@openzeppelin/contracts-mcp 0.6.1 → 0.6.3

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.
@@ -1,20 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width,initial-scale=1" />
6
- <title>OpenZeppelin cairo-vesting</title>
7
- <style>
8
- /* Do not use height:100% — MCP Apps autoResize measures with max-content and
9
- percentage heights collapse to ~0, which shrinks the host iframe over time. */
10
- html, body { margin: 0; padding: 0; background: #f9fafb; }
11
- body { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; min-height: 560px; }
12
- </style>
13
- </head>
14
- <body>
15
- <script>
16
- !function(){"use strict";var e=[],t=[];!function(n,o){if(n&&"undefined"!=typeof document){var r,i=!0===o.prepend?"prepend":"append",a=!0===o.singleTag,s="string"==typeof o.container?document.querySelector(o.container):document.getElementsByTagName("head")[0];if(a){var c=e.indexOf(s);-1===c&&(c=e.push(s)-1,t[c]={}),r=t[c]&&t[c][i]?t[c][i]:t[c][i]=l()}else r=l();65279===n.charCodeAt(0)&&(n=n.substring(1)),r.styleSheet?r.styleSheet.cssText+=n:r.appendChild(document.createTextNode(n))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),o.attributes)for(var t=Object.keys(o.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],o.attributes[t[n]]);var r="prepend"===i?"afterbegin":"beforeend";return s.insertAdjacentElement(r,e),e}}("pre code.hljs {\n display: block;\n overflow-x: auto;\n padding: 1em\n}\ncode.hljs {\n padding: 3px 5px\n}\n/*\n\nAtom One Dark by Daniel Gamage\nOriginal One Dark Syntax theme from https://github.com/atom/one-dark-syntax\n\nbase: #282c34\nmono-1: #abb2bf\nmono-2: #818896\nmono-3: #5c6370\nhue-1: #56b6c2\nhue-2: #61aeee\nhue-3: #c678dd\nhue-4: #98c379\nhue-5: #e06c75\nhue-5-2: #be5046\nhue-6: #d19a66\nhue-6-2: #e6c07b\n\n*/\n.hljs {\n color: #abb2bf;\n background: #282c34\n}\n.hljs-comment,\n.hljs-quote {\n color: #5c6370;\n font-style: italic\n}\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n color: #c678dd\n}\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n color: #e06c75\n}\n.hljs-literal {\n color: #56b6c2\n}\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta .hljs-string {\n color: #98c379\n}\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n color: #d19a66\n}\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n color: #61aeee\n}\n.hljs-built_in,\n.hljs-title.class_,\n.hljs-class .hljs-title {\n color: #e6c07b\n}\n.hljs-emphasis {\n font-style: italic\n}\n.hljs-strong {\n font-weight: bold\n}\n.hljs-link {\n text-decoration: underline\n}\n\n.visible {\n visibility: visible\n}\n\n.collapse {\n visibility: collapse\n}\n\n.static {\n position: static\n}\n\n.absolute {\n position: absolute\n}\n\n.relative {\n position: relative\n}\n\n.bottom-1 {\n bottom: 0.25rem\n}\n\n.bottom-4 {\n bottom: 1rem\n}\n\n.bottom-8 {\n bottom: 2rem\n}\n\n.bottom-\\[3\\.75rem\\] {\n bottom: 3.75rem\n}\n\n.left-4 {\n left: 1rem\n}\n\n.right-0 {\n right: 0px\n}\n\n.right-4 {\n right: 1rem\n}\n\n.right-8 {\n right: 2rem\n}\n\n.z-20 {\n z-index: 20\n}\n\n.z-50 {\n z-index: 50\n}\n\n.m-0 {\n margin: 0px\n}\n\n.m-\\[2px\\] {\n margin: 2px\n}\n\n.mr-2 {\n margin-right: 0.5rem\n}\n\n.block {\n display: block\n}\n\n.flex {\n display: flex\n}\n\n.grid {\n display: grid\n}\n\n.contents {\n display: contents\n}\n\n.hidden {\n display: none\n}\n\n.h-10 {\n height: 2.5rem\n}\n\n.h-14 {\n height: 3.5rem\n}\n\n.h-32 {\n height: 8rem\n}\n\n.h-6 {\n height: 1.5rem\n}\n\n.h-\\[32px\\] {\n height: 32px\n}\n\n.h-\\[36px\\] {\n height: 36px\n}\n\n.h-\\[calc\\(100\\%-188px\\)\\] {\n height: calc(100% - 188px)\n}\n\n.h-\\[calc\\(100\\%-800px\\)\\] {\n height: calc(100% - 800px)\n}\n\n.h-\\[calc\\(100vh-84px\\)\\] {\n height: calc(100vh - 84px)\n}\n\n.h-full {\n height: 100%\n}\n\n.max-h-full {\n max-height: 100%\n}\n\n.min-h-0 {\n min-height: 0px\n}\n\n.min-h-\\[200px\\] {\n min-height: 200px\n}\n\n.w-10 {\n width: 2.5rem\n}\n\n.w-32 {\n width: 8rem\n}\n\n.w-6 {\n width: 1.5rem\n}\n\n.w-60 {\n width: 15rem\n}\n\n.w-72 {\n width: 18rem\n}\n\n.w-80 {\n width: 20rem\n}\n\n.w-\\[32px\\] {\n width: 32px\n}\n\n.w-\\[36px\\] {\n width: 36px\n}\n\n.w-\\[40rem\\] {\n width: 40rem\n}\n\n.w-full {\n width: 100%\n}\n\n.min-w-0 {\n min-width: 0px\n}\n\n.min-w-72 {\n min-width: 18rem\n}\n\n.min-w-\\[14rem\\] {\n min-width: 14rem\n}\n\n.min-w-\\[40px\\] {\n min-width: 40px\n}\n\n.max-w-\\[400px\\] {\n max-width: 400px\n}\n\n.max-w-\\[42\\%\\] {\n max-width: 42%\n}\n\n.max-w-\\[calc\\(100vw-420px\\)\\] {\n max-width: calc(100vw - 420px)\n}\n\n.flex-1 {\n flex: 1 1 0%\n}\n\n.flex-none {\n flex: none\n}\n\n.shrink-0 {\n flex-shrink: 0\n}\n\n.grow {\n flex-grow: 1\n}\n\n.basis-0 {\n flex-basis: 0px\n}\n\n.rotate-45 {\n --tw-rotate: 45deg;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))\n}\n\n@keyframes fade-in {\n 0% {\n opacity: 0\n }\n 100% {\n opacity: 1\n }\n}\n\n.animate-fade-in {\n animation: fade-in 0.3s ease-out\n}\n\n@keyframes fade-up {\n 0% {\n opacity: 0;\n transform: translateY(1rem)\n }\n 100% {\n opacity: 1;\n transform: translateY(0)\n }\n}\n\n.animate-fade-up {\n animation: fade-up 0.2s ease-out\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg)\n }\n}\n\n.animate-spin-slow {\n animation: spin 2s linear infinite\n}\n\n.cursor-pointer {\n cursor: pointer\n}\n\n.resize-none {\n resize: none\n}\n\n.resize-x {\n resize: horizontal\n}\n\n.resize {\n resize: both\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr))\n}\n\n.grid-cols-\\[2fr\\2c 1fr\\] {\n grid-template-columns: 2fr 1fr\n}\n\n.flex-row {\n flex-direction: row\n}\n\n.flex-col {\n flex-direction: column\n}\n\n.flex-col-reverse {\n flex-direction: column-reverse\n}\n\n.flex-wrap {\n flex-wrap: wrap\n}\n\n.items-center {\n align-items: center\n}\n\n.justify-center {\n justify-content: center\n}\n\n.justify-between {\n justify-content: space-between\n}\n\n.gap-2 {\n gap: 0.5rem\n}\n\n.gap-3 {\n gap: 0.75rem\n}\n\n.gap-4 {\n gap: 1rem\n}\n\n.overflow-auto {\n overflow: auto\n}\n\n.overflow-hidden {\n overflow: hidden\n}\n\n.overflow-x-auto {\n overflow-x: auto\n}\n\n.overflow-y-auto {\n overflow-y: auto\n}\n\n.whitespace-nowrap {\n white-space: nowrap\n}\n\n.rounded-3xl {\n border-radius: 1.5rem\n}\n\n.rounded-full {\n border-radius: 9999px\n}\n\n.rounded-md {\n border-radius: 0.375rem\n}\n\n.rounded-xl {\n border-radius: 0.75rem\n}\n\n.rounded-l-3xl {\n border-top-left-radius: 1.5rem;\n border-bottom-left-radius: 1.5rem\n}\n\n.rounded-r-3xl {\n border-top-right-radius: 1.5rem;\n border-bottom-right-radius: 1.5rem\n}\n\n.border {\n border-width: 1px\n}\n\n.border-0 {\n border-width: 0px\n}\n\n.border-b {\n border-bottom-width: 1px\n}\n\n.border-r {\n border-right-width: 1px\n}\n\n.border-solid {\n border-style: solid\n}\n\n.border-none {\n border-style: none\n}\n\n.border-\\[var\\(--gray-3\\)\\] {\n border-color: var(--gray-3)\n}\n\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity, 1))\n}\n\n.bg-\\[\\#3d3b5d\\] {\n --tw-bg-opacity: 1;\n background-color: rgb(61 59 93 / var(--tw-bg-opacity, 1))\n}\n\n.bg-blue-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(219 234 254 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1))\n}\n\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1))\n}\n\n.bg-transparent {\n background-color: transparent\n}\n\n.p-2 {\n padding: 0.5rem\n}\n\n.p-3 {\n padding: 0.75rem\n}\n\n.p-4 {\n padding: 1rem\n}\n\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem\n}\n\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem\n}\n\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem\n}\n\n.py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem\n}\n\n.pr-2 {\n padding-right: 0.5rem\n}\n\n.text-center {\n text-align: center\n}\n\n.text-right {\n text-align: right\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n\n.font-bold {\n font-weight: 700\n}\n\n.font-medium {\n font-weight: 500\n}\n\n.italic {\n font-style: italic\n}\n\n.leading-tight {\n line-height: 1.25\n}\n\n.text-blue-600 {\n --tw-text-opacity: 1;\n color: rgb(37 99 235 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-50 {\n --tw-text-opacity: 1;\n color: rgb(249 250 251 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity, 1))\n}\n\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity, 1))\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}\n\n.underline {\n text-decoration-line: underline\n}\n\n.no-underline {\n text-decoration-line: none\n}\n\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px\n}\n\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)\n}\n\n*,\n*:before,\n*:after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nhtml {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n}\n\ncode {\n font-family: var(--monospace);\n font-size: 1em;\n}\n\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n}\n:root {\n --sans-serif: system-ui, sans-serif;\n --monospace: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;\n\n /* Colors */\n\n --text-color: #333333;\n\n --gray-1: #f9fafb;\n --gray-2: #eff1f3;\n --gray-3: #d8dbe2;\n --gray-4: #818998;\n --gray-5: #575c66;\n --gray-6: #2c374b;\n\n --blue-1: #f5f6ff;\n --blue-2: #4e5de4;\n --blue-3: #343f9d;\n\n --yellow-1: #fffaeb;\n --yellow-2: #ffcc33;\n --yellow-3: #b27700;\n\n --red-1: #feecec;\n --red-2: #f53d3d;\n --red-3: #aa0909;\n\n --solidity-blue-1: #51d4ff;\n --solidity-blue-2: #4e5de4;\n\n --cairo-orange: #fe4a3c;\n\n --polkadot-pink: #ff2670;\n\n --stylus-pink: #e3066e;\n\n --stellar-black: #0f0f0f;\n\n --confidential-black: #000000;\n --confidential-yellow: #ffd208;\n\n --uniswap-pink: #f50eb4;\n\n /* Dimensions (scale taken from Tailwind) */\n\n --size-1: 0.25rem;\n --size-2: 0.5rem;\n --size-3: 0.75rem;\n --size-4: 1rem;\n --size-8: 2rem;\n --size-64: 16rem;\n\n /* Font Sizes */\n\n --text-small: 0.875rem;\n\n /* Utilities */\n\n --shadow: 0 2px 3px rgba(0, 0, 0, 0.1);\n\n --icon-adjust: 0.125em;\n}\n.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n[data-tippy-root]{max-width:calc(100vw - 10px)}\n.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n.tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n.tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n.tippy-arrow{width:16px;height:16px;color:#333}\n.tippy-arrow:before{content:\"\";position:absolute;border-color:transparent;border-style:solid}\n.tippy-content{position:relative;padding:5px 9px;z-index:1}\n.tippy-box[data-theme~=material]{background-color:#505355;font-weight:600}\n.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}\n.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}\n.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}\n:root {\n --tippy-background: #333;\n --tippy-text: var(--gray-3);\n --tippy-border: rgba(0, 8, 16, 0.15);\n}\n.tippy-box[data-theme~='light'] {\n --tippy-background: #fffffff5;\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-yellow'] {\n --tippy-background: var(--yellow-1);\n --tippy-text: #333;\n}\n.tippy-box[data-theme~='light-red'] {\n --tippy-background: var(--red-1);\n --tippy-text: #333;\n}\n.tippy-box {\n background-color: var(--tippy-background);\n background-clip: padding-box;\n color: var(--tippy-text);\n box-shadow: var(--shadow);\n font-weight: initial;\n font-variant: initial;\n text-transform: none;\n}\n.tippy-box[data-theme~='border'] {\n border: 1px solid var(--tippy-border);\n}\n.tippy-box > .tippy-backdrop {\n background-color: var(--tippy-background);\n}\n.tippy-box[data-theme~='border'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n z-index: -1;\n border-color: transparent;\n border-style: solid;\n}\n.tippy-box[data-placement^='top'] > .tippy-arrow:before {\n border-top-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {\n border-bottom-color: var(--tippy-background);\n bottom: 16px;\n}\n.tippy-box[data-placement^='left'] > .tippy-arrow:before {\n border-left-color: var(--tippy-background);\n}\n.tippy-box[data-placement^='right'] > .tippy-arrow:before {\n border-right-color: var(--tippy-background);\n right: 16px;\n}\n.tippy-box[data-theme~='border'][data-placement^='top'] > .tippy-arrow:after {\n border-top-color: var(--tippy-border);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='bottom'] > .tippy-arrow:after {\n border-bottom-color: var(--tippy-border);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='left'] > .tippy-arrow:after {\n border-left-color: var(--tippy-border);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px;\n}\n.tippy-box[data-theme~='border'][data-placement^='right'] > .tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: var(--tippy-border);\n}\n.container {\n background-color: var(--gray-1);\n min-width: 32rem;\n}\n.header {\n font-size: var(--text-small);\n}\n.tab {\n color: var(--gray-5);\n}\n.tab button:hover,\n.overflow-btn:hover {\n background-color: var(--gray-2);\n}\n/* Global .overflow-menu button with .selected class */\n.overflow-menu button.selected {\n order: unset;\n}\n.tab button,\n.overflow-btn {\n border: 0;\n background-color: transparent;\n padding: var(--size-2) var(--size-4);\n border-radius: 20px;\n cursor: pointer;\n transition: background-color ease-in-out 0.2s;\n}\n/* Global .action-button */\n.action-button {\n padding: 7px;\n border-radius: 20px;\n transition: background-color ease-in-out 0.2s;\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n color: var(--gray-6);\n cursor: pointer;\n}\n/* Hover and active states for .action-button */\n.action-button:hover {\n background-color: var(--gray-2);\n}\n.action-button:active,\n.action-button.active {\n background-color: var(--gray-2);\n}\n/* .icon inside .action-button */\n.action-button .icon {\n margin: 0 var(--size-1);\n}\n/* Disabled state */\n.action-button.disabled {\n color: var(--gray-4);\n}\n/* Button with text */\n.with-text {\n padding-right: var(--size-3);\n}\n/* Controls container */\n.controls {\n background-color: white;\n padding: var(--size-4);\n}\n/* Controls footer */\n.controls-footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n color: var(--gray-5);\n margin-top: var(--size-3);\n padding: 0 var(--size-2);\n font-size: var(--text-small);\n}\n/* Apply left margin to every element after the first child */\n.controls-footer > * + * {\n margin-left: var(--size-3);\n}\n/* .icon inside .controls-footer */\n.controls-footer .icon {\n margin-right: 0.2em;\n opacity: 0.8;\n}\n/* Links inside .controls-footer */\n.controls-footer a {\n color: inherit;\n text-decoration: none;\n}\n/* Hover effect for links */\n.controls-footer a:hover {\n color: var(--text-color);\n}\n.download-option-content {\n margin-left: var(--size-3);\n font-size: var(--text-small);\n}\n.download-option-content > :first-child {\n margin-bottom: var(--size-2);\n color: var(--gray-6);\n font-weight: bold;\n}\n.download-option-content > :not(:first-child) {\n margin-top: var(--size-1);\n color: var(--gray-5);\n}\n.download-option {\n display: flex;\n padding: var(--size-2);\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 4px;\n cursor: pointer;\n}\n/* The .icon inside .download-option */\n.download-option :global(.icon) {\n margin-top: var(--icon-adjust);\n}\n/* When the previous sibling is not hovered */\n:not(:hover) + .download-option {\n border-top: 1px solid var(--gray-2);\n}\n/* Hover and focus states */\n.download-option:hover,\n.download-option:focus {\n background-color: var(--gray-1);\n border: 1px solid var(--gray-3);\n}\n/* Direct or nested div inside .download-option */\n.download-option div {\n display: block;\n}\n\n/* General */\n\nbody {\n color: var(--text-color);\n font-family: var(--sans-serif);\n}\n\nsvg.vertical-align {\n vertical-align: calc(-1 * var(--icon-adjust));\n}\n\nsvg.keepcolor {\n fill: currentColor;\n}\n\nsvg.icon {\n vertical-align: calc(-1 * var(--icon-adjust));\n flex: 0 0 auto;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\ninput:not([type]),\ninput[type='text'],\ninput[type='number'],\ninput[type='datetime-local'] {\n border: 1px solid var(--gray-3);\n padding: var(--size-2) var(--size-3);\n border-radius: 6px;\n}\n\n/* Hide up and down arrows in numeric input fields */\n\ninput[type='number']::-webkit-outer-spin-button,\ninput[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput[type='number'] {\n -moz-appearance: textfield;\n -webkit-appearance: textfield;\n appearance: textfield;\n}\n\n/* Components */\n\n.controls-section {\n display: flex;\n flex-direction: column;\n}\n\n.controls-section + .controls-section {\n margin-top: var(--size-4);\n padding-top: var(--size-4);\n border-top: 1px solid var(--gray-3);\n }\n\n.controls-section > * + * {\n margin-top: var(--size-3);\n }\n\n.controls-section h1 {\n margin-top: 0;\n margin-bottom: 0;\n text-transform: lowercase;\n font-variant: small-caps;\n font-size: var(--text-small);\n color: var(--gray-4);\n font-weight: 600;\n }\n\n.subcontrol::before {\n content: '└';\n color: var(--gray-3);\n}\n\n.checkbox-group {\n display: flex;\n flex-direction: column;\n}\n\n.checkbox-group > * {\n display: flex;\n align-items: center;\n padding: var(--size-2);\n }\n\n.checkbox-group input {\n margin-right: var(--size-2);\n }\n\n.checkbox-group .tooltip {\n margin-left: auto;\n }\n\n.checkbox-group .checked {\n background-color: var(--blue-1);\n }\n\n.labeled-input {\n display: flex;\n flex-direction: column;\n}\n\n.labeled-input > span {\n font-size: var(--text-small);\n }\n\n.labeled-input > input {\n margin-top: var(--size-1);\n width: 100%;\n }\n\n.tooltip-container,\n.checkbox-group > *,\n.labeled-input {\n --tooltip-opacity: 0.15;\n}\n\n.tooltip-container:hover, .checkbox-group > *:hover, .labeled-input:hover {\n --tooltip-opacity: 0.5;\n }\n\ninput.input-inline {\n padding: 0.25em;\n height: 1.5em;\n width: 2em;\n max-width: 100%;\n text-align: center;\n}\n\n.has-error {\n box-shadow: 0 0 var(--size-1) var(--red-2);\n}\n\n.import-link {\n color: inherit;\n}\n\n.comment-link {\n color: #7d828d;\n}\n\n.glimmery {\n background: conic-gradient(rgb(196, 181, 253), rgb(110, 231, 183), rgb(249, 168, 212));\n}\n\n.hljs.-solidity {\n background: linear-gradient(30deg, #151a24, #2b323e);\n}\n\n.hljs.-cairo {\n background: linear-gradient(30deg, #191717, #2a0f0f);\n}\n\n.hljs.-stylus {\n background: linear-gradient(30deg, #181215, #360c1f);\n}\n\n.light-link {\n color: white;\n}\n\n.hover\\:bg-\\[\\#4a4872\\]:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(74 72 114 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:bg-white:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1))\n}\n\n.hover\\:underline:hover {\n text-decoration-line: underline\n}\n",{});const n=Object.freeze({status:"aborted"});function o(e,t,n){function o(n,o){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:o,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,o);const r=a.prototype,i=Object.keys(r);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=r[t].bind(n))}}const r=n?.Parent??Object;class i extends r{}function a(e){var t;const r=n?.Parent?new i:this;o(r,e),(t=r._zod).deferred??(t.deferred=[]);for(const e of r._zod.deferred)e();return r}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const r=Symbol("zod_brand");class i extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const s={};function c(e){return e&&Object.assign(s,e),s}function l(e){const t=Object.values(e).filter(e=>"number"==typeof e),n=Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t);return n}function u(e,t="|"){return e.map(e=>D(e)).join(t)}function d(e,t){return"bigint"==typeof t?t.toString():t}function p(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function m(e){return null==e}function f(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function g(e,t){const n=(e.toString().split(".")[1]||"").length,o=t.toString();let r=(o.split(".")[1]||"").length;if(0===r&&/\d?e-\d?/.test(o)){const e=o.match(/\d?e-(\d?)/);e?.[1]&&(r=Number.parseInt(e[1]))}const i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}const h=Symbol("evaluating");function v(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==h)return void 0===o&&(o=h,o=n()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function y(e){return JSON.stringify(e)}function _(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const x="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function w(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const k=p(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function I(e){if(!1===w(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==w(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function S(e){return I(e)?{...e}:Array.isArray(e)?[...e]:e}const C=new Set(["string","number","symbol"]),E=new Set(["string","number","bigint","boolean","symbol","undefined"]);function z(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(e,t,n){const o=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(o._zod.parent=e),o}function O(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function D(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function U(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const N={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},A={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function j(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return T(e,$(e._zod.def,{get shape(){const e={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(e[o]=n.shape[o])}return b(this,"shape",e),e},checks:[]}))}function R(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=$(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete o[e]}return b(this,"shape",o),o},checks:[]});return T(e,r)}function P(e,t){if(!I(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,o)}function Z(e,t){if(!I(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return b(this,"shape",n),n}});return T(e,n)}function M(e,t){const n=$(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return b(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return T(e,n)}function L(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=e?new e({type:"optional",innerType:o[t]}):o[t])}else for(const t in o)r[t]=e?new e({type:"optional",innerType:o[t]}):o[t];return b(this,"shape",r),r},checks:[]});return T(t,r)}function q(e,t,n){const o=$(t._zod.def,{get shape(){const o=t._zod.def.shape,r={...o};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(r[t]=new e({type:"nonoptional",innerType:o[t]}))}else for(const t in o)r[t]=new e({type:"nonoptional",innerType:o[t]});return b(this,"shape",r),r}});return T(t,o)}function V(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function F(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function H(e){return"string"==typeof e?e:e?.message}function J(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const r=H(e.inst?._zod.def?.error?.(e))??H(t?.error?.(e))??H(n.customError?.(e))??H(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function G(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function B(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function W(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(null===e)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return t}function K(...e){const[t,n,o]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:o}:{...t}}function X(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Q(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Y=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:A,Class:class{constructor(...e){}},NUMBER_FORMAT_RANGES:N,aborted:V,allowsEval:k,assert:function(e){},assertEqual:function(e){return e},assertIs:function(e){},assertNever:function(e){throw new Error("Unexpected value in exhaustive check")},assertNotEqual:function(e){return e},assignProp:b,base64ToUint8Array:X,base64urlToUint8Array:function(e){const t=e.replace(/-/g,"+").replace(/_/g,"/");return X(t+"=".repeat((4-t.length%4)%4))},cached:p,captureStackTrace:x,cleanEnum:function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},cleanRegex:f,clone:T,cloneDef:function(e){return $(e._zod.def)},createTransparentProxy:function(e){let t;return new Proxy({},{get:(n,o,r)=>(t??(t=e()),Reflect.get(t,o,r)),set:(n,o,r,i)=>(t??(t=e()),Reflect.set(t,o,r,i)),has:(n,o)=>(t??(t=e()),Reflect.has(t,o)),deleteProperty:(n,o)=>(t??(t=e()),Reflect.deleteProperty(t,o)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,o)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)),defineProperty:(n,o,r)=>(t??(t=e()),Reflect.defineProperty(t,o,r))})},defineLazy:v,esc:y,escapeRegex:z,extend:P,finalizeIssue:J,floatSafeRemainder:g,getElementAtPath:function(e,t){return t?t.reduce((e,t)=>e?.[t],e):e},getEnumValues:l,getLengthableOrigin:B,getParsedType:e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},getSizableOrigin:G,hexToUint8Array:function(e){const t=e.replace(/^0x/,"");if(t.length%2!=0)throw new Error("Invalid hex string length");const n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n},isObject:w,isPlainObject:I,issue:K,joinValues:u,jsonStringifyReplacer:d,merge:M,mergeDefs:$,normalizeParams:O,nullish:m,numKeys:function(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t},objectClone:function(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))},omit:R,optionalKeys:U,parsedType:W,partial:L,pick:j,prefixIssues:F,primitiveTypes:E,promiseAllObject:function(e){const t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{const n={};for(let o=0;o<t.length;o++)n[t[o]]=e[o];return n})},propertyKeyTypes:C,randomString:function(e=10){const t="abcdefghijklmnopqrstuvwxyz";let n="";for(let o=0;o<e;o++)n+=t[Math.floor(26*Math.random())];return n},required:q,safeExtend:Z,shallowClone:S,slugify:_,stringifyPrimitive:D,uint8ArrayToBase64:Q,uint8ArrayToBase64url:function(e){return Q(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},uint8ArrayToHex:function(e){return Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("")},unwrapMessage:H});const ee=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,d,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},te=o("$ZodError",ee),ne=o("$ZodError",ee,{Parent:Error});function oe(e,t=e=>e.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function re(e,t=e=>e.message){const n={_errors:[]},o=e=>{for(const r of e.issues)if("invalid_union"===r.code&&r.errors.length)r.errors.map(e=>o({issues:e}));else if("invalid_key"===r.code)o({issues:r.issues});else if("invalid_element"===r.code)o({issues:r.issues});else if(0===r.path.length)n._errors.push(t(r));else{let e=n,o=0;for(;o<r.path.length;){const n=r.path[o];o===r.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(r))):e[n]=e[n]||{_errors:[]},e=e[n],o++}}};return o(e),n}function ie(e,t=e=>e.message){const n={errors:[]},o=(e,r=[])=>{var i,a;for(const s of e.issues)if("invalid_union"===s.code&&s.errors.length)s.errors.map(e=>o({issues:e},s.path));else if("invalid_key"===s.code)o({issues:s.issues},s.path);else if("invalid_element"===s.code)o({issues:s.issues},s.path);else{const e=[...r,...s.path];if(0===e.length){n.errors.push(t(s));continue}let o=n,c=0;for(;c<e.length;){const n=e[c],r=c===e.length-1;"string"==typeof n?(o.properties??(o.properties={}),(i=o.properties)[n]??(i[n]={errors:[]}),o=o.properties[n]):(o.items??(o.items=[]),(a=o.items)[n]??(a[n]={errors:[]}),o=o.items[n]),r&&o.errors.push(t(s)),c++}}};return o(e),n}function ae(e){const t=[],n=e.map(e=>"object"==typeof e?e.key:e);for(const e of n)"number"==typeof e?t.push(`[${e}]`):"symbol"==typeof e?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push("."),t.push(e));return t.join("")}function se(e){const t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(const e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ae(e.path)}`);return t.join("\n")}const ce=e=>(t,n,o,r)=>{const a=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new i;if(s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>J(e,a,c())));throw x(t,r?.callee),t}return s.value},le=ce(ne),ue=e=>async(t,n,o,r)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(r?.Err??e)(a.issues.map(e=>J(e,i,c())));throw x(t,r?.callee),t}return a.value},de=ue(ne),pe=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new i;return a.issues.length?{success:!1,error:new(e??te)(a.issues.map(e=>J(e,r,c())))}:{success:!0,data:a.value}},me=pe(ne),fe=e=>async(t,n,o)=>{const r=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>J(e,r,c())))}:{success:!0,data:i.value}},ge=fe(ne),he=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ce(e)(t,n,r)},ve=he(ne),be=e=>(t,n,o)=>ce(e)(t,n,o),$e=be(ne),ye=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ue(e)(t,n,r)},_e=ye(ne),xe=e=>async(t,n,o)=>ue(e)(t,n,o),we=xe(ne),ke=e=>(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return pe(e)(t,n,r)},Ie=ke(ne),Se=e=>(t,n,o)=>pe(e)(t,n,o),Ce=Se(ne),Ee=e=>async(t,n,o)=>{const r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fe(e)(t,n,r)},ze=Ee(ne),Te=e=>async(t,n,o)=>fe(e)(t,n,o),Oe=Te(ne),De=/^[cC][^\s-]{8,}$/,Ue=/^[0-9a-z]+$/,Ne=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ae=/^[0-9a-vA-V]{20}$/,je=/^[A-Za-z0-9]{27}$/,Re=/^[a-zA-Z0-9_-]{21}$/,Pe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ze=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Me=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Le=Me(4),qe=Me(6),Ve=Me(7),Fe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,He=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Je=He;function Ge(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}const Be=/^(?:(?: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])$/,We=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ke=e=>{const t=z(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Xe=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ye=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,nt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ot=/^\+[1-9]\d{6,14}$/,rt="(?:(?:\\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])))",it=new RegExp(`^${rt}$`);function at(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function st(e){return new RegExp(`^${at(e)}$`)}function ct(e){const t=at({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${rt}T(?:${o})$`)}const lt=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),ut=/^-?\d+n?$/,dt=/^-?\d+$/,pt=/^-?\d+(?:\.\d+)?$/,mt=/^(?:true|false)$/i,ft=/^null$/i,gt=/^undefined$/i,ht=/^[^A-Z]*$/,vt=/^[^a-z]*$/,bt=/^[0-9a-fA-F]*$/;function $t(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function yt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const _t=$t(22,"=="),xt=yt(22),wt=$t(27,"="),kt=yt(27),It=$t(43,"="),St=yt(43),Ct=$t(64,""),Et=yt(64),zt=$t(86,"=="),Tt=yt(86);var Ot=Object.freeze({__proto__:null,base64:Ye,base64url:et,bigint:ut,boolean:mt,browserEmail:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cidrv4:Xe,cidrv6:Qe,cuid:De,cuid2:Ue,date:it,datetime:ct,domain:nt,duration:Pe,e164:ot,email:Fe,emoji:Ge,extendedDuration:/^[-+]?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)?)??$/,guid:Ze,hex:bt,hostname:tt,html5Email:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,idnEmail:Je,integer:dt,ipv4:Be,ipv6:We,ksuid:je,lowercase:ht,mac:Ke,md5_base64:_t,md5_base64url:xt,md5_hex:/^[0-9a-fA-F]{32}$/,nanoid:Re,null:ft,number:pt,rfc5322Email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,sha1_base64:wt,sha1_base64url:kt,sha1_hex:/^[0-9a-fA-F]{40}$/,sha256_base64:It,sha256_base64url:St,sha256_hex:/^[0-9a-fA-F]{64}$/,sha384_base64:Ct,sha384_base64url:Et,sha384_hex:/^[0-9a-fA-F]{96}$/,sha512_base64:zt,sha512_base64url:Tt,sha512_hex:/^[0-9a-fA-F]{128}$/,string:lt,time:st,ulid:Ne,undefined:gt,unicodeEmail:He,uppercase:vt,uuid:Me,uuid4:Le,uuid6:qe,uuid7:Ve,xid:Ae});const Dt=o("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ut={number:"number",bigint:"bigint",object:"date"},Nt=o("$ZodCheckLessThan",(e,t)=>{Dt.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),At=o("$ZodCheckGreaterThan",(e,t)=>{Dt.init(e,t);const n=Ut[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jt=o("$ZodCheckMultipleOf",(e,t)=>{Dt.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===g(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Rt=o("$ZodCheckNumberFormat",(e,t)=>{Dt.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[r,i]=N[t.format];e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i,n&&(o.pattern=dt)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}))}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Pt=o("$ZodCheckBigIntFormat",(e,t)=>{Dt.init(e,t);const[n,o]=A[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=n,r.maximum=o}),e._zod.check=r=>{const i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Zt=o("$ZodCheckMaxSize",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;o.size<=t.maximum||n.issues.push({origin:G(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Mt=o("$ZodCheckMinSize",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;o.size>=t.minimum||n.issues.push({origin:G(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Lt=o("$ZodCheckSizeEquals",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{const o=n.value,r=o.size;if(r===t.size)return;const i=r>t.size;n.issues.push({origin:G(o),...i?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),qt=o("$ZodCheckMaxLength",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const r=B(o);n.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vt=o("$ZodCheckMinLength",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const r=B(o);n.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ft=o("$ZodCheckLengthEquals",(e,t)=>{var n;Dt.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!m(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const o=n.value,r=o.length;if(r===t.length)return;const i=B(o),a=r>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ht=o("$ZodCheckStringFormat",(e,t)=>{var n,o;Dt.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Jt=o("$ZodCheckRegex",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gt=o("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ht),Ht.init(e,t)}),Bt=o("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vt),Ht.init(e,t)}),Wt=o("$ZodCheckIncludes",(e,t)=>{Dt.init(e,t);const n=z(t.includes),o=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kt=o("$ZodCheckStartsWith",(e,t)=>{Dt.init(e,t);const n=new RegExp(`^${z(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Xt=o("$ZodCheckEndsWith",(e,t)=>{Dt.init(e,t);const n=new RegExp(`.*${z(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function Qt(e,t,n){e.issues.length&&t.issues.push(...F(n,e.issues))}const Yt=o("$ZodCheckProperty",(e,t)=>{Dt.init(e,t),e._zod.check=e=>{const n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Qt(n,e,t.property));Qt(n,e,t.property)}}),en=o("$ZodCheckMimeType",(e,t)=>{Dt.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),tn=o("$ZodCheckOverwrite",(e,t)=>{Dt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class nn{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),o=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of o)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const on={major:4,minor:3,patch:6},rn=o("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=on;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let o,r=V(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const t=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new i;if(o||s instanceof Promise)o=(o??Promise.resolve()).then(async()=>{await s;e.issues.length!==t&&(r||(r=V(e,t)))});else{if(e.issues.length===t)continue;r||(r=V(e,t))}}return o?o.then(()=>e):e},n=(n,r,a)=>{if(V(n))return n.aborted=!0,n;const s=t(r,o,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(t=>e._zod.parse(t,a))}return e._zod.parse(s,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if("backward"===a.direction){const t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}const s=e._zod.parse(r,a);if(s instanceof Promise){if(!1===a.async)throw new i;return s.then(e=>t(e,o,a))}return t(s,o,a)}}v(e,"~standard",()=>({validate:t=>{try{const n=me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return ge(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),an=o("$ZodString",(e,t)=>{rn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??lt(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),sn=o("$ZodStringFormat",(e,t)=>{Ht.init(e,t),an.init(e,t)}),cn=o("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ze),sn.init(e,t)}),ln=o("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Me(e))}else t.pattern??(t.pattern=Me());sn.init(e,t)}),un=o("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fe),sn.init(e,t)}),dn=o("$ZodURL",(e,t)=>{sn.init(e,t),e._zod.check=n=>{try{const o=n.value.trim(),r=new URL(o);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=r.href:n.value=o)}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),pn=o("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ge()),sn.init(e,t)}),mn=o("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Re),sn.init(e,t)}),fn=o("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=De),sn.init(e,t)}),gn=o("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ue),sn.init(e,t)}),hn=o("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ne),sn.init(e,t)}),vn=o("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ae),sn.init(e,t)}),bn=o("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=je),sn.init(e,t)}),$n=o("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ct(t)),sn.init(e,t)}),yn=o("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=it),sn.init(e,t)}),_n=o("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=st(t)),sn.init(e,t)}),xn=o("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Pe),sn.init(e,t)}),wn=o("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Be),sn.init(e,t),e._zod.bag.format="ipv4"}),kn=o("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=We),sn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),In=o("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ke(t.delimiter)),sn.init(e,t),e._zod.bag.format="mac"}),Sn=o("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xe),sn.init(e,t)}),Cn=o("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Qe),sn.init(e,t),e._zod.check=n=>{const o=n.value.split("/");try{if(2!==o.length)throw new Error;const[e,t]=o;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function En(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zn=o("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ye),sn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{En(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Tn(e){if(!et.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return En(t.padEnd(4*Math.ceil(t.length/4),"="))}const On=o("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=et),sn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Tn(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Dn=o("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ot),sn.init(e,t)});function Un(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[o]=n;if(!o)return!1;const r=JSON.parse(atob(o));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const Nn=o("$ZodJWT",(e,t)=>{sn.init(e,t),e._zod.check=n=>{Un(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),An=o("$ZodCustomStringFormat",(e,t)=>{sn.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),jn=o("$ZodNumber",(e,t)=>{rn.init(e,t),e._zod.pattern=e._zod.bag.pattern??pt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const r=n.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return n;const i="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Rn=o("$ZodNumberFormat",(e,t)=>{Rt.init(e,t),jn.init(e,t)}),Pn=o("$ZodBoolean",(e,t)=>{rn.init(e,t),e._zod.pattern=mt,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const r=n.value;return"boolean"==typeof r||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Zn=o("$ZodBigInt",(e,t)=>{rn.init(e,t),e._zod.pattern=ut,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(e){}return"bigint"==typeof n.value||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Mn=o("$ZodBigIntFormat",(e,t)=>{Pt.init(e,t),Zn.init(e,t)}),Ln=o("$ZodSymbol",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return"symbol"==typeof o||t.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),t}}),qn=o("$ZodUndefined",(e,t)=>{rn.init(e,t),e._zod.pattern=gt,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),t}}),Vn=o("$ZodNull",(e,t)=>{rn.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{const o=t.value;return null===o||t.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),t}}),Fn=o("$ZodAny",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Hn=o("$ZodUnknown",(e,t)=>{rn.init(e,t),e._zod.parse=e=>e}),Jn=o("$ZodNever",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),Gn=o("$ZodVoid",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return void 0===o||t.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),t}}),Bn=o("$ZodDate",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function Wn(e,t,n){e.issues.length&&t.issues.push(...F(n,e.issues)),t.value[n]=e.value}const Kn=o("$ZodArray",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);const i=[];for(let e=0;e<r.length;e++){const a=r[e],s=t.element._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(t=>Wn(t,n,e))):Wn(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function Xn(e,t,n,o,r){if(e.issues.length){if(r&&!(n in o))return;t.issues.push(...F(n,e.issues))}void 0===e.value?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function Qn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=U(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yn(e,t,n,o,r,i){const a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type,u="optional"===c.optout;for(const r in t){if(s.has(r))continue;if("never"===l){a.push(r);continue}const i=c.run({value:t[r],issues:[]},o);i instanceof Promise?e.push(i.then(e=>Xn(e,n,r,t,u))):Xn(i,n,r,t,u)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const eo=o("$ZodObject",(e,t)=>{rn.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!n?.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const o=p(()=>Qn(t));v(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){n[t]??(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n});const r=w,i=t.catchall;let a;e._zod.parse=(t,n)=>{a??(a=o.value);const s=t.value;if(!r(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const c=[],l=a.shape;for(const e of a.keys){const o=l[e],r="optional"===o._zod.optout,i=o._zod.run({value:s[e],issues:[]},n);i instanceof Promise?c.push(i.then(n=>Xn(n,t,e,s,r))):Xn(i,t,e,s,r)}return i?Yn(c,s,t,n,o.value,e):c.length?Promise.all(c).then(()=>t):t}}),to=o("$ZodObjectJIT",(e,t)=>{eo.init(e,t);const n=e._zod.parse,o=p(()=>Qn(t));let r;const i=w,a=!s.jitless,c=a&&k.value,l=t.catchall;let u;e._zod.parse=(s,d)=>{u??(u=o.value);const p=s.value;return i(p)?a&&c&&!1===d?.async&&!0!==d.jitless?(r||(r=(e=>{const t=new nn(["shape","payload","ctx"]),n=o.value,r=e=>{const t=y(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let a=0;for(const e of n.keys)i[e]="key_"+a++;t.write("const newResult = {};");for(const o of n.keys){const n=i[o],a=y(o),s=e[o],c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(o)};`),c?t.write(`\n if (${n}.issues.length) {\n if (${a} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `):t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${a}, ...iss.path] : [${a}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${a} in input) {\n newResult[${a}] = undefined;\n }\n } else {\n newResult[${a}] = ${n}.value;\n }\n \n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),s=r(s,d),l?Yn([],p,s,d,u,e):s):n(s,d):(s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s)}});function no(e,t,n,o){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const r=e.filter(e=>!V(e));return 1===r.length?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}),t)}const oo=o("$ZodUnion",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),v(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),v(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>f(e.source)).join("|")})$`)}});const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>no(t,r,e,i)):no(s,r,e,i)}});function ro(e,t,n,o){const r=e.filter(e=>0===e.issues.length);return 1===r.length?(t.value=r[0].value,t):(0===r.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>J(e,o,c())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}const io=o("$ZodXor",(e,t)=>{oo.init(e,t),t.inclusive=!1;const n=1===t.options.length,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(s.push(t),a=!0):s.push(t)}return a?Promise.all(s).then(t=>ro(t,r,e,i)):ro(s,r,e,i)}}),ao=o("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,oo.init(e,t);const n=e._zod.parse;v(e._zod,"propValues",()=>{const e={};for(const n of t.options){const o=n._zod.propValues;if(!o||0===Object.keys(o).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const[t,n]of Object.entries(o)){e[t]||(e[t]=new Set);for(const o of n)e[t].add(o)}}return e});const o=p(()=>{const e=t.options,n=new Map;for(const o of e){const e=o._zod.propValues?.[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const t of e){if(n.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,o)}}return n});e._zod.parse=(r,i)=>{const a=r.value;if(!w(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),so=o("$ZodIntersection",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{const o=e.value,r=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return r instanceof Promise||i instanceof Promise?Promise.all([r,i]).then(([t,n])=>lo(e,t,n)):lo(e,r,i)}});function co(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(I(e)&&I(t)){const n=Object.keys(t),o=Object.keys(e).filter(e=>-1!==n.indexOf(e)),r={...e,...t};for(const n of o){const o=co(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r[n]=o.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const r=co(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lo(e,t,n){const o=new Map;let r;for(const n of t.issues)if("unrecognized_keys"===n.code){r??(r=n);for(const e of n.keys)o.has(e)||o.set(e,{}),o.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);const i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),V(e))return e;const a=co(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const uo=o("$ZodTuple",(e,t)=>{rn.init(e,t);const n=t.items;e._zod.parse=(o,r)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],s=[...n].reverse().findIndex(e=>"optional"!==e._zod.optin),c=-1===s?0:n.length-s;if(!t.rest){const t=i.length>n.length,r=i.length<c-1;if(t||r)return o.issues.push({...t?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),o}let l=-1;for(const e of n){if(l++,l>=i.length&&l>=c)continue;const t=e._zod.run({value:i[l],issues:[]},r);t instanceof Promise?a.push(t.then(e=>po(e,o,l))):po(t,o,l)}if(t.rest){const e=i.slice(n.length);for(const n of e){l++;const e=t.rest._zod.run({value:n,issues:[]},r);e instanceof Promise?a.push(e.then(e=>po(e,o,l))):po(e,o,l)}}return a.length?Promise.all(a).then(()=>o):o}});function po(e,t,n){e.issues.length&&t.issues.push(...F(n,e.issues)),t.value[n]=e.value}const mo=o("$ZodRecord",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!I(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const s=new Set;for(const e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){s.add("number"==typeof e?e.toString():e);const a=t.valueType._zod.run({value:r[e],issues:[]},o);a instanceof Promise?i.push(a.then(t=>{t.issues.length&&n.issues.push(...F(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...F(e,a.issues)),n.value[e]=a.value)}let c;for(const e in r)s.has(e)||(c=c??[],c.push(e));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c})}else{n.value={};for(const a of Reflect.ownKeys(r)){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if("string"==typeof a&&pt.test(a)&&s.issues.length){const e=t.keyType._zod.run({value:Number(a),issues:[]},o);if(e instanceof Promise)throw new Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>J(e,o,c())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:r[a],issues:[]},o);l instanceof Promise?i.push(l.then(e=>{e.issues.length&&n.issues.push(...F(a,e.issues)),n.value[s.value]=e.value})):(l.issues.length&&n.issues.push(...F(a,l.issues)),n.value[s.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),fo=o("$ZodMap",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;const i=[];n.value=new Map;for(const[a,s]of r){const c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([t,i])=>{go(t,i,n,a,r,e,o)})):go(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function go(e,t,n,o,r,i,a){e.issues.length&&(C.has(typeof o)?n.issues.push(...F(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(e=>J(e,a,c()))})),t.issues.length&&(C.has(typeof o)?n.issues.push(...F(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(e=>J(e,a,c()))})),n.value.set(e.value,t.value)}const ho=o("$ZodSet",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{const r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;const i=[];n.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},o);r instanceof Promise?i.push(r.then(e=>vo(e,n))):vo(r,n)}return i.length?Promise.all(i).then(()=>n):n}});function vo(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const bo=o("$ZodEnum",(e,t)=>{rn.init(e,t);const n=l(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(e=>C.has(typeof e)).map(e=>"string"==typeof e?z(e):e.toString()).join("|")})$`),e._zod.parse=(t,r)=>{const i=t.value;return o.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),$o=o("$ZodLiteral",(e,t)=>{if(rn.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?z(e):e?z(e.toString()):String(e)).join("|")})$`),e._zod.parse=(o,r)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),yo=o("$ZodFile",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>{const o=t.value;return o instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),t}}),_o=o("$ZodTransform",(e,t)=>{rn.init(e,t),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);const r=t.transform(n.value,n);if(o.async){return(r instanceof Promise?r:Promise.resolve(r)).then(e=>(n.value=e,n))}if(r instanceof Promise)throw new i;return n.value=r,n}});function xo(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const wo=o("$ZodOptional",(e,t)=>{rn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>xo(t,e.value)):xo(o,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),ko=o("$ZodExactOptional",(e,t)=>{wo.init(e,t),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Io=o("$ZodNullable",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${f(e.source)}|null)$`):void 0}),v(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),So=o("$ZodDefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>Co(e,t)):Co(o,t)}});function Co(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Eo=o("$ZodPrefault",(e,t)=>{rn.init(e,t),e._zod.optin="optional",v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),zo=o("$ZodNonOptional",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,o)=>{const r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(t=>To(t,e)):To(r,e)}});function To(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Oo=o("$ZodSuccess",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new a("ZodSuccess");const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===o.issues.length,e)}}),Do=o("$ZodCatch",(e,t)=>{rn.init(e,t),v(e._zod,"optin",()=>t.innerType._zod.optin),v(e._zod,"optout",()=>t.innerType._zod.optout),v(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(o=>(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)):(e.value=o.value,o.issues.length&&(e.value=t.catchValue({...e,error:{issues:o.issues.map(e=>J(e,n,c()))},input:e.value}),e.issues=[]),e)}}),Uo=o("$ZodNaN",(e,t)=>{rn.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),No=o("$ZodPipe",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.in,n)):Ao(o,t.in,n)}const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Ao(e,t.out,n)):Ao(o,t.out,n)}});function Ao(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const jo=o("$ZodCodec",(e,t)=>{rn.init(e,t),v(e._zod,"values",()=>t.in._zod.values),v(e._zod,"optin",()=>t.in._zod.optin),v(e._zod,"optout",()=>t.out._zod.optout),v(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Ro(e,t,n)):Ro(o,t,n)}{const o=t.out._zod.run(e,n);return o instanceof Promise?o.then(e=>Ro(e,t,n)):Ro(o,t,n)}}});function Ro(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){const o=t.transform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.out,n)):Po(e,o,t.out,n)}{const o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(o=>Po(e,o,t.in,n)):Po(e,o,t.in,n)}}function Po(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}const Zo=o("$ZodReadonly",(e,t)=>{rn.init(e,t),v(e._zod,"propValues",()=>t.innerType._zod.propValues),v(e._zod,"values",()=>t.innerType._zod.values),v(e._zod,"optin",()=>t.innerType?._zod?.optin),v(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(Mo):Mo(o)}});function Mo(e){return e.value=Object.freeze(e.value),e}const Lo=o("$ZodTemplateLiteral",(e,t)=>{rn.init(e,t);const n=[];for(const e of t.parts)if("object"==typeof e&&null!==e){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const o=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,r))}else{if(null!==e&&!E.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);n.push(z(`${e}`))}e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(n,o)=>"string"!=typeof n.value?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),qo=o("$ZodFunction",(e,t)=>(rn.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if("function"!=typeof t)throw new Error("implement() must be called with a function");return function(...n){const o=e._def.input?le(e._def.input,n):n,r=Reflect.apply(t,this,o);return e._def.output?le(e._def.output,r):r}},e.implementAsync=t=>{if("function"!=typeof t)throw new Error("implementAsync() must be called with a function");return async function(...n){const o=e._def.input?await de(e._def.input,n):n,r=await Reflect.apply(t,this,o);return e._def.output?await de(e._def.output,r):r}},e._zod.parse=(t,n)=>{if("function"!=typeof t.value)return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;const o=e._def.output&&"promise"===e._def.output._zod.def.type;return t.value=o?e.implementAsync(t.value):e.implement(t.value),t},e.input=(...t)=>{const n=e.constructor;return Array.isArray(t[0])?new n({type:"function",input:new uo({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output}):new n({type:"function",input:t[0],output:e._def.output})},e.output=t=>new(0,e.constructor)({type:"function",input:e._def.input,output:t}),e)),Vo=o("$ZodPromise",(e,t)=>{rn.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Fo=o("$ZodLazy",(e,t)=>{rn.init(e,t),v(e._zod,"innerType",()=>t.getter()),v(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),v(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),v(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),v(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ho=o("$ZodCustom",(e,t)=>{Dt.init(e,t),rn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(t=>Jo(t,n,o,e));Jo(r,n,o,e)}});function Jo(e,t,n,o){if(!e){const e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),t.issues.push(K(e))}}const Go=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(t){return e[t]??null}const n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${r}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${r}`}case"invalid_value":return 1===e.values.length?`مدخلات غير مقبولة: يفترض إدخال ${D(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:"ends_with"===t.format?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:"includes"===t.format?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:"regex"===t.format?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":default:return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`}}};const Bo=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${r}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${r}`}case"invalid_value":return 1===e.values.length?`Yanlış dəyər: gözlənilən ${D(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:"ends_with"===t.format?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:"includes"===t.format?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:"regex"===t.format?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":default:return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`}}};function Wo(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ko=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(t){return e[t]??null}const n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${r}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${r}`}case"invalid_value":return 1===e.values.length?`Няправільны ўвод: чакалася ${D(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Wo(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${o.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Wo(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${o.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:"ends_with"===t.format?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:"includes"===t.format?`Няправільны радок: павінен змяшчаць "${t.includes}"`:"regex"===t.format?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":default:return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`}}};const Xo=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(t){return e[t]??null}const n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${r}`:`Невалиден вход: очакван ${t}, получен ${r}`}case"invalid_value":return 1===e.values.length?`Невалиден вход: очакван ${D(e.values[0])}`:`Невалидна опция: очаквано едно от ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Твърде голямо: очаква се ${e.origin??"стойност"} да съдържа ${n}${e.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${e.origin??"стойност"} да бъде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;if("starts_with"===t.format)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if("ends_with"===t.format)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if("includes"===t.format)return`Невалиден низ: трябва да включва "${t.includes}"`;if("regex"===t.format)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let o="Невалиден";return"emoji"===t.format&&(o="Невалидно"),"datetime"===t.format&&(o="Невалидно"),"date"===t.format&&(o="Невалидна"),"time"===t.format&&(o="Невалидно"),"duration"===t.format&&(o="Невалидна"),`${o} ${n[t.format]??e.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case"unrecognized_keys":return`Неразпознат${e.keys.length>1?"и":""} ключ${e.keys.length>1?"ове":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${e.origin}`;case"invalid_union":default:return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${e.origin}`}}};const Qo=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${r}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${r}`}case"invalid_value":return 1===e.values.length?`Valor invàlid: s'esperava ${D(e.values[0])}`:`Opció invàlida: s'esperava una de ${u(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",o=t(e.origin);return o?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",o=t(e.origin);return o?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Format invàlid: ha de començar amb "${t.prefix}"`:"ends_with"===t.format?`Format invàlid: ha d'acabar amb "${t.suffix}"`:"includes"===t.format?`Format invàlid: ha d'incloure "${t.includes}"`:"regex"===t.format?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":default:return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`}}};const Yo=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(t){return e[t]??null}const n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${r}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${r}`}case"invalid_value":return 1===e.values.length?`Neplatný vstup: očekáváno ${D(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neplatný řetězec: musí začínat na "${t.prefix}"`:"ends_with"===t.format?`Neplatný řetězec: musí končit na "${t.suffix}"`:"includes"===t.format?`Neplatný řetězec: musí obsahovat "${t.includes}"`:"regex"===t.format?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${u(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":default:return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`}}};const er=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${r}`:`Ugyldigt input: forventede ${t}, fik ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig værdi: forventede ${D(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For stor: forventede ${i??"value"} ${r.verb} ${n} ${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor: forventede ${i??"value"} havde ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`For lille: forventede ${i} ${r.verb} ${n} ${e.minimum.toString()} ${r.unit}`:`For lille: forventede ${i} havde ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: skal starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: skal ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: skal indeholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${e.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${e.origin}`;default:return"Ugyldigt input"}}};const tr=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(t){return e[t]??null}const n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${r}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${r}`}case"invalid_value":return 1===e.values.length?`Ungültige Eingabe: erwartet ${D(e.values[0])}`:`Ungültige Option: erwartet eine von ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ungültiger String: muss mit "${t.prefix}" beginnen`:"ends_with"===t.format?`Ungültiger String: muss mit "${t.suffix}" enden`:"includes"===t.format?`Ungültiger String: muss "${t.includes}" enthalten`:"regex"===t.format?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":default:return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`}}};const nr=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input);return`Invalid input: expected ${t}, received ${o[n]??n}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${D(e.values[0])}`:`Invalid option: expected one of ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Too big: expected ${e.origin??"value"} to have ${n}${e.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${e.origin??"value"} to be ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${o.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Invalid string: must start with "${t.prefix}"`:"ends_with"===t.format?`Invalid string: must end with "${t.suffix}"`:"includes"===t.format?`Invalid string: must include "${t.includes}"`:"regex"===t.format?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${e.divisor}`;case"unrecognized_keys":return`Unrecognized key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Invalid key in ${e.origin}`;case"invalid_union":default:return"Invalid input";case"invalid_element":return`Invalid value in ${e.origin}`}}};function or(){return{localeError:nr()}}const rr=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(t){return e[t]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${r}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${r}`}case"invalid_value":return 1===e.values.length?`Nevalida enigo: atendiĝis ${D(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${e.origin??"valoro"} havu ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:"ends_with"===t.format?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:"includes"===t.format?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:"regex"===t.format?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case"unrecognized_keys":return`Nekonata${e.keys.length>1?"j":""} ŝlosilo${e.keys.length>1?"j":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${e.origin}`;case"invalid_union":default:return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${e.origin}`}}};const ir=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(t){return e[t]??null}const n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${r}`:`Entrada inválida: se esperaba ${t}, recibido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: se esperaba ${D(e.values[0])}`:`Opción inválida: se esperaba una de ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado grande: se esperaba que ${i??"valor"} tuviera ${n}${e.maximum.toString()} ${r.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i??"valor"} fuera ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=t(e.origin),i=o[e.origin]??e.origin;return r?`Demasiado pequeño: se esperaba que ${i} tuviera ${n}${e.minimum.toString()} ${r.unit}`:`Demasiado pequeño: se esperaba que ${i} fuera ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Cadena inválida: debe comenzar con "${t.prefix}"`:"ends_with"===t.format?`Cadena inválida: debe terminar en "${t.suffix}"`:"includes"===t.format?`Cadena inválida: debe incluir "${t.includes}"`:"regex"===t.format?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Llave${e.keys.length>1?"s":""} desconocida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[e.origin]??e.origin}`;case"invalid_union":default:return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[e.origin]??e.origin}`}}};const ar=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(t){return e[t]??null}const n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${r} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${r} دریافت شد`}case"invalid_value":return 1===e.values.length?`ورودی نامعتبر: می‌بایست ${D(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${u(e.values,"|")} می‌بود`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return"starts_with"===t.format?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:"ends_with"===t.format?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:"includes"===t.format?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:"regex"===t.format?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${u(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":default:return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`}}};const sr=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(t){return e[t]??null}const n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${r}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${r}`}case"invalid_value":return 1===e.values.length?`Virheellinen syöte: täytyy olla ${D(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${n}${e.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${n}${e.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:"ends_with"===t.format?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:"includes"===t.format?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:"regex"===t.format?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${u(e.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};const cr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${r} reçu`:`Entrée invalide : ${t} attendu, ${r} reçu`}case"invalid_value":return 1===e.values.length?`Entrée invalide : ${D(e.values[0])} attendu`:`Option invalide : une valeur parmi ${u(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Trop grand : ${e.origin??"valeur"} doit ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Trop petit : ${e.origin} doit ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const lr=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(t){return e[t]??null}const n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${r}`:`Entrée invalide : attendu ${t}, reçu ${r}`}case"invalid_value":return 1===e.values.length?`Entrée invalide : attendu ${D(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",o=t(e.origin);return o?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",o=t(e.origin);return o?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chaîne invalide : doit commencer par "${t.prefix}"`:"ends_with"===t.format?`Chaîne invalide : doit se terminer par "${t.suffix}"`:"includes"===t.format?`Chaîne invalide : doit inclure "${t.includes}"`:"regex"===t.format?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${u(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":default:return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`}}};const ur=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=t=>t?e[t]:void 0,o=t=>{const o=n(t);return o?o.label:t??e.unknown.label},r=e=>`ה${o(e)}`,i=e=>{const t=n(e);return"f"===(t?.gender??"m")?"צריכה להיות":"צריך להיות"},a=e=>e?t[e]??null:null,s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},c={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{const n=t.expected,r=c[n??""]??o(n),i=W(t.input),a=c[i]??e[i]?.label??i;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${a}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${a}`}case"invalid_value":{if(1===t.values.length)return`ערך לא תקין: הערך חייב להיות ${D(t.values[0])}`;const e=t.values.map(e=>D(e));if(2===t.values.length)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;const n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(", ")} או ${n}`}case"too_big":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.longLabel??"ארוך"} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??""} ${t.inclusive?"או פחות":"לכל היותר"}`.trim();if("number"===t.origin){return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`}if("array"===t.origin||"set"===t.origin){return`גדול מדי: ${n} ${"set"===t.origin?"צריכה":"צריך"} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??""} או פחות`:`פחות מ-${t.maximum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?"<=":"<",s=i(t.origin??"value");return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${o}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??"גדול"} מדי: ${n} ${s} ${o}${t.maximum.toString()}`}case"too_small":{const e=a(t.origin),n=r(t.origin??"value");if("string"===t.origin)return`${e?.shortLabel??"קצר"} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??""} ${t.inclusive?"או יותר":"לפחות"}`.trim();if("number"===t.origin){return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`}if("array"===t.origin||"set"===t.origin){const o="set"===t.origin?"צריכה":"צריך";if(1===t.minimum&&t.inclusive){return`קטן מדי: ${n} ${o} להכיל ${t.origin,"לפחות פריט אחד"}`}return`קטן מדי: ${n} ${o} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??""} או יותר`:`יותר מ-${t.minimum} ${e?.unit??""}`}`.trim()}const o=t.inclusive?">=":">",s=i(t.origin??"value");return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${o}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??"קטן"} מדי: ${n} ${s} ${o}${t.minimum.toString()}`}case"invalid_format":{const e=t;if("starts_with"===e.format)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if("ends_with"===e.format)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if("includes"===e.format)return`המחרוזת חייבת לכלול "${e.includes}"`;if("regex"===e.format)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;const n=s[e.format];return`${n?.label??e.format} לא ${"f"===(n?.gender??"m")?"תקינה":"תקין"}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case"unrecognized_keys":return`מפתח${t.keys.length>1?"ות":""} לא מזוה${t.keys.length>1?"ים":"ה"}: ${u(t.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":default:return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${r(t.origin??"array")}`}}};const dr=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(t){return e[t]??null}const n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${r}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${r}`}case"invalid_value":return 1===e.values.length?`Érvénytelen bemenet: a várt érték ${D(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:"ends_with"===t.format?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:"includes"===t.format?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:"regex"===t.format?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":default:return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`}}};function pr(e,t,n){return 1===Math.abs(e)?t:n}function mr(e){if(!e)return"";const t=e[e.length-1];return e+(["ա","ե","ը","ի","ո","ու","օ"].includes(t)?"ն":"ը")}const fr=()=>{const e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function t(t){return e[t]??null}const n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${r}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${r}`}case"invalid_value":return 1===e.values.length?`Սխալ մուտքագրում․ սպասվում էր ${D(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=pr(Number(e.maximum),o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${mr(e.origin??"արժեք")} լինի ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=pr(Number(e.minimum),o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${mr(e.origin)} լինի ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:"ends_with"===t.format?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:"includes"===t.format?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:"regex"===t.format?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${e.keys.length>1?"ներ":""}. ${u(e.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${mr(e.origin)}-ում`;case"invalid_union":default:return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${mr(e.origin)}-ում`}}};const gr=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${r}`:`Input tidak valid: diharapkan ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak valid: diharapkan ${D(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak valid: harus dimulai dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak valid: harus berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak valid: harus menyertakan "${t.includes}"`:"regex"===t.format?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":default:return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`}}};const hr=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(t){return e[t]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${r} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${r} þar sem á að vera ${t}`}case"invalid_value":return 1===e.values.length?`Rangt gildi: gert ráð fyrir ${D(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} hafi ${n}${e.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${e.origin??"gildi"} sé ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ógildur strengur: verður að byrja á "${t.prefix}"`:"ends_with"===t.format?`Ógildur strengur: verður að enda á "${t.suffix}"`:"includes"===t.format?`Ógildur strengur: verður að innihalda "${t.includes}"`:"regex"===t.format?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case"unrecognized_keys":return`Óþekkt ${e.keys.length>1?"ir lyklar":"ur lykill"}: ${u(e.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${e.origin}`;case"invalid_union":default:return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${e.origin}`}}};const vr=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(t){return e[t]??null}const n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${r}`:`Input non valido: atteso ${t}, ricevuto ${r}`}case"invalid_value":return 1===e.values.length?`Input non valido: atteso ${D(e.values[0])}`:`Opzione non valida: atteso uno tra ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Stringa non valida: deve iniziare con "${t.prefix}"`:"ends_with"===t.format?`Stringa non valida: deve terminare con "${t.suffix}"`:"includes"===t.format?`Stringa non valida: deve includere "${t.includes}"`:"regex"===t.format?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${u(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":default:return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`}}};const br=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(t){return e[t]??null}const n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${r}が入力されました`:`無効な入力: ${t}が期待されましたが、${r}が入力されました`}case"invalid_value":return 1===e.values.length?`無効な入力: ${D(e.values[0])}が期待されました`:`無効な選択: ${u(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",o=t(e.origin);return o?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${o.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",o=t(e.origin);return o?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${o.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無効な文字列: "${t.prefix}"で始まる必要があります`:"ends_with"===t.format?`無効な文字列: "${t.suffix}"で終わる必要があります`:"includes"===t.format?`無効な文字列: "${t.includes}"を含む必要があります`:"regex"===t.format?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${u(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":default:return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`}}};const $r=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(t){return e[t]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${r}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${r}`}case"invalid_value":return 1===e.values.length?`არასწორი შეყვანა: მოსალოდნელი ${D(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${u(e.values,"|")}-დან`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??"მნიშვნელობა"} იყოს ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`არასწორი სტრინგი: უნდა იწყებოდეს "${t.prefix}"-ით`:"ends_with"===t.format?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:"includes"===t.format?`არასწორი სტრინგი: უნდა შეიცავდეს "${t.includes}"-ს`:"regex"===t.format?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${e.keys.length>1?"ები":"ი"}: ${u(e.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${e.origin}-ში`;case"invalid_union":default:return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${e.origin}-ში`}}};const yr=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(t){return e[t]??null}const n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${r}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${r}`}case"invalid_value":return 1===e.values.length?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${D(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:"ends_with"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:"includes"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:"regex"===t.format?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${u(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":default:return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`}}};function _r(){return{localeError:yr()}}const xr=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(t){return e[t]??null}const n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${r}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${r}입니다`}case"invalid_value":return 1===e.values.length?`잘못된 입력: 값은 ${D(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${u(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",o="미만"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${o}`}case"too_small":{const n=e.inclusive?"이상":"초과",o="이상"===n?"이어야 합니다":"여야 합니다",r=t(e.origin),i=r?.unit??"요소";return r?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${i} ${n}${o}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${o}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:"ends_with"===t.format?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:"includes"===t.format?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:"regex"===t.format?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${u(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":default:return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`}}};const wr=e=>e.charAt(0).toUpperCase()+e.slice(1);function kr(e){const t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||0===n?"many":1===n?"one":"few"}const Ir=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(t,n,o,r){const i=e[t]??null;return null===i?i:{unit:i.unit[n],verb:i.verb[r][o?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${r}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${r}, o tikėtasi - ${t}`}case"invalid_value":return 1===e.values.length?`Privalo būti ${D(e.values[0])}`:`Privalo būti vienas iš ${u(e.values,"|")} pasirinkimų`;case"too_big":{const n=o[e.origin]??e.origin,r=t(e.origin,kr(Number(e.maximum)),e.inclusive??!1,"smaller");if(r?.verb)return`${wr(n??e.origin??"reikšmė")} ${r.verb} ${e.maximum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${wr(n??e.origin??"reikšmė")} turi būti ${i} ${e.maximum.toString()} ${r?.unit}`}case"too_small":{const n=o[e.origin]??e.origin,r=t(e.origin,kr(Number(e.minimum)),e.inclusive??!1,"bigger");if(r?.verb)return`${wr(n??e.origin??"reikšmė")} ${r.verb} ${e.minimum.toString()} ${r.unit??"elementų"}`;const i=e.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${wr(n??e.origin??"reikšmė")} turi būti ${i} ${e.minimum.toString()} ${r?.unit}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Eilutė privalo prasidėti "${t.prefix}"`:"ends_with"===t.format?`Eilutė privalo pasibaigti "${t.suffix}"`:"includes"===t.format?`Eilutė privalo įtraukti "${t.includes}"`:"regex"===t.format?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case"not_multiple_of":return`Skaičius privalo būti ${e.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${e.keys.length>1?"i":"as"} rakt${e.keys.length>1?"ai":"as"}: ${u(e.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":default:return"Klaidinga įvestis";case"invalid_element":{const t=o[e.origin]??e.origin;return`${wr(t??e.origin??"reikšmė")} turi klaidingą įvestį`}}}};const Sr=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(t){return e[t]??null}const n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${r}`:`Грешен внес: се очекува ${t}, примено ${r}`}case"invalid_value":return 1===e.values.length?`Invalid input: expected ${D(e.values[0])}`:`Грешана опција: се очекува една ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неважечка низа: мора да започнува со "${t.prefix}"`:"ends_with"===t.format?`Неважечка низа: мора да завршува со "${t.suffix}"`:"includes"===t.format?`Неважечка низа: мора да вклучува "${t.includes}"`:"regex"===t.format?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${u(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":default:return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`}}};const Cr=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(t){return e[t]??null}const n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${r}`:`Input tidak sah: dijangka ${t}, diterima ${r}`}case"invalid_value":return 1===e.values.length?`Input tidak sah: dijangka ${D(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Terlalu besar: dijangka ${e.origin??"nilai"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Terlalu kecil: dijangka ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`String tidak sah: mesti bermula dengan "${t.prefix}"`:"ends_with"===t.format?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:"includes"===t.format?`String tidak sah: mesti mengandungi "${t.includes}"`:"regex"===t.format?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${u(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":default:return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`}}};const Er=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(t){return e[t]??null}const n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${r}`:`Ongeldige invoer: verwacht ${t}, ontving ${r}`}case"invalid_value":return 1===e.values.length?`Ongeldige invoer: verwacht ${D(e.values[0])}`:`Ongeldige optie: verwacht één van ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin),r="date"===e.origin?"laat":"string"===e.origin?"lang":"groot";return o?`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin),r="date"===e.origin?"vroeg":"string"===e.origin?"kort":"klein";return o?`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${r}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:"ends_with"===t.format?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:"includes"===t.format?`Ongeldige tekst: moet "${t.includes}" bevatten`:"regex"===t.format?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":default:return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`}}};const zr=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(t){return e[t]??null}const n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${r}`:`Ugyldig input: forventet ${t}, fikk ${r}`}case"invalid_value":return 1===e.values.length?`Ugyldig verdi: forventet ${D(e.values[0])}`:`Ugyldig valg: forventet en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ugyldig streng: må starte med "${t.prefix}"`:"ends_with"===t.format?`Ugyldig streng: må ende med "${t.suffix}"`:"includes"===t.format?`Ugyldig streng: må inneholde "${t.includes}"`:"regex"===t.format?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":default:return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`}}};const Tr=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(t){return e[t]??null}const n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${r}`:`Fâsit giren: umulan ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Fâsit giren: umulan ${D(e.values[0])}`:`Fâsit tercih: mûteberler ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Fâsit metin: "${t.prefix}" ile başlamalı.`:"ends_with"===t.format?`Fâsit metin: "${t.suffix}" ile bitmeli.`:"includes"===t.format?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:"regex"===t.format?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};const Or=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(t){return e[t]??null}const n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${r} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${r} ترلاسه شو`}case"invalid_value":return 1===e.values.length?`ناسم ورودي: باید ${D(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${u(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return"starts_with"===t.format?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:"ends_with"===t.format?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:"includes"===t.format?`ناسم متن: باید "${t.includes}" ولري`:"regex"===t.format?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${u(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":default:return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`}}};const Dr=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(t){return e[t]??null}const n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${r}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${r}`}case"invalid_value":return 1===e.values.length?`Nieprawidłowe dane wejściowe: oczekiwano ${D(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:"ends_with"===t.format?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:"includes"===t.format?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:"regex"===t.format?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":default:return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`}}};const Ur=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(t){return e[t]??null}const n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${r}`:`Tipo inválido: esperado ${t}, recebido ${r}`}case"invalid_value":return 1===e.values.length?`Entrada inválida: esperado ${D(e.values[0])}`:`Opção inválida: esperada uma das ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Texto inválido: deve começar com "${t.prefix}"`:"ends_with"===t.format?`Texto inválido: deve terminar com "${t.suffix}"`:"includes"===t.format?`Texto inválido: deve incluir "${t.includes}"`:"regex"===t.format?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function Nr(e,t,n,o){const r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:1===i?t:i>=2&&i<=4?n:o}const Ar=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(t){return e[t]??null}const n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${r}`:`Неверный ввод: ожидалось ${t}, получено ${r}`}case"invalid_value":return 1===e.values.length?`Неверный ввод: ожидалось ${D(e.values[0])}`:`Неверный вариант: ожидалось одно из ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);if(o){const t=Nr(Number(e.maximum),o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);if(o){const t=Nr(Number(e.minimum),o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неверная строка: должна начинаться с "${t.prefix}"`:"ends_with"===t.format?`Неверная строка: должна заканчиваться на "${t.suffix}"`:"includes"===t.format?`Неверная строка: должна содержать "${t.includes}"`:"regex"===t.format?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":default:return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`}}};const jr=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(t){return e[t]??null}const n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${r}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${r}`}case"invalid_value":return 1===e.values.length?`Neveljaven vnos: pričakovano ${D(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Neveljaven niz: mora se začeti z "${t.prefix}"`:"ends_with"===t.format?`Neveljaven niz: mora se končati z "${t.suffix}"`:"includes"===t.format?`Neveljaven niz: mora vsebovati "${t.includes}"`:"regex"===t.format?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${u(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":default:return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`}}};const Rr=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(t){return e[t]??null}const n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${r}`:`Ogiltig inmatning: förväntat ${t}, fick ${r}`}case"invalid_value":return 1===e.values.length?`Ogiltig inmatning: förväntat ${D(e.values[0])}`:`Ogiltigt val: förväntade en av ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ogiltig sträng: måste börja med "${t.prefix}"`:"ends_with"===t.format?`Ogiltig sträng: måste sluta med "${t.suffix}"`:"includes"===t.format?`Ogiltig sträng: måste innehålla "${t.includes}"`:"regex"===t.format?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${u(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":default:return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`}}};const Pr=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(t){return e[t]??null}const n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${r}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${r}`}case"invalid_value":return 1===e.values.length?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${D(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${u(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return"starts_with"===t.format?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:"ends_with"===t.format?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:"includes"===t.format?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:"regex"===t.format?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":default:return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`}}};const Zr=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(t){return e[t]??null}const n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${r}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${r}`}case"invalid_value":return 1===e.values.length?`ค่าไม่ถูกต้อง: ควรเป็น ${D(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",o=t(e.origin);return o?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",o=t(e.origin);return o?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:"ends_with"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:"includes"===t.format?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:"regex"===t.format?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${u(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};const Mr=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(t){return e[t]??null}const n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${r}`:`Geçersiz değer: beklenen ${t}, alınan ${r}`}case"invalid_value":return 1===e.values.length?`Geçersiz değer: beklenen ${D(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${e.origin??"değer"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Geçersiz metin: "${t.prefix}" ile başlamalı`:"ends_with"===t.format?`Geçersiz metin: "${t.suffix}" ile bitmeli`:"includes"===t.format?`Geçersiz metin: "${t.includes}" içermeli`:"regex"===t.format?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case"not_multiple_of":return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} içinde geçersiz anahtar`;case"invalid_union":default:return"Geçersiz değer";case"invalid_element":return`${e.origin} içinde geçersiz değer`}}};const Lr=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(t){return e[t]??null}const n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${r}`:`Неправильні вхідні дані: очікується ${t}, отримано ${r}`}case"invalid_value":return 1===e.values.length?`Неправильні вхідні дані: очікується ${D(e.values[0])}`:`Неправильна опція: очікується одне з ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Занадто велике: очікується, що ${e.origin??"значення"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Занадто мале: очікується, що ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Неправильний рядок: повинен починатися з "${t.prefix}"`:"ends_with"===t.format?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:"includes"===t.format?`Неправильний рядок: повинен містити "${t.includes}"`:"regex"===t.format?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${u(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":default:return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`}}};function qr(){return{localeError:Lr()}}const Vr=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(t){return e[t]??null}const n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${r} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${r} موصول ہوا`}case"invalid_value":return 1===e.values.length?`غلط ان پٹ: ${D(e.values[0])} متوقع تھا`:`غلط آپشن: ${u(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return"starts_with"===t.format?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:"ends_with"===t.format?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:"includes"===t.format?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:"regex"===t.format?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${u(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":default:return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`}}};const Fr=()=>{const e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function t(t){return e[t]??null}const n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${r}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${r}`}case"invalid_value":return 1===e.values.length?`Noto‘g‘ri kirish: kutilgan ${D(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${e.origin??"qiymat"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:"ends_with"===t.format?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:"includes"===t.format?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:"regex"===t.format?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${e.keys.length>1?"lar":""}: ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} dagi kalit noto‘g‘ri`;case"invalid_union":default:return"Noto‘g‘ri kirish";case"invalid_element":return`${e.origin} da noto‘g‘ri qiymat`}}};const Hr=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(t){return e[t]??null}const n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${r}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${r}`}case"invalid_value":return 1===e.values.length?`Đầu vào không hợp lệ: mong đợi ${D(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${o.verb} ${n}${e.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Quá nhỏ: mong đợi ${e.origin} ${o.verb} ${n}${e.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:"ends_with"===t.format?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:"includes"===t.format?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:"regex"===t.format?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${u(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":default:return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`}}};const Jr=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(t){return e[t]??null}const n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${r}`:`无效输入:期望 ${t},实际接收 ${r}`}case"invalid_value":return 1===e.values.length?`无效输入:期望 ${D(e.values[0])}`:`无效选项:期望以下之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${o.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`无效字符串:必须以 "${t.prefix}" 开头`:"ends_with"===t.format?`无效字符串:必须以 "${t.suffix}" 结尾`:"includes"===t.format?`无效字符串:必须包含 "${t.includes}"`:"regex"===t.format?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${u(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":default:return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`}}};const Gr=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(t){return e[t]??null}const n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${r}`:`無效的輸入值:預期為 ${t},但收到 ${r}`}case"invalid_value":return 1===e.values.length?`無效的輸入值:預期為 ${D(e.values[0])}`:`無效的選項:預期為以下其中之一 ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${o.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`無效的字串:必須以 "${t.prefix}" 開頭`:"ends_with"===t.format?`無效的字串:必須以 "${t.suffix}" 結尾`:"includes"===t.format?`無效的字串:必須包含 "${t.includes}"`:"regex"===t.format?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${u(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":default:return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`}}};const Br=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(t){return e[t]??null}const n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return e=>{switch(e.code){case"invalid_type":{const t=o[e.expected]??e.expected,n=W(e.input),r=o[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${r}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${r}`}case"invalid_value":return 1===e.values.length?`Ìbáwọlé aṣìṣe: a ní láti fi ${D(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${u(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",o=t(e.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${o.verb} ${n}${e.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",o=t(e.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${o.verb} ${n}${e.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const t=e;return"starts_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:"ends_with"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:"includes"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:"regex"===t.format?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${u(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":default:return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`}}};var Wr,Kr=Object.freeze({__proto__:null,ar:function(){return{localeError:Go()}},az:function(){return{localeError:Bo()}},be:function(){return{localeError:Ko()}},bg:function(){return{localeError:Xo()}},ca:function(){return{localeError:Qo()}},cs:function(){return{localeError:Yo()}},da:function(){return{localeError:er()}},de:function(){return{localeError:tr()}},en:or,eo:function(){return{localeError:rr()}},es:function(){return{localeError:ir()}},fa:function(){return{localeError:ar()}},fi:function(){return{localeError:sr()}},fr:function(){return{localeError:cr()}},frCA:function(){return{localeError:lr()}},he:function(){return{localeError:ur()}},hu:function(){return{localeError:dr()}},hy:function(){return{localeError:fr()}},id:function(){return{localeError:gr()}},is:function(){return{localeError:hr()}},it:function(){return{localeError:vr()}},ja:function(){return{localeError:br()}},ka:function(){return{localeError:$r()}},kh:function(){return _r()},km:_r,ko:function(){return{localeError:xr()}},lt:function(){return{localeError:Ir()}},mk:function(){return{localeError:Sr()}},ms:function(){return{localeError:Cr()}},nl:function(){return{localeError:Er()}},no:function(){return{localeError:zr()}},ota:function(){return{localeError:Tr()}},pl:function(){return{localeError:Dr()}},ps:function(){return{localeError:Or()}},pt:function(){return{localeError:Ur()}},ru:function(){return{localeError:Ar()}},sl:function(){return{localeError:jr()}},sv:function(){return{localeError:Rr()}},ta:function(){return{localeError:Pr()}},th:function(){return{localeError:Zr()}},tr:function(){return{localeError:Mr()}},ua:function(){return qr()},uk:qr,ur:function(){return{localeError:Vr()}},uz:function(){return{localeError:Fr()}},vi:function(){return{localeError:Hr()}},yo:function(){return{localeError:Br()}},zhCN:function(){return{localeError:Jr()}},zhTW:function(){return{localeError:Gr()}}});const Xr=Symbol("ZodOutput"),Qr=Symbol("ZodInput");class Yr{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function ei(){return new Yr}(Wr=globalThis).__zod_globalRegistry??(Wr.__zod_globalRegistry=ei());const ti=globalThis.__zod_globalRegistry;function ni(e,t){return new e({type:"string",...O(t)})}function oi(e,t){return new e({type:"string",coerce:!0,...O(t)})}function ri(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function ii(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function ai(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function ci(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function ui(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function di(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function pi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function mi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function fi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function gi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function hi(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function vi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function bi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function $i(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function yi(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...O(t)})}function _i(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function xi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function wi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function ki(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function Ii(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function Si(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}const Ci={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ei(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function zi(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function Ti(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function Oi(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function Di(e,t){return new e({type:"number",checks:[],...O(t)})}function Ui(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function Ni(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function Ai(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function ji(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function Ri(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function Pi(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function Zi(e,t){return new e({type:"boolean",...O(t)})}function Mi(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function Li(e,t){return new e({type:"bigint",...O(t)})}function qi(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function Vi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function Fi(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function Hi(e,t){return new e({type:"symbol",...O(t)})}function Ji(e,t){return new e({type:"undefined",...O(t)})}function Gi(e,t){return new e({type:"null",...O(t)})}function Bi(e){return new e({type:"any"})}function Wi(e){return new e({type:"unknown"})}function Ki(e,t){return new e({type:"never",...O(t)})}function Xi(e,t){return new e({type:"void",...O(t)})}function Qi(e,t){return new e({type:"date",...O(t)})}function Yi(e,t){return new e({type:"date",coerce:!0,...O(t)})}function ea(e,t){return new e({type:"nan",...O(t)})}function ta(e,t){return new Nt({check:"less_than",...O(t),value:e,inclusive:!1})}function na(e,t){return new Nt({check:"less_than",...O(t),value:e,inclusive:!0})}function oa(e,t){return new At({check:"greater_than",...O(t),value:e,inclusive:!1})}function ra(e,t){return new At({check:"greater_than",...O(t),value:e,inclusive:!0})}function ia(e){return oa(0,e)}function aa(e){return ta(0,e)}function sa(e){return na(0,e)}function ca(e){return ra(0,e)}function la(e,t){return new jt({check:"multiple_of",...O(t),value:e})}function ua(e,t){return new Zt({check:"max_size",...O(t),maximum:e})}function da(e,t){return new Mt({check:"min_size",...O(t),minimum:e})}function pa(e,t){return new Lt({check:"size_equals",...O(t),size:e})}function ma(e,t){return new qt({check:"max_length",...O(t),maximum:e})}function fa(e,t){return new Vt({check:"min_length",...O(t),minimum:e})}function ga(e,t){return new Ft({check:"length_equals",...O(t),length:e})}function ha(e,t){return new Jt({check:"string_format",format:"regex",...O(t),pattern:e})}function va(e){return new Gt({check:"string_format",format:"lowercase",...O(e)})}function ba(e){return new Bt({check:"string_format",format:"uppercase",...O(e)})}function $a(e,t){return new Wt({check:"string_format",format:"includes",...O(t),includes:e})}function ya(e,t){return new Kt({check:"string_format",format:"starts_with",...O(t),prefix:e})}function _a(e,t){return new Xt({check:"string_format",format:"ends_with",...O(t),suffix:e})}function xa(e,t,n){return new Yt({check:"property",property:e,schema:t,...O(n)})}function wa(e,t){return new en({check:"mime_type",mime:e,...O(t)})}function ka(e){return new tn({check:"overwrite",tx:e})}function Ia(e){return ka(t=>t.normalize(e))}function Sa(){return ka(e=>e.trim())}function Ca(){return ka(e=>e.toLowerCase())}function Ea(){return ka(e=>e.toUpperCase())}function za(){return ka(e=>_(e))}function Ta(e,t,n){return new e({type:"array",element:t,...O(n)})}function Oa(e,t){return new e({type:"file",...O(t)})}function Da(e,t,n){const o=O(n);o.abort??(o.abort=!0);return new e({type:"custom",check:"custom",fn:t,...o})}function Ua(e,t,n){return new e({type:"custom",check:"custom",fn:t,...O(n)})}function Na(e){const t=Aa(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(K(e,n.value,t._zod.def));else{const o=e;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(K(o))}},e(n.value,n)));return t}function Aa(e,t){const n=new Dt({check:"custom",...O(t)});return n._zod.check=e,n}function ja(e){const t=new Dt({check:"describe"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Ra(e){const t=new Dt({check:"meta"});return t._zod.onattach=[t=>{const n=ti.get(t)??{};ti.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Pa(e,t){const n=O(t);let o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];"sensitive"!==n.case&&(o=o.map(e=>"string"==typeof e?e.toLowerCase():e),r=r.map(e=>"string"==typeof e?e.toLowerCase():e));const i=new Set(o),a=new Set(r),s=e.Codec??jo,c=e.Boolean??Pn,l=new s({type:"pipe",in:new(e.String??an)({type:"string",error:n.error}),out:new c({type:"boolean",error:n.error}),transform:(e,t)=>{let o=e;return"sensitive"!==n.case&&(o=o.toLowerCase()),!!i.has(o)||!a.has(o)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:t.value,inst:l,continue:!1}),{})},reverseTransform:(e,t)=>!0===e?o[0]||"true":r[0]||"false",error:n.error});return l}function Za(e,t,n,o={}){const r=O(o),i={...O(o),check:"string_format",type:"string",format:t,fn:"function"==typeof n?n:e=>n.test(e),...r};n instanceof RegExp&&(i.pattern=n);return new e(i)}function Ma(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ti,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function La(e,t,n={path:[],schemaPath:[]}){var o;const r=e._zod.def,i=t.seen.get(e);if(i){i.count++;return n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema}const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const o={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,o);else{const n=a.schema,i=t.processors[r.type];if(!i)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);i(e,t,n,o)}const i=e._zod.parent;i&&(a.ref||(a.ref=i),La(i,t,o),t.seen.get(i).isParent=!0)}const c=t.metadataRegistry.get(e);c&&Object.assign(a.schema,c),"input"===t.io&&Fa(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault;return t.seen.get(e).schema}function qa(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const t of e.seen.entries()){const n=e.metadataRegistry.get(t[0])?.id;if(n){const e=o.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(n,t[0])}}const r=t=>{if(t[1].schema.$ref)return;const o=t[1],{ref:r,defId:i}=(t=>{const o="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){const n=e.external.registry.get(t[0])?.id,r=e.external.uri??(e=>e);if(n)return{ref:r(n)};const i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${r("__shared")}#/${o}/${i}`}}if(t[1]===n)return{ref:"#"};const r=`#/${o}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:r+i}})(t);o.def={...o.schema},i&&(o.defId=i);const a=o.schema;for(const e in a)delete a[e];a.$ref=r};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];if(e.cycle)throw new Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){const o=n[1];if(t===n[0]){r(n);continue}if(e.external){const o=e.external.registry.get(n[0])?.id;if(t!==n[0]&&o){r(n);continue}}const i=e.metadataRegistry.get(n[0])?.id;i?r(n):(o.cycle||o.count>1&&"ref"===e.reused)&&r(n)}}function Va(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=t=>{const n=e.seen.get(t);if(null===n.ref)return;const r=n.def??n.schema,i={...r},a=n.ref;if(n.ref=null,a){o(a);const n=e.seen.get(a),s=n.schema;!s.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(r,s):(r.allOf=r.allOf??[],r.allOf.push(s)),Object.assign(r,i);if(t._zod.parent===a)for(const e in r)"$ref"!==e&&"allOf"!==e&&(e in i||delete r[e]);if(s.$ref&&n.def)for(const e in r)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(r[e])===JSON.stringify(n.def[e])&&delete r[e]}const s=t._zod.parent;if(s&&s!==a){o(s);const t=e.seen.get(s);if(t?.schema.$ref&&(r.$ref=t.schema.$ref,t.def))for(const e in r)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(r[e])===JSON.stringify(t.def[e])&&delete r[e]}e.override({zodSchema:t,jsonSchema:r,path:n.path??[]})};for(const t of[...e.seen.entries()].reverse())o(t[0]);const r={};if("draft-2020-12"===e.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?r.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const n=e.external.registry.get(t)?.id;if(!n)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(n)}Object.assign(r,n.def??n.schema);const i=e.external?.defs??{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?r.$defs=i:r.definitions=i);try{const n=JSON.parse(JSON.stringify(r));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ja(t,"input",e.processors),output:Ja(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function Fa(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const o=e._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return Fa(o.element,n);if("set"===o.type)return Fa(o.valueType,n);if("lazy"===o.type)return Fa(o.getter(),n);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return Fa(o.innerType,n);if("intersection"===o.type)return Fa(o.left,n)||Fa(o.right,n);if("record"===o.type||"map"===o.type)return Fa(o.keyType,n)||Fa(o.valueType,n);if("pipe"===o.type)return Fa(o.in,n)||Fa(o.out,n);if("object"===o.type){for(const e in o.shape)if(Fa(o.shape[e],n))return!0;return!1}if("union"===o.type){for(const e of o.options)if(Fa(e,n))return!0;return!1}if("tuple"===o.type){for(const e of o.items)if(Fa(e,n))return!0;return!(!o.rest||!Fa(o.rest,n))}return!1}const Ha=(e,t={})=>n=>{const o=Ma({...n,processors:t});return La(e,o),qa(o,e),Va(o,e)},Ja=(e,t,n={})=>o=>{const{libraryOptions:r,target:i}=o??{},a=Ma({...r??{},target:i,io:t,processors:n});return La(e,a),qa(a,e),Va(a,e)},Ga={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ba=(e,t,n,o)=>{const r=n;r.type="string";const{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if("number"==typeof i&&(r.minLength=i),"number"==typeof a&&(r.maxLength=a),s&&(r.format=Ga[s]??s,""===r.format&&delete r.format,"time"===s&&delete r.format),l&&(r.contentEncoding=l),c&&c.size>0){const e=[...c];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}},Wa=(e,t,n,o)=>{const r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;"string"==typeof s&&s.includes("int")?r.type="integer":r.type="number","number"==typeof u&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),"number"==typeof i&&(r.minimum=i,"number"==typeof u&&"draft-04"!==t.target&&(u>=i?delete r.minimum:delete r.exclusiveMinimum)),"number"==typeof l&&("draft-04"===t.target||"openapi-3.0"===t.target?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),"number"==typeof a&&(r.maximum=a,"number"==typeof l&&"draft-04"!==t.target&&(l<=a?delete r.maximum:delete r.exclusiveMaximum)),"number"==typeof c&&(r.multipleOf=c)},Ka=(e,t,n,o)=>{n.type="boolean"},Xa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema")},Qa=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema")},Ya=(e,t,n,o)=>{"openapi-3.0"===t.target?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},es=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema")},ts=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Void cannot be represented in JSON Schema")},ns=(e,t,n,o)=>{n.not={}},os=(e,t,n,o)=>{},rs=(e,t,n,o)=>{},is=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Date cannot be represented in JSON Schema")},as=(e,t,n,o)=>{const r=l(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r},ss=(e,t,n,o)=>{const r=e._zod.def,i=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(e))}else i.push(e);if(0===i.length);else if(1===i.length){const e=i[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else i.every(e=>"number"==typeof e)&&(n.type="number"),i.every(e=>"string"==typeof e)&&(n.type="string"),i.every(e=>"boolean"==typeof e)&&(n.type="boolean"),i.every(e=>null===e)&&(n.type="null"),n.enum=i},cs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema")},ls=(e,t,n,o)=>{const r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},us=(e,t,n,o)=>{const r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;void 0!==a&&(i.minLength=a),void 0!==s&&(i.maxLength=s),c?1===c.length?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(r,i)},ds=(e,t,n,o)=>{n.type="boolean"},ps=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")},ms=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Function types cannot be represented in JSON Schema")},fs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")},gs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Map cannot be represented in JSON Schema")},hs=(e,t,n,o)=>{if("throw"===t.unrepresentable)throw new Error("Set cannot be represented in JSON Schema")},vs=(e,t,n,o)=>{const r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof s&&(r.maxItems=s),r.type="array",r.items=La(i.element,t,{...o,path:[...o.path,"items"]})},bs=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object",r.properties={};const a=i.shape;for(const e in a)r.properties[e]=La(a[e],t,{...o,path:[...o.path,"properties",e]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(e=>{const n=i.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));c.size>0&&(r.required=Array.from(c)),"never"===i.catchall?._zod.def.type?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=La(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):"output"===t.io&&(r.additionalProperties=!1)},$s=(e,t,n,o)=>{const r=e._zod.def,i=!1===r.inclusive,a=r.options.map((e,n)=>La(e,t,{...o,path:[...o.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a},ys=(e,t,n,o)=>{const r=e._zod.def,i=La(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=La(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},_s=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="array";const a="draft-2020-12"===t.target?"prefixItems":"items",s="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",c=i.items.map((e,n)=>La(e,t,{...o,path:[...o.path,a,n]})),l=i.rest?La(i.rest,t,{...o,path:[...o.path,s,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null;"draft-2020-12"===t.target?(r.prefixItems=c,l&&(r.items=l)):"openapi-3.0"===t.target?(r.items={anyOf:c},l&&r.items.anyOf.push(l),r.minItems=c.length,l||(r.maxItems=c.length)):(r.items=c,l&&(r.additionalItems=l));const{minimum:u,maximum:d}=e._zod.bag;"number"==typeof u&&(r.minItems=u),"number"==typeof d&&(r.maxItems=d)},xs=(e,t,n,o)=>{const r=n,i=e._zod.def;r.type="object";const a=i.keyType,s=a._zod.bag,c=s?.patterns;if("loose"===i.mode&&c&&c.size>0){const e=La(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(const t of c)r.patternProperties[t.source]=e}else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(r.propertyNames=La(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=La(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const l=a._zod.values;if(l){const e=[...l].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(r.required=e)}},ws=(e,t,n,o)=>{const r=e._zod.def,i=La(r.innerType,t,o),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ks=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Is=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Ss=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Cs=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);let i;t.seen.get(e).ref=r.innerType;try{i=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},Es=(e,t,n,o)=>{const r=e._zod.def,i="input"===t.io?"transform"===r.in._zod.def.type?r.out:r.in:r.out;La(i,t,o);t.seen.get(e).ref=i},zs=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType,n.readOnly=!0},Ts=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Os=(e,t,n,o)=>{const r=e._zod.def;La(r.innerType,t,o);t.seen.get(e).ref=r.innerType},Ds=(e,t,n,o)=>{const r=e._zod.innerType;La(r,t,o);t.seen.get(e).ref=r},Us={string:Ba,number:Wa,boolean:Ka,bigint:Xa,symbol:Qa,null:Ya,undefined:es,void:ts,never:ns,any:os,unknown:rs,date:is,enum:as,literal:ss,nan:cs,template_literal:ls,file:us,success:ds,custom:ps,function:ms,transform:fs,map:gs,set:hs,array:vs,object:bs,union:$s,intersection:ys,tuple:_s,record:xs,nullable:ws,nonoptional:ks,default:Is,prefault:Ss,catch:Cs,pipe:Es,readonly:zs,promise:Ts,optional:Os,lazy:Ds};function Ns(e,t){if("_idmap"in e){const n=e,o=Ma({...t,processors:Us}),r={};for(const e of n._idmap.entries()){const[t,n]=e;La(n,o)}const i={},a={registry:n,uri:t?.uri,defs:r};o.external=a;for(const e of n._idmap.entries()){const[t,n]=e;qa(o,n),i[t]=Va(o,n)}if(Object.keys(r).length>0){const e="draft-2020-12"===o.target?"$defs":"definitions";i.__shared={[e]:r}}return{schemas:i}}const n=Ma({...t,processors:Us});return La(e,n),qa(n,e),Va(n,e)}var As=Object.freeze({__proto__:null}),js=Object.freeze({__proto__:null,$ZodAny:Fn,$ZodArray:Kn,$ZodAsyncError:i,$ZodBase64:zn,$ZodBase64URL:On,$ZodBigInt:Zn,$ZodBigIntFormat:Mn,$ZodBoolean:Pn,$ZodCIDRv4:Sn,$ZodCIDRv6:Cn,$ZodCUID:fn,$ZodCUID2:gn,$ZodCatch:Do,$ZodCheck:Dt,$ZodCheckBigIntFormat:Pt,$ZodCheckEndsWith:Xt,$ZodCheckGreaterThan:At,$ZodCheckIncludes:Wt,$ZodCheckLengthEquals:Ft,$ZodCheckLessThan:Nt,$ZodCheckLowerCase:Gt,$ZodCheckMaxLength:qt,$ZodCheckMaxSize:Zt,$ZodCheckMimeType:en,$ZodCheckMinLength:Vt,$ZodCheckMinSize:Mt,$ZodCheckMultipleOf:jt,$ZodCheckNumberFormat:Rt,$ZodCheckOverwrite:tn,$ZodCheckProperty:Yt,$ZodCheckRegex:Jt,$ZodCheckSizeEquals:Lt,$ZodCheckStartsWith:Kt,$ZodCheckStringFormat:Ht,$ZodCheckUpperCase:Bt,$ZodCodec:jo,$ZodCustom:Ho,$ZodCustomStringFormat:An,$ZodDate:Bn,$ZodDefault:So,$ZodDiscriminatedUnion:ao,$ZodE164:Dn,$ZodEmail:un,$ZodEmoji:pn,$ZodEncodeError:a,$ZodEnum:bo,$ZodError:te,$ZodExactOptional:ko,$ZodFile:yo,$ZodFunction:qo,$ZodGUID:cn,$ZodIPv4:wn,$ZodIPv6:kn,$ZodISODate:yn,$ZodISODateTime:$n,$ZodISODuration:xn,$ZodISOTime:_n,$ZodIntersection:so,$ZodJWT:Nn,$ZodKSUID:bn,$ZodLazy:Fo,$ZodLiteral:$o,$ZodMAC:In,$ZodMap:fo,$ZodNaN:Uo,$ZodNanoID:mn,$ZodNever:Jn,$ZodNonOptional:zo,$ZodNull:Vn,$ZodNullable:Io,$ZodNumber:jn,$ZodNumberFormat:Rn,$ZodObject:eo,$ZodObjectJIT:to,$ZodOptional:wo,$ZodPipe:No,$ZodPrefault:Eo,$ZodPromise:Vo,$ZodReadonly:Zo,$ZodRealError:ne,$ZodRecord:mo,$ZodRegistry:Yr,$ZodSet:ho,$ZodString:an,$ZodStringFormat:sn,$ZodSuccess:Oo,$ZodSymbol:Ln,$ZodTemplateLiteral:Lo,$ZodTransform:_o,$ZodTuple:uo,$ZodType:rn,$ZodULID:hn,$ZodURL:dn,$ZodUUID:ln,$ZodUndefined:qn,$ZodUnion:oo,$ZodUnknown:Hn,$ZodVoid:Gn,$ZodXID:vn,$ZodXor:io,$brand:r,$constructor:o,$input:Qr,$output:Xr,Doc:nn,JSONSchema:As,JSONSchemaGenerator:class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),this.ctx=Ma({processors:Us,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return La(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),qa(this.ctx,e);const n=Va(this.ctx,e),{"~standard":o,...r}=n;return r}},NEVER:n,TimePrecision:Ci,_any:Bi,_array:Ta,_base64:wi,_base64url:ki,_bigint:Li,_boolean:Zi,_catch:function(e,t,n){return new e({type:"catch",innerType:t,catchValue:"function"==typeof n?n:()=>n})},_check:Aa,_cidrv4:_i,_cidrv6:xi,_coercedBigint:qi,_coercedBoolean:Mi,_coercedDate:Yi,_coercedNumber:Ui,_coercedString:oi,_cuid:mi,_cuid2:fi,_custom:Da,_date:Qi,_decode:be,_decodeAsync:xe,_default:function(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():S(n)}})},_discriminatedUnion:function(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...O(o)})},_e164:Ii,_email:ri,_emoji:di,_encode:he,_encodeAsync:ye,_endsWith:_a,_enum:function(e,t,n){const o=Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t;return new e({type:"enum",entries:o,...O(n)})},_file:Oa,_float32:Ai,_float64:ji,_gt:oa,_gte:ra,_guid:ii,_includes:$a,_int:Ni,_int32:Ri,_int64:Vi,_intersection:function(e,t,n){return new e({type:"intersection",left:t,right:n})},_ipv4:bi,_ipv6:$i,_isoDate:zi,_isoDateTime:Ei,_isoDuration:Oi,_isoTime:Ti,_jwt:Si,_ksuid:vi,_lazy:function(e,t){return new e({type:"lazy",getter:t})},_length:ga,_literal:function(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(n)})},_lowercase:va,_lt:ta,_lte:na,_mac:yi,_map:function(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...O(o)})},_max:na,_maxLength:ma,_maxSize:ua,_mime:wa,_min:ra,_minLength:fa,_minSize:da,_multipleOf:la,_nan:ea,_nanoid:pi,_nativeEnum:function(e,t,n){return new e({type:"enum",entries:t,...O(n)})},_negative:aa,_never:Ki,_nonnegative:ca,_nonoptional:function(e,t,n){return new e({type:"nonoptional",innerType:t,...O(n)})},_nonpositive:sa,_normalize:Ia,_null:Gi,_nullable:function(e,t){return new e({type:"nullable",innerType:t})},_number:Di,_optional:function(e,t){return new e({type:"optional",innerType:t})},_overwrite:ka,_parse:ce,_parseAsync:ue,_pipe:function(e,t,n){return new e({type:"pipe",in:t,out:n})},_positive:ia,_promise:function(e,t){return new e({type:"promise",innerType:t})},_property:xa,_readonly:function(e,t){return new e({type:"readonly",innerType:t})},_record:function(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...O(o)})},_refine:Ua,_regex:ha,_safeDecode:Se,_safeDecodeAsync:Te,_safeEncode:ke,_safeEncodeAsync:Ee,_safeParse:pe,_safeParseAsync:fe,_set:function(e,t,n){return new e({type:"set",valueType:t,...O(n)})},_size:pa,_slugify:za,_startsWith:ya,_string:ni,_stringFormat:Za,_stringbool:Pa,_success:function(e,t){return new e({type:"success",innerType:t})},_superRefine:Na,_symbol:Hi,_templateLiteral:function(e,t,n){return new e({type:"template_literal",parts:t,...O(n)})},_toLowerCase:Ca,_toUpperCase:Ea,_transform:function(e,t){return new e({type:"transform",transform:t})},_trim:Sa,_tuple:function(e,t,n,o){const r=n instanceof rn;return new e({type:"tuple",items:t,rest:r?n:null,...O(r?o:n)})},_uint32:Pi,_uint64:Fi,_ulid:gi,_undefined:Ji,_union:function(e,t,n){return new e({type:"union",options:t,...O(n)})},_unknown:Wi,_uppercase:ba,_url:ui,_uuid:ai,_uuidv4:si,_uuidv6:ci,_uuidv7:li,_void:Xi,_xid:hi,_xor:function(e,t,n){return new e({type:"union",options:t,inclusive:!1,...O(n)})},clone:T,config:c,createStandardJSONSchemaMethod:Ja,createToJSONSchemaMethod:Ha,decode:$e,decodeAsync:we,describe:ja,encode:ve,encodeAsync:_e,extractDefs:qa,finalize:Va,flattenError:oe,formatError:re,globalConfig:s,globalRegistry:ti,initializeContext:Ma,isValidBase64:En,isValidBase64URL:Tn,isValidJWT:Un,locales:Kr,meta:Ra,parse:le,parseAsync:de,prettifyError:se,process:La,regexes:Ot,registry:ei,safeDecode:Ce,safeDecodeAsync:Oe,safeEncode:Ie,safeEncodeAsync:ze,safeParse:me,safeParseAsync:ge,toDotPath:ae,toJSONSchema:Ns,treeifyError:ie,util:Y,version:on});function Rs(e){return!!e._zod}function Ps(e,t){if(Rs(e)){return me(e,t)}return e.safeParse(t)}var Zs=Object.freeze({__proto__:null,endsWith:_a,gt:oa,gte:ra,includes:$a,length:ga,lowercase:va,lt:ta,lte:na,maxLength:ma,maxSize:ua,mime:wa,minLength:fa,minSize:da,multipleOf:la,negative:aa,nonnegative:ca,nonpositive:sa,normalize:Ia,overwrite:ka,positive:ia,property:xa,regex:ha,size:pa,slugify:za,startsWith:ya,toLowerCase:Ca,toUpperCase:Ea,trim:Sa,uppercase:ba});const Ms=o("ZodISODateTime",(e,t)=>{$n.init(e,t),fc.init(e,t)});function Ls(e){return Ei(Ms,e)}const qs=o("ZodISODate",(e,t)=>{yn.init(e,t),fc.init(e,t)});function Vs(e){return zi(qs,e)}const Fs=o("ZodISOTime",(e,t)=>{_n.init(e,t),fc.init(e,t)});function Hs(e){return Ti(Fs,e)}const Js=o("ZodISODuration",(e,t)=>{xn.init(e,t),fc.init(e,t)});function Gs(e){return Oi(Js,e)}var Bs=Object.freeze({__proto__:null,ZodISODate:qs,ZodISODateTime:Ms,ZodISODuration:Js,ZodISOTime:Fs,date:Vs,datetime:Ls,duration:Gs,time:Hs});const Ws=(e,t)=>{te.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>re(e,t)},flatten:{value:t=>oe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ks=o("ZodError",Ws),Xs=o("ZodError",Ws,{Parent:Error}),Qs=ce(Xs),Ys=ue(Xs),ec=pe(Xs),tc=fe(Xs),nc=he(Xs),oc=be(Xs),rc=ye(Xs),ic=xe(Xs),ac=ke(Xs),sc=Se(Xs),cc=Ee(Xs),lc=Te(Xs),uc=o("ZodType",(e,t)=>(rn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ja(e,"input"),output:Ja(e,"output")}}),e.toJSONSchema=Ha(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>T(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Qs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ec(e,t,n),e.parseAsync=async(t,n)=>Ys(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nc(e,t,n),e.decode=(t,n)=>oc(e,t,n),e.encodeAsync=async(t,n)=>rc(e,t,n),e.decodeAsync=async(t,n)=>ic(e,t,n),e.safeEncode=(t,n)=>ac(e,t,n),e.safeDecode=(t,n)=>sc(e,t,n),e.safeEncodeAsync=async(t,n)=>cc(e,t,n),e.safeDecodeAsync=async(t,n)=>lc(e,t,n),e.refine=(t,n)=>e.check(od(t,n)),e.superRefine=t=>e.check(rd(t)),e.overwrite=t=>e.check(ka(t)),e.optional=()=>xu(e),e.exactOptional=()=>ku(e),e.nullable=()=>Su(e),e.nullish=()=>xu(Su(e)),e.nonoptional=t=>Uu(e,t),e.array=()=>ql(e),e.or=t=>Wl([e,t]),e.and=t=>tu(e,t),e.transform=t=>Lu(e,yu(t)),e.default=t=>zu(e,t),e.prefault=t=>Ou(e,t),e.catch=t=>Ru(e,t),e.pipe=t=>Lu(e,t),e.readonly=()=>Hu(e),e.describe=t=>{const n=e.clone();return ti.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>ti.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return ti.get(e);const n=e.clone();return ti.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),dc=o("_ZodString",(e,t)=>{an.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ba(e,t,n);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ha(...t)),e.includes=(...t)=>e.check($a(...t)),e.startsWith=(...t)=>e.check(ya(...t)),e.endsWith=(...t)=>e.check(_a(...t)),e.min=(...t)=>e.check(fa(...t)),e.max=(...t)=>e.check(ma(...t)),e.length=(...t)=>e.check(ga(...t)),e.nonempty=(...t)=>e.check(fa(1,...t)),e.lowercase=t=>e.check(va(t)),e.uppercase=t=>e.check(ba(t)),e.trim=()=>e.check(Sa()),e.normalize=(...t)=>e.check(Ia(...t)),e.toLowerCase=()=>e.check(Ca()),e.toUpperCase=()=>e.check(Ea()),e.slugify=()=>e.check(za())}),pc=o("ZodString",(e,t)=>{an.init(e,t),dc.init(e,t),e.email=t=>e.check(ri(gc,t)),e.url=t=>e.check(ui(kc,t)),e.jwt=t=>e.check(Si(ol,t)),e.emoji=t=>e.check(di(Cc,t)),e.guid=t=>e.check(ii(vc,t)),e.uuid=t=>e.check(ai($c,t)),e.uuidv4=t=>e.check(si($c,t)),e.uuidv6=t=>e.check(ci($c,t)),e.uuidv7=t=>e.check(li($c,t)),e.nanoid=t=>e.check(pi(zc,t)),e.guid=t=>e.check(ii(vc,t)),e.cuid=t=>e.check(mi(Oc,t)),e.cuid2=t=>e.check(fi(Uc,t)),e.ulid=t=>e.check(gi(Ac,t)),e.base64=t=>e.check(wi(Xc,t)),e.base64url=t=>e.check(ki(Yc,t)),e.xid=t=>e.check(hi(Rc,t)),e.ksuid=t=>e.check(vi(Zc,t)),e.ipv4=t=>e.check(bi(Lc,t)),e.ipv6=t=>e.check($i(Hc,t)),e.cidrv4=t=>e.check(_i(Gc,t)),e.cidrv6=t=>e.check(xi(Wc,t)),e.e164=t=>e.check(Ii(tl,t)),e.datetime=t=>e.check(Ls(t)),e.date=t=>e.check(Vs(t)),e.time=t=>e.check(Hs(t)),e.duration=t=>e.check(Gs(t))});function mc(e){return ni(pc,e)}const fc=o("ZodStringFormat",(e,t)=>{sn.init(e,t),dc.init(e,t)}),gc=o("ZodEmail",(e,t)=>{un.init(e,t),fc.init(e,t)});function hc(e){return ri(gc,e)}const vc=o("ZodGUID",(e,t)=>{cn.init(e,t),fc.init(e,t)});function bc(e){return ii(vc,e)}const $c=o("ZodUUID",(e,t)=>{ln.init(e,t),fc.init(e,t)});function yc(e){return ai($c,e)}function _c(e){return si($c,e)}function xc(e){return ci($c,e)}function wc(e){return li($c,e)}const kc=o("ZodURL",(e,t)=>{dn.init(e,t),fc.init(e,t)});function Ic(e){return ui(kc,e)}function Sc(e){return ui(kc,{protocol:/^https?$/,hostname:nt,...O(e)})}const Cc=o("ZodEmoji",(e,t)=>{pn.init(e,t),fc.init(e,t)});function Ec(e){return di(Cc,e)}const zc=o("ZodNanoID",(e,t)=>{mn.init(e,t),fc.init(e,t)});function Tc(e){return pi(zc,e)}const Oc=o("ZodCUID",(e,t)=>{fn.init(e,t),fc.init(e,t)});function Dc(e){return mi(Oc,e)}const Uc=o("ZodCUID2",(e,t)=>{gn.init(e,t),fc.init(e,t)});function Nc(e){return fi(Uc,e)}const Ac=o("ZodULID",(e,t)=>{hn.init(e,t),fc.init(e,t)});function jc(e){return gi(Ac,e)}const Rc=o("ZodXID",(e,t)=>{vn.init(e,t),fc.init(e,t)});function Pc(e){return hi(Rc,e)}const Zc=o("ZodKSUID",(e,t)=>{bn.init(e,t),fc.init(e,t)});function Mc(e){return vi(Zc,e)}const Lc=o("ZodIPv4",(e,t)=>{wn.init(e,t),fc.init(e,t)});function qc(e){return bi(Lc,e)}const Vc=o("ZodMAC",(e,t)=>{In.init(e,t),fc.init(e,t)});function Fc(e){return yi(Vc,e)}const Hc=o("ZodIPv6",(e,t)=>{kn.init(e,t),fc.init(e,t)});function Jc(e){return $i(Hc,e)}const Gc=o("ZodCIDRv4",(e,t)=>{Sn.init(e,t),fc.init(e,t)});function Bc(e){return _i(Gc,e)}const Wc=o("ZodCIDRv6",(e,t)=>{Cn.init(e,t),fc.init(e,t)});function Kc(e){return xi(Wc,e)}const Xc=o("ZodBase64",(e,t)=>{zn.init(e,t),fc.init(e,t)});function Qc(e){return wi(Xc,e)}const Yc=o("ZodBase64URL",(e,t)=>{On.init(e,t),fc.init(e,t)});function el(e){return ki(Yc,e)}const tl=o("ZodE164",(e,t)=>{Dn.init(e,t),fc.init(e,t)});function nl(e){return Ii(tl,e)}const ol=o("ZodJWT",(e,t)=>{Nn.init(e,t),fc.init(e,t)});function rl(e){return Si(ol,e)}const il=o("ZodCustomStringFormat",(e,t)=>{An.init(e,t),fc.init(e,t)});function al(e,t,n={}){return Za(il,e,t,n)}function sl(e){return Za(il,"hostname",tt,e)}function cl(e){return Za(il,"hex",bt,e)}function ll(e,t){const n=`${e}_${t?.enc??"hex"}`,o=Ot[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Za(il,n,o,t)}const ul=o("ZodNumber",(e,t)=>{jn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Wa(e,t,n),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.int=t=>e.check(ml(t)),e.safe=t=>e.check(ml(t)),e.positive=t=>e.check(oa(0,t)),e.nonnegative=t=>e.check(ra(0,t)),e.negative=t=>e.check(ta(0,t)),e.nonpositive=t=>e.check(na(0,t)),e.multipleOf=(t,n)=>e.check(la(t,n)),e.step=(t,n)=>e.check(la(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dl(e){return Di(ul,e)}const pl=o("ZodNumberFormat",(e,t)=>{Rn.init(e,t),ul.init(e,t)});function ml(e){return Ni(pl,e)}function fl(e){return Ai(pl,e)}function gl(e){return ji(pl,e)}function hl(e){return Ri(pl,e)}function vl(e){return Pi(pl,e)}const bl=o("ZodBoolean",(e,t)=>{Pn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ka(0,0,t)});function $l(e){return Zi(bl,e)}const yl=o("ZodBigInt",(e,t)=>{Zn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Xa(0,e),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.gt=(t,n)=>e.check(oa(t,n)),e.gte=(t,n)=>e.check(ra(t,n)),e.min=(t,n)=>e.check(ra(t,n)),e.lt=(t,n)=>e.check(ta(t,n)),e.lte=(t,n)=>e.check(na(t,n)),e.max=(t,n)=>e.check(na(t,n)),e.positive=t=>e.check(oa(BigInt(0),t)),e.negative=t=>e.check(ta(BigInt(0),t)),e.nonpositive=t=>e.check(na(BigInt(0),t)),e.nonnegative=t=>e.check(ra(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(la(t,n));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function _l(e){return Li(yl,e)}const xl=o("ZodBigIntFormat",(e,t)=>{Mn.init(e,t),yl.init(e,t)});function wl(e){return Vi(xl,e)}function kl(e){return Fi(xl,e)}const Il=o("ZodSymbol",(e,t)=>{Ln.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Qa(0,e)});function Sl(e){return Hi(Il,e)}const Cl=o("ZodUndefined",(e,t)=>{qn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>es(0,e)});function El(e){return Ji(Cl,e)}const zl=o("ZodNull",(e,t)=>{Vn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>Ya(0,e,t)});function Tl(e){return Gi(zl,e)}const Ol=o("ZodAny",(e,t)=>{Fn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Dl(){return Bi(Ol)}const Ul=o("ZodUnknown",(e,t)=>{Hn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function Nl(){return Wi(Ul)}const Al=o("ZodNever",(e,t)=>{Jn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ns(0,0,t)});function jl(e){return Ki(Al,e)}const Rl=o("ZodVoid",(e,t)=>{Gn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ts(0,e)});function Pl(e){return Xi(Rl,e)}const Zl=o("ZodDate",(e,t)=>{Bn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>is(0,e),e.min=(t,n)=>e.check(ra(t,n)),e.max=(t,n)=>e.check(na(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Ml(e){return Qi(Zl,e)}const Ll=o("ZodArray",(e,t)=>{Kn.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>vs(e,t,n,o),e.element=t.element,e.min=(t,n)=>e.check(fa(t,n)),e.nonempty=t=>e.check(fa(1,t)),e.max=(t,n)=>e.check(ma(t,n)),e.length=(t,n)=>e.check(ga(t,n)),e.unwrap=()=>e.element});function ql(e,t){return Ta(Ll,e,t)}function Vl(e){const t=e._zod.def.shape;return mu(Object.keys(t))}const Fl=o("ZodObject",(e,t)=>{to.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>bs(e,t,n,o),v(e,"shape",()=>t.shape),e.keyof=()=>mu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nl()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nl()}),e.strict=()=>e.clone({...e._zod.def,catchall:jl()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>P(e,t),e.safeExtend=t=>Z(e,t),e.merge=t=>M(e,t),e.pick=t=>j(e,t),e.omit=t=>R(e,t),e.partial=(...t)=>L(_u,e,t[0]),e.required=(...t)=>q(Du,e,t[0])});function Hl(e,t){const n={type:"object",shape:e??{},...O(t)};return new Fl(n)}function Jl(e,t){return new Fl({type:"object",shape:e,catchall:jl(),...O(t)})}function Gl(e,t){return new Fl({type:"object",shape:e,catchall:Nl(),...O(t)})}const Bl=o("ZodUnion",(e,t)=>{oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Wl(e,t){return new Bl({type:"union",options:e,...O(t)})}const Kl=o("ZodXor",(e,t)=>{Bl.init(e,t),io.init(e,t),e._zod.processJSONSchema=(t,n,o)=>$s(e,t,n,o),e.options=t.options});function Xl(e,t){return new Kl({type:"union",options:e,inclusive:!1,...O(t)})}const Ql=o("ZodDiscriminatedUnion",(e,t)=>{Bl.init(e,t),ao.init(e,t)});function Yl(e,t,n){return new Ql({type:"union",options:t,discriminator:e,...O(n)})}const eu=o("ZodIntersection",(e,t)=>{so.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ys(e,t,n,o)});function tu(e,t){return new eu({type:"intersection",left:e,right:t})}const nu=o("ZodTuple",(e,t)=>{uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>_s(e,t,n,o),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){const o=t instanceof rn;return new nu({type:"tuple",items:e,rest:o?t:null,...O(o?n:t)})}const ru=o("ZodRecord",(e,t)=>{mo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>xs(e,t,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function iu(e,t,n){return new ru({type:"record",keyType:e,valueType:t,...O(n)})}function au(e,t,n){const o=T(e);return o._zod.values=void 0,new ru({type:"record",keyType:o,valueType:t,...O(n)})}function su(e,t,n){return new ru({type:"record",keyType:e,valueType:t,mode:"loose",...O(n)})}const cu=o("ZodMap",(e,t)=>{fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>gs(0,e),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function lu(e,t,n){return new cu({type:"map",keyType:e,valueType:t,...O(n)})}const uu=o("ZodSet",(e,t)=>{ho.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>hs(0,e),e.min=(...t)=>e.check(da(...t)),e.nonempty=t=>e.check(da(1,t)),e.max=(...t)=>e.check(ua(...t)),e.size=(...t)=>e.check(pa(...t))});function du(e,t){return new uu({type:"set",valueType:e,...O(t)})}const pu=o("ZodEnum",(e,t)=>{bo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>as(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,o)=>{const r={};for(const o of e){if(!n.has(o))throw new Error(`Key ${o} not found in enum`);r[o]=t.entries[o]}return new pu({...t,checks:[],...O(o),entries:r})},e.exclude=(e,o)=>{const r={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new pu({...t,checks:[],...O(o),entries:r})}});function mu(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new pu({type:"enum",entries:n,...O(t)})}function fu(e,t){return new pu({type:"enum",entries:e,...O(t)})}const gu=o("ZodLiteral",(e,t)=>{$o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ss(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function hu(e,t){return new gu({type:"literal",values:Array.isArray(e)?e:[e],...O(t)})}const vu=o("ZodFile",(e,t)=>{yo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>us(e,0,n),e.min=(t,n)=>e.check(da(t,n)),e.max=(t,n)=>e.check(ua(t,n)),e.mime=(t,n)=>e.check(wa(Array.isArray(t)?t:[t],n))});function bu(e){return Oa(vu,e)}const $u=o("ZodTransform",(e,t)=>{_o.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>fs(0,e),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new a(e.constructor.name);n.addIssue=o=>{if("string"==typeof o)n.issues.push(K(o,n.value,t));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(K(t))}};const r=t.transform(n.value,n);return r instanceof Promise?r.then(e=>(n.value=e,n)):(n.value=r,n)}});function yu(e){return new $u({type:"transform",transform:e})}const _u=o("ZodOptional",(e,t)=>{wo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Os(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function xu(e){return new _u({type:"optional",innerType:e})}const wu=o("ZodExactOptional",(e,t)=>{ko.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Os(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function ku(e){return new wu({type:"optional",innerType:e})}const Iu=o("ZodNullable",(e,t)=>{Io.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ws(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Su(e){return new Iu({type:"nullable",innerType:e})}function Cu(e){return xu(Su(e))}const Eu=o("ZodDefault",(e,t)=>{So.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Is(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zu(e,t){return new Eu({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Tu=o("ZodPrefault",(e,t)=>{Eo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ss(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Ou(e,t){return new Tu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():S(t)}})}const Du=o("ZodNonOptional",(e,t)=>{zo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ks(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Uu(e,t){return new Du({type:"nonoptional",innerType:e,...O(t)})}const Nu=o("ZodSuccess",(e,t)=>{Oo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ds(0,0,t),e.unwrap=()=>e._zod.def.innerType});function Au(e){return new Nu({type:"success",innerType:e})}const ju=o("ZodCatch",(e,t)=>{Do.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Cs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ru(e,t){return new ju({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const Pu=o("ZodNaN",(e,t)=>{Uo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>cs(0,e)});function Zu(e){return ea(Pu,e)}const Mu=o("ZodPipe",(e,t)=>{No.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Es(e,t,0,o),e.in=t.in,e.out=t.out});function Lu(e,t){return new Mu({type:"pipe",in:e,out:t})}const qu=o("ZodCodec",(e,t)=>{Mu.init(e,t),jo.init(e,t)});function Vu(e,t,n){return new qu({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Fu=o("ZodReadonly",(e,t)=>{Zo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>zs(e,t,n,o),e.unwrap=()=>e._zod.def.innerType});function Hu(e){return new Fu({type:"readonly",innerType:e})}const Ju=o("ZodTemplateLiteral",(e,t)=>{Lo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>ls(e,0,n)});function Gu(e,t){return new Ju({type:"template_literal",parts:e,...O(t)})}const Bu=o("ZodLazy",(e,t)=>{Fo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ds(e,t,0,o),e.unwrap=()=>e._zod.def.getter()});function Wu(e){return new Bu({type:"lazy",getter:e})}const Ku=o("ZodPromise",(e,t)=>{Vo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(t,n,o)=>Ts(e,t,0,o),e.unwrap=()=>e._zod.def.innerType});function Xu(e){return new Ku({type:"promise",innerType:e})}const Qu=o("ZodFunction",(e,t)=>{qo.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ms(0,e)});function Yu(e){return new Qu({type:"function",input:Array.isArray(e?.input)?ou(e?.input):e?.input??ql(Nl()),output:e?.output??Nl()})}const ed=o("ZodCustom",(e,t)=>{Ho.init(e,t),uc.init(e,t),e._zod.processJSONSchema=(e,t,n)=>ps(0,e)});function td(e){const t=new Dt({check:"custom"});return t._zod.check=e,t}function nd(e,t){return Da(ed,e??(()=>!0),t)}function od(e,t={}){return Ua(ed,e,t)}function rd(e){return Na(e)}const id=ja,ad=Ra;function sd(e,t={}){const n=new ed({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...O(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:"invalid_type",expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const cd=(...e)=>Pa({Codec:qu,Boolean:bl,String:pc},...e);function ld(e){const t=Wu(()=>Wl([mc(e),dl(),$l(),Tl(),ql(t),iu(mc(),t)]));return t}function ud(e,t){return Lu(yu(e),t)}const dd={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function pd(e){c({customError:e})}function md(){return c().customError}var fd;fd||(fd={});const gd={...Object.freeze({__proto__:null,ZodAny:Ol,ZodArray:Ll,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:xl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Oc,ZodCUID2:Uc,ZodCatch:ju,ZodCodec:qu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Zl,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:gc,ZodEmoji:Cc,ZodEnum:pu,ZodExactOptional:wu,ZodFile:vu,ZodFunction:Qu,ZodGUID:vc,ZodIPv4:Lc,ZodIPv6:Hc,ZodIntersection:eu,ZodJWT:ol,ZodKSUID:Zc,ZodLazy:Bu,ZodLiteral:gu,ZodMAC:Vc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Du,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Fl,ZodOptional:_u,ZodPipe:Mu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Fu,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Nu,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:kc,ZodUUID:$c,ZodUndefined:Cl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:Rl,ZodXID:Rc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Dl,array:ql,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:Ru,check:td,cidrv4:Bc,cidrv6:Kc,codec:Vu,cuid:Dc,cuid2:Nc,custom:nd,date:Ml,describe:id,discriminatedUnion:Yl,e164:nl,email:hc,emoji:Ec,enum:mu,exactOptional:ku,file:bu,float32:fl,float64:gl,function:Yu,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Sc,instanceof:sd,int:ml,int32:hl,int64:wl,intersection:tu,ipv4:qc,ipv6:Jc,json:ld,jwt:rl,keyof:Vl,ksuid:Mc,lazy:Wu,literal:hu,looseObject:Gl,looseRecord:su,mac:Fc,map:lu,meta:ad,nan:Zu,nanoid:Tc,nativeEnum:fu,never:jl,nonoptional:Uu,null:Tl,nullable:Su,nullish:Cu,number:dl,object:Hl,optional:xu,partialRecord:au,pipe:Lu,prefault:Ou,preprocess:ud,promise:Xu,readonly:Hu,record:iu,refine:od,set:du,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Sl,templateLiteral:Gu,transform:yu,tuple:ou,uint32:vl,uint64:kl,ulid:jc,undefined:El,union:Wl,unknown:Nl,url:Ic,uuid:yc,uuidv4:_c,uuidv6:xc,uuidv7:wc,void:Pl,xid:Pc,xor:Xl}),...Zs,iso:Bs},hd=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function vd(e,t){if(void 0!==e.not){if("object"==typeof e.not&&0===Object.keys(e.not).length)return gd.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(void 0!==e.unevaluatedItems)throw new Error("unevaluatedItems is not supported");if(void 0!==e.unevaluatedProperties)throw new Error("unevaluatedProperties is not supported");if(void 0!==e.if||void 0!==e.then||void 0!==e.else)throw new Error("Conditional schemas (if/then/else) are not supported");if(void 0!==e.dependentSchemas||void 0!==e.dependentRequired)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return gd.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const o=function(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const n=e.slice(1).split("/").filter(Boolean);if(0===n.length)return t.rootSchema;const o="draft-2020-12"===t.version?"$defs":"definitions";if(n[0]===o){const o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}(n,t),r=bd(o,t);return t.refs.set(n,r),t.processing.delete(n),r}if(void 0!==e.enum){const n=e.enum;if("openapi-3.0"===t.version&&!0===e.nullable&&1===n.length&&null===n[0])return gd.null();if(0===n.length)return gd.never();if(1===n.length)return gd.literal(n[0]);if(n.every(e=>"string"==typeof e))return gd.enum(n);const o=n.map(e=>gd.literal(e));return o.length<2?o[0]:gd.union([o[0],o[1],...o.slice(2)])}if(void 0!==e.const)return gd.literal(e.const);const n=e.type;if(Array.isArray(n)){const o=n.map(n=>vd({...e,type:n},t));return 0===o.length?gd.never():1===o.length?o[0]:gd.union(o)}if(!n)return gd.any();let o;switch(n){case"string":{let t=gd.string();if(e.format){const n=e.format;"email"===n?t=t.check(gd.email()):"uri"===n||"uri-reference"===n?t=t.check(gd.url()):"uuid"===n||"guid"===n?t=t.check(gd.uuid()):"date-time"===n?t=t.check(gd.iso.datetime()):"date"===n?t=t.check(gd.iso.date()):"time"===n?t=t.check(gd.iso.time()):"duration"===n?t=t.check(gd.iso.duration()):"ipv4"===n?t=t.check(gd.ipv4()):"ipv6"===n?t=t.check(gd.ipv6()):"mac"===n?t=t.check(gd.mac()):"cidr"===n?t=t.check(gd.cidrv4()):"cidr-v6"===n?t=t.check(gd.cidrv6()):"base64"===n?t=t.check(gd.base64()):"base64url"===n?t=t.check(gd.base64url()):"e164"===n?t=t.check(gd.e164()):"jwt"===n?t=t.check(gd.jwt()):"emoji"===n?t=t.check(gd.emoji()):"nanoid"===n?t=t.check(gd.nanoid()):"cuid"===n?t=t.check(gd.cuid()):"cuid2"===n?t=t.check(gd.cuid2()):"ulid"===n?t=t.check(gd.ulid()):"xid"===n?t=t.check(gd.xid()):"ksuid"===n&&(t=t.check(gd.ksuid()))}"number"==typeof e.minLength&&(t=t.min(e.minLength)),"number"==typeof e.maxLength&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t="integer"===n?gd.number().int():gd.number();"number"==typeof e.minimum&&(t=t.min(e.minimum)),"number"==typeof e.maximum&&(t=t.max(e.maximum)),"number"==typeof e.exclusiveMinimum?t=t.gt(e.exclusiveMinimum):!0===e.exclusiveMinimum&&"number"==typeof e.minimum&&(t=t.gt(e.minimum)),"number"==typeof e.exclusiveMaximum?t=t.lt(e.exclusiveMaximum):!0===e.exclusiveMaximum&&"number"==typeof e.maximum&&(t=t.lt(e.maximum)),"number"==typeof e.multipleOf&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":o=gd.boolean();break;case"null":o=gd.null();break;case"object":{const n={},r=e.properties||{},i=new Set(e.required||[]);for(const[e,o]of Object.entries(r)){const r=bd(o,t);n[e]=i.has(e)?r:r.optional()}if(e.propertyNames){const r=bd(e.propertyNames,t),i=e.additionalProperties&&"object"==typeof e.additionalProperties?bd(e.additionalProperties,t):gd.any();if(0===Object.keys(n).length){o=gd.record(r,i);break}const a=gd.object(n).passthrough(),s=gd.looseRecord(r,i);o=gd.intersection(a,s);break}if(e.patternProperties){const r=e.patternProperties,i=Object.keys(r),a=[];for(const e of i){const n=bd(r[e],t),o=gd.string().regex(new RegExp(e));a.push(gd.looseRecord(o,n))}const s=[];if(Object.keys(n).length>0&&s.push(gd.object(n).passthrough()),s.push(...a),0===s.length)o=gd.object({}).passthrough();else if(1===s.length)o=s[0];else{let e=gd.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=gd.intersection(e,s[t]);o=e}break}const a=gd.object(n);o=!1===e.additionalProperties?a.strict():"object"==typeof e.additionalProperties?a.catchall(bd(e.additionalProperties,t)):a.passthrough();break}case"array":{const n=e.prefixItems,r=e.items;if(n&&Array.isArray(n)){const i=n.map(e=>bd(e,t)),a=r&&"object"==typeof r&&!Array.isArray(r)?bd(r,t):void 0;o=a?gd.tuple(i).rest(a):gd.tuple(i),"number"==typeof e.minItems&&(o=o.check(gd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(gd.maxLength(e.maxItems)))}else if(Array.isArray(r)){const n=r.map(e=>bd(e,t)),i=e.additionalItems&&"object"==typeof e.additionalItems?bd(e.additionalItems,t):void 0;o=i?gd.tuple(n).rest(i):gd.tuple(n),"number"==typeof e.minItems&&(o=o.check(gd.minLength(e.minItems))),"number"==typeof e.maxItems&&(o=o.check(gd.maxLength(e.maxItems)))}else if(void 0!==r){const n=bd(r,t);let i=gd.array(n);"number"==typeof e.minItems&&(i=i.min(e.minItems)),"number"==typeof e.maxItems&&(i=i.max(e.maxItems)),o=i}else o=gd.array(gd.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(o=o.describe(e.description)),void 0!==e.default&&(o=o.default(e.default)),o}function bd(e,t){if("boolean"==typeof e)return e?gd.any():gd.never();let n=vd(e,t);const o=e.type||void 0!==e.enum||void 0!==e.const;if(e.anyOf&&Array.isArray(e.anyOf)){const r=e.anyOf.map(e=>bd(e,t)),i=gd.union(r);n=o?gd.intersection(n,i):i}if(e.oneOf&&Array.isArray(e.oneOf)){const r=e.oneOf.map(e=>bd(e,t)),i=gd.xor(r);n=o?gd.intersection(n,i):i}if(e.allOf&&Array.isArray(e.allOf))if(0===e.allOf.length)n=o?n:gd.any();else{let r=o?n:bd(e.allOf[0],t);for(let n=o?0:1;n<e.allOf.length;n++)r=gd.intersection(r,bd(e.allOf[n],t));n=r}!0===e.nullable&&"openapi-3.0"===t.version&&(n=gd.nullable(n)),!0===e.readOnly&&(n=gd.readonly(n));const r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const t of i)t in e&&(r[t]=e[t]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const t of a)t in e&&(r[t]=e[t]);for(const t of Object.keys(e))hd.has(t)||(r[t]=e[t]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function $d(e,t){if("boolean"==typeof e)return e?gd.any():gd.never();const n=function(e,t){const n=e.$schema;return"https://json-schema.org/draft/2020-12/schema"===n?"draft-2020-12":"http://json-schema.org/draft-07/schema#"===n?"draft-7":"http://json-schema.org/draft-04/schema#"===n?"draft-4":t??"draft-2020-12"}(e,t?.defaultTarget);return bd(e,{version:n,defs:e.$defs||e.definitions||{},refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ti})}var yd=Object.freeze({__proto__:null,bigint:function(e){return qi(yl,e)},boolean:function(e){return Mi(bl,e)},date:function(e){return Yi(Zl,e)},number:function(e){return Ui(ul,e)},string:function(e){return oi(pc,e)}});c(or());var _d=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Ci,ZodAny:Ol,ZodArray:Ll,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:xl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Oc,ZodCUID2:Uc,ZodCatch:ju,ZodCodec:qu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Zl,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:gc,ZodEmoji:Cc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:Lc,ZodIPv6:Hc,ZodISODate:qs,ZodISODateTime:Ms,ZodISODuration:Js,ZodISOTime:Fs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Zc,ZodLazy:Bu,ZodLiteral:gu,ZodMAC:Vc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Du,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Fl,ZodOptional:_u,ZodPipe:Mu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Fu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Nu,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:kc,ZodUUID:$c,ZodUndefined:Cl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:Rl,ZodXID:Rc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Dl,array:ql,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:Ru,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Vu,coerce:yd,config:c,core:js,cuid:Dc,cuid2:Nc,custom:nd,date:Ml,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:hc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:ku,file:bu,flattenError:oe,float32:fl,float64:gl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Sc,includes:$a,instanceof:sd,int:ml,int32:hl,int64:wl,intersection:tu,ipv4:qc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Vl,ksuid:Mc,lazy:Wu,length:ga,literal:hu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Fc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Zu,nanoid:Tc,nativeEnum:fu,negative:aa,never:jl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Su,nullish:Cu,number:dl,object:Hl,optional:xu,overwrite:ka,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:Lu,positive:ia,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:xa,readonly:Hu,record:iu,refine:od,regex:ha,regexes:Ot,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Sl,templateLiteral:Gu,toJSONSchema:Ns,toLowerCase:Ca,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Sa,tuple:ou,uint32:vl,uint64:kl,ulid:jc,undefined:El,union:Wl,unknown:Nl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:xc,uuidv7:wc,void:Pl,xid:Pc,xor:Xl}),xd=Object.freeze({__proto__:null,$brand:r,$input:Qr,$output:Xr,NEVER:n,TimePrecision:Ci,ZodAny:Ol,ZodArray:Ll,ZodBase64:Xc,ZodBase64URL:Yc,ZodBigInt:yl,ZodBigIntFormat:xl,ZodBoolean:bl,ZodCIDRv4:Gc,ZodCIDRv6:Wc,ZodCUID:Oc,ZodCUID2:Uc,ZodCatch:ju,ZodCodec:qu,ZodCustom:ed,ZodCustomStringFormat:il,ZodDate:Zl,ZodDefault:Eu,ZodDiscriminatedUnion:Ql,ZodE164:tl,ZodEmail:gc,ZodEmoji:Cc,ZodEnum:pu,ZodError:Ks,ZodExactOptional:wu,ZodFile:vu,get ZodFirstPartyTypeKind(){return fd},ZodFunction:Qu,ZodGUID:vc,ZodIPv4:Lc,ZodIPv6:Hc,ZodISODate:qs,ZodISODateTime:Ms,ZodISODuration:Js,ZodISOTime:Fs,ZodIntersection:eu,ZodIssueCode:dd,ZodJWT:ol,ZodKSUID:Zc,ZodLazy:Bu,ZodLiteral:gu,ZodMAC:Vc,ZodMap:cu,ZodNaN:Pu,ZodNanoID:zc,ZodNever:Al,ZodNonOptional:Du,ZodNull:zl,ZodNullable:Iu,ZodNumber:ul,ZodNumberFormat:pl,ZodObject:Fl,ZodOptional:_u,ZodPipe:Mu,ZodPrefault:Tu,ZodPromise:Ku,ZodReadonly:Fu,ZodRealError:Xs,ZodRecord:ru,ZodSet:uu,ZodString:pc,ZodStringFormat:fc,ZodSuccess:Nu,ZodSymbol:Il,ZodTemplateLiteral:Ju,ZodTransform:$u,ZodTuple:nu,ZodType:uc,ZodULID:Ac,ZodURL:kc,ZodUUID:$c,ZodUndefined:Cl,ZodUnion:Bl,ZodUnknown:Ul,ZodVoid:Rl,ZodXID:Rc,ZodXor:Kl,_ZodString:dc,_default:zu,_function:Yu,any:Dl,array:ql,base64:Qc,base64url:el,bigint:_l,boolean:$l,catch:Ru,check:td,cidrv4:Bc,cidrv6:Kc,clone:T,codec:Vu,coerce:yd,config:c,core:js,cuid:Dc,cuid2:Nc,custom:nd,date:Ml,decode:oc,decodeAsync:ic,describe:id,discriminatedUnion:Yl,e164:nl,email:hc,emoji:Ec,encode:nc,encodeAsync:rc,endsWith:_a,enum:mu,exactOptional:ku,file:bu,flattenError:oe,float32:fl,float64:gl,formatError:re,fromJSONSchema:$d,function:Yu,getErrorMap:md,globalRegistry:ti,gt:oa,gte:ra,guid:bc,hash:ll,hex:cl,hostname:sl,httpUrl:Sc,includes:$a,instanceof:sd,int:ml,int32:hl,int64:wl,intersection:tu,ipv4:qc,ipv6:Jc,iso:Bs,json:ld,jwt:rl,keyof:Vl,ksuid:Mc,lazy:Wu,length:ga,literal:hu,locales:Kr,looseObject:Gl,looseRecord:su,lowercase:va,lt:ta,lte:na,mac:Fc,map:lu,maxLength:ma,maxSize:ua,meta:ad,mime:wa,minLength:fa,minSize:da,multipleOf:la,nan:Zu,nanoid:Tc,nativeEnum:fu,negative:aa,never:jl,nonnegative:ca,nonoptional:Uu,nonpositive:sa,normalize:Ia,null:Tl,nullable:Su,nullish:Cu,number:dl,object:Hl,optional:xu,overwrite:ka,parse:Qs,parseAsync:Ys,partialRecord:au,pipe:Lu,positive:ia,prefault:Ou,preprocess:ud,prettifyError:se,promise:Xu,property:xa,readonly:Hu,record:iu,refine:od,regex:ha,regexes:Ot,registry:ei,safeDecode:sc,safeDecodeAsync:lc,safeEncode:ac,safeEncodeAsync:cc,safeParse:ec,safeParseAsync:tc,set:du,setErrorMap:pd,size:pa,slugify:za,startsWith:ya,strictObject:Jl,string:mc,stringFormat:al,stringbool:cd,success:Au,superRefine:rd,symbol:Sl,templateLiteral:Gu,toJSONSchema:Ns,toLowerCase:Ca,toUpperCase:Ea,transform:yu,treeifyError:ie,trim:Sa,tuple:ou,uint32:vl,uint64:kl,ulid:jc,undefined:El,union:Wl,unknown:Nl,uppercase:ba,url:Ic,util:Y,uuid:yc,uuidv4:_c,uuidv6:xc,uuidv7:wc,void:Pl,xid:Pc,xor:Xl,z:_d});const wd="io.modelcontextprotocol/related-task",kd="2.0",Id=nd(e=>null!==e&&("object"==typeof e||"function"==typeof e)),Sd=Wl([mc(),dl().int()]),Cd=mc();Gl({ttl:dl().optional(),pollInterval:dl().optional()});const Ed=Hl({ttl:dl().optional()}),zd=Hl({taskId:mc()}),Td=Gl({progressToken:Sd.optional(),[wd]:zd.optional()}),Od=Hl({_meta:Td.optional()}),Dd=Od.extend({task:Ed.optional()}),Ud=Hl({method:mc(),params:Od.loose().optional()}),Nd=Hl({_meta:Td.optional()}),Ad=Hl({method:mc(),params:Nd.loose().optional()}),jd=Gl({_meta:Td.optional()}),Rd=Wl([mc(),dl().int()]),Pd=Hl({jsonrpc:hu(kd),id:Rd,...Ud.shape}).strict(),Zd=e=>Pd.safeParse(e).success,Md=Hl({jsonrpc:hu(kd),...Ad.shape}).strict(),Ld=Hl({jsonrpc:hu(kd),id:Rd,result:jd}).strict(),qd=e=>Ld.safeParse(e).success;var Vd;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(Vd||(Vd={}));const Fd=Hl({jsonrpc:hu(kd),id:Rd.optional(),error:Hl({code:dl().int(),message:mc(),data:Nl().optional()})}).strict(),Hd=Wl([Pd,Md,Ld,Fd]);Wl([Ld,Fd]);const Jd=jd.strict(),Gd=Nd.extend({requestId:Rd.optional(),reason:mc().optional()}),Bd=Ad.extend({method:hu("notifications/cancelled"),params:Gd}),Wd=Hl({src:mc(),mimeType:mc().optional(),sizes:ql(mc()).optional(),theme:mu(["light","dark"]).optional()}),Kd=Hl({icons:ql(Wd).optional()}),Xd=Hl({name:mc(),title:mc().optional()}),Qd=Xd.extend({...Xd.shape,...Kd.shape,version:mc(),websiteUrl:mc().optional(),description:mc().optional()}),Yd=tu(Hl({applyDefaults:$l().optional()}),iu(mc(),Nl())),ep=ud(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,tu(Hl({form:Yd.optional(),url:Id.optional()}),iu(mc(),Nl()).optional())),tp=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({sampling:Gl({createMessage:Id.optional()}).optional(),elicitation:Gl({create:Id.optional()}).optional()}).optional()}),np=Gl({list:Id.optional(),cancel:Id.optional(),requests:Gl({tools:Gl({call:Id.optional()}).optional()}).optional()}),op=Hl({experimental:iu(mc(),Id).optional(),sampling:Hl({context:Id.optional(),tools:Id.optional()}).optional(),elicitation:ep.optional(),roots:Hl({listChanged:$l().optional()}).optional(),tasks:tp.optional(),extensions:iu(mc(),Id).optional()}),rp=Od.extend({protocolVersion:mc(),capabilities:op,clientInfo:Qd}),ip=Ud.extend({method:hu("initialize"),params:rp}),ap=Hl({experimental:iu(mc(),Id).optional(),logging:Id.optional(),completions:Id.optional(),prompts:Hl({listChanged:$l().optional()}).optional(),resources:Hl({subscribe:$l().optional(),listChanged:$l().optional()}).optional(),tools:Hl({listChanged:$l().optional()}).optional(),tasks:np.optional(),extensions:iu(mc(),Id).optional()}),sp=jd.extend({protocolVersion:mc(),capabilities:ap,serverInfo:Qd,instructions:mc().optional()}),cp=Ad.extend({method:hu("notifications/initialized"),params:Nd.optional()}),lp=Ud.extend({method:hu("ping"),params:Od.optional()}),up=Hl({progress:dl(),total:xu(dl()),message:xu(mc())}),dp=Hl({...Nd.shape,...up.shape,progressToken:Sd}),pp=Ad.extend({method:hu("notifications/progress"),params:dp}),mp=Od.extend({cursor:Cd.optional()}),fp=Ud.extend({params:mp.optional()}),gp=jd.extend({nextCursor:Cd.optional()}),hp=mu(["working","input_required","completed","failed","cancelled"]),vp=Hl({taskId:mc(),status:hp,ttl:Wl([dl(),Tl()]),createdAt:mc(),lastUpdatedAt:mc(),pollInterval:xu(dl()),statusMessage:xu(mc())}),bp=jd.extend({task:vp}),$p=Nd.merge(vp),yp=Ad.extend({method:hu("notifications/tasks/status"),params:$p}),_p=Ud.extend({method:hu("tasks/get"),params:Od.extend({taskId:mc()})}),xp=jd.merge(vp),wp=Ud.extend({method:hu("tasks/result"),params:Od.extend({taskId:mc()})});jd.loose();const kp=fp.extend({method:hu("tasks/list")}),Ip=gp.extend({tasks:ql(vp)}),Sp=Ud.extend({method:hu("tasks/cancel"),params:Od.extend({taskId:mc()})}),Cp=jd.merge(vp),Ep=Hl({uri:mc(),mimeType:xu(mc()),_meta:iu(mc(),Nl()).optional()}),zp=Ep.extend({text:mc()}),Tp=mc().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Op=Ep.extend({blob:Tp}),Dp=mu(["user","assistant"]),Up=Hl({audience:ql(Dp).optional(),priority:dl().min(0).max(1).optional(),lastModified:Ls({offset:!0}).optional()}),Np=Hl({...Xd.shape,...Kd.shape,uri:mc(),description:xu(mc()),mimeType:xu(mc()),size:xu(dl()),annotations:Up.optional(),_meta:xu(Gl({}))}),Ap=Hl({...Xd.shape,...Kd.shape,uriTemplate:mc(),description:xu(mc()),mimeType:xu(mc()),annotations:Up.optional(),_meta:xu(Gl({}))}),jp=fp.extend({method:hu("resources/list")}),Rp=gp.extend({resources:ql(Np)}),Pp=fp.extend({method:hu("resources/templates/list")}),Zp=gp.extend({resourceTemplates:ql(Ap)}),Mp=Od.extend({uri:mc()}),Lp=Mp,qp=Ud.extend({method:hu("resources/read"),params:Lp}),Vp=jd.extend({contents:ql(Wl([zp,Op]))}),Fp=Ad.extend({method:hu("notifications/resources/list_changed"),params:Nd.optional()}),Hp=Mp,Jp=Ud.extend({method:hu("resources/subscribe"),params:Hp}),Gp=Mp,Bp=Ud.extend({method:hu("resources/unsubscribe"),params:Gp}),Wp=Nd.extend({uri:mc()}),Kp=Ad.extend({method:hu("notifications/resources/updated"),params:Wp}),Xp=Hl({name:mc(),description:xu(mc()),required:xu($l())}),Qp=Hl({...Xd.shape,...Kd.shape,description:xu(mc()),arguments:xu(ql(Xp)),_meta:xu(Gl({}))}),Yp=fp.extend({method:hu("prompts/list")}),em=gp.extend({prompts:ql(Qp)}),tm=Od.extend({name:mc(),arguments:iu(mc(),mc()).optional()}),nm=Ud.extend({method:hu("prompts/get"),params:tm}),om=Hl({type:hu("text"),text:mc(),annotations:Up.optional(),_meta:iu(mc(),Nl()).optional()}),rm=Hl({type:hu("image"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Nl()).optional()}),im=Hl({type:hu("audio"),data:Tp,mimeType:mc(),annotations:Up.optional(),_meta:iu(mc(),Nl()).optional()}),am=Hl({type:hu("tool_use"),name:mc(),id:mc(),input:iu(mc(),Nl()),_meta:iu(mc(),Nl()).optional()}),sm=Hl({type:hu("resource"),resource:Wl([zp,Op]),annotations:Up.optional(),_meta:iu(mc(),Nl()).optional()}),cm=Np.extend({type:hu("resource_link")}),lm=Wl([om,rm,im,cm,sm]),um=Hl({role:Dp,content:lm}),dm=jd.extend({description:mc().optional(),messages:ql(um)}),pm=Ad.extend({method:hu("notifications/prompts/list_changed"),params:Nd.optional()}),mm=Hl({title:mc().optional(),readOnlyHint:$l().optional(),destructiveHint:$l().optional(),idempotentHint:$l().optional(),openWorldHint:$l().optional()}),fm=Hl({taskSupport:mu(["required","optional","forbidden"]).optional()}),gm=Hl({...Xd.shape,...Kd.shape,description:mc().optional(),inputSchema:Hl({type:hu("object"),properties:iu(mc(),Id).optional(),required:ql(mc()).optional()}).catchall(Nl()),outputSchema:Hl({type:hu("object"),properties:iu(mc(),Id).optional(),required:ql(mc()).optional()}).catchall(Nl()).optional(),annotations:mm.optional(),execution:fm.optional(),_meta:iu(mc(),Nl()).optional()}),hm=fp.extend({method:hu("tools/list")}),vm=gp.extend({tools:ql(gm)}),bm=jd.extend({content:ql(lm).default([]),structuredContent:iu(mc(),Nl()).optional(),isError:$l().optional()});bm.or(jd.extend({toolResult:Nl()}));const $m=Dd.extend({name:mc(),arguments:iu(mc(),Nl()).optional()}),ym=Ud.extend({method:hu("tools/call"),params:$m}),_m=Ad.extend({method:hu("notifications/tools/list_changed"),params:Nd.optional()});Hl({autoRefresh:$l().default(!0),debounceMs:dl().int().nonnegative().default(300)});const xm=mu(["debug","info","notice","warning","error","critical","alert","emergency"]),wm=Od.extend({level:xm}),km=Ud.extend({method:hu("logging/setLevel"),params:wm}),Im=Nd.extend({level:xm,logger:mc().optional(),data:Nl()}),Sm=Ad.extend({method:hu("notifications/message"),params:Im}),Cm=Hl({name:mc().optional()}),Em=Hl({hints:ql(Cm).optional(),costPriority:dl().min(0).max(1).optional(),speedPriority:dl().min(0).max(1).optional(),intelligencePriority:dl().min(0).max(1).optional()}),zm=Hl({mode:mu(["auto","required","none"]).optional()}),Tm=Hl({type:hu("tool_result"),toolUseId:mc().describe("The unique identifier for the corresponding tool call."),content:ql(lm).default([]),structuredContent:Hl({}).loose().optional(),isError:$l().optional(),_meta:iu(mc(),Nl()).optional()}),Om=Yl("type",[om,rm,im]),Dm=Yl("type",[om,rm,im,am,Tm]),Um=Hl({role:Dp,content:Wl([Dm,ql(Dm)]),_meta:iu(mc(),Nl()).optional()}),Nm=Dd.extend({messages:ql(Um),modelPreferences:Em.optional(),systemPrompt:mc().optional(),includeContext:mu(["none","thisServer","allServers"]).optional(),temperature:dl().optional(),maxTokens:dl().int(),stopSequences:ql(mc()).optional(),metadata:Id.optional(),tools:ql(gm).optional(),toolChoice:zm.optional()}),Am=Ud.extend({method:hu("sampling/createMessage"),params:Nm}),jm=jd.extend({model:mc(),stopReason:xu(mu(["endTurn","stopSequence","maxTokens"]).or(mc())),role:Dp,content:Om}),Rm=jd.extend({model:mc(),stopReason:xu(mu(["endTurn","stopSequence","maxTokens","toolUse"]).or(mc())),role:Dp,content:Wl([Dm,ql(Dm)])}),Pm=Hl({type:hu("boolean"),title:mc().optional(),description:mc().optional(),default:$l().optional()}),Zm=Hl({type:hu("string"),title:mc().optional(),description:mc().optional(),minLength:dl().optional(),maxLength:dl().optional(),format:mu(["email","uri","date","date-time"]).optional(),default:mc().optional()}),Mm=Hl({type:mu(["number","integer"]),title:mc().optional(),description:mc().optional(),minimum:dl().optional(),maximum:dl().optional(),default:dl().optional()}),Lm=Hl({type:hu("string"),title:mc().optional(),description:mc().optional(),enum:ql(mc()),default:mc().optional()}),qm=Hl({type:hu("string"),title:mc().optional(),description:mc().optional(),oneOf:ql(Hl({const:mc(),title:mc()})),default:mc().optional()}),Vm=Hl({type:hu("string"),title:mc().optional(),description:mc().optional(),enum:ql(mc()),enumNames:ql(mc()).optional(),default:mc().optional()}),Fm=Wl([Lm,qm]),Hm=Wl([Hl({type:hu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({type:hu("string"),enum:ql(mc())}),default:ql(mc()).optional()}),Hl({type:hu("array"),title:mc().optional(),description:mc().optional(),minItems:dl().optional(),maxItems:dl().optional(),items:Hl({anyOf:ql(Hl({const:mc(),title:mc()}))}),default:ql(mc()).optional()})]),Jm=Wl([Vm,Fm,Hm]),Gm=Wl([Jm,Pm,Zm,Mm]),Bm=Wl([Dd.extend({mode:hu("form").optional(),message:mc(),requestedSchema:Hl({type:hu("object"),properties:iu(mc(),Gm),required:ql(mc()).optional()})}),Dd.extend({mode:hu("url"),message:mc(),elicitationId:mc(),url:mc().url()})]),Wm=Ud.extend({method:hu("elicitation/create"),params:Bm}),Km=Nd.extend({elicitationId:mc()}),Xm=Ad.extend({method:hu("notifications/elicitation/complete"),params:Km}),Qm=jd.extend({action:mu(["accept","decline","cancel"]),content:ud(e=>null===e?void 0:e,iu(mc(),Wl([mc(),dl(),$l(),ql(mc())])).optional())}),Ym=Hl({type:hu("ref/resource"),uri:mc()}),ef=Hl({type:hu("ref/prompt"),name:mc()}),tf=Od.extend({ref:Wl([ef,Ym]),argument:Hl({name:mc(),value:mc()}),context:Hl({arguments:iu(mc(),mc()).optional()}).optional()}),nf=Ud.extend({method:hu("completion/complete"),params:tf}),of=jd.extend({completion:Gl({values:ql(mc()).max(100),total:xu(dl().int()),hasMore:xu($l())})}),rf=Hl({uri:mc().startsWith("file://"),name:mc().optional(),_meta:iu(mc(),Nl()).optional()}),af=Ud.extend({method:hu("roots/list"),params:Od.optional()}),sf=jd.extend({roots:ql(rf)}),cf=Ad.extend({method:hu("notifications/roots/list_changed"),params:Nd.optional()});Wl([lp,ip,nf,km,nm,Yp,jp,Pp,qp,Jp,Bp,ym,hm,_p,wp,kp,Sp]),Wl([Bd,pp,cp,cf,yp]),Wl([Jd,jm,Rm,Qm,sf,xp,Ip,bp]),Wl([lp,Am,Wm,af,_p,wp,kp,Sp]),Wl([Bd,pp,Sm,Kp,Fp,_m,pm,yp,Xm]),Wl([Jd,sp,of,dm,em,Rp,Zp,Vp,bm,vm,xp,Ip,bp]);class lf extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,t,n){if(e===Vd.UrlElicitationRequired&&n){const e=n;if(e.elicitations)return new uf(e.elicitations,t)}return new lf(e,t,n)}}class uf extends lf{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Vd.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}function df(e){return"completed"===e||"failed"===e||"cancelled"===e}function pf(e){const t=function(e){if(!e)return;let t;if(Rs(e)){const n=e;t=n._zod?.def?.shape}else t=e.shape;if(t){if("function"==typeof t)try{return t()}catch{return}return t}}(e),n=t?.method;if(!n)throw new Error("Schema is missing a method literal");const o=function(e){if(Rs(e)){const t=e,n=t._zod?.def;if(n){if(void 0!==n.value)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const n=e.value;if(void 0!==n)return n}(n);if("string"!=typeof o)throw new Error("Schema method literal must be a string");return o}function mf(e,t){const n=Ps(e,t);if(!n.success)throw n.error;return n.data}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");class ff{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Bd,e=>{this._oncancel(e)}),this.setNotificationHandler(pp,e=>{this._onprogress(e)}),this.setRequestHandler(lp,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_p,async(e,t)=>{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Vd.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(wp,async(e,t)=>{const n=async()=>{const o=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(o,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,n=t.id,o=this._requestResolvers.get(n);if(o)if(this._requestResolvers.delete(n),"response"===e.type)o(t);else{const e=t;o(new lf(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${n}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const r=await this._taskStore.getTask(o,t.sessionId);if(!r)throw new lf(Vd.InvalidParams,`Task not found: ${o}`);if(!df(r.status))return await this._waitForTaskUpdate(o,t.signal),await n();if(df(r.status)){const e=await this._taskStore.getTaskResult(o,t.sessionId);return this._clearTaskQueue(o),{...e,_meta:{...e._meta,[wd]:{taskId:o}}}}return await n()};return await n()}),this.setRequestHandler(kp,async(e,t)=>{try{const{tasks:n,nextCursor:o}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:o,_meta:{}}}catch(e){throw new lf(Vd.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Sp,async(e,t)=>{try{const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new lf(Vd.InvalidParams,`Task not found: ${e.params.taskId}`);if(df(n.status))throw new lf(Vd.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const o=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!o)throw new lf(Vd.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...o}}catch(e){if(e instanceof lf)throw e;throw new lf(Vd.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,n,o,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),lf.fromError(Vd.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};const o=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{var n;o?.(e,t),qd(e)||(n=e,Fd.safeParse(n).success)?this._onresponse(e):Zd(e)?this._onrequest(e,t):(e=>Md.safeParse(e).success)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=lf.fromError(Vd.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,r=e.params?._meta?.[wd]?.taskId;if(void 0===n){const t={jsonrpc:"2.0",id:e.id,error:{code:Vd.MethodNotFound,message:"Method not found"}};return void(r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:t,timestamp:Date.now()},o?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):o?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const i=new AbortController;this._requestHandlerAbortControllers.set(e.id,i);const a=(s=e.params,Dd.safeParse(s).success?e.params.task:void 0);var s;const c=this._taskStore?this.requestTaskStore(e,o?.sessionId):void 0,l={signal:i.signal,sessionId:o?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(i.signal.aborted)return;const n={relatedRequestId:e.id};r&&(n.relatedTask={taskId:r}),await this.notification(t,n)},sendRequest:async(t,n,o)=>{if(i.signal.aborted)throw new lf(Vd.ConnectionClosed,"Request was cancelled");const a={...o,relatedRequestId:e.id};r&&!a.relatedTask&&(a.relatedTask={taskId:r});const s=a.relatedTask?.taskId??r;return s&&c&&await c.updateTaskStatus(s,"input_required"),await this.request(t,n,a)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:r,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,l)).then(async t=>{if(i.signal.aborted)return;const n={result:t,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))},async t=>{if(i.signal.aborted)return;const n={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Vd.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:n,timestamp:Date.now()},o?.sessionId):await(o?.send(n))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===i&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const i=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&i&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(e){return this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),void i(e)}r(n)}_onresponse(e){const t=Number(e.id),n=this._requestResolvers.get(t);if(n){if(this._requestResolvers.delete(t),qd(e))n(e);else{n(new lf(e.error.code,e.error.message,e.error.data))}return}const o=this._responseHandlers.get(t);if(void 0===o)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let r=!1;if(qd(e)&&e.result&&"object"==typeof e.result){const n=e.result;if(n.task&&"object"==typeof n.task){const e=n.task;"string"==typeof e.taskId&&(r=!0,this._taskProgressTokens.set(e.taskId,t))}}if(r||this._progressHandlers.delete(t),qd(e))o(e);else{o(lf.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,n){const{task:o}=n??{};if(!o){try{const o=await this.request(e,t,n);yield{type:"result",result:o}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Vd.InternalError,String(e))}}return}let r;try{const o=await this.request(e,bp,n);if(!o.task)throw new lf(Vd.InternalError,"Task creation did not return a task");for(r=o.task.taskId,yield{type:"taskCreated",task:o.task};;){const e=await this.getTask({taskId:r},n);if(yield{type:"taskStatus",task:e},df(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:r},t,n);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new lf(Vd.InternalError,`Task ${r} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new lf(Vd.InternalError,`Task ${r} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:r},t,n);return void(yield{type:"result",result:e})}const o=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,o)),n?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof lf?e:new lf(Vd.InternalError,String(e))}}}request(e,t,n){const{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i,task:a,relatedTask:s}=n??{};return new Promise((c,l)=>{const u=e=>{l(e)};if(!this._transport)return void u(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(e){return void u(e)}n?.signal?.throwIfAborted();const d=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),a&&(p.params={...p.params,task:a}),s&&(p.params={...p.params,_meta:{...p.params?._meta||{},[wd]:s}});const m=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(e)}},{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof lf?e:new lf(Vd.RequestTimeout,String(e));l(t)};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{const n=Ps(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});const f=n?.timeout??6e4;this._setupTimeout(d,f,n?.maxTotalTimeout,()=>m(lf.fromError(Vd.RequestTimeout,"Request timed out",{timeout:f})),n?.resetTimeoutOnProgress??!1);const g=s?.taskId;if(g){const e=e=>{const t=this._responseHandlers.get(d);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,e),this._enqueueTaskMessage(g,{type:"request",message:p,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})}else this._transport.send(p,{relatedRequestId:o,resumptionToken:r,onresumptiontoken:i}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},xp,t)}async getTaskResult(e,t,n){return this.request({method:"tasks/result",params:e},t,n)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},Ip,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Cp,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const n=t?.relatedTask?.taskId;if(n){const o={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[wd]:t.relatedTask}}};return void await this._enqueueTaskMessage(n,{type:"notification",message:o,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[wd]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))})}let o={...e,jsonrpc:"2.0"};t?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[wd]:t.relatedTask}}}),await this._transport.send(o,t)}setRequestHandler(e,t){const n=pf(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,o)=>{const r=mf(e,n);return Promise.resolve(t(r,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const n=pf(e);this._notificationHandlers.set(n,n=>{const o=mf(e,n);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,o)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const n=await this._taskMessageQueue.dequeueAll(e,t);for(const t of n)if("request"===t.type&&Zd(t.message)){const n=t.message.id,o=this._requestResolvers.get(n);o?(o(new lf(Vd.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(n)):this._onerror(new Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,o)=>{if(t.aborted)return void o(new lf(Vd.InvalidRequest,"Request cancelled"));const r=setTimeout(e,n);t.addEventListener("abort",()=>{clearTimeout(r),o(new lf(Vd.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await n.createTask(o,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const o=await n.getTask(e,t);if(!o)throw new lf(Vd.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(e,o,r)=>{await n.storeTaskResult(e,o,r,t);const i=await n.getTask(e,t);if(i){const t=yp.parse({method:"notifications/tasks/status",params:i});await this.notification(t),df(i.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,o,r)=>{const i=await n.getTask(e,t);if(!i)throw new lf(Vd.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(df(i.status))throw new lf(Vd.InvalidParams,`Cannot update task "${e}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,o,r,t);const a=await n.getTask(e,t);if(a){const t=yp.parse({method:"notifications/tasks/status",params:a});await this.notification(t),df(a.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}}function gf(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}var hf;hf=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"&&new Proxy(hf,{get:(e,t)=>(typeof require<"u"?require:e)[t]});class vf extends ff{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let o=n.shape.method.value;this._registeredMethods.add(o);let r=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),r.onHandler?.(n);for(let e of[...r.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let o=n.listeners.indexOf(t);-1!==o&&n.listeners.splice(o,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setRequestHandler"),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,"setNotificationHandler"),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}}class bf{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource)return void console.debug("Ignoring message from unknown source",e);let n=Hd.safeParse(e.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):"2.0"!==e.data?.jsonrpc?console.debug("Ignoring non-JSON-RPC message",n.error.message,e):(console.error("Failed to parse message",n.error.message,e),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){"ui/notifications/tool-input-partial"!==e.method&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var $f=Wl([hu("light"),hu("dark")]).describe("Color theme preference for the host environment."),yf=Wl([hu("inline"),hu("fullscreen"),hu("pip")]).describe("Display mode for UI presentation."),_f=iu(Wl([hu("--color-background-primary"),hu("--color-background-secondary"),hu("--color-background-tertiary"),hu("--color-background-inverse"),hu("--color-background-ghost"),hu("--color-background-info"),hu("--color-background-danger"),hu("--color-background-success"),hu("--color-background-warning"),hu("--color-background-disabled"),hu("--color-text-primary"),hu("--color-text-secondary"),hu("--color-text-tertiary"),hu("--color-text-inverse"),hu("--color-text-ghost"),hu("--color-text-info"),hu("--color-text-danger"),hu("--color-text-success"),hu("--color-text-warning"),hu("--color-text-disabled"),hu("--color-border-primary"),hu("--color-border-secondary"),hu("--color-border-tertiary"),hu("--color-border-inverse"),hu("--color-border-ghost"),hu("--color-border-info"),hu("--color-border-danger"),hu("--color-border-success"),hu("--color-border-warning"),hu("--color-border-disabled"),hu("--color-ring-primary"),hu("--color-ring-secondary"),hu("--color-ring-inverse"),hu("--color-ring-info"),hu("--color-ring-danger"),hu("--color-ring-success"),hu("--color-ring-warning"),hu("--font-sans"),hu("--font-mono"),hu("--font-weight-normal"),hu("--font-weight-medium"),hu("--font-weight-semibold"),hu("--font-weight-bold"),hu("--font-text-xs-size"),hu("--font-text-sm-size"),hu("--font-text-md-size"),hu("--font-text-lg-size"),hu("--font-heading-xs-size"),hu("--font-heading-sm-size"),hu("--font-heading-md-size"),hu("--font-heading-lg-size"),hu("--font-heading-xl-size"),hu("--font-heading-2xl-size"),hu("--font-heading-3xl-size"),hu("--font-text-xs-line-height"),hu("--font-text-sm-line-height"),hu("--font-text-md-line-height"),hu("--font-text-lg-line-height"),hu("--font-heading-xs-line-height"),hu("--font-heading-sm-line-height"),hu("--font-heading-md-line-height"),hu("--font-heading-lg-line-height"),hu("--font-heading-xl-line-height"),hu("--font-heading-2xl-line-height"),hu("--font-heading-3xl-line-height"),hu("--border-radius-xs"),hu("--border-radius-sm"),hu("--border-radius-md"),hu("--border-radius-lg"),hu("--border-radius-xl"),hu("--border-radius-full"),hu("--border-width-regular"),hu("--shadow-hairline"),hu("--shadow-sm"),hu("--shadow-md"),hu("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."),Wl([mc(),El()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");Hl({method:hu("ui/open-link"),params:Hl({url:mc().describe("URL to open in the host's browser")})});var xf=Hl({isError:$l().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),wf=Hl({isError:$l().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),kf=Hl({isError:$l().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();Hl({method:hu("ui/notifications/sandbox-proxy-ready"),params:Hl({})});var If=Hl({connectDomains:ql(mc()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted → no network connections (secure default)"),resourceDomains:ql(mc()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:ql(mc()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:ql(mc()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Sf=Hl({camera:Hl({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:Hl({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:Hl({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:Hl({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});Hl({method:hu("ui/notifications/size-changed"),params:Hl({width:dl().optional().describe("New width in pixels."),height:dl().optional().describe("New height in pixels.")})});var Cf=Hl({method:hu("ui/notifications/tool-input"),params:Hl({arguments:iu(mc(),Nl().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),Ef=Hl({method:hu("ui/notifications/tool-input-partial"),params:Hl({arguments:iu(mc(),Nl().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),zf=Hl({method:hu("ui/notifications/tool-cancelled"),params:Hl({reason:mc().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Tf=Hl({fonts:mc().optional()}),Of=Hl({variables:_f.optional().describe("CSS variables for theming the app."),css:Tf.optional().describe("CSS blocks that apps can inject.")}),Df=Hl({method:hu("ui/resource-teardown"),params:Hl({})});iu(mc(),Nl());var Uf=Hl({text:Hl({}).optional().describe("Host supports text content blocks."),image:Hl({}).optional().describe("Host supports image content blocks."),audio:Hl({}).optional().describe("Host supports audio content blocks."),resource:Hl({}).optional().describe("Host supports resource content blocks."),resourceLink:Hl({}).optional().describe("Host supports resource link content blocks."),structuredContent:Hl({}).optional().describe("Host supports structured content.")});Hl({method:hu("ui/notifications/request-teardown"),params:Hl({}).optional()});var Nf=Hl({experimental:iu(mc(),iu(mc(),Dl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:Hl({}).optional().describe("Host supports opening external URLs."),downloadFile:Hl({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:Hl({listChanged:$l().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:Hl({listChanged:$l().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:Hl({}).optional().describe("Host accepts log messages."),sandbox:Hl({permissions:Sf.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:If.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Uf.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Uf.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:Hl({tools:Hl({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Af=Hl({experimental:iu(mc(),iu(mc(),Dl()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:Hl({listChanged:$l().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:ql(yf).optional().describe("Display modes the app supports.")});Hl({method:hu("ui/notifications/initialized"),params:Hl({}).optional()}),Hl({csp:If.optional().describe("Content Security Policy configuration for UI resources."),permissions:Sf.optional().describe("Sandbox permissions requested by the UI resource."),domain:mc().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."),prefersBorder:$l().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border")}),Hl({method:hu("ui/request-display-mode"),params:Hl({mode:yf.describe("The display mode being requested.")})});var jf=Hl({mode:yf.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Rf=Wl([hu("model"),hu("app")]).describe("Tool visibility scope - who can access the tool.");Hl({resourceUri:mc().optional(),visibility:ql(Rf).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'),csp:jl().optional(),permissions:jl().optional()}),Hl({mimeTypes:ql(mc()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Hl({method:hu("ui/download-file"),params:Hl({contents:ql(Wl([sm,cm])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Hl({method:hu("ui/message"),params:Hl({role:hu("user").describe('Message role, currently only "user" is supported.'),content:ql(lm).describe("Message content blocks (text, image, etc.).")})}),Hl({method:hu("ui/notifications/sandbox-resource-ready"),params:Hl({html:mc().describe("HTML content to load into the inner iframe."),sandbox:mc().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:If.optional().describe("CSP configuration from resource metadata."),permissions:Sf.optional().describe("Sandbox permissions from resource metadata.")})});var Pf=Hl({method:hu("ui/notifications/tool-result"),params:bm.describe("Standard MCP tool execution result.")}),Zf=Hl({toolInfo:Hl({id:Rd.optional().describe("JSON-RPC id of the tools/call request."),tool:gm.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:$f.optional().describe("Current color theme preference."),styles:Of.optional().describe("Style configuration for theming the app."),displayMode:yf.optional().describe("How the UI is currently displayed."),availableDisplayModes:ql(yf).optional().describe("Display modes the host supports."),containerDimensions:Wl([Hl({height:dl().describe("Fixed container height in pixels.")}),Hl({maxHeight:Wl([dl(),El()]).optional().describe("Maximum container height in pixels.")})]).and(Wl([Hl({width:dl().describe("Fixed container width in pixels.")}),Hl({maxWidth:Wl([dl(),El()]).optional().describe("Maximum container width in pixels.")})])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."),locale:mc().optional().describe("User's language and region preference in BCP 47 format."),timeZone:mc().optional().describe("User's timezone in IANA format."),userAgent:mc().optional().describe("Host application identifier."),platform:Wl([hu("web"),hu("desktop"),hu("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:Hl({touch:$l().optional().describe("Whether the device supports touch input."),hover:$l().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:Hl({top:dl().describe("Top safe area inset in pixels."),right:dl().describe("Right safe area inset in pixels."),bottom:dl().describe("Bottom safe area inset in pixels."),left:dl().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),Mf=Hl({method:hu("ui/notifications/host-context-changed"),params:Zf.describe("Partial context update containing only changed fields.")});Hl({method:hu("ui/update-model-context"),params:Hl({content:ql(lm).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:iu(mc(),Nl().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Hl({method:hu("ui/initialize"),params:Hl({appInfo:Qd.describe("App identification (name and version)."),appCapabilities:Af.describe("Features and capabilities this app provides."),protocolVersion:mc().describe("Protocol version this app supports.")})});var Lf=Hl({protocolVersion:mc().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Qd.describe("Host application identification and version."),hostCapabilities:Nf.describe("Features and capabilities provided by the host."),hostContext:Zf.describe("Rich context about the host environment.")}).passthrough(),qf={target:"draft-2020-12"};async function Vf(e,t){let n=e["~standard"];if(n.jsonSchema)return n.jsonSchema[t](qf);if("zod"===n.vendor){let{z:n}=await Promise.resolve().then(function(){return xd});return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Ff(e,t,n=""){let o=await e["~standard"].validate(t);if(o.issues){let e=o.issues.map(e=>{let t=e.path?.map(e=>"object"==typeof e?e.key:e).join(".");return t?`${t}: ${e.message}`:e.message}).join("; ");throw Error(n+e)}return o.value}class Hf extends vf{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Cf,toolinputpartial:Ef,toolresult:Pf,toolcancelled:zf,hostcontextchanged:Mf};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!Hf.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e))return;if(this._everHadListener.add(e),!this._initializedSent)return;let t=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(t);console.warn(t)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){"hostcontextchanged"===e&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||c({jitless:!0}),this.setRequestHandler(lp,e=>(console.log("Received ping:",e.params),{})),this.setEventHandler("hostcontextchanged",void 0)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._capabilities=function(e,t){const n={...e};for(const e in t){const o=e,r=t[o];if(void 0===r)continue;const i=n[o];gf(i)&&gf(r)?n[o]={...i,...r}:n[o]=r}return n}(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let o=this,r=()=>{o._initializedSent&&o._capabilities.tools?.listChanged&&o.sendToolListChanged()},i=void 0!==t.inputSchema,a={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,r()},disable(){this.enabled=!1,r()},update(e){Object.assign(this,e),r()},remove(){o._registeredTools[e]===a&&(delete o._registeredTools[e],r())},handler:async(t,o)=>{if(!a.enabled)throw Error(`Tool ${e} is disabled`);let r;if(i){let i=a.inputSchema,s=i?await Ff(i,t??{},`Invalid input for tool ${e}: `):t??{};r=await n(s,o)}else r=await n(o);return a.outputSchema&&!r.isError&&(r.structuredContent=await Ff(a.outputSchema,r.structuredContent,`Invalid output for tool ${e}: `)),r}};return this._registeredTools[e]=a,this._capabilities.tools||this.transport||this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),r(),a}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Vf(t.inputSchema,"input"):{type:"object",properties:{}}};return t.outputSchema&&(n.outputSchema=await Vf(t.outputSchema,"output")),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Df,(e,t)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(ym,(e,t)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(hm,(e,t)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if("sampling/createMessage"===e)if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(e){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(e,t){if(this._assertInitialized("callServerTool"),"string"==typeof e)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},bm,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},Vp,t)}async listServerResources(e,t){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},Rp,t)}async createSamplingMessage(e,t){this._assertInitialized("createSamplingMessage");let n=e.tools?Rm:jm;return await this.request({method:"sampling/createMessage",params:e},n,t)}sendMessage(e,t){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},kf,t)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,t){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},Jd,t)}openLink(e,t){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},xf,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},wf,t)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,t){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},jf,t)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,o=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let o=document.documentElement,r=o.style.height;o.style.height="max-content";let i=Math.ceil(o.getBoundingClientRect().height);o.style.height=r;let a=Math.ceil(window.innerWidth);a===t&&i===n||(t=a,n=i,this.sendSizeChanged({width:a,height:i}))}))};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(e=new bf(window.parent,window.parent),t){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:"2026-01-26"}},Lf,t);if(void 0===e)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}}function Jf(){}function Gf(e,t){for(const n in t)e[n]=t[n];return e}function Bf(e){return e()}function Wf(){return Object.create(null)}function Kf(e){e.forEach(Bf)}function Xf(e){return"function"==typeof e}function Qf(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function Yf(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return Jf;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function eg(e,t,n,o){if(e){const r=tg(e,t,n,o);return e[0](r)}}function tg(e,t,n,o){return e[1]&&o?Gf(n.ctx.slice(),e[1](o(t))):n.ctx}function ng(e,t,n,o){if(e[2]&&o){const r=e[2](o(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|r[o];return e}return t.dirty|r}return t.dirty}function og(e,t,n,o,r,i){if(r){const a=tg(t,n,o,i);e.p(a,r)}}function rg(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}function ig(e,t){const n={};t=new Set(t);for(const o in e)t.has(o)||"$"===o[0]||(n[o]=e[o]);return n}function ag(e){return e&&Xf(e.destroy)?e.destroy:Jf}function sg(e,t){e.appendChild(t)}function cg(e,t,n){const o=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!o.getElementById(t)){const e=dg("style");e.id=t,e.textContent=n,function(e,t){sg(e.head||e,t),t.sheet}(o,e)}}function lg(e,t,n){e.insertBefore(t,n||null)}function ug(e){e.parentNode&&e.parentNode.removeChild(e)}function dg(e){return document.createElement(e)}function pg(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function mg(e){return document.createTextNode(e)}function fg(){return mg(" ")}function gg(){return mg("")}function hg(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function vg(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function bg(e){let t;return{p(...n){t=n,t.forEach(t=>e.push(t))},r(){t.forEach(t=>e.splice(e.indexOf(t),1))}}}function $g(e){return""===e?null:+e}function yg(e,t){t=""+t,e.data!==t&&(e.data=t)}function _g(e,t){e.value=null==t?"":t}function xg(e,t,n,o){null==n?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function wg(e,t,n){e.classList[n?"add":"remove"](t)}class kg{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=pg(t.nodeName):this.e=dg(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)lg(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(ug)}}function Ig(e,t){return new e(t)}let Sg;function Cg(e){Sg=e}function Eg(){if(!Sg)throw new Error("Function called outside component initialization");return Sg}function zg(e){Eg().$$.on_mount.push(e)}const Tg=[],Og=[];let Dg=[];const Ug=[],Ng=Promise.resolve();let Ag=!1;function jg(e){Dg.push(e)}function Rg(e){Ug.push(e)}const Pg=new Set;let Zg=0;function Mg(){if(0!==Zg)return;const e=Sg;do{try{for(;Zg<Tg.length;){const e=Tg[Zg];Zg++,Cg(e),Lg(e.$$)}}catch(e){throw Tg.length=0,Zg=0,e}for(Cg(null),Tg.length=0,Zg=0;Og.length;)Og.pop()();for(let e=0;e<Dg.length;e+=1){const t=Dg[e];Pg.has(t)||(Pg.add(t),t())}Dg.length=0}while(Tg.length);for(;Ug.length;)Ug.pop()();Ag=!1,Pg.clear(),Cg(e)}function Lg(e){if(null!==e.fragment){e.update(),Kf(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(jg)}}const qg=new Set;let Vg;function Fg(){Vg={r:0,c:[],p:Vg}}function Hg(){Vg.r||Kf(Vg.c),Vg=Vg.p}function Jg(e,t){e&&e.i&&(qg.delete(e),e.i(t))}function Gg(e,t,n,o){if(e&&e.o){if(qg.has(e))return;qg.add(e),Vg.c.push(()=>{qg.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}else o&&o()}function Bg(e,t,n){const o=e.$$.props[t];void 0!==o&&(e.$$.bound[o]=n,n(e.$$.ctx[o]))}function Wg(e){e&&e.c()}function Kg(e,t,n,o){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),o||jg(()=>{const t=e.$$.on_mount.map(Bf).filter(Xf);e.$$.on_destroy?e.$$.on_destroy.push(...t):Kf(t),e.$$.on_mount=[]}),i.forEach(jg)}function Xg(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Dg.forEach(o=>-1===e.indexOf(o)?t.push(o):n.push(o)),n.forEach(e=>e()),Dg=t}(n.after_update),Kf(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Qg(e,t){-1===e.$$.dirty[0]&&(Tg.push(e),Ag||(Ag=!0,Ng.then(Mg)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Yg(e,t,n,o,r,i,a,s=[-1]){const c=Sg;Cg(e);const l=e.$$={fragment:null,ctx:[],props:i,update:Jf,not_equal:r,bound:Wf(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Wf(),dirty:s,skip_bound:!1,root:t.target||c.$$.root};a&&a(l.root);let u=!1;if(l.ctx=n?n(e,t.props||{},(t,n,...o)=>{const i=o.length?o[0]:n;return l.ctx&&r(l.ctx[t],l.ctx[t]=i)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](i),u&&Qg(e,t)),n}):[],l.update(),u=!0,Kf(l.before_update),l.fragment=!!o&&o(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(ug)}else l.fragment&&l.fragment.c();t.intro&&Jg(e.$$.fragment),Kg(e,t.target,t.anchor,t.customElement),Mg()}Cg(c)}class eh{$destroy(){Xg(this,1),this.$destroy=Jf}$on(e,t){if(!Xf(t))return Jf;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const th=[];function nh(e,t=Jf){let n;const o=new Set;function r(t){if(Qf(e,t)&&(e=t,n)){const t=!th.length;for(const t of o)t[1](),th.push(t,e);if(t){for(let e=0;e<th.length;e+=2)th[e][0](th[e+1]);th.length=0}}}return{set:r,update:function(t){r(t(e))},subscribe:function(i,a=Jf){const s=[i,a];return o.add(s),1===o.size&&(n=t(r)||Jf),i(e),()=>{o.delete(s),0===o.size&&n&&(n(),n=null)}}}}const oh={message:!1,updateModelContext:!1,openLinks:!1};class rh extends Error{constructor(e="Update cancelled"){super(e),this.name="HandoffCancelledError"}}function ih(e){const t=e.getHostCapabilities();return{message:null!=t?.message,updateModelContext:null!=t?.updateModelContext,openLinks:null!=t?.openLinks}}function ah(e){return e.message}function sh(e,t){return`I refined this contract in the Wizard UI beyond the initial MCP tool result. Here is the current generated source.\n\n\`\`\`${e}\n${t.trimEnd()}\n\`\`\``}async function ch(e){if(!navigator.clipboard?.writeText)throw new Error("Clipboard is not available in this host.");await navigator.clipboard.writeText(e)}const lh="mcp-external-links";function uh(e){cg(e,"svelte-h4n0sq",".mcp-shell.svelte-h4n0sq{height:var(--mcp-app-height);min-height:var(--mcp-app-height);background-color:var(--gray-1);box-sizing:border-box;font-size:12px;--text-small:0.75rem;--size-1:0.2rem;--size-2:0.35rem;--size-3:0.55rem;--size-4:0.7rem}.mcp-shell.svelte-h4n0sq .controls{padding:var(--size-3)}.mcp-shell.svelte-h4n0sq pre code.hljs{font-size:0.7rem;line-height:1.35}.footer.svelte-h4n0sq{display:flex;flex-direction:column;gap:0.35rem}.drift-notice.svelte-h4n0sq{padding:0.4rem 0.55rem;border:1px solid var(--gray-3);border-radius:8px;background:color-mix(in srgb, var(--gray-2) 65%, transparent)}.drift-text.svelte-h4n0sq{margin:0;font-size:0.75rem;line-height:1.4;color:var(--gray-5);text-align:left}.actions.svelte-h4n0sq{display:flex;justify-content:flex-end;align-items:center;gap:0.75rem}.actions.drifted.svelte-h4n0sq{justify-content:space-between}.restore-link.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--gray-4);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}.restore-link.svelte-h4n0sq:hover{color:var(--gray-5)}.restore-confirm.svelte-h4n0sq{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0.35rem 0.5rem;font-size:0.75rem;color:var(--gray-5)}.restore-confirm-btn.svelte-h4n0sq{padding:0;border:none;background:none;color:var(--solidity-blue-2);font:inherit;font-size:0.75rem;font-weight:600;text-decoration:underline;cursor:pointer}.restore-confirm-btn.cancel.svelte-h4n0sq{color:var(--gray-4);font-weight:500}.use-button.svelte-h4n0sq{padding:0.45rem 0.9rem;border-radius:16px;border:1px solid var(--gray-3);background-color:var(--solidity-blue-2);color:white;font-weight:600;font-size:0.75rem;cursor:pointer}.use-button.drifted.svelte-h4n0sq:not(.disabled):not(:disabled){box-shadow:0 0 0 2px color-mix(in srgb, var(--solidity-blue-2) 35%, transparent)}.use-button.disabled.svelte-h4n0sq,.use-button.svelte-h4n0sq:disabled{opacity:0.5;cursor:not-allowed}.status.svelte-h4n0sq{margin:0;max-width:100%;font-size:0.75rem;text-align:right}.status.hint.svelte-h4n0sq{color:var(--gray-4)}.status.error.svelte-h4n0sq{color:var(--red-3)}.no-select.svelte-h4n0sq{-webkit-user-select:none;-moz-user-select:none;user-select:none}.tippy-box{font-size:12px;line-height:1.35}.tippy-box .tippy-content{padding:0.35rem 0.5rem}html.mcp-no-open-links .tippy-box a[href]{display:none}")}const dh=e=>({}),ph=e=>({});function mh(e){let t;return{c(){t=dg("div"),t.innerHTML='<p class="drift-text svelte-h4n0sq">Preview differs from the original tool run. The agent&#39;s reply from that run still matches the original\n settings. Send updates to the agent for it to see the new code.</p>',vg(t,"class","drift-notice svelte-h4n0sq")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function fh(e){let t;function n(e,t){return e[11]?hh:gh}let o=n(e),r=o(e);return{c(){r.c(),t=gg()},m(e,n){r.m(e,n),lg(e,t,n)},p(e,i){o===(o=n(e))&&r?r.p(e,i):(r.d(1),r=o(e),r&&(r.c(),r.m(t.parentNode,t)))},d(e){r.d(e),e&&ug(t)}}}function gh(e){let t,n,o;return{c(){t=dg("button"),t.textContent="Restore original",vg(t,"type","button"),vg(t,"class","restore-link svelte-h4n0sq")},m(r,i){lg(r,t,i),n||(o=hg(t,"click",e[25]),n=!0)},p:Jf,d(e){e&&ug(t),n=!1,o()}}}function hh(e){let t,n,o,r,i,a,s;return{c(){t=dg("span"),n=mg("Restore original settings?\n "),o=dg("button"),o.textContent="Confirm",r=fg(),i=dg("button"),i.textContent="Cancel",vg(o,"type","button"),vg(o,"class","restore-confirm-btn svelte-h4n0sq"),vg(i,"type","button"),vg(i,"class","restore-confirm-btn cancel svelte-h4n0sq"),vg(t,"class","restore-confirm svelte-h4n0sq")},m(c,l){lg(c,t,l),sg(t,n),sg(t,o),sg(t,r),sg(t,i),a||(s=[hg(o,"click",e[23]),hg(i,"click",e[24])],a=!0)},p:Jf,d(e){e&&ug(t),a=!1,Kf(s)}}}function vh(e){let t;return{c(){t=mg("Send Updates to Agent")},m(e,n){lg(e,t,n)},p:Jf,d(e){e&&ug(t)}}}function bh(e){let t;return{c(){t=mg("Copy to Clipboard")},m(e,n){lg(e,t,n)},p:Jf,d(e){e&&ug(t)}}}function $h(e){let t;return{c(){t=mg(e[8])},m(e,n){lg(e,t,n)},p(e,n){256&n&&yg(t,e[8])},d(e){e&&ug(t)}}}function yh(e){let t,n=e[12]?"Copying…":"Sending…";return{c(){t=mg(n)},m(e,n){lg(e,t,n)},p(e,o){4096&o&&n!==(n=e[12]?"Copying…":"Sending…")&&yg(t,n)},d(e){e&&ug(t)}}}function _h(e){let t;return{c(){t=mg("Connecting…")},m(e,n){lg(e,t,n)},p:Jf,d(e){e&&ug(t)}}}function xh(e){let t,n;return{c(){t=dg("p"),n=mg(e[10]),vg(t,"class","status hint svelte-h4n0sq")},m(e,o){lg(e,t,o),sg(t,n)},p(e,t){1024&t&&yg(n,e[10])},d(e){e&&ug(t)}}}function wh(e){let t,n;return{c(){t=dg("p"),n=mg(e[9]),vg(t,"class","status error svelte-h4n0sq")},m(e,o){lg(e,t,o),sg(t,n)},p(e,t){512&t&&yg(n,e[9])},d(e){e&&ug(t)}}}function kh(e){let t,n,o;return{c(){t=dg("p"),n=mg("Could not connect to host: "),o=mg(e[4]),vg(t,"class","status error svelte-h4n0sq")},m(e,r){lg(e,t,r),sg(t,n),sg(t,o)},p(e,t){16&t&&yg(o,e[4])},d(e){e&&ug(t)}}}function Ih(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_;const x=e[22].controls,w=eg(x,e,e[21],ph);let k=e[5]&&mh(),I=e[5]&&e[6]&&fh(e);function S(e,t){return e[3]||e[4]?e[7]?yh:e[8]?$h:e[12]?bh:vh:_h}let C=S(e),E=C(e);function z(e,t){return e[4]?kh:e[9]?wh:e[10]?xh:void 0}let T=z(e),O=T&&T(e);return{c(){t=dg("div"),n=dg("div"),o=dg("div"),w&&w.c(),r=fg(),i=dg("div"),a=dg("pre"),s=mg(" "),c=dg("code"),u=mg("\n "),d=fg(),p=dg("div"),k&&k.c(),m=fg(),f=dg("div"),I&&I.c(),g=fg(),h=dg("button"),E.c(),b=fg(),O&&O.c(),vg(o,"class","controls min-w-[14rem] w-60 max-w-[42%] flex flex-col shrink-0 overflow-auto border-r border-[var(--gray-3)]"),vg(c,"class",l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"),vg(a,"class","flex flex-col grow basis-0 overflow-auto m-0"),vg(i,"class","output flex flex-col grow min-w-0 overflow-hidden"),vg(n,"class","flex flex-row grow min-h-0 overflow-hidden rounded-xl border border-[var(--gray-3)]"),vg(h,"class","use-button svelte-h4n0sq"),h.disabled=e[13],vg(h,"title",v=e[12]?"Copy to Clipboard":void 0),wg(h,"disabled",e[13]),wg(h,"drifted",e[5]),vg(f,"class","actions svelte-h4n0sq"),wg(f,"drifted",e[5]),vg(p,"class","footer shrink-0 svelte-h4n0sq"),vg(t,"class","mcp-shell flex flex-col gap-2 p-2 min-h-0 svelte-h4n0sq")},m(l,v){lg(l,t,v),sg(t,n),sg(n,o),w&&w.m(o,null),sg(n,r),sg(n,i),sg(i,a),sg(a,s),sg(a,c),c.innerHTML=e[0],sg(a,u),sg(t,d),sg(t,p),k&&k.m(p,null),sg(p,m),sg(p,f),I&&I.m(f,null),sg(f,g),sg(f,h),E.m(h,null),sg(p,b),O&&O.m(p,null),$=!0,y||(_=[hg(a,"click",e[15]),hg(h,"click",e[14])],y=!0)},p(e,[t]){w&&w.p&&(!$||2097152&t)&&og(w,x,e,e[21],$?ng(x,e[21],t,dh):rg(e[21]),ph),(!$||1&t)&&(c.innerHTML=e[0]),(!$||6&t&&l!==(l="hljs "+e[2]+" grow overflow-auto p-2 "+(e[1]?"no-select":"")+" svelte-h4n0sq"))&&vg(c,"class",l),e[5]?k||(k=mh(),k.c(),k.m(p,m)):k&&(k.d(1),k=null),e[5]&&e[6]?I?I.p(e,t):(I=fh(e),I.c(),I.m(f,g)):I&&(I.d(1),I=null),C===(C=S(e))&&E?E.p(e,t):(E.d(1),E=C(e),E&&(E.c(),E.m(h,null))),(!$||8192&t)&&(h.disabled=e[13]),(!$||4096&t&&v!==(v=e[12]?"Copy to Clipboard":void 0))&&vg(h,"title",v),(!$||8192&t)&&wg(h,"disabled",e[13]),(!$||32&t)&&wg(h,"drifted",e[5]),(!$||32&t)&&wg(f,"drifted",e[5]),T===(T=z(e))&&O?O.p(e,t):(O&&O.d(1),O=T&&T(e),O&&(O.c(),O.m(p,null)))},i(e){$||(Jg(w,e),$=!0)},o(e){Gg(w,e),$=!1},d(e){e&&ug(t),w&&w.d(e),k&&k.d(),I&&I.d(),E.d(),O&&O.d(),y=!1,Kf(_)}}}function Sh(e,t,n){let o,r,i,a,s,c,l,{$$slots:u={},$$scope:d}=t,{highlightedCode:p}=t,{hasErrors:m=!1}=t,{highlightClass:f="-solidity"}=t,{code:g=""}=t,{fence:h}=t,{hostConnected:v=!1}=t,{hostConnectError:b}=t,{hostSendCaps:$=oh}=t,{mcpApp:y}=t,{drifted:_=!1}=t,{onRestoreOriginal:x}=t,w=!1,k=!1;const I=nh({canOpen:!1});var S,C;function E(e){l&&clearTimeout(l),n(8,a=e),l=setTimeout(()=>{n(8,a=void 0),l=void 0},1e3)}function z(e,t){return n=>{const o=n.target,r=o instanceof Element?o.closest(e)?.getAttribute("href"):void 0;r&&!r.startsWith("#")&&(n.preventDefault(),n.stopPropagation(),$.openLinks&&async function(e,t){if((await e.openLink({url:t})).isError)throw new Error("Host denied opening the link.")}(y,r).catch(e=>console.warn(`[mcp-apps] ${t} openLink failed`,e)))}}S=lh,C=I,Eg().$$.context.set(S,C);const T=z("a[href]","code preview"),O=z(".tippy-box a[href]","tippy");zg(()=>(document.addEventListener("click",O,!0),()=>document.removeEventListener("click",O,!0)));return e.$$set=e=>{"highlightedCode"in e&&n(0,p=e.highlightedCode),"hasErrors"in e&&n(1,m=e.hasErrors),"highlightClass"in e&&n(2,f=e.highlightClass),"code"in e&&n(16,g=e.code),"fence"in e&&n(17,h=e.fence),"hostConnected"in e&&n(3,v=e.hostConnected),"hostConnectError"in e&&n(4,b=e.hostConnectError),"hostSendCaps"in e&&n(18,$=e.hostSendCaps),"mcpApp"in e&&n(19,y=e.mcpApp),"drifted"in e&&n(5,_=e.drifted),"onRestoreOriginal"in e&&n(6,x=e.onRestoreOriginal),"$$scope"in e&&n(21,d=e.$$scope)},e.$$.update=()=>{32&e.$$.dirty&&(_||n(11,k=!1)),262144&e.$$.dirty&&I.set({canOpen:$.openLinks}),262144&e.$$.dirty&&document.documentElement.classList.toggle("mcp-no-open-links",!$.openLinks),262144&e.$$.dirty&&n(20,o=ah($)),1048584&e.$$.dirty&&n(12,r=v&&!o),65946&e.$$.dirty&&n(13,i=m||w||!g||!v||!!b||!!a)},[p,m,f,v,b,_,x,w,a,s,c,k,r,i,async function(){if(!i){n(9,s=void 0),n(10,c=void 0),n(7,w=!0);try{if(r)return await ch(g),void E("Copied");await async function(e,t,n){const o=ih(e);if(!ah(o))throw new Error("This host does not support sending the contract to the agent.");if(o.updateModelContext)try{await e.updateModelContext({content:[{type:"text",text:t}]})}catch(e){console.warn("[mcp-apps] updateModelContext failed",e)}if((await e.sendMessage({role:"user",content:[{type:"text",text:sh(n,t)}]})).isError)throw new rh}(y,g,h),E("Sent")}catch(e){if(e instanceof rh)return void n(10,c=e.message);console.error("[mcp-apps] Send Updates to Agent failed",e),n(9,s=e instanceof Error?e.message:String(e));try{await ch(g),E("Copied")}catch{}}finally{n(7,w=!1)}}},T,g,h,$,y,o,d,u,()=>{n(11,k=!1),x()},()=>n(11,k=!1),()=>n(11,k=!0)]}class Ch extends eh{constructor(e){super(),Yg(this,e,Sh,Ih,Qf,{highlightedCode:0,hasErrors:1,highlightClass:2,code:16,fence:17,hostConnected:3,hostConnectError:4,hostSendCaps:18,mcpApp:19,drifted:5,onRestoreOriginal:6},uh)}}function Eh(e){return structuredClone(e)}function zh(e){let t,n,o,r;const i=[{errors:e[7]},e[1].controlProps?.(e[2],e[6])??{}];function a(t){e[15](t)}var s=e[1].controls[e[2]];function c(e){let t={};for(let e=0;e<i.length;e+=1)t=Gf(t,i[e]);return void 0!==e[6]&&(t.opts=e[6]),{props:t}}return s&&(t=Ig(s,c(e)),Og.push(()=>Bg(t,"opts",a))),{c(){t&&Wg(t.$$.fragment),o=gg()},m(e,n){t&&Kg(t,e,n),lg(e,o,n),r=!0},p(e,r){const l=198&r?function(e,t){const n={},o={},r={$$scope:1};let i=e.length;for(;i--;){const a=e[i],s=t[i];if(s){for(const e in a)e in s||(o[e]=1);for(const e in s)r[e]||(n[e]=s[e],r[e]=1);e[i]=s}else for(const e in a)r[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(i,[128&r&&{errors:e[7]},70&r&&(u=e[1].controlProps?.(e[2],e[6])??{},"object"==typeof u&&null!==u?u:{})]):{};var u;if(!n&&64&r&&(n=!0,l.opts=e[6],Rg(()=>n=!1)),6&r&&s!==(s=e[1].controls[e[2]])){if(t){Fg();const e=t;Gg(e.$$.fragment,1,0,()=>{Xg(e,1)}),Hg()}s?(t=Ig(s,c(e)),Og.push(()=>Bg(t,"opts",a)),Wg(t.$$.fragment),Jg(t.$$.fragment,1),Kg(t,o.parentNode,o)):t=null}else s&&t.$set(l)},i(e){r||(t&&Jg(t.$$.fragment,e),r=!0)},o(e){t&&Gg(t.$$.fragment,e),r=!1},d(e){e&&ug(o),t&&Xg(t,e)}}}function Th(e){let t,n;return t=new Ch({props:{highlightedCode:e[11],hasErrors:e[8],code:e[9],highlightClass:e[1].highlightClass,fence:e[1].fence,hostConnected:e[3],hostConnectError:e[4],hostSendCaps:e[5],mcpApp:e[0],drifted:e[10],onRestoreOriginal:e[12],$$slots:{controls:[zh]},$$scope:{ctx:e}}}),{c(){Wg(t.$$.fragment)},m(e,o){Kg(t,e,o),n=!0},p(e,[n]){const o={};2048&n&&(o.highlightedCode=e[11]),256&n&&(o.hasErrors=e[8]),512&n&&(o.code=e[9]),2&n&&(o.highlightClass=e[1].highlightClass),2&n&&(o.fence=e[1].fence),8&n&&(o.hostConnected=e[3]),16&n&&(o.hostConnectError=e[4]),32&n&&(o.hostSendCaps=e[5]),1&n&&(o.mcpApp=e[0]),1024&n&&(o.drifted=e[10]),524486&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jg(t.$$.fragment,e),n=!0)},o(e){Gg(t.$$.fragment,e),n=!1},d(e){Xg(t,e)}}}function Oh(e,t,n){let o,r,i,a,s,c,l,u,{adapter:d}=t,{kind:p}=t,{mcpApp:m}=t,{hostConnected:f=!1}=t,{hostConnectError:g}=t,{hostSendCaps:h=oh}=t,v=d.emptyContract();function b(e){try{return d.print(d.build(e))}catch{return}}function $(e,t){if(!e)return;const o=function(e,t,n){return void 0===e||"result"===n&&!t}(l,a,t),r={...s??{},...e,kind:p};if(n(6,s=r),!o)return;const i=function(e,t,n){const o=n(e);if(void 0!==o)return{opts:Eh(e),code:o,supersedesOpts:!1};const r=n(t);return void 0!==r?{opts:Eh(t),code:r,supersedesOpts:!0}:void 0}(r,{...e,kind:p},b);void 0!==i&&(c=i.opts,n(13,l=i.code),i.supersedesOpts&&n(6,s=Eh(i.opts)))}return m.ontoolinput=e=>{$(e.arguments,"input")},m.ontoolresult=e=>{const t=e.structuredContent;t?.opts&&$(t.opts,"result")},e.$$set=e=>{"adapter"in e&&n(1,d=e.adapter),"kind"in e&&n(2,p=e.kind),"mcpApp"in e&&n(0,m=e.mcpApp),"hostConnected"in e&&n(3,f=e.hostConnected),"hostConnectError"in e&&n(4,g=e.hostConnectError),"hostSendCaps"in e&&n(5,h=e.hostSendCaps)},e.$$.update=()=>{if(66&e.$$.dirty&&s)try{n(14,v=d.build(s)),n(7,u=void 0)}catch(e){const t=e instanceof Error?e.message:String(e);n(7,u=d.optionsErrors(e)??{_:t||"Failed to build contract"})}16386&e.$$.dirty&&n(9,o=d.print(v)),546&e.$$.dirty&&n(11,r=h.openLinks?d.injectHyperlinks(d.highlight(o)):d.highlight(o)),128&e.$$.dirty&&n(8,i=void 0!==u),8960&e.$$.dirty&&n(10,a=function(e){const{originalCode:t,code:n,hasErrors:o}=e;return void 0!==t&&(o||n!==t)}({originalCode:l,code:o,hasErrors:i}))},[m,d,p,f,g,h,s,u,i,o,a,r,function(){null!=c&&n(6,s=Eh(c))},l,v,function(e){s=e,n(6,s)}]}class Dh extends eh{constructor(e){super(),Yg(this,e,Oh,Th,Qf,{adapter:1,kind:2,mcpApp:0,hostConnected:3,hostConnectError:4,hostSendCaps:5})}}class Uh extends Error{constructor(e){super("Invalid options"),this.messages=e}}const Nh=/^(?!$)\d+$/;function Ah(e){return Nh.test(e)}function jh(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|")/g,(e,t)=>"\\"+t)}function Rh(e,t){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]+/g,"").replace(/(\\|')/g,(e,t)=>"\\"+t);if(n.length>31)throw new Uh({[t]:"String is longer than 31 characters"});return n}function Ph(e){if(e<=0)throw new Error(`Number of bits must be positive (actual '${e}').`);if(e%8!=0)throw new Error(`The number of bits must be a multiple of 8 (actual '${e}').`);return BigInt("0x"+"ff".repeat(e/8))}const Zh={u8:Ph(8),u16:Ph(16),u32:Ph(32),u64:Ph(64),u128:Ph(128),u256:Ph(256)};function Mh(e,t,n){const o=e.toString();if(!/^\d+$/.test(o))throw new Uh({[t]:"Not a valid number"});const r=BigInt(o);if(r>Zh[n])throw new Uh({[t]:`Value is greater than ${n} max value`});return r}function Lh(e,t,n){Mh(e,t,n)}class qh{constructor(e,t,n=!1){this.license="MIT",this.upgradeable=!1,this.documentations=[],this.constructorArgs=[],this.constructorCode=[],this.componentsMap=new Map,this.implementedTraitsMap=new Map,this.superVariablesMap=new Map,this.constantsMap=new Map,this.useClausesMap=new Map,this.interfaceFlagsSet=new Set,this.name=function(e,t=!1){const n=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/^[^a-zA-Z_]+/,"").replace(/^(.)/,e=>t?e.toUpperCase():e).replace(/[^\w]+(.?)/g,(e,t)=>t.toUpperCase());if(0===n.length)throw new Uh({name:"Identifier is empty or does not have valid characters"});return n}(e,!0),this.macros=t,this.account=n}get components(){return[...this.componentsMap.values()]}get implementedTraits(){return[...this.implementedTraitsMap.values()]}get superVariables(){return[...this.superVariablesMap.values()]}get constants(){return[...this.constantsMap.values()]}get useClauses(){return[...this.useClausesMap.values()]}get interfaceFlags(){return this.interfaceFlagsSet}addUseClause(e,t,n){const o=n?.groupable??!0,r=n?.alias??"",i=r.length>0?r:t;this.useClausesMap.has(i)||this.useClausesMap.set(i,{containerPath:e,name:t,groupable:o,alias:r})}addComponent(e,t=[],n=!0){this.macros.withComponents||this.addUseClause(e.path,e.name);const o=e.name,r=this.componentsMap.has(o);if(!r){const r={initializer:n?{params:t}:void 0,...e,impls:[...e.impls]};this.componentsMap.set(o,r)}return!r}addImplToComponent(e,t){this.addComponent(e);const n=this.componentsMap.get(e.name);if(null==n)throw new Error(`Component ${e.name} has not been added yet`);n.impls.some(e=>e.name===t.name)||n.impls.push(t)}addConstant(e){return!this.constantsMap.has(e.name)&&(this.constantsMap.set(e.name,e),!0)}addSuperVariable(e){return!this.superVariablesMap.has(e.name)&&(this.superVariablesMap.set(e.name,e),this.addUseClause("super",e.name),!0)}addImplementedTrait(e){const t=e.name,n=this.implementedTraitsMap.get(t);if(void 0!==n)return n;{const n={name:e.name,of:e.of,tags:[...e.tags],superVariables:[],functions:[],section:e.section,priority:e.priority};return this.implementedTraitsMap.set(t,n),n}}addSuperVariableToTrait(e,t){const n=this.addImplementedTrait(e);for(const e of n.superVariables)if(e.name===t.name){if(e.type!==t.type)throw new Error(`Tried to add duplicate super var ${t.name} with different type: ${t.type} instead of ${e.type}.`);if(e.value!==t.value)throw new Error(`Tried to add duplicate super var ${t.name} with different value: ${t.value} instead of ${e.value}.`);return!1}return n.superVariables.push(t),!0}addFunction(e,t){const n=this.addImplementedTrait(e),o=this.getFunctionSignature(t);for(let e=0;e<n.functions.length;e++){const t=n.functions[e];if(void 0!==t&&this.getFunctionSignature(t)===o)return t}const r={...t,codeBefore:[],tag:e.perItemTag};return n.functions.push(r),r}getFunctionSignature(e){return[e.name,"(",...e.args.map(e=>e.name),")"].join("")}addFunctionCodeBefore(e,t,n){this.addImplementedTrait(e);const o=this.addFunction(e,t);o.codeBefore=[...o.codeBefore??[],n]}addConstructorArgument(e){for(const t of this.constructorArgs)if(t.name==e.name)return;this.constructorArgs.push(e)}addConstructorCode(e){this.constructorCode.push(e)}addInterfaceFlag(e){this.interfaceFlagsSet.add(e)}addDocumentation(e){this.documentations.push(e)}}function Vh(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const Fh=Vh({SRC5Component:{path:"openzeppelin_introspection::src5",substorage:{name:"src5",type:"SRC5Component::Storage"},event:{name:"SRC5Event",type:"SRC5Component::Event"},impls:[]},VotesComponent:{path:"openzeppelin_governance::votes",substorage:{name:"votes",type:"VotesComponent::Storage"},event:{name:"VotesEvent",type:"VotesComponent::Event"},impls:[{name:"VotesInternalImpl",embed:!1,value:"VotesComponent::InternalImpl<ContractState>"}]},NoncesComponent:{path:"openzeppelin_utils::cryptography::nonces",substorage:{name:"nonces",type:"NoncesComponent::Storage"},event:{name:"NoncesEvent",type:"NoncesComponent::Event"},impls:[{name:"NoncesImpl",embed:!0,value:"NoncesComponent::NoncesImpl<ContractState>"}]}});function Hh(e,t){e.addComponent(Fh.SRC5Component,[],!1),e.interfaceFlags.has("ISRC5")||(e.addImplToComponent(Fh.SRC5Component,{name:"SRC5Impl",embed:!0,value:"SRC5Component::SRC5Impl<ContractState>",section:t}),e.addInterfaceFlag("ISRC5"))}function Jh(e,t,n,o){Gh(e,t,n,o),e.addComponent(Fh.NoncesComponent,[],!1),e.addComponent(Fh.VotesComponent,[],!1),e.addImplToComponent(Fh.VotesComponent,{name:"VotesImpl",embed:!0,value:"VotesComponent::VotesImpl<ContractState>"}),e.addUseClause("openzeppelin_utils::contract_clock","ERC6372TimestampClock")}function Gh(e,t,n,o){e.addUseClause("openzeppelin_utils::cryptography::snip12","SNIP12Metadata");const r={name:"SNIP12MetadataImpl",of:"SNIP12Metadata",tags:[],priority:0,section:o};e.addImplementedTrait(r),e.addFunction(r,{name:"name",args:[],returns:"felt252",code:[`'${t}'`]}),e.addFunction(r,{name:"version",args:[],returns:"felt252",code:[`'${n}'`]})}const Bh=new RegExp(`^(\\d+(?:\\.\\d+)?) +(${["second","minute","hour","day","week","month","year"].join("|")})s?$`),Wh=86400,Kh={second:1,minute:60,hour:3600,day:Wh,week:604800,month:2592e3,year:31536e3};function Xh(e){const t=e.trim().match(Bh);if(!t||t.length<2)throw new Error("Bad duration format");const n=parseFloat(t[1]),o=t[2],r=n*Kh[o];return Math.round(r)}const Qh={darInitialDelay:"1 day",darDefaultDelayIncrease:"5 days",darMaxTransferDelay:"30 days"},Yh=()=>({type:!1,...Qh}),ev=()=>({type:"ownable",...Qh}),tv="ownable",nv=BigInt(432e3),ov=BigInt(2592e3);function rv(e,t){switch(t.type){case!1:break;case"ownable":e.addComponent(av.OwnableComponent,[{lit:"owner"}],!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"owner",type:"ContractAddress"});break;case"roles":e.addComponent(av.AccessControlComponent,[],!0)&&(e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(av.AccessControlComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(av.AccessControlComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(av.AccessControlComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(av.AccessControlComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Hh(e),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_admin",type:"ContractAddress"}),e.addUseClause("openzeppelin_access::accesscontrol","DEFAULT_ADMIN_ROLE"),e.addConstructorCode("self.access_control._grant_role(DEFAULT_ADMIN_ROLE, default_admin)"));break;case"roles-dar":{const n=[{lit:"INITIAL_DELAY"},{lit:"initial_default_admin"}];if(e.addComponent(av.AccessControlDefaultAdminRulesComponent,n,!0)){e.interfaceFlags.has("ISRC5")?(e.addImplToComponent(av.AccessControlDefaultAdminRulesComponent,{name:"AccessControlImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlImpl<ContractState>"}),e.addImplToComponent(av.AccessControlDefaultAdminRulesComponent,{name:"AccessControlDefaultAdminRulesImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlDefaultAdminRulesImpl<ContractState>"}),e.addImplToComponent(av.AccessControlDefaultAdminRulesComponent,{name:"AccessControlCamelImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlCamelImpl<ContractState>"}),e.addImplToComponent(av.AccessControlDefaultAdminRulesComponent,{name:"AccessControlWithDelayImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlWithDelayImpl<ContractState>"})):(e.addImplToComponent(av.AccessControlDefaultAdminRulesComponent,{name:"AccessControlMixinImpl",embed:!0,value:"AccessControlDefaultAdminRulesComponent::AccessControlMixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5")),Hh(e);const n=Mh(function(e){try{return Xh(e.darInitialDelay)}catch(e){throw e instanceof Error?new Uh({darInitialDelay:e.message}):e}}(t),"darInitialDelay","u64");e.addConstant({name:"INITIAL_DELAY",type:"u64",value:n.toString(),comment:t.darInitialDelay,inlineComment:!0});const o=Mh(function(e){try{return Xh(e.darDefaultDelayIncrease)}catch(e){throw e instanceof Error?new Uh({darDefaultDelayIncrease:e.message}):e}}(t),"darDefaultDelayIncrease","u64"),r=Mh(function(e){try{return Xh(e.darMaxTransferDelay)}catch(e){throw e instanceof Error?new Uh({darMaxTransferDelay:e.message}):e}}(t),"darMaxTransferDelay","u64");if(o===nv&&r===ov)e.addUseClause("openzeppelin_access::accesscontrol::extensions","DefaultConfig",{alias:"AccessControlDefaultAdminRulesDefaultConfig"});else{const n={name:"AccessControlDefaultAdminRulesImmutableConfig",of:"AccessControlDefaultAdminRulesComponent::ImmutableConfig",tags:[]};e.addImplementedTrait(n),e.addSuperVariableToTrait(n,{name:"DEFAULT_ADMIN_DELAY_INCREASE_WAIT",type:"u64",value:o.toString(),comment:t.darDefaultDelayIncrease,inlineComment:!0}),e.addSuperVariableToTrait(n,{name:"MAXIMUM_DEFAULT_ADMIN_TRANSFER_DELAY",type:"u64",value:r.toString(),comment:t.darMaxTransferDelay,inlineComment:!0})}e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"initial_default_admin",type:"ContractAddress"})}break}default:throw t.type,new Error("Unknown access type")}}function iv(e,t,n,o,r,i){const a={...o};switch(!1===a.type&&(a.type=tv),rv(e,a),a.type){case"ownable":e.addFunctionCodeBefore(t,n,"self.ownable.assert_only_owner()");break;case"roles":case"roles-dar":{const o=r+"_ROLE",s=e.addSuperVariable({name:o,type:"felt252",value:`selector!("${o}")`}),c="roles-dar"===a.type?av.AccessControlDefaultAdminRulesComponent.substorage.name:av.AccessControlComponent.substorage.name;void 0!==i&&(e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:i,type:"ContractAddress"}),s&&e.addConstructorCode(`self.${c}._grant_role(${o}, ${i})`)),e.addFunctionCodeBefore(t,n,`self.${c}.assert_only_role(${o})`);break}default:throw a.type,new Error("Unknown access type")}}const av=Vh({OwnableComponent:{path:"openzeppelin_access::ownable",substorage:{name:"ownable",type:"OwnableComponent::Storage"},event:{name:"OwnableEvent",type:"OwnableComponent::Event"},impls:[{name:"OwnableMixinImpl",embed:!0,value:"OwnableComponent::OwnableMixinImpl<ContractState>"},{name:"OwnableInternalImpl",embed:!1,value:"OwnableComponent::InternalImpl<ContractState>"}]},AccessControlComponent:{path:"openzeppelin_access::accesscontrol",substorage:{name:"access_control",type:"AccessControlComponent::Storage"},event:{name:"AccessControlEvent",type:"AccessControlComponent::Event"},impls:[{name:"AccessControlInternalImpl",embed:!1,value:"AccessControlComponent::InternalImpl<ContractState>"}]},AccessControlDefaultAdminRulesComponent:{path:"openzeppelin_access::accesscontrol::extensions",substorage:{name:"access_control_dar",type:"AccessControlDefaultAdminRulesComponent::Storage"},event:{name:"AccessControlDefaultAdminRulesEvent",type:"AccessControlDefaultAdminRulesComponent::Event"},impls:[{name:"AccessControlDefaultAdminRulesInternalImpl",embed:!1,value:"AccessControlDefaultAdminRulesComponent::InternalImpl<ContractState>"}]}}),sv=/[\n\r\u2028\u2029]/u;function cv(e,t){if(sv.test(e))throw new Uh({[t]:"Must not contain line breaks"})}const lv={license:"MIT"};function uv(e,t){const{securityContact:n,license:o}=t;n&&(cv(n,"securityContact"),e.addDocumentation(`Security contact: ${n}`)),o&&(cv(o,"license"),e.license=o)}const dv={withComponents:!1},pv={upgradeable:!0,info:lv,macros:dv},mv={...pv,access:Yh()};function fv(e){return{upgradeable:e.upgradeable??pv.upgradeable,info:e.info??pv.info,macros:e.macros??pv.macros}}function gv(e){return{...fv(e),access:e.access??mv.access}}function hv(e="external"){return"view"===e?{name:"self",type:"@ContractState"}:{name:"ref self",type:"ContractState"}}function vv(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Object.assign({name:e},t)]))}const bv={name:"ExternalImpl",of:"ExternalTrait",tags:["generate_trait","abi(per_item)"],perItemTag:"external(v0)"};function $v(e,t){e.addComponent(yv.PausableComponent,[],!1),e.addFunction(bv,_v.pause),e.addFunction(bv,_v.unpause),iv(e,bv,_v.pause,t,"PAUSER","pauser"),iv(e,bv,_v.unpause,t,"PAUSER","pauser")}const yv=Vh({PausableComponent:{path:"openzeppelin_security::pausable",substorage:{name:"pausable",type:"PausableComponent::Storage"},event:{name:"PausableEvent",type:"PausableComponent::Event"},impls:[{name:"PausableImpl",embed:!0,value:"PausableComponent::PausableImpl<ContractState>"},{name:"PausableInternalImpl",embed:!1,value:"PausableComponent::InternalImpl<ContractState>"}]}}),_v=vv({pause:{args:[hv()],code:["self.pausable.pause()"]},unpause:{args:[hv()],code:["self.pausable.unpause()"]}});function xv(e,t){if(!1===t)return;e.upgradeable=!0,e.addComponent(kv.UpgradeableComponent,[],!1),e.addUseClause("openzeppelin_interfaces::upgrades","IUpgradeable"),e.addUseClause("starknet","ClassHash");const n={name:"UpgradeableImpl",of:"IUpgradeable<ContractState>",section:"Upgradeable",tags:["abi(embed_v0)"]};return e.addImplementedTrait(n),n}function wv(e,t,n){const o=xv(e,t);void 0!==o&&iv(e,o,Iv.upgrade,n,"UPGRADER","upgrader")}const kv=Vh({UpgradeableComponent:{path:"openzeppelin_upgrades",substorage:{name:"upgradeable",type:"UpgradeableComponent::Storage"},event:{name:"UpgradeableEvent",type:"UpgradeableComponent::Event"},impls:[{name:"UpgradeableInternalImpl",embed:!1,value:"UpgradeableComponent::InternalImpl<ContractState>"}]}}),Iv=vv({upgrade:{args:[hv(),{name:"new_class_hash",type:"ClassHash"}],code:["self.upgradeable.upgrade(new_class_hash)"]}}),Sv=Symbol("whitespace");function*Cv(e,t){for(const n of t)n===Sv?yield"":Array.isArray(n)?yield*Cv(e+1,n):yield" ".repeat(e)+n}function Ev(...e){return e.filter(e=>e.length>0).flatMap(e=>[Sv,...e]).slice(1)}const zv="1. with no section",Tv="Standalone Imports";function Ov(e){if(!e.macros.withComponents||0===e.components.length)return[];return[`#[with_components(${e.components.map(e=>e.name).map(e=>{const t=e.indexOf("Component");if(-1===t)throw new Error(`Component name "${e}" must contain "Component" substring`);return e.substring(0,t)}).join(", ")})]`]}function Dv(e){const t=e.account?"#[starknet::contract(account)]":"#[starknet::contract]";return function(...e){return[...Cv(0,e)].join("\n")+"\n"}(...Ev([`// SPDX-License-Identifier: ${e.license}`,"// Compatible with OpenZeppelin Contracts for Cairo ^3.0.0"],function(e){return Uv(e.superVariables.map(e=>`const ${e.name}: ${e.type} = ${e.value}`))}(e),[...(n=e.documentations,n.map(e=>`// ${e}`)),`${t}`,...Ov(e),`mod ${e.name} {`,Ev(Nv(e),Rv(e.constants),Pv(e),Zv(e),Mv(e),Lv(e),Vv(e),qv(e)),"}"]));var n}function Uv(e){return e.map(e=>e.endsWith(";")?e:e+";")}function Nv(e){const t=function(e){return e.useClauses.sort((e,t)=>{const n=`${e.containerPath}::${Av(e)}`,o=`${t.containerPath}::${Av(t)}`;return n.localeCompare(o)})}(e),n=t.reduce((e,t)=>(t.groupable?(e[t.containerPath]=e[t.containerPath]||[]).push(t):(e[Tv]=e[Tv]||[]).push(t),e),{});return Object.entries(n).flatMap(([e,t])=>function(e,t){const n=[];if(t===Tv)for(const t of e)n.push(`use ${t.containerPath}::${Av(t)};`);else if(1==e.length)n.push(`use ${t}::${Av(e[0])};`);else if(e.length>1){const o=e.map(e=>Av(e)).join(", ");n.push(`use ${t}::{${o}};`)}return n}(t,e)).flatMap(e=>function(e){const t=[],n=-1!==e.indexOf("{");n&&e.length>90?(t.push(e.slice(0,e.indexOf("{")+1)),t.push(...jv(e.slice(e.indexOf("{")+1,-2))),t.push("};")):t.push(e);return t}(e.toString()))}function Av(e){return e.alias?`${e.name} as ${e.alias}`:e.name}function jv(e){const t=[];if(e.length>90){const n=e.slice(0,90),o=n.lastIndexOf(",");-1!==o?(t.push("\t"+n.slice(0,o+1)),t.push(...jv(e.slice(o+2)))):t.push("\t"+n)}else t.push("\t"+e);return t}function Rv(e){const t=[];for(const n of e){const e=n.inlineComment??!1,o=!!n.comment;o&&!e?(t.push(`// ${n.comment}`),t.push(`const ${n.name}: ${n.type} = ${n.value};`)):o?t.push(`const ${n.name}: ${n.type} = ${n.value}; // ${n.comment}`):t.push(`const ${n.name}: ${n.type} = ${n.value};`)}return t}function Pv(e){return e.macros.withComponents?[]:e.components.map(e=>`component!(path: ${e.name}, storage: ${e.substorage.name}, event: ${e.event.name});`)}function Zv(e){const t=e.macros.withComponents,n=e.components.flatMap(e=>t?e.impls.filter(e=>e.embed):e.impls),o=n.reduce((e,t)=>{const n=t.embed??!0,o=t.section??(n?"External":"Internal");return(e[o]=e[o]||[]).push(t),e},{}),r=Object.entries(o).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[];return n.push(`// ${e}`),t.map(e=>n.push(...function(e){const t=[];(e.embed??1)&&t.push("#[abi(embed_v0)]");return t.push(`impl ${e.name} = ${e.value};`),t}(e))),n}(e,t));return Ev(...r)}function Mv(e){if(e.macros.withComponents||0===e.components.length)return["#[storage]","struct Storage {}"];const t=[];for(const n of e.components)t.push("#[substorage(v0)]"),t.push(`${n.substorage.name}: ${n.substorage.type},`);return["#[storage]","struct Storage {",t,"}"]}function Lv(e){if(e.macros.withComponents||0===e.components.length)return[];const t=[];for(const n of e.components)t.push("#[flat]"),t.push(`${n.event.name}: ${n.event.type},`);return["#[event]","#[derive(Drop, starknet::Event)]","enum Event {",t,"}"]}function qv(e){const t=e.implementedTraits.sort((e,t)=>e.priority!==t.priority?(e.priority??1/0)-(t.priority??1/0):e.tags.length!==t.tags.length?e.tags.length-t.tags.length:e.name.localeCompare(t.name)),n=t.reduce((e,t)=>{const n=t.section??zv;return(e[n]=e[n]||[]).push(t),e},{}),o=Object.entries(n).sort((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>function(e,t){const n=[],o=e===zv;o||(n.push("//"),n.push(`// ${e}`),n.push("//"));return t.forEach((e,t)=>{(t>0||!o)&&n.push(""),n.push(...function(e){const t=[];t.push(...e.tags.map(e=>`#[${e}]`)),t.push(`impl ${e.name} of ${e.of} {`);const n=Rv(e.superVariables);t.push(n);const o=e.functions.map(e=>function(e){const t=`fn ${e.name}`,n=e.args.map(e=>Gv(e)),o=e.codeBefore?.concat(e.code)??e.code;for(let t=0;t<o.length;t++){const n=o[t],r=t<o.length-1||void 0===e.returns;void 0!==n&&n.length>0&&(r&&!["{","}",";"].includes(n.charAt(n.length-1))?o[t]+=";":!r&&n.endsWith(";")&&(o[t]=n.slice(0,n.length-1)))}return Jv(t,n,e.tag,e.returns,void 0,o)}(e));return t.push(Ev(...o)),t.push("}"),t}(e))}),n}(e,t));return Ev(...o)}function Vv(e){const t=e.components.some(e=>void 0!==e.initializer),n=e.constructorCode.length>0;if(t||n){const t=e.components.filter(Fv).flatMap(e=>function({substorage:e,initializer:t}){if(void 0===t||void 0===e?.name)return[];return[`self.${e.name}.initializer(`+t.params.map(Hv).join(", ")+")"]}(e)),n="constructor",o="fn constructor",r=[hv(),...e.constructorArgs],i=Ev(Uv(t),Uv(e.constructorCode));return Jv(o,r.map(e=>Gv(e)),n,void 0,void 0,i)}return[]}function Fv(e){return void 0!==e.initializer&&void 0!==e.substorage?.name}function Hv(e){if("object"==typeof e){if("lit"in e)return e.lit;if("note"in e)return`${Hv(e.value)}`;throw Error("Unknown value type")}if("number"==typeof e){if(Number.isSafeInteger(e))return e.toFixed(0);throw new Error(`Number not representable (${e})`)}return"bigint"==typeof e?`${e}`:`"${e}"`}function Jv(e,t,n,o,r,i){const a=[];void 0!==n&&a.push(`#[${n}]`);let s=`${e}(`;if(t.length>0){const e=t.join(", ");e.length>80?(a.push(s),s="",a.push(t.map(e=>`${e},`))):s+=`${e}`}return s+=")",s+=void 0===o?" {":` -> ${o} {`,a.push(s),a.push(i),a.push("}"),a}function Gv(e){if(void 0!==e.type){const t=e.type;return`${e.name}: ${t}`}return`${e.name}`}const Bv=BigInt(18),Wv={name:"MyToken",symbol:"MTK",decimals:Bv.toString(),burnable:!1,pausable:!1,premint:"0",mintable:!1,votes:!1,appName:"",appVersion:"v1",access:mv.access,upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function Kv(e){const t=function(e){return{...e,...gv(e),decimals:e.decimals??Wv.decimals,burnable:e.burnable??Wv.burnable,pausable:e.pausable??Wv.pausable,premint:e.premint||Wv.premint,mintable:e.mintable??Wv.mintable,votes:e.votes??Wv.votes,appName:e.appName??Wv.appName,appVersion:e.appVersion??Wv.appVersion}}(e),n=new qh(t.name,t.macros),o=Mh(t.decimals,"decimals","u8");return function(e,t,n,o){if(e.addComponent(Qv.ERC20Component,[t,n],!0),o===Bv)e.addUseClause("openzeppelin_token::erc20","DefaultConfig",{alias:"ERC20DefaultConfig"});else{const t={name:"ERC20ImmutableConfig",of:"ERC20Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"DECIMALS",type:"u8",value:o.toString()})}}(n,jh(t.name),jh(t.symbol),o),function(e){e.addImplToComponent(Qv.ERC20Component,{name:"ERC20MixinImpl",embed:!0,value:"ERC20Component::ERC20MixinImpl<ContractState>"})}(n),t.premint&&function(e,t,n){if(void 0!==t&&"0"!==t){if(!Xv.test(t))throw new Uh({premint:"Not a valid number"});const o=Mh(function(e,t){let n;const o=e.split(".");if(o.length>2)throw new Uh({premint:"Not a valid number"});{const e=o[0]??"";let r=o[1]??"";if(t>r.length)try{r+="0".repeat(t-r.length)}catch{throw new Uh({premint:"Decimals number too large"})}else if(t<r.length)throw new Uh({premint:"Too many decimals"});n=e.concat(r).replace(/^0+/,"")}0===n.length&&(n="0");return n}(t,Number(n)),"premint","u256");e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"recipient",type:"ContractAddress"}),e.addConstructorCode(`self.erc20.mint(recipient, ${o})`)}}(n,t.premint,o),t.pausable&&$v(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","get_caller_address"),e.addFunction(bv,Yv.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),iv(e,bv,Yv.mint,t,"MINTER","minter")}(n,t.access),function(e,t){const n=t.pausable||t.votes;if(n){const n={name:"ERC20HooksImpl",of:"ERC20Component::ERC20HooksTrait<ContractState>",tags:[],priority:1};if(e.addImplementedTrait(n),t.pausable){e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let contract_state = self.get_contract();","contract_state.pausable.assert_not_paused();")}if(t.votes){if(!t.appName)throw new Uh({appName:"Application Name is required when Votes are enabled"});if(!t.appVersion)throw new Uh({appVersion:"Application Version is required when Votes are enabled"});Jh(e,Rh(t.appName,"appName"),Rh(t.appVersion,"appVersion"),"SNIP12 Metadata"),e.addUseClause("starknet","ContractAddress");e.addFunction(n,{name:"after_update",args:[{name:"ref self",type:"ERC20Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:[]}).code.push("let mut contract_state = self.get_contract_mut();","contract_state.votes.transfer_voting_units(from, recipient, amount);")}}else e.addUseClause("openzeppelin_token::erc20","ERC20HooksEmptyImpl")}(n,t),rv(n,t.access),wv(n,t.upgradeable,t.access),uv(n,t.info),n}const Xv=/^(\d*\.?\d*)$/;const Qv=Vh({ERC20Component:{path:"openzeppelin_token::erc20",substorage:{name:"erc20",type:"ERC20Component::Storage"},event:{name:"ERC20Event",type:"ERC20Component::Event"},impls:[{name:"ERC20InternalImpl",embed:!1,value:"ERC20Component::InternalImpl<ContractState>"}]}}),Yv=vv({burn:{args:[hv(),{name:"value",type:"u256"}],code:["self.erc20.burn(get_caller_address(), value);"]},mint:{args:[hv(),{name:"recipient",type:"ContractAddress"},{name:"amount",type:"u256"}],code:["self.erc20.mint(recipient, amount);"]}}),eb=BigInt(1e4),tb={enabled:!1,defaultRoyaltyFraction:"0",feeDenominator:eb.toString()};function nb(e,t,n){if(!t.enabled)return;const o={...n};!1===o.type&&(o.type=tv),rv(e,o);const{defaultRoyaltyFraction:r,feeDenominator:i}=function(e){const t=Mh(e.feeDenominator,"feeDenominator","u128");if(t===BigInt(0))throw new Uh({feeDenominator:"Must be greater than 0"});const n=Mh(e.defaultRoyaltyFraction,"defaultRoyaltyFraction","u128");if(n>t)throw new Uh({defaultRoyaltyFraction:"Cannot be greater than fee denominator"});return{defaultRoyaltyFraction:n,feeDenominator:t}}(t),a=[{lit:"default_royalty_receiver"},r];switch(e.addComponent(ob.ERC2981Component,a,!0),e.addUseClause("starknet","ContractAddress"),e.addConstructorArgument({name:"default_royalty_receiver",type:"ContractAddress"}),o.type){case"ownable":e.addImplToComponent(ob.ERC2981Component,{name:"ERC2981AdminOwnableImpl",embed:!0,value:"ERC2981Component::ERC2981AdminOwnableImpl<ContractState>"});break;case"roles":e.addImplToComponent(ob.ERC2981Component,{name:"ERC2981AdminAccessControlImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;case"roles-dar":e.addImplToComponent(ob.ERC2981Component,{name:"ERC2981AdminAccessControlDefaultAdminRulesImpl",embed:!0,value:"ERC2981Component::ERC2981AdminAccessControlDefaultAdminRulesImpl<ContractState>"}),e.addConstructorArgument({name:"royalty_admin",type:"ContractAddress"}),e.addConstructorCode("self.access_control_dar._grant_role(ERC2981Component::ROYALTY_ADMIN_ROLE, royalty_admin)");break;default:throw o.type,new Error("Unknown access type")}if(i===eb)e.addUseClause("openzeppelin_token::common::erc2981","DefaultConfig",{alias:"ERC2981DefaultConfig"});else{const t={name:"ERC2981ImmutableConfig",of:"ERC2981Component::ImmutableConfig",tags:[]};e.addImplementedTrait(t),e.addSuperVariableToTrait(t,{name:"FEE_DENOMINATOR",type:"u128",value:i.toString()})}}eb.toString();const ob=Vh({ERC2981Component:{path:"openzeppelin_token::common::erc2981",substorage:{name:"erc2981",type:"ERC2981Component::Storage"},event:{name:"ERC2981Event",type:"ERC2981Component::Event"},impls:[{name:"ERC2981Impl",embed:!0,value:"ERC2981Component::ERC2981Impl<ContractState>"},{name:"ERC2981InfoImpl",embed:!0,value:"ERC2981Component::ERC2981InfoImpl<ContractState>"},{name:"ERC2981InternalImpl",embed:!1,value:"ERC2981Component::InternalImpl<ContractState>"}]}}),rb={name:"MyToken",symbol:"MTK",baseUri:"",burnable:!1,pausable:!1,mintable:!1,enumerable:!1,votes:!1,royaltyInfo:tb,appName:"",appVersion:"v1",access:mv.access,upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function ib(e){const t=function(e){return{...e,...gv(e),baseUri:e.baseUri??rb.baseUri,burnable:e.burnable??rb.burnable,pausable:e.pausable??rb.pausable,mintable:e.mintable??rb.mintable,enumerable:e.enumerable??rb.enumerable,royaltyInfo:e.royaltyInfo??rb.royaltyInfo,votes:e.votes??rb.votes,appName:e.appName??rb.appName,appVersion:e.appVersion??rb.appVersion}}(e),n=new qh(t.name,t.macros);return function(e,t,n,o){e.addComponent(ab.ERC721Component,[t,n,o],!0)}(n,jh(t.name),jh(t.symbol),jh(t.baseUri)),function(e){e.addImplToComponent(ab.ERC721Component,{name:"ERC721MixinImpl",embed:!0,value:"ERC721Component::ERC721MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Hh(e)}(n),t.pausable&&$v(n,t.access),t.burnable&&function(e){e.addUseClause("core::num::traits","Zero"),e.addUseClause("starknet","get_caller_address"),e.addFunction(bv,sb.burn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),iv(e,bv,sb.safe_mint,t,"MINTER","minter"),e.addFunction(bv,sb.safeMint)}(n,t.access),t.enumerable&&function(e){e.addComponent(ab.ERC721EnumerableComponent,[],!0)}(n),rv(n,t.access),wv(n,t.upgradeable,t.access),uv(n,t.info),nb(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable||t.enumerable||t.votes;if(n){const n={name:"ERC721HooksImpl",of:"ERC721Component::ERC721HooksTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(n),e.addUseClause("starknet","ContractAddress");const o=[t.enumerable||t.votes?"let mut contract_state = self.get_contract_mut()":"let contract_state = self.get_contract()"];if(t.pausable&&o.push("contract_state.pausable.assert_not_paused()"),t.enumerable&&o.push("contract_state.erc721_enumerable.before_update(to, token_id)"),t.votes){if(!t.appName)throw new Uh({appName:"Application Name is required when Votes are enabled"});if(!t.appVersion)throw new Uh({appVersion:"Application Version is required when Votes are enabled"});Jh(e,Rh(t.appName,"appName"),Rh(t.appVersion,"appVersion"),"SNIP12 Metadata"),o.push("let previous_owner = self._owner_of(token_id);"),o.push("contract_state.votes.transfer_voting_units(previous_owner, to, 1);")}e.addFunction(n,{name:"before_update",args:[{name:"ref self",type:"ERC721Component::ComponentState<ContractState>"},{name:"to",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"auth",type:"ContractAddress"}],code:o})}else e.addUseClause("openzeppelin_token::erc721","ERC721HooksEmptyImpl")}(n,t),n}const ab=Vh({ERC721Component:{path:"openzeppelin_token::erc721",substorage:{name:"erc721",type:"ERC721Component::Storage"},event:{name:"ERC721Event",type:"ERC721Component::Event"},impls:[{name:"ERC721InternalImpl",embed:!1,value:"ERC721Component::InternalImpl<ContractState>"}]},ERC721EnumerableComponent:{path:"openzeppelin_token::erc721::extensions",substorage:{name:"erc721_enumerable",type:"ERC721EnumerableComponent::Storage"},event:{name:"ERC721EnumerableEvent",type:"ERC721EnumerableComponent::Event"},impls:[{name:"ERC721EnumerableImpl",embed:!0,value:"ERC721EnumerableComponent::ERC721EnumerableImpl<ContractState>"},{name:"ERC721EnumerableInternalImpl",embed:!1,value:"ERC721EnumerableComponent::InternalImpl<ContractState>"}]}}),sb=vv({burn:{args:[hv(),{name:"token_id",type:"u256"}],code:["self.erc721.update(Zero::zero(), token_id, get_caller_address());"]},safe_mint:{args:[hv(),{name:"recipient",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc721.safe_mint(recipient, token_id, data);"]},safeMint:{args:[hv(),{name:"recipient",type:"ContractAddress"},{name:"tokenId",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.safe_mint(recipient, tokenId, data);"]}}),cb={name:"MyToken",baseUri:"",burnable:!1,pausable:!1,mintable:!1,updatableUri:!0,royaltyInfo:tb,access:mv.access,upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function lb(e){const t=function(e){return{...e,...gv(e),burnable:e.burnable??cb.burnable,pausable:e.pausable??cb.pausable,mintable:e.mintable??cb.mintable,updatableUri:e.updatableUri??cb.updatableUri,royaltyInfo:e.royaltyInfo??cb.royaltyInfo}}(e),n=new qh(t.name,t.macros);return function(e,t){e.addComponent(ub.ERC1155Component,[t],!0)}(n,jh(t.baseUri)),function(e){e.addImplToComponent(ub.ERC1155Component,{name:"ERC1155MixinImpl",embed:!0,value:"ERC1155Component::ERC1155MixinImpl<ContractState>"}),e.addInterfaceFlag("ISRC5"),Hh(e)}(n),t.pausable&&$v(n,t.access),t.burnable&&function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("starknet","get_caller_address"),e.addFunction(bv,db.burn),e.addFunction(bv,db.batch_burn),e.addFunction(bv,db.batchBurn)}(n),t.mintable&&function(e,t){e.addUseClause("starknet","ContractAddress"),iv(e,bv,db.mint,t,"MINTER","minter"),iv(e,bv,db.batch_mint,t,"MINTER","minter"),e.addFunction(bv,db.batchMint)}(n,t.access),t.updatableUri&&function(e,t){iv(e,bv,db.set_base_uri,t,"URI_SETTER","uri_setter"),e.addFunction(bv,db.setBaseUri)}(n,t.access),rv(n,t.access),wv(n,t.upgradeable,t.access),uv(n,t.info),nb(n,t.royaltyInfo,t.access),function(e,t){const n=t.pausable;if(n){const t={name:"ERC1155HooksImpl",of:"ERC1155Component::ERC1155HooksTrait<ContractState>",tags:[],priority:1};e.addImplementedTrait(t),e.addUseClause("starknet","ContractAddress"),e.addFunction(t,{name:"before_update",args:[{name:"ref self",type:"ERC1155Component::ComponentState<ContractState>"},{name:"from",type:"ContractAddress"},{name:"to",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let contract_state = self.get_contract()","contract_state.pausable.assert_not_paused()"]})}else e.addUseClause("openzeppelin_token::erc1155","ERC1155HooksEmptyImpl")}(n,t),n}const ub=Vh({ERC1155Component:{path:"openzeppelin_token::erc1155",substorage:{name:"erc1155",type:"ERC1155Component::Storage"},event:{name:"ERC1155Event",type:"ERC1155Component::Event"},impls:[{name:"ERC1155InternalImpl",embed:!1,value:"ERC1155Component::InternalImpl<ContractState>"}]}}),db=vv({burn:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.burn(account, token_id, value);"]},batch_burn:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["let caller = get_caller_address();","if account != caller {"," assert(self.erc1155.is_approved_for_all(account, caller), ERC1155Component::Errors::UNAUTHORIZED)","}","self.erc1155.batch_burn(account, token_ids, values);"]},batchBurn:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"}],code:["self.batch_burn(account, tokenIds, values);"]},mint:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"token_id",type:"u256"},{name:"value",type:"u256"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.mint_with_acceptance_check(account, token_id, value, data);"]},batch_mint:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"token_ids",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.erc1155.batch_mint_with_acceptance_check(account, token_ids, values, data);"]},batchMint:{args:[hv(),{name:"account",type:"ContractAddress"},{name:"tokenIds",type:"Span<u256>"},{name:"values",type:"Span<u256>"},{name:"data",type:"Span<felt252>"}],code:["self.batch_mint(account, tokenIds, values, data);"]},set_base_uri:{args:[hv(),{name:"base_uri",type:"ByteArray"}],code:["self.erc1155._set_base_uri(base_uri);"]},setBaseUri:{args:[hv(),{name:"baseUri",type:"ByteArray"}],code:["self.set_base_uri(baseUri);"]}}),pb={name:"MyContract",pausable:!1,access:mv.access,upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function mb(e){const t=function(e){return{...e,...gv(e),pausable:e.pausable??pb.pausable}}(e),n=new qh(t.name,t.macros);return t.pausable&&$v(n,t.access),rv(n,t.access),wv(n,t.upgradeable,t.access),uv(n,t.info),n}const fb={name:"MyAccount",type:"stark",declare:!0,deploy:!0,pubkey:!0,outsideExecution:!0,upgradeable:pv.upgradeable,info:pv.info,macros:pv.macros};function gb(e){const t=function(e){return{...e,...fv(e),declare:e.declare??fb.declare,deploy:e.deploy??fb.deploy,pubkey:e.pubkey??fb.pubkey,outsideExecution:e.outsideExecution??fb.outsideExecution}}(e),n=new qh(t.name,t.macros,!0);switch(t.type){case"stark":n.addConstructorArgument({name:"public_key",type:"felt252"}),n.addComponent(vb.AccountComponent,[{lit:"public_key"}],!0);break;case"eth":n.addUseClause("openzeppelin_interfaces::accounts","EthPublicKey"),n.addConstructorArgument({name:"public_key",type:"EthPublicKey"}),n.addComponent(vb.EthAccountComponent,[{lit:"public_key"}],!0)}return t.declare&&t.deploy&&t.pubkey?function(e,t){const n="stark"===t?"AccountMixinImpl":"EthAccountMixinImpl",[o,r]=hb(t);e.addImplToComponent(r,{name:`${n}`,value:`${o}::${n}<ContractState>`,embed:!0}),e.addInterfaceFlag("ISRC5"),Hh(e)}(n,t.type):(function(e,t){const[n,o]=hb(t);e.addImplToComponent(o,{name:"SRC6Impl",embed:!0,value:`${n}::SRC6Impl<ContractState>`}),e.addImplToComponent(o,{name:"SRC6CamelOnlyImpl",embed:!0,value:`${n}::SRC6CamelOnlyImpl<ContractState>`}),Hh(e)}(n,t.type),t.declare&&function(e,t){const[n,o]=hb(t);e.addImplToComponent(o,{name:"DeclarerImpl",embed:!0,value:`${n}::DeclarerImpl<ContractState>`})}(n,t.type),t.deploy&&function(e,t){const[n,o]=hb(t);e.addImplToComponent(o,{name:"DeployableImpl",embed:!0,value:`${n}::DeployableImpl<ContractState>`})}(n,t.type),t.pubkey&&function(e,t){const[n,o]=hb(t);e.addImplToComponent(o,{name:"PublicKeyImpl",embed:!0,value:`${n}::PublicKeyImpl<ContractState>`}),e.addImplToComponent(o,{name:"PublicKeyCamelImpl",embed:!0,value:`${n}::PublicKeyCamelImpl<ContractState>`})}(n,t.type)),t.outsideExecution&&function(e){e.addComponent(vb.SRC9Component,[],!0)}(n),function(e,t,n){const o=xv(e,t);if(void 0!==o)switch(n){case"stark":e.addFunctionCodeBefore(o,Iv.upgrade,"self.account.assert_only_self()");break;case"eth":e.addFunctionCodeBefore(o,Iv.upgrade,"self.eth_account.assert_only_self()")}}(n,t.upgradeable,t.type),uv(n,t.info),n}function hb(e){const[t,n]="stark"===e?["AccountComponent",vb.AccountComponent]:["EthAccountComponent",vb.EthAccountComponent];return[t,n]}const vb=Vh({AccountComponent:{path:"openzeppelin_account",substorage:{name:"account",type:"AccountComponent::Storage"},event:{name:"AccountEvent",type:"AccountComponent::Event"},impls:[{name:"AccountInternalImpl",embed:!1,value:"AccountComponent::InternalImpl<ContractState>"}]},EthAccountComponent:{path:"openzeppelin_account::eth_account",substorage:{name:"eth_account",type:"EthAccountComponent::Storage"},event:{name:"EthAccountEvent",type:"EthAccountComponent::Event"},impls:[{name:"EthAccountInternalImpl",embed:!1,value:"EthAccountComponent::InternalImpl<ContractState>"}]},SRC9Component:{path:"openzeppelin_account::extensions",substorage:{name:"src9",type:"SRC9Component::Storage"},event:{name:"SRC9Event",type:"SRC9Component::Event"},impls:[{name:"OutsideExecutionV2Impl",embed:!0,value:"SRC9Component::OutsideExecutionV2Impl<ContractState>"},{name:"OutsideExecutionInternalImpl",embed:!1,value:"SRC9Component::InternalImpl<ContractState>"}]}}),bb="openzeppelin_governance::governor::extensions",$b="Extensions (external)",yb="Extensions (internal)",_b={name:"MyGovernor",delay:"1 day",period:"1 week",votes:"erc20votes",clockMode:"timestamp",timelock:"openzeppelin",decimals:18,proposalThreshold:"0",quorumMode:"percent",quorumPercent:4,quorumAbsolute:"",settings:!0,upgradeable:mv.upgradeable,appName:"OpenZeppelin Governor",appVersion:"v1",info:mv.info,macros:mv.macros};function xb(e){const t=function(e){return{...e,...fv(e),delay:e.delay??_b.delay,period:e.period??_b.period,proposalThreshold:e.proposalThreshold||_b.proposalThreshold,decimals:e.decimals??_b.decimals,quorumPercent:e.quorumPercent??_b.quorumPercent,quorumAbsolute:e.quorumAbsolute??_b.quorumAbsolute,settings:e.settings??_b.settings,quorumMode:e.quorumMode??_b.quorumMode,votes:e.votes??_b.votes,clockMode:e.clockMode??_b.clockMode,timelock:e.timelock??_b.timelock,appName:e.appName??_b.appName,appVersion:e.appVersion??_b.appVersion}}(e),n=new qh(t.name,t.macros);return function(e){if(!/^\d+$/.test(e.toString()))throw new Uh({decimals:"Not a valid number"})}(t.decimals),function(e){e.addUseClause("starknet","ContractAddress"),e.addUseClause("openzeppelin_governance::governor","DefaultConfig",{alias:"GovernorDefaultConfig"}),e.addConstructorArgument({name:"votes_token",type:"ContractAddress"}),e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalTrait",{alias:"GovernorInternalTrait"}),e.addComponent(wb.GovernorComponent,[],!0)}(n),Hh(n,"SRC5"),Gh(n,t.appName,t.appVersion,"SNIP12 Metadata"),function(e){e.addComponent(wb.GovernorCountingSimpleComponent,[],!1)}(n),function(e,t){if("percent"===t.quorumMode){if(t.quorumPercent>100)throw new Uh({quorumPercent:"Invalid percentage"});!function(e,t){e.addConstant({name:"QUORUM_NUMERATOR",type:"u256",value:(10*t).toString(),comment:`${t}%`,inlineComment:!0}),e.addUseClause(`${bb}::GovernorVotesQuorumFractionComponent`,"InternalTrait",{alias:"GovernorVotesQuorumFractionInternalTrait"}),e.addComponent(wb.GovernorVotesQuorumFractionComponent,[{lit:"votes_token"},{lit:"QUORUM_NUMERATOR"}],!0)}(e,t.quorumPercent)}else if("absolute"===t.quorumMode){if(!Ah(t.quorumAbsolute))throw new Uh({quorumAbsolute:"Not a valid number"});let n,o="";0===t.decimals||"erc721votes"===t.votes?n=`${t.quorumAbsolute}`:(n=""+BigInt(t.quorumAbsolute)*BigInt(10)**BigInt(t.decimals),n=Mh(n,"quorumAbsolute","u256").toString(),o=`${t.quorumAbsolute} * pow!(10, ${t.decimals})`),function(e){e.addUseClause(`${bb}::GovernorVotesComponent`,"InternalTrait",{alias:"GovernorVotesInternalTrait"}),e.addComponent(wb.GovernorVotesComponent,[{lit:"votes_token"}],!0)}(e),function(e,t,n){e.addConstant({name:"QUORUM",type:"u256",value:t,comment:n,inlineComment:!0});const o={name:"GovernorQuorum",of:"GovernorComponent::GovernorQuorumTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:1};e.addImplementedTrait(o),e.addFunction(o,{name:"quorum",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"},{name:"timepoint",type:"u64"}],returns:"u256",code:["QUORUM"]})}(e,n,o)}}(n,t),function(e,t){e.addConstant({name:"VOTING_DELAY",type:"u64",value:kb(t).toString(),comment:t.delay,inlineComment:!0}),e.addConstant({name:"VOTING_PERIOD",type:"u64",value:Ib(t).toString(),comment:t.period,inlineComment:!0}),e.addConstant({name:"PROPOSAL_THRESHOLD",type:"u256",...Sb(t),inlineComment:!0}),t.settings?(e.addUseClause(`${bb}::GovernorSettingsComponent`,"InternalTrait",{alias:"GovernorSettingsInternalTrait"}),e.addComponent(wb.GovernorSettingsComponent,[{lit:"VOTING_DELAY"},{lit:"VOTING_PERIOD"},{lit:"PROPOSAL_THRESHOLD"}],!0)):function(e){const t={name:"GovernorSettings",of:"GovernorComponent::GovernorSettingsTrait<ContractState>",tags:[],section:"Locally implemented extensions",priority:2};e.addImplementedTrait(t),e.addFunction(t,{name:"voting_delay",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_DELAY"]}),e.addFunction(t,{name:"voting_period",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u64",code:["VOTING_PERIOD"]}),e.addFunction(t,{name:"proposal_threshold",args:[{name:"self",type:"@GovernorComponent::ComponentState<ContractState>"}],returns:"u256",code:["PROPOSAL_THRESHOLD"]})}(e)}(n,t),function(e,{timelock:t}){!1===t?e.addComponent(wb.GovernorCoreExecutionComponent,[],!1):(e.addConstructorArgument({name:"timelock_controller",type:"ContractAddress"}),e.addUseClause(`${bb}::GovernorTimelockExecutionComponent`,"InternalTrait",{alias:"GovernorTimelockExecutionInternalTrait"}),e.addComponent(wb.GovernorTimelockExecutionComponent,[{lit:"timelock_controller"}],!0))}(n,t),function(e,t){const n=xv(e,t);void 0!==n&&(e.addUseClause("openzeppelin_governance::governor::GovernorComponent","InternalExtendedImpl"),e.addFunctionCodeBefore(n,Iv.upgrade,"self.governor.assert_only_governance()"))}(n,t.upgradeable),uv(n,t.info),n}const wb=Vh({GovernorComponent:{path:"openzeppelin_governance::governor",substorage:{name:"governor",type:"GovernorComponent::Storage"},event:{name:"GovernorEvent",type:"GovernorComponent::Event"},impls:[{name:"GovernorImpl",embed:!0,value:"GovernorComponent::GovernorImpl<ContractState>",section:"Governor Core"}]},GovernorSettingsComponent:{path:bb,substorage:{name:"governor_settings",type:"GovernorSettingsComponent::Storage"},event:{name:"GovernorSettingsEvent",type:"GovernorSettingsComponent::Event"},impls:[{name:"GovernorSettingsAdminImpl",embed:!0,value:"GovernorSettingsComponent::GovernorSettingsAdminImpl<ContractState>",section:$b},{name:"GovernorSettingsImpl",embed:!1,value:"GovernorSettingsComponent::GovernorSettings<ContractState>",section:yb}]},GovernorVotesComponent:{path:bb,substorage:{name:"governor_votes",type:"GovernorVotesComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesComponent::Event"},impls:[{name:"VotesTokenImpl",embed:!0,value:"GovernorVotesComponent::VotesTokenImpl<ContractState>",section:$b},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesComponent::GovernorVotes<ContractState>",section:yb}]},GovernorVotesQuorumFractionComponent:{path:bb,substorage:{name:"governor_votes_quorum_fraction",type:"GovernorVotesQuorumFractionComponent::Storage"},event:{name:"GovernorVotesEvent",type:"GovernorVotesQuorumFractionComponent::Event"},impls:[{name:"GovernorQuorumImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorQuorum<ContractState>",section:yb},{name:"GovernorVotesImpl",embed:!1,value:"GovernorVotesQuorumFractionComponent::GovernorVotes<ContractState>",section:yb},{name:"QuorumFractionImpl",embed:!0,value:"GovernorVotesQuorumFractionComponent::QuorumFractionImpl<ContractState>",section:$b}]},GovernorCountingSimpleComponent:{path:bb,substorage:{name:"governor_counting_simple",type:"GovernorCountingSimpleComponent::Storage"},event:{name:"GovernorCountingSimpleEvent",type:"GovernorCountingSimpleComponent::Event"},impls:[{name:"GovernorCountingSimpleImpl",embed:!1,value:"GovernorCountingSimpleComponent::GovernorCounting<ContractState>",section:yb}]},GovernorCoreExecutionComponent:{path:bb,substorage:{name:"governor_core_execution",type:"GovernorCoreExecutionComponent::Storage"},event:{name:"GovernorCoreExecutionEvent",type:"GovernorCoreExecutionComponent::Event"},impls:[{name:"GovernorCoreExecutionImpl",embed:!1,value:"GovernorCoreExecutionComponent::GovernorExecution<ContractState>",section:yb}]},GovernorTimelockExecutionComponent:{path:bb,substorage:{name:"governor_timelock_execution",type:"GovernorTimelockExecutionComponent::Storage"},event:{name:"GovernorTimelockExecutionEvent",type:"GovernorTimelockExecutionComponent::Event"},impls:[{name:"TimelockedImpl",embed:!0,value:"GovernorTimelockExecutionComponent::TimelockedImpl<ContractState>",section:$b},{name:"GovernorTimelockExecutionImpl",embed:!1,value:"GovernorTimelockExecutionComponent::GovernorExecution<ContractState>",section:yb}]}});function kb(e){try{if("timestamp"===e.clockMode)return Xh(e.delay);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Uh({delay:e.message}):e}}function Ib(e){try{if("timestamp"===e.clockMode)return Xh(e.period);throw new Error("Invalid clock mode")}catch(e){throw e instanceof Error?new Uh({period:e.message}):e}}function Sb({proposalThreshold:e,decimals:t,votes:n}){if(!/^\d+$/.test(e))throw new Uh({proposalThreshold:"Not a valid number"});if(/^0+$/.test(e)||0===t||"erc721votes"===n)return{value:e};{let n=""+BigInt(e)*BigInt(10)**BigInt(t);return n=Mh(n,"proposalThreshold","u256").toString(),{value:`${n}`,comment:`${e} * pow!(10, ${t})`}}}const Cb={name:"MyMultisig",quorum:"2",upgradeable:mv.upgradeable,info:mv.info,macros:mv.macros};function Eb(e){const t=function(e){return{...e,...fv(e),quorum:e.quorum??Cb.quorum}}(e),n=new qh(t.name,t.macros);return function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){const t=e.quorum;if(!Ah(t))throw new Uh({quorum:"Not a valid number"});const n=Mh(t,"quorum","u32");if(n===BigInt(0))throw new Uh({quorum:"Quorum cannot be 0"});return n}(t);e.addConstant({name:"INITIAL_QUORUM",type:"u32",value:n.toString()}),e.addConstructorArgument({name:"signers",type:"Span<ContractAddress>"});const o=[{lit:"INITIAL_QUORUM"},{lit:"signers"}];e.addComponent(zb.MultisigComponent,o,!0)}(n,t),uv(n,t.info),function(e,t){const n=xv(e,t);void 0!==n&&e.addFunctionCodeBefore(n,Iv.upgrade,"self.multisig.assert_only_self()")}(n,t.upgradeable),rv(n,Yh()),n}const zb=Vh({MultisigComponent:{path:"openzeppelin_governance::multisig",substorage:{name:"multisig",type:"MultisigComponent::Storage"},event:{name:"MultisigEvent",type:"MultisigComponent::Event"},impls:[{name:"MultisigImpl",embed:!0,value:"MultisigComponent::MultisigImpl<ContractState>"},{name:"MultisigInternalImpl",embed:!1,value:"MultisigComponent::InternalImpl<ContractState>"}]}}),Tb={name:"MyVesting",startDate:"",duration:"0 day",cliffDuration:"0 day",schedule:"custom",info:mv.info,macros:mv.macros};function Ob(e){const t=function(e){return{name:e.name??Tb.name,startDate:e.startDate??Tb.startDate,duration:e.duration??Tb.duration,cliffDuration:e.cliffDuration??Tb.cliffDuration,schedule:e.schedule??Tb.schedule,info:e.info??Tb.info,macros:e.macros??Tb.macros}}(e),n=new qh(t.name,t.macros);!function(e,t){e.addUseClause("starknet","ContractAddress");const n=function(e){if(""===e.startDate||"NaN"===e.startDate)return;const t=new Date(`${e.startDate}Z`),n=t.getTime(),o=Mh(Math.floor(n/1e3),"startDate","u64"),r=t.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"UTC"});return{timestampInSec:o,formattedDate:`${r} (UTC)`}}(t),o=function(e){try{return Xh(e.duration)}catch(e){throw e instanceof Error?new Uh({duration:e.message}):e}}(t),r=function(e){try{return Xh(e.cliffDuration)}catch(e){throw e instanceof Error?new Uh({cliffDuration:e.message}):e}}(t);(function(e,t){if(Lh(e,"duration","u64"),Lh(t,"cliffDuration","u64"),t>e)throw new Uh({cliffDuration:"Cliff duration must be less than or equal to the total duration"})})(o,r),void 0!==n?e.addConstant({name:"START",type:"u64",value:n.timestampInSec.toString(),comment:n.formattedDate,inlineComment:!0}):e.addConstant({name:"START",type:"u64",value:"0"});e.addConstant({name:"DURATION",type:"u64",value:o.toString(),comment:t.duration,inlineComment:!0}),e.addConstant({name:"CLIFF_DURATION",type:"u64",value:r.toString(),comment:t.cliffDuration,inlineComment:!0});const i=[{lit:"START"},{lit:"DURATION"},{lit:"CLIFF_DURATION"}];e.addComponent(Db.VestingComponent,i,!0)}(n,t),function(e,t){switch(t.schedule){case"linear":return void e.addUseClause("openzeppelin_finance::vesting","LinearVestingSchedule");case"custom":{const t={name:"VestingSchedule",of:"VestingComponent::VestingScheduleTrait<ContractState>",tags:[],priority:0};e.addImplementedTrait(t),e.addFunction(t,{name:"calculate_vested_amount",returns:"u256",args:[{name:"self",type:"@VestingComponent::ComponentState<ContractState>"},{name:"token",type:"ContractAddress"},{name:"total_allocation",type:"u256"},{name:"timestamp",type:"u64"},{name:"start",type:"u64"},{name:"duration",type:"u64"},{name:"cliff",type:"u64"}],code:["// TODO: Must be implemented according to the desired vesting schedule","0"]})}}}(n,t),uv(n,t.info);const o=ev();return rv(n,o),wv(n,!1,o),n}const Db=Vh({VestingComponent:{path:"openzeppelin_finance::vesting",substorage:{name:"vesting",type:"VestingComponent::Storage"},event:{name:"VestingEvent",type:"VestingComponent::Event"},impls:[{name:"VestingImpl",embed:!0,value:"VestingComponent::VestingImpl<ContractState>"},{name:"VestingInternalImpl",embed:!1,value:"VestingComponent::InternalImpl<ContractState>"}]}});const Ub={print:function(e=Wv){return Dv(Kv(e))},defaults:Wv,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable}},Nb={print:function(e=rb){return Dv(ib(e))},defaults:rb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!0===e.upgradeable||!0===e.royaltyInfo?.enabled}},Ab={print:function(e=cb){return Dv(lb(e))},defaults:cb,isAccessControlRequired:function(e){return!0===e.mintable||!0===e.pausable||!1!==e.updatableUri||!0===e.upgradeable||!0===e.royaltyInfo?.enabled}},jb={defaults:fb},Rb={defaults:Cb},Pb={defaults:_b},Zb={defaults:Tb},Mb={print:function(e=pb){return Dv(mb(e))},defaults:pb,isAccessControlRequired:function(e){return!0===e.pausable||!0===e.upgradeable}};function Lb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qb,Vb;function Fb(){if(Vb)return qb;function e(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n],r=typeof o;"object"!==r&&"function"!==r||Object.isFrozen(o)||e(o)}),t}Vb=1;class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function o(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const r=e=>!!e.scope;class i{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=n(e)}openNode(e){if(!r(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${"_".repeat(t+1)}`)].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class s{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=a({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{s._collapse(e)}))}}class c extends s{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new i(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function l(e){return e?"string"==typeof e?e:e.source:null}function u(e){return m("(?=",e,")")}function d(e){return m("(?:",e,")*")}function p(e){return m("(?:",e,")?")}function m(...e){return e.map(e=>l(e)).join("")}function f(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map(e=>l(e)).join("|")+")"}function g(e){return new RegExp(e.toString()+"|").exec("").length-1}const h=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function v(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;const t=n;let o=l(e),r="";for(;o.length>0;){const e=h.exec(o);if(!e){r+=o;break}r+=o.substring(0,e.index),o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+t):(r+=e[0],"("===e[0]&&n++)}return r}).map(e=>`(${e})`).join(t)}const b="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",x="\\b(0b[01]+)",w={begin:"\\\\[\\s\\S]",relevance:0},k={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[w]},I={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[w]},S=function(e,t,n={}){const r=o({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},C=S("//","$"),E=S("/\\*","\\*/"),z=S("#","$"),T={scope:"number",begin:y,relevance:0},O={scope:"number",begin:_,relevance:0},D={scope:"number",begin:x,relevance:0},U={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[w,{begin:/\[/,end:/\]/,relevance:0,contains:[w]}]},N={scope:"title",begin:b,relevance:0},A={scope:"title",begin:$,relevance:0},j={begin:"\\.\\s*"+$,relevance:0};var R=Object.freeze({__proto__:null,APOS_STRING_MODE:k,BACKSLASH_ESCAPE:w,BINARY_NUMBER_MODE:D,BINARY_NUMBER_RE:x,COMMENT:S,C_BLOCK_COMMENT_MODE:E,C_LINE_COMMENT_MODE:C,C_NUMBER_MODE:O,C_NUMBER_RE:_,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:b,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:j,NUMBER_MODE:T,NUMBER_RE:y,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:I,REGEXP_MODE:U,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=m(t,/.*\b/,e.binary,/\b.*/)),o({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:N,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:A});function P(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Z(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function M(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=P,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function L(e,t){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function q(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function V(e,t){void 0===e.relevance&&(e.relevance=1)}const F=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=m(n.beforeMatch,u(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},H=["of","and","for","in","not","or","if","then","parent","list","value"];function J(e,t,n="keyword"){const o=Object.create(null);return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(n){Object.assign(o,J(e[n],t,n))}),o;function r(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");o[n[0]]=[e,G(n[0],n[1])]})}}function G(e,t){return t?Number(t):function(e){return H.includes(e.toLowerCase())}(e)?0:1}const B={},W=e=>{console.error(e)},K=(e,...t)=>{console.log(`WARN: ${e}`,...t)},X=(e,t)=>{B[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),B[`${e}/${t}`]=!0)},Q=new Error;function Y(e,t,{key:n}){let o=0;const r=e[n],i={},a={};for(let e=1;e<=t.length;e++)a[e+o]=r[e],i[e+o]=!0,o+=g(t[e-1]);e[n]=a,e[n]._emit=i,e[n]._multi=!0}function ee(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw W("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Q;if("object"!=typeof e.beginScope||null===e.beginScope)throw W("beginScope must be object"),Q;Y(e,e.begin,{key:"beginScope"}),e.begin=v(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw W("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Q;if("object"!=typeof e.endScope||null===e.endScope)throw W("endScope must be object"),Q;Y(e,e.end,{key:"endScope"}),e.end=v(e.end,{joinWith:""})}}(e)}function te(e){function t(t,n){return new RegExp(l(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=g(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(v(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),o=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,o)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=o(e.classNameAliases||{}),function n(i,a){const s=i;if(i.isCompiled)return s;[Z,q,ee,F].forEach(e=>e(i,a)),e.compilerExtensions.forEach(e=>e(i,a)),i.__beforeBegin=null,[M,L,V].forEach(e=>e(i,a)),i.isCompiled=!0;let c=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),c=i.keywords.$pattern,delete i.keywords.$pattern),c=c||/\w+/,i.keywords&&(i.keywords=J(i.keywords,e.case_insensitive)),s.keywordPatternRe=t(c,!0),a&&(i.begin||(i.begin=/\B|\b/),s.beginRe=t(s.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(s.endRe=t(s.end)),s.terminatorEnd=l(s.end)||"",i.endsWithParent&&a.terminatorEnd&&(s.terminatorEnd+=(i.end?"|":"")+a.terminatorEnd)),i.illegal&&(s.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return o(e,{variants:null},t)}));if(e.cachedVariants)return e.cachedVariants;if(ne(e))return o(e,{starts:e.starts?o(e.starts):null});if(Object.isFrozen(e))return o(e);return e}("self"===e?i:e)})),i.contains.forEach(function(e){n(e,s)}),i.starts&&n(i.starts,a),s.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(s),s}(e)}function ne(e){return!!e&&(e.endsWithParent||ne(e.starts))}class oe extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const re=n,ie=o,ae=Symbol("nomatch"),se=function(n){const o=Object.create(null),r=Object.create(null),i=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let g={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function h(e){return g.noHighlightRe.test(e)}function v(e,t,n){let o="",r="";"object"==typeof t?(o=e,n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,o=t),void 0===n&&(n=!0);const i={code:o,language:r};S("before:highlight",i);const a=i.result?i.result:b(i.language,i.code,n);return a.code=i.code,S("after:highlight",a),a}function b(e,n,r,i){const c=Object.create(null);function l(e,t){return e.keywords[t]}function u(){if(!C.keywords)return void z.addText(T);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(T),n="";for(;t;){n+=T.substring(e,t.index);const o=k.case_insensitive?t[0].toLowerCase():t[0],r=l(C,o);if(r){const[e,i]=r;if(z.addText(n),n="",c[o]=(c[o]||0)+1,c[o]<=7&&(O+=i),e.startsWith("_"))n+=t[0];else{const n=k.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(T)}n+=T.substring(e),z.addText(n)}function d(){null!=C.subLanguage?function(){if(""===T)return;let e=null;if("string"==typeof C.subLanguage){if(!o[C.subLanguage])return void z.addText(T);e=b(C.subLanguage,T,!0,E[C.subLanguage]),E[C.subLanguage]=e._top}else e=$(T,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=e.relevance),z.__addSublanguage(e._emitter,e.language)}():u(),T=""}function p(e,t){""!==e&&(z.startScope(t),z.addText(e),z.endScope())}function m(e,t){let n=1;const o=t.length-1;for(;n<=o;){if(!e._emit[n]){n++;continue}const o=k.classNameAliases[e[n]]||e[n],r=t[n];o?p(r,o):(T=r,u(),T=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&z.openNode(k.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(T,k.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),T=""):e.beginScope._multi&&(m(e.beginScope,t),T="")),C=Object.create(e,{parent:{value:C}}),C}function h(e,n,o){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,o);if(r){if(e["on:end"]){const o=new t(e);e["on:end"](n,o),o.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return h(e.parent,n,o)}function v(e){return 0===C.matcher.regexIndex?(T+=e[0],1):(N=!0,0)}function y(e){const t=e[0],o=n.substring(e.index),r=h(C,e,o);if(!r)return ae;const i=C;C.endScope&&C.endScope._wrap?(d(),p(t,C.endScope._wrap)):C.endScope&&C.endScope._multi?(d(),m(C.endScope,e)):i.skip?T+=t:(i.returnEnd||i.excludeEnd||(T+=t),d(),i.excludeEnd&&(T=t));do{C.scope&&z.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==r.parent);return r.starts&&f(r.starts,e),i.returnEnd?0:t.length}let _={};function x(o,i){const s=i&&i[0];if(T+=o,null==s)return d(),0;if("begin"===_.type&&"end"===i.type&&_.index===i.index&&""===s){if(T+=n.slice(i.index,i.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=_.rule,t}return 1}if(_=i,"begin"===i.type)return function(e){const n=e[0],o=e.rule,r=new t(o),i=[o.__beforeBegin,o["on:begin"]];for(const t of i)if(t&&(t(e,r),r.isMatchIgnored))return v(n);return o.skip?T+=n:(o.excludeBegin&&(T+=n),d(),o.returnBegin||o.excludeBegin||(T=n)),f(o,e),o.returnBegin?0:n.length}(i);if("illegal"===i.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===i.type){const e=y(i);if(e!==ae)return e}if("illegal"===i.type&&""===s)return T+="\n",1;if(U>1e5&&U>3*i.index){throw new Error("potential infinite loop, way more iterations than matches")}return T+=s,s.length}const k=w(e);if(!k)throw W(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const I=te(k);let S="",C=i||I;const E={},z=new g.__emitter(g);!function(){const e=[];for(let t=C;t!==k;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>z.openNode(e))}();let T="",O=0,D=0,U=0,N=!1;try{if(k.__emitTokens)k.__emitTokens(n,z);else{for(C.matcher.considerAll();;){U++,N?N=!1:C.matcher.considerAll(),C.matcher.lastIndex=D;const e=C.matcher.exec(n);if(!e)break;const t=x(n.substring(D,e.index),e);D=e.index+t}x(n.substring(D))}return z.finalize(),S=z.toHTML(),{language:e,value:S,relevance:O,illegal:!1,_emitter:z,_top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:re(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:D,context:n.slice(D-100,D+100),mode:t.mode,resultSoFar:S},_emitter:z};if(a)return{language:e,value:re(n),illegal:!1,relevance:0,errorRaised:t,_emitter:z,_top:C};throw t}}function $(e,t){t=t||g.languages||Object.keys(o);const n=function(e){const t={value:re(e),illegal:!1,relevance:0,_top:l,_emitter:new g.__emitter(g)};return t._emitter.addText(e),t}(e),r=t.filter(w).filter(I).map(t=>b(t,e,!1));r.unshift(n);const i=r.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(w(e.language).supersetOf===t.language)return 1;if(w(t.language).supersetOf===e.language)return-1}return 0}),[a,s]=i,c=a;return c.secondBest=s,c}function y(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t);if(n){const t=w(n[1]);return t||(K(s.replace("{}",n[1])),K("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>h(e)||w(e))}(e);if(h(n))return;if(S("before:highlightElement",{el:e,language:n}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),g.throwUnescapedHTML)){throw new oe("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const o=t.textContent,i=n?v(o,{language:n,ignoreIllegals:!0}):$(o);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const o=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${o}`)}(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),S("after:highlightElement",{el:e,result:i,text:o})}let _=!1;function x(){if("loading"===document.readyState)return _||window.addEventListener("DOMContentLoaded",function(){x()},!1),void(_=!0);document.querySelectorAll(g.cssSelector).forEach(y)}function w(e){return e=(e||"").toLowerCase(),o[e]||o[r[e]]}function k(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{r[e.toLowerCase()]=t})}function I(e){const t=w(e);return t&&!t.disableAutodetect}function S(e,t){const n=e;i.forEach(function(e){e[n]&&e[n](t)})}Object.assign(n,{highlight:v,highlightAuto:$,highlightAll:x,highlightElement:y,highlightBlock:function(e){return X("10.7.0","highlightBlock will be removed entirely in v12.0"),X("10.7.0","Please use highlightElement now."),y(e)},configure:function(e){g=ie(g,e)},initHighlighting:()=>{x(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){x(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,t){let r=null;try{r=t(n)}catch(t){if(W("Language definition for '{}' could not be registered.".replace("{}",e)),!a)throw t;W(t),r=l}r.name||(r.name=e),o[e]=r,r.rawDefinition=t.bind(null,n),r.aliases&&k(r.aliases,{languageName:e})},unregisterLanguage:function(e){delete o[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(o)},getLanguage:w,registerAliases:k,autoDetection:I,inherit:ie,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),i.push(e)},removePlugin:function(e){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}),n.debugMode=function(){a=!1},n.safeMode=function(){a=!0},n.versionString="11.11.1",n.regex={concat:m,lookahead:u,either:f,optional:p,anyNumberOfTimes:d};for(const t in R)"object"==typeof R[t]&&e(R[t]);return Object.assign(n,R),n},ce=se({});return ce.newInstance=()=>se({}),qb=ce,ce.HighlightJS=ce,ce.default=ce,qb}var Hb,Jb,Gb,Bb,Wb,Kb=Lb(Fb()),Xb={exports:{}};function Qb(){return Jb?Hb:(Jb=1,Hb=function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",n="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],keywords:{keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield",literal:"true false Some None Ok Err",built_in:n},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"meta",begin:"#\\!?\\[",end:"\\]",contains:[{className:"meta-string",begin:/"/,end:/"/}]},{className:"class",beginKeywords:"type",end:";",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"\\S"},{className:"class",beginKeywords:"trait enum struct union",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::",keywords:{built_in:n}},{begin:"->"}]}})}var Yb=function(){if(Wb)return Xb.exports;Wb=1;const e=function(){if(Bb)return Gb;Bb=1;const e=Qb();return Gb=function(t){const n=e(t);if("object"!=typeof n.keywords)throw Error("Expected object");const o={keyword:["break","const","continue","else","enum","false","for","fn","hint","if","impl","in","match","pub","return","struct","trait","true","type","use","as","assert","do","dyn","extern","let","macro","mod","move","ref","static_assert","static","super","try","typeof","unsafe","where","while","with","yield"].join(" "),literal:["true","false"].join(" "),type:["bool","u8","u16","u32","u64","u128","u256","usize"].join(" ")};return Object.assign(n.keywords,o),Object.assign(n.contains,[...n.contains,{className:"built_in",begin:"selector!"},{className:"built_in",begin:"component!"},{className:"class",beginKeywords:"mod",end:"{",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{className:"class",beginKeywords:"impl",end:";",contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{endsParent:!0})]},{beginKeywords:"let",end:";",contains:[t.inherit({className:"variable",begin:t.UNDERSCORE_IDENT_RE,relevance:0},{endsParent:!0})]}]),Object.assign(n,{name:"Cairo",aliases:["cairo"]}),n}}();return Xb.exports=function(t){t.registerLanguage("cairo",e)},Xb.exports.cairo=e,Xb.exports}();Lb(Yb)(Kb);const e$={AccountComponent:"account",UpgradeableComponent:"upgradeable"};var t$="top",n$="bottom",o$="right",r$="left",i$="auto",a$=[t$,n$,o$,r$],s$="start",c$="end",l$="viewport",u$="popper",d$=a$.reduce(function(e,t){return e.concat([t+"-"+s$,t+"-"+c$])},[]),p$=[].concat(a$,[i$]).reduce(function(e,t){return e.concat([t,t+"-"+s$,t+"-"+c$])},[]),m$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function f$(e){return e?(e.nodeName||"").toLowerCase():null}function g$(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function h$(e){return e instanceof g$(e).Element||e instanceof Element}function v$(e){return e instanceof g$(e).HTMLElement||e instanceof HTMLElement}function b$(e){return"undefined"!=typeof ShadowRoot&&(e instanceof g$(e).ShadowRoot||e instanceof ShadowRoot)}var $$={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];v$(r)&&f$(r)&&(Object.assign(r.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});v$(o)&&f$(o)&&(Object.assign(o.style,i),Object.keys(r).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]};function y$(e){return e.split("-")[0]}var _$=Math.max,x$=Math.min,w$=Math.round;function k$(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function I$(){return!/^((?!chrome|android).)*safari/i.test(k$())}function S$(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&v$(e)&&(r=e.offsetWidth>0&&w$(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&w$(o.height)/e.offsetHeight||1);var a=(h$(e)?g$(e):window).visualViewport,s=!I$()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/r,l=(o.top+(s&&a?a.offsetTop:0))/i,u=o.width/r,d=o.height/i;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function C$(e){var t=S$(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function E$(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b$(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function z$(e){return g$(e).getComputedStyle(e)}function T$(e){return["table","td","th"].indexOf(f$(e))>=0}function O$(e){return((h$(e)?e.ownerDocument:e.document)||window.document).documentElement}function D$(e){return"html"===f$(e)?e:e.assignedSlot||e.parentNode||(b$(e)?e.host:null)||O$(e)}function U$(e){return v$(e)&&"fixed"!==z$(e).position?e.offsetParent:null}function N$(e){for(var t=g$(e),n=U$(e);n&&T$(n)&&"static"===z$(n).position;)n=U$(n);return n&&("html"===f$(n)||"body"===f$(n)&&"static"===z$(n).position)?t:n||function(e){var t=/firefox/i.test(k$());if(/Trident/i.test(k$())&&v$(e)&&"fixed"===z$(e).position)return null;var n=D$(e);for(b$(n)&&(n=n.host);v$(n)&&["html","body"].indexOf(f$(n))<0;){var o=z$(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function A$(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function j$(e,t,n){return _$(e,x$(t,n))}function R$(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function P$(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var Z$={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=y$(n.placement),c=A$(s),l=[r$,o$].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return R$("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:P$(e,a$))}(r.padding,n),d=C$(i),p="y"===c?t$:r$,m="y"===c?n$:o$,f=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],g=a[c]-n.rects.reference[c],h=N$(i),v=h?"y"===c?h.clientHeight||0:h.clientWidth||0:0,b=f/2-g/2,$=u[p],y=v-d[l]-u[m],_=v/2-d[l]/2+b,x=j$($,_,y),w=c;n.modifiersData[o]=((t={})[w]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&E$(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function M$(e){return e.split("-")[1]}var L$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function q$(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=void 0===p?0:p,f=a.y,g=void 0===f?0:f,h="function"==typeof u?u({x:m,y:g}):{x:m,y:g};m=h.x,g=h.y;var v=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),$=r$,y=t$,_=window;if(l){var x=N$(n),w="clientHeight",k="clientWidth";if(x===g$(n)&&"static"!==z$(x=O$(n)).position&&"absolute"===s&&(w="scrollHeight",k="scrollWidth"),r===t$||(r===r$||r===o$)&&i===c$)y=n$,g-=(d&&x===_&&_.visualViewport?_.visualViewport.height:x[w])-o.height,g*=c?1:-1;if(r===r$||(r===t$||r===n$)&&i===c$)$=o$,m-=(d&&x===_&&_.visualViewport?_.visualViewport.width:x[k])-o.width,m*=c?1:-1}var I,S=Object.assign({position:s},l&&L$),C=!0===u?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:w$(n*r)/r||0,y:w$(o*r)/r||0}}({x:m,y:g},g$(n)):{x:m,y:g};return m=C.x,g=C.y,c?Object.assign({},S,((I={})[y]=b?"0":"",I[$]=v?"0":"",I.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",I)):Object.assign({},S,((t={})[y]=b?g+"px":"",t[$]=v?m+"px":"",t.transform="",t))}var V$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:y$(t.placement),variation:M$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,q$(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,q$(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},F$={passive:!0};var H$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,c=g$(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(e){e.addEventListener("scroll",n.update,F$)}),s&&c.addEventListener("resize",n.update,F$),function(){i&&l.forEach(function(e){e.removeEventListener("scroll",n.update,F$)}),s&&c.removeEventListener("resize",n.update,F$)}},data:{}},J$={left:"right",right:"left",bottom:"top",top:"bottom"};function G$(e){return e.replace(/left|right|bottom|top/g,function(e){return J$[e]})}var B$={start:"end",end:"start"};function W$(e){return e.replace(/start|end/g,function(e){return B$[e]})}function K$(e){var t=g$(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function X$(e){return S$(O$(e)).left+K$(e).scrollLeft}function Q$(e){var t=z$(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function Y$(e){return["html","body","#document"].indexOf(f$(e))>=0?e.ownerDocument.body:v$(e)&&Q$(e)?e:Y$(D$(e))}function ey(e,t){var n;void 0===t&&(t=[]);var o=Y$(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=g$(o),a=r?[i].concat(i.visualViewport||[],Q$(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(ey(D$(a)))}function ty(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ny(e,t,n){return t===l$?ty(function(e,t){var n=g$(e),o=O$(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(r){i=r.width,a=r.height;var l=I$();(l||!l&&"fixed"===t)&&(s=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:s+X$(e),y:c}}(e,n)):h$(t)?function(e,t){var n=S$(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ty(function(e){var t,n=O$(e),o=K$(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=_$(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=_$(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+X$(e),c=-o.scrollTop;return"rtl"===z$(r||n).direction&&(s+=_$(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(O$(e)))}function oy(e,t,n,o){var r="clippingParents"===t?function(e){var t=ey(D$(e)),n=["absolute","fixed"].indexOf(z$(e).position)>=0&&v$(e)?N$(e):e;return h$(n)?t.filter(function(e){return h$(e)&&E$(e,n)&&"body"!==f$(e)}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(t,n){var r=ny(e,n,o);return t.top=_$(r.top,t.top),t.right=x$(r.right,t.right),t.bottom=x$(r.bottom,t.bottom),t.left=_$(r.left,t.left),t},ny(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ry(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?y$(r):null,a=r?M$(r):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case t$:t={x:s,y:n.y-o.height};break;case n$:t={x:s,y:n.y+n.height};break;case o$:t={x:n.x+n.width,y:c};break;case r$:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?A$(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case s$:t[l]=t[l]-(n[u]/2-o[u]/2);break;case c$:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function iy(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?l$:l,d=n.elementContext,p=void 0===d?u$:d,m=n.altBoundary,f=void 0!==m&&m,g=n.padding,h=void 0===g?0:g,v=R$("number"!=typeof h?h:P$(h,a$)),b=p===u$?"reference":u$,$=e.rects.popper,y=e.elements[f?b:p],_=oy(h$(y)?y:y.contextElement||O$(e.elements.popper),c,u,a),x=S$(e.elements.reference),w=ry({reference:x,element:$,placement:r}),k=ty(Object.assign({},$,w)),I=p===u$?k:x,S={top:_.top-I.top+v.top,bottom:I.bottom-_.bottom+v.bottom,left:_.left-I.left+v.left,right:I.right-_.right+v.right},C=e.modifiersData.offset;if(p===u$&&C){var E=C[r];Object.keys(S).forEach(function(e){var t=[o$,n$].indexOf(e)>=0?1:-1,n=[t$,n$].indexOf(e)>=0?"y":"x";S[e]+=E[n]*t})}return S}function ay(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?p$:c,u=M$(o),d=u?s?d$:d$.filter(function(e){return M$(e)===u}):a$,p=d.filter(function(e){return l.indexOf(e)>=0});0===p.length&&(p=d);var m=p.reduce(function(t,n){return t[n]=iy(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[y$(n)],t},{});return Object.keys(m).sort(function(e,t){return m[e]-m[t]})}var sy={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,f=void 0===m||m,g=n.allowedAutoPlacements,h=t.options.placement,v=y$(h),b=c||(v===h||!f?[G$(h)]:function(e){if(y$(e)===i$)return[];var t=G$(e);return[W$(e),t,W$(t)]}(h)),$=[h].concat(b).reduce(function(e,n){return e.concat(y$(n)===i$?ay(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:f,allowedAutoPlacements:g}):n)},[]),y=t.rects.reference,_=t.rects.popper,x=new Map,w=!0,k=$[0],I=0;I<$.length;I++){var S=$[I],C=y$(S),E=M$(S)===s$,z=[t$,n$].indexOf(C)>=0,T=z?"width":"height",O=iy(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),D=z?E?o$:r$:E?n$:t$;y[T]>_[T]&&(D=G$(D));var U=G$(D),N=[];if(i&&N.push(O[C]<=0),s&&N.push(O[D]<=0,O[U]<=0),N.every(function(e){return e})){k=S,w=!1;break}x.set(S,N)}if(w)for(var A=function(e){var t=$.find(function(t){var n=x.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return k=t,"break"},j=f?3:1;j>0;j--){if("break"===A(j))break}t.placement!==k&&(t.modifiersData[o]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function cy(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ly(e){return[t$,o$,n$,r$].some(function(t){return e[t]>=0})}var uy={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,a=p$.reduce(function(e,n){return e[n]=function(e,t,n){var o=y$(e),r=[r$,t$].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[r$,o$].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}};var dy={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,m=void 0===p||p,f=n.tetherOffset,g=void 0===f?0:f,h=iy(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),v=y$(t.placement),b=M$(t.placement),$=!b,y=A$(v),_="x"===y?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,k=t.rects.popper,I="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,S="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(x){if(i){var z,T="y"===y?t$:r$,O="y"===y?n$:o$,D="y"===y?"height":"width",U=x[y],N=U+h[T],A=U-h[O],j=m?-k[D]/2:0,R=b===s$?w[D]:k[D],P=b===s$?-k[D]:-w[D],Z=t.elements.arrow,M=m&&Z?C$(Z):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=L[T],V=L[O],F=j$(0,w[D],M[D]),H=$?w[D]/2-j-F-q-S.mainAxis:R-F-q-S.mainAxis,J=$?-w[D]/2+j+F+V+S.mainAxis:P+F+V+S.mainAxis,G=t.elements.arrow&&N$(t.elements.arrow),B=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,W=null!=(z=null==C?void 0:C[y])?z:0,K=U+J-W,X=j$(m?x$(N,U+H-W-B):N,U,m?_$(A,K):A);x[y]=X,E[y]=X-U}if(s){var Q,Y="x"===y?t$:r$,ee="x"===y?n$:o$,te=x[_],ne="y"===_?"height":"width",oe=te+h[Y],re=te-h[ee],ie=-1!==[t$,r$].indexOf(v),ae=null!=(Q=null==C?void 0:C[_])?Q:0,se=ie?oe:te-w[ne]-k[ne]-ae+S.altAxis,ce=ie?te+w[ne]+k[ne]-ae-S.altAxis:re,le=m&&ie?function(e,t,n){var o=j$(e,t,n);return o>n?n:o}(se,te,ce):j$(m?se:oe,te,m?ce:re);x[_]=le,E[_]=le-te}t.modifiersData[o]=E}},requiresIfExists:["offset"]};function py(e,t,n){void 0===n&&(n=!1);var o,r=v$(t),i=v$(t)&&function(e){var t=e.getBoundingClientRect(),n=w$(t.width)/e.offsetWidth||1,o=w$(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=O$(t),s=S$(e,i,n),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==f$(t)||Q$(a))&&(c=(o=t)!==g$(o)&&v$(o)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(o):K$(o)),v$(t)?((l=S$(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=X$(a))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function my(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}}),o.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),o}var fy={placement:"bottom",modifiers:[],strategy:"absolute"};function gy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function hy(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?fy:r;return function(e,t,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},fy,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:h$(e)?ey(e):e.contextElement?ey(e.contextElement):[],popper:ey(t)};var a,l,p=function(e){var t=my(e);return m$.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(o,s.options.modifiers),l=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(l).map(function(e){return l[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:u,options:o}),a=function(){};c.push(i||a)}}),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(gy(t,n)){s.rects={reference:py(t,N$(n),"fixed"===s.options.strategy),popper:C$(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],i=r.fn,a=r.options,c=void 0===a?{}:a,d=r.name;"function"==typeof i&&(s=i({state:s,options:c,name:d,instance:u})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),l=!0}};if(!gy(e,t))return u;function d(){c.forEach(function(e){return e()}),c=[]}return u.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),u}}var vy=hy({defaultModifiers:[H$,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ry({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},V$,$$,uy,sy,dy,Z$,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=iy(t,{elementContext:"reference"}),s=iy(t,{altBoundary:!0}),c=cy(a,o),l=cy(s,r,i),u=ly(c),d=ly(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),by="tippy-content",$y="tippy-arrow",yy="tippy-svg-arrow",_y={passive:!0,capture:!0},xy=function(){return document.body};function wy(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function ky(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Iy(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Sy(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout(function(){e(o)},t)};var n}function Cy(e){return[].concat(e)}function Ey(e,t){-1===e.indexOf(t)&&e.push(t)}function zy(e){return[].slice.call(e)}function Ty(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function Oy(){return document.createElement("div")}function Dy(e){return["Element","Fragment"].some(function(t){return ky(e,t)})}function Uy(e){return Dy(e)?[e]:function(e){return ky(e,"NodeList")}(e)?zy(e):Array.isArray(e)?e:zy(document.querySelectorAll(e))}function Ny(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Ay(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function jy(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[o](t,n)})}function Ry(e,t){for(var n=t;n;){var o;if(e.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Py={isTouch:!1},Zy=0;function My(){Py.isTouch||(Py.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ly))}function Ly(){var e=performance.now();e-Zy<20&&(Py.isTouch=!1,document.removeEventListener("mousemove",Ly)),Zy=e}function qy(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Vy=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Fy=Object.assign({appendTo:xy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Hy=Object.keys(Fy);function Jy(e){var t=(e.plugins||[]).reduce(function(t,n){var o,r=n.name,i=n.defaultValue;r&&(t[r]=void 0!==e[r]?e[r]:null!=(o=Fy[r])?o:i);return t},{});return Object.assign({},e,t)}function Gy(e,t){var n=Object.assign({},t,{content:Iy(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Jy(Object.assign({},Fy,{plugins:t}))):Hy).reduce(function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(e){t[n]=o}return t},{})}(e,t.plugins));return n.aria=Object.assign({},Fy.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function By(e,t){e.innerHTML=t}function Wy(e){var t=Oy();return!0===e?t.className=$y:(t.className=yy,Dy(e)?t.appendChild(e):By(t,e)),t}function Ky(e,t){Dy(t.content)?(By(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?By(e,t.content):e.textContent=t.content)}function Xy(e){var t=e.firstElementChild,n=zy(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(by)}),arrow:n.find(function(e){return e.classList.contains($y)||e.classList.contains(yy)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function Qy(e){var t=Oy(),n=Oy();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=Oy();function r(n,o){var r=Xy(t),i=r.box,a=r.content,s=r.arrow;o.theme?i.setAttribute("data-theme",o.theme):i.removeAttribute("data-theme"),"string"==typeof o.animation?i.setAttribute("data-animation",o.animation):i.removeAttribute("data-animation"),o.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?i.setAttribute("role",o.role):i.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||Ky(a,e.props),o.arrow?s?n.arrow!==o.arrow&&(i.removeChild(s),i.appendChild(Wy(o.arrow))):i.appendChild(Wy(o.arrow)):s&&i.removeChild(s)}return o.className=by,o.setAttribute("data-state","hidden"),Ky(o,e.props),t.appendChild(n),n.appendChild(o),r(e.props,e.props),{popper:t,onUpdate:r}}Qy.$$tippy=!0;var Yy=1,e_=[],t_=[];function n_(e,t){var n,o,r,i,a,s,c,l,u=Gy(e,Object.assign({},Fy,Jy(Ty(t)))),d=!1,p=!1,m=!1,f=!1,g=[],h=Sy(G,u.interactiveDebounce),v=Yy++,b=(l=u.plugins).filter(function(e,t){return l.indexOf(e)===t}),$={id:v,reference:e,popper:Oy(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(r)},setProps:function(t){if($.state.isDestroyed)return;U("onBeforeUpdate",[$,t]),H();var n=$.props,o=Gy(e,Object.assign({},n,Ty(t),{ignoreAttributes:!0}));$.props=o,F(),n.interactiveDebounce!==o.interactiveDebounce&&(j(),h=Sy(G,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?Cy(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):o.triggerTarget&&e.removeAttribute("aria-expanded");A(),D(),x&&x(n,o);$.popperInstance&&(X(),Y().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));U("onAfterUpdate",[$,t])},setContent:function(e){$.setProps({content:e})},show:function(){var e=$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=Py.isTouch&&!$.props.touch,r=wy($.props.duration,0,Fy.duration);if(e||t||n||o)return;if(E().hasAttribute("disabled"))return;if(U("onShow",[$],!1),!1===$.props.onShow($))return;$.state.isVisible=!0,C()&&(_.style.visibility="visible");D(),M(),$.state.isMounted||(_.style.transition="none");if(C()){var i=T();Ny([i.box,i.content],0)}s=function(){var e;if($.state.isVisible&&!f){if(f=!0,_.offsetHeight,_.style.transition=$.props.moveTransition,C()&&$.props.animation){var t=T(),n=t.box,o=t.content;Ny([n,o],r),Ay([n,o],"visible")}N(),A(),Ey(t_,$),null==(e=$.popperInstance)||e.forceUpdate(),U("onMount",[$]),$.props.animation&&C()&&function(e,t){q(e,t)}(r,function(){$.state.isShown=!0,U("onShown",[$])})}},function(){var e,t=$.props.appendTo,n=E();e=$.props.interactive&&t===xy||"parent"===t?n.parentNode:Iy(t,[n]);e.contains(_)||e.appendChild(_);$.state.isMounted=!0,X()}()},hide:function(){var e=!$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=wy($.props.duration,1,Fy.duration);if(e||t||n)return;if(U("onHide",[$],!1),!1===$.props.onHide($))return;$.state.isVisible=!1,$.state.isShown=!1,f=!1,d=!1,C()&&(_.style.visibility="hidden");if(j(),L(),D(!0),C()){var r=T(),i=r.box,a=r.content;$.props.animation&&(Ny([i,a],o),Ay([i,a],"hidden"))}N(),A(),$.props.animation?C()&&function(e,t){q(e,function(){!$.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(o,$.unmount):$.unmount()},hideWithInteractivity:function(e){z().addEventListener("mousemove",h),Ey(e_,h),h(e)},enable:function(){$.state.isEnabled=!0},disable:function(){$.hide(),$.state.isEnabled=!1},unmount:function(){$.state.isVisible&&$.hide();if(!$.state.isMounted)return;Q(),Y().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);t_=t_.filter(function(e){return e!==$}),$.state.isMounted=!1,U("onHidden",[$])},destroy:function(){if($.state.isDestroyed)return;$.clearDelayTimeouts(),$.unmount(),H(),delete e._tippy,$.state.isDestroyed=!0,U("onDestroy",[$])}};if(!u.render)return $;var y=u.render($),_=y.popper,x=y.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+$.id,$.popper=_,e._tippy=$,_._tippy=$;var w=b.map(function(e){return e.fn($)}),k=e.hasAttribute("aria-expanded");return F(),A(),D(),U("onCreate",[$]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){$.props.interactive&&$.state.isVisible&&$.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){$.props.interactive&&$.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",h)}),$;function I(){var e=$.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===I()[0]}function C(){var e;return!(null==(e=$.props.render)||!e.$$tippy)}function E(){return c||e}function z(){var e=E().parentNode;return e?function(e){var t,n=Cy(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}(e):document}function T(){return Xy(_)}function O(e){return $.state.isMounted&&!$.state.isVisible||Py.isTouch||i&&"focus"===i.type?0:wy($.props.delay,e?0:1,Fy.delay)}function D(e){void 0===e&&(e=!1),_.style.pointerEvents=$.props.interactive&&!e?"":"none",_.style.zIndex=""+$.props.zIndex}function U(e,t,n){var o;(void 0===n&&(n=!0),w.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(o=$.props)[e].apply(o,t)}function N(){var t=$.props.aria;if(t.content){var n="aria-"+t.content,o=_.id;Cy($.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if($.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var r=t&&t.replace(o,"").trim();r?e.setAttribute(n,r):e.removeAttribute(n)}})}}function A(){!k&&$.props.aria.expanded&&Cy($.props.triggerTarget||e).forEach(function(e){$.props.interactive?e.setAttribute("aria-expanded",$.state.isVisible&&e===E()?"true":"false"):e.removeAttribute("aria-expanded")})}function j(){z().removeEventListener("mousemove",h),e_=e_.filter(function(e){return e!==h})}function R(t){if(!Py.isTouch||!m&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!$.props.interactive||!Ry(_,n)){if(Cy($.props.triggerTarget||e).some(function(e){return Ry(e,n)})){if(Py.isTouch)return;if($.state.isVisible&&$.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[$,t]);!0===$.props.hideOnClick&&($.clearDelayTimeouts(),$.hide(),p=!0,setTimeout(function(){p=!1}),$.state.isMounted||L())}}}function P(){m=!0}function Z(){m=!1}function M(){var e=z();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,_y),e.addEventListener("touchstart",Z,_y),e.addEventListener("touchmove",P,_y)}function L(){var e=z();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,_y),e.removeEventListener("touchstart",Z,_y),e.removeEventListener("touchmove",P,_y)}function q(e,t){var n=T().box;function o(e){e.target===n&&(jy(n,"remove",o),t())}if(0===e)return t();jy(n,"remove",a),jy(n,"add",o),a=o}function V(t,n,o){void 0===o&&(o=!1),Cy($.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,o),g.push({node:e,eventType:t,handler:n,options:o})})}function F(){var e;S()&&(V("touchstart",J,{passive:!0}),V("touchend",B,{passive:!0})),(e=$.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(V(e,J),e){case"mouseenter":V("mouseleave",B);break;case"focus":V(Vy?"focusout":"blur",W);break;case"focusin":V("focusout",W)}})}function H(){g.forEach(function(e){var t=e.node,n=e.eventType,o=e.handler,r=e.options;t.removeEventListener(n,o,r)}),g=[]}function J(e){var t,n=!1;if($.state.isEnabled&&!K(e)&&!p){var o="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,A(),!$.state.isVisible&&ky(e,"MouseEvent")&&e_.forEach(function(t){return t(e)}),"click"===e.type&&($.props.trigger.indexOf("mouseenter")<0||d)&&!1!==$.props.hideOnClick&&$.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!o&&te(e)}}function G(e){var t=e.target,n=E().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var o=Y().concat(_).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null}).filter(Boolean);(function(e,t){var n=t.clientX,o=t.clientY;return e.every(function(e){var t=e.popperRect,r=e.popperState,i=e.props.interactiveBorder,a=r.placement.split("-")[0],s=r.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-o+c>i,m=o-t.bottom-l>i,f=t.left-n+u>i,g=n-t.right-d>i;return p||m||f||g})})(o,e)&&(j(),te(e))}}function B(e){K(e)||$.props.trigger.indexOf("click")>=0&&d||($.props.interactive?$.hideWithInteractivity(e):te(e))}function W(e){$.props.trigger.indexOf("focusin")<0&&e.target!==E()||$.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function K(e){return!!Py.isTouch&&S()!==e.type.indexOf("touch")>=0}function X(){Q();var t=$.props,n=t.popperOptions,o=t.placement,r=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=C()?Xy(_).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||E()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=T().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];C()&&c&&d.push({name:"arrow",options:{element:c,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),$.popperInstance=vy(l,_,Object.assign({},n,{placement:o,onFirstUpdate:s,modifiers:d}))}function Q(){$.popperInstance&&($.popperInstance.destroy(),$.popperInstance=null)}function Y(){return zy(_.querySelectorAll("[data-tippy-root]"))}function ee(e){$.clearDelayTimeouts(),e&&U("onTrigger",[$,e]),M();var t=O(!0),o=I(),r=o[0],i=o[1];Py.isTouch&&"hold"===r&&i&&(t=i),t?n=setTimeout(function(){$.show()},t):$.show()}function te(e){if($.clearDelayTimeouts(),U("onUntrigger",[$,e]),$.state.isVisible){if(!($.props.trigger.indexOf("mouseenter")>=0&&$.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=O(!1);t?o=setTimeout(function(){$.state.isVisible&&$.hide()},t):r=requestAnimationFrame(function(){$.hide()})}}else L()}}function o_(e,t){void 0===t&&(t={});var n=Fy.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",My,_y),window.addEventListener("blur",qy);var o=Object.assign({},t,{plugins:n}),r=Uy(e).reduce(function(e,t){var n=t&&n_(t,o);return n&&e.push(n),e},[]);return Dy(e)?r[0]:r}o_.defaultProps=Fy,o_.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Fy[t]=e[t]})},o_.currentInput=Py,Object.assign({},$$,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),o_.setDefaultProps({render:Qy});const r_=e=>({}),i_=e=>({trigger:e[2]}),a_=e=>({}),s_=e=>({trigger:e[2]});function c_(e){let t,n,o;const r=e[6].default,i=eg(r,e,e[5],s_),a=e[6].content,s=eg(a,e,e[5],i_),c=s||function(e){let t;return{c(){t=mg(e[0])},m(e,n){lg(e,t,n)},p(e,n){1&n&&yg(t,e[0])},d(e){e&&ug(t)}}}(e);return{c(){i&&i.c(),t=fg(),n=dg("div"),c&&c.c(),xg(n,"display","none")},m(r,a){i&&i.m(r,a),lg(r,t,a),lg(r,n,a),c&&c.m(n,null),e[7](n),o=!0},p(e,[t]){i&&i.p&&(!o||32&t)&&og(i,r,e,e[5],o?ng(r,e[5],t,a_):rg(e[5]),s_),s?s.p&&(!o||32&t)&&og(s,a,e,e[5],o?ng(a,e[5],t,r_):rg(e[5]),i_):c&&c.p&&(!o||1&t)&&c.p(e,o?t:-1)},i(e){o||(Jg(i,e),Jg(c,e),o=!0)},o(e){Gg(i,e),Gg(c,e),o=!1},d(o){i&&i.d(o),o&&ug(t),o&&ug(n),c&&c.d(o),e[7](null)}}}function l_(e,t,n){const o=["text","disabled"];let r,i,a,s=ig(t,o),{$$slots:c={},$$scope:l}=t,{text:u=""}=t,{disabled:d=!1}=t;return zg(()=>{r&&(n(4,a=o_(r,{...s,content:i})),i.style.removeProperty("display"))}),e.$$set=e=>{t=Gf(Gf({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(9,s=ig(t,o)),"text"in e&&n(0,u=e.text),"disabled"in e&&n(3,d=e.disabled),"$$scope"in e&&n(5,l=e.$$scope)},e.$$.update=()=>{24&e.$$.dirty&&a&&(d?a.disable():a.enable())},[u,i,e=>{r=e},d,a,l,c,function(e){Og[e?"unshift":"push"](()=>{i=e,n(1,i)})}]}class u_ extends eh{constructor(e){super(),Yg(this,e,l_,c_,Qf,{text:0,disabled:3})}}function d_(e){cg(e,"svelte-wb18kg","svg.svelte-wb18kg{opacity:var(--tooltip-opacity, 1);color:var(--text-color)}")}function p_(e){let t,n,o,r;return{c(){t=pg("svg"),n=pg("path"),vg(n,"fill","currentColor"),vg(n,"d","M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"),vg(t,"class","tooltip svelte-wb18kg"),xg(t,"width","1rem"),xg(t,"height","1rem"),vg(t,"viewBox","0 0 24 24")},m(i,a){lg(i,t,a),sg(t,n),o||(r=ag(e[9].call(null,t)),o=!0)},p:Jf,d(e){e&&ug(t),o=!1,r()}}}function m_(e){let t,n,o,r;return{c(){t=dg("br"),n=fg(),o=dg("a"),r=mg("Read more."),vg(o,"href",e[0]),vg(o,"target",e[3]?void 0:"_blank"),vg(o,"rel",e[3]?void 0:"noopener noreferrer")},m(e,i){lg(e,t,i),lg(e,n,i),lg(e,o,i),sg(o,r)},p(e,t){1&t&&vg(o,"href",e[0])},d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function f_(e){let t,n,o;const r=e[6].default,i=eg(r,e,e[7],null);let a=e[2]&&m_(e);return{c(){t=dg("div"),i&&i.c(),n=fg(),a&&a.c(),vg(t,"slot","content")},m(e,r){lg(e,t,r),i&&i.m(t,null),sg(t,n),a&&a.m(t,null),o=!0},p(e,n){i&&i.p&&(!o||128&n)&&og(i,r,e,e[7],o?ng(r,e[7],n,null):rg(e[7]),null),e[2]?a?a.p(e,n):(a=m_(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},i(e){o||(Jg(i,e),o=!0)},o(e){Gg(i,e),o=!1},d(e){e&&ug(t),i&&i.d(e),a&&a.d()}}}function g_(e){let t,n;return t=new u_({props:{interactive:!0,placement:e[1],theme:"light border",maxWidth:"22em",$$slots:{content:[f_,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0],default:[p_,({trigger:e})=>({9:e}),({trigger:e})=>e?512:0]},$$scope:{ctx:e}}}),{c(){Wg(t.$$.fragment)},m(e,o){Kg(t,e,o),n=!0},p(e,[n]){const o={};2&n&&(o.placement=e[1]),133&n&&(o.$$scope={dirty:n,ctx:e}),t.$set(o)},i(e){n||(Jg(t.$$.fragment,e),n=!0)},o(e){Gg(t.$$.fragment,e),n=!1},d(e){Xg(t,e)}}}function h_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{link:s}=t,{placement:c="right"}=t;const l=(u=lh,Eg().$$.context.get(u));var u;const d=null!=l,p=l??function(e,t){return{subscribe:nh(e,t).subscribe}}({canOpen:!1});return Yf(e,p,e=>n(5,r=e)),e.$$set=e=>{"link"in e&&n(0,s=e.link),"placement"in e&&n(1,c=e.placement),"$$scope"in e&&n(7,a=e.$$scope)},e.$$.update=()=>{33&e.$$.dirty&&n(2,o=null!=s&&(!d||r.canOpen))},[s,c,o,d,p,r,i,a]}class v_ extends eh{constructor(e){super(),Yg(this,e,h_,g_,Qf,{link:0,placement:1},d_)}}function b_(e){let t,n,o;return{c(){t=dg("input"),vg(t,"type","checkbox"),t.disabled=e[1]},m(r,i){lg(r,t,i),t.checked=e[0],n||(o=hg(t,"change",e[6]),n=!0)},p(e,[n]){2&n&&(t.disabled=e[1]),1&n&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&ug(t),n=!1,o()}}}function $_(e,t,n){let{value:o=!1}=t,{checked:r=!1!==o}=t,{defaultValue:i}=t,{disabled:a}=t,s=r,c=o||i;return e.$$set=e=>{"value"in e&&n(2,o=e.value),"checked"in e&&n(0,r=e.checked),"defaultValue"in e&&n(3,i=e.defaultValue),"disabled"in e&&n(1,a=e.disabled)},e.$$.update=()=>{53&e.$$.dirty&&(s?r?!1===o&&n(0,r=!1):n(2,o=!1):r?n(2,o=c):!1!==o&&n(0,r=!0),n(4,s=r),n(5,c=o||c))},[r,a,o,i,s,c,function(){r=this.checked,n(0,r),n(4,s),n(5,c),n(2,o)}]}class y_ extends eh{constructor(e){super(),Yg(this,e,$_,b_,Qf,{value:2,checked:0,defaultValue:3,disabled:1})}}function __(e){let t,n;return{c(){t=pg("svg"),n=pg("path"),vg(n,"d","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"),vg(t,"class","keepcolor"),vg(t,"width","9"),vg(t,"height","9"),vg(t,"xmlns","http://www.w3.org/2000/svg"),vg(t,"viewBox","0 0 320 512")},m(e,o){lg(e,t,o),sg(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ug(t)}}}class x_ extends eh{constructor(e){super(),Yg(this,e,null,__,Qf,{})}}function w_(e){let t,n;return{c(){t=pg("svg"),n=pg("path"),vg(n,"d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"),vg(t,"class","keepcolor"),vg(t,"width","9"),vg(t,"height","9"),vg(t,"xmlns","http://www.w3.org/2000/svg"),vg(t,"viewBox","0 0 512 512")},m(e,o){lg(e,t,o),sg(t,n)},p:Jf,i:Jf,o:Jf,d(e){e&&ug(t)}}}class k_ extends eh{constructor(e){super(),Yg(this,e,null,w_,Qf,{})}}function I_(e){let t,n,o,r;const i=[C_,S_],a=[];function s(e,t){return"checkbox"===e[3]?0:"toggleradio"===e[3]?1:-1}return~(n=s(e))&&(o=a[n]=i[n](e)),{c(){t=dg("span"),o&&o.c(),vg(t,"class","mr-2")},m(e,o){lg(e,t,o),~n&&a[n].m(t,null),r=!0},p(e,r){let c=n;n=s(e),n===c?~n&&a[n].p(e,r):(o&&(Fg(),Gg(a[c],1,1,()=>{a[c]=null}),Hg()),~n?(o=a[n],o?o.p(e,r):(o=a[n]=i[n](e),o.c()),Jg(o,1),o.m(t,null)):o=null)},i(e){r||(Jg(o),r=!0)},o(e){Gg(o),r=!1},d(e){e&&ug(t),~n&&a[n].d()}}}function S_(e){let t,n,o;function r(t){e[19](t)}let i={defaultValue:e[4],disabled:e[7]||e[9]};return void 0!==e[1]&&(i.value=e[1]),t=new y_({props:i}),Og.push(()=>Bg(t,"value",r)),{c(){Wg(t.$$.fragment)},m(e,n){Kg(t,e,n),o=!0},p(e,o){const r={};16&o&&(r.defaultValue=e[4]),640&o&&(r.disabled=e[7]||e[9]),!n&&2&o&&(n=!0,r.value=e[1],Rg(()=>n=!1)),t.$set(r)},i(e){o||(Jg(t.$$.fragment,e),o=!0)},o(e){Gg(t.$$.fragment,e),o=!1},d(e){Xg(t,e)}}}function C_(e){let t,n,o,r;return{c(){t=dg("input"),vg(t,"type","checkbox"),t.disabled=n=e[7]||e[9]},m(n,i){lg(n,t,i),t.checked=e[0],o||(r=hg(t,"change",e[18]),o=!0)},p(e,o){640&o&&n!==(n=e[7]||e[9])&&(t.disabled=n),1&o&&(t.checked=e[0])},i:Jf,o:Jf,d(e){e&&ug(t),o=!1,r()}}}function E_(e){let t,n;return t=new x_({}),{c(){Wg(t.$$.fragment)},m(e,o){Kg(t,e,o),n=!0},i(e){n||(Jg(t.$$.fragment,e),n=!0)},o(e){Gg(t.$$.fragment,e),n=!1},d(e){Xg(t,e)}}}function z_(e){let t,n;return t=new k_({}),{c(){Wg(t.$$.fragment)},m(e,o){Kg(t,e,o),n=!0},i(e){n||(Jg(t.$$.fragment,e),n=!0)},o(e){Gg(t.$$.fragment,e),n=!1},d(e){Xg(t,e)}}}function T_(e){let t,n;return{c(){t=new kg(!1),n=gg(),t.a=n},m(o,r){t.m(e[5],o,r),lg(o,n,r)},p(e,n){32&n&&t.p(e[5])},d(e){e&&ug(n),e&&t.d()}}}function O_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S="section"!==e[3]&&I_(e);const C=[z_,E_],E=[];function z(e,t){return e[10]?0:1}d=z(e),p=E[d]=C[d](e),g=new v_({props:{link:e[6],$$slots:{default:[T_]},$$scope:{ctx:e}}});const T=e[17].default,O=eg(T,e,e[20],null);return{c(){t=dg("section"),n=dg("h1"),o=dg("label"),r=dg("div"),S&&S.c(),i=fg(),a=dg("span"),s=mg(e[2]),c=fg(),l=dg("div"),u=dg("button"),p.c(),f=fg(),Wg(g.$$.fragment),h=fg(),v=dg("div"),b=dg("span"),y=fg(),_=dg("div"),O&&O.c(),vg(r,"class","flex items-center"),vg(u,"class","px-1 bg-transparent border-0 mr-2"),vg(u,"aria-label",m=e[10]?"Collapse section":"Expand section"),vg(l,"class","flex items-center"),vg(o,"class","items-center tooltip-container pr-2 flex justify-between"),vg(b,"class","italic"),vg(v,"class","text-sm text-gray-500"),v.hidden=$=!e[7]||void 0===e[8],_.hidden=x=!e[10],vg(t,"class","controls-section")},m(p,m){var $;lg(p,t,m),sg(t,n),sg(n,o),sg(o,r),S&&S.m(r,null),sg(r,i),sg(r,a),sg(a,s),sg(o,c),sg(o,l),sg(l,u),E[d].m(u,null),sg(l,f),Kg(g,l,null),sg(t,h),sg(t,v),sg(v,b),b.innerHTML=e[8],sg(t,y),sg(t,_),O&&O.m(_,null),w=!0,k||(I=hg(u,"click",($=e[11],function(e){return e.preventDefault(),$.call(this,e)})),k=!0)},p(e,[t]){"section"!==e[3]?S?(S.p(e,t),8&t&&Jg(S,1)):(S=I_(e),S.c(),Jg(S,1),S.m(r,i)):S&&(Fg(),Gg(S,1,1,()=>{S=null}),Hg()),(!w||4&t)&&yg(s,e[2]);let n=d;d=z(e),d!==n&&(Fg(),Gg(E[n],1,1,()=>{E[n]=null}),Hg(),p=E[d],p||(p=E[d]=C[d](e),p.c()),Jg(p,1),p.m(u,null)),(!w||1024&t&&m!==(m=e[10]?"Collapse section":"Expand section"))&&vg(u,"aria-label",m);const o={};64&t&&(o.link=e[6]),1048608&t&&(o.$$scope={dirty:t,ctx:e}),g.$set(o),(!w||256&t)&&(b.innerHTML=e[8]),(!w||384&t&&$!==($=!e[7]||void 0===e[8]))&&(v.hidden=$),O&&O.p&&(!w||1048576&t)&&og(O,T,e,e[20],w?ng(T,e[20],t,null):rg(e[20]),null),(!w||1024&t&&x!==(x=!e[10]))&&(_.hidden=x)},i(e){w||(Jg(S),Jg(p),Jg(g.$$.fragment,e),Jg(O,e),w=!0)},o(e){Gg(S),Gg(p),Gg(g.$$.fragment,e),Gg(O,e),w=!1},d(e){e&&ug(t),S&&S.d(),E[d].d(),Xg(g),O&&O.d(e),k=!1,I()}}}function D_(e,t,n){let o,r,{$$slots:i={},$$scope:a}=t,{label:s}=t,{type:c}=t,{checkboxChecked:l}=t,{toggleRadioValue:u}=t,{toggleRadioDefaultValue:d}=t,{helpContent:p}=t,{helpLink:m}=t,{disabled:f}=t,{disabledReason:g}=t,{required:h}=t,{error:v}=t,b=!1,$=h,y=r;return e.$$set=e=>{"label"in e&&n(2,s=e.label),"type"in e&&n(3,c=e.type),"checkboxChecked"in e&&n(0,l=e.checkboxChecked),"toggleRadioValue"in e&&n(1,u=e.toggleRadioValue),"toggleRadioDefaultValue"in e&&n(4,d=e.toggleRadioDefaultValue),"helpContent"in e&&n(5,p=e.helpContent),"helpLink"in e&&n(6,m=e.helpLink),"disabled"in e&&n(7,f=e.disabled),"disabledReason"in e&&n(8,g=e.disabledReason),"required"in e&&n(9,h=e.required),"error"in e&&n(12,v=e.error),"$$scope"in e&&n(20,a=e.$$scope)},e.$$.update=()=>{4096&e.$$.dirty&&n(16,o=void 0!==v),3&e.$$.dirty&&n(15,r=!(!l&&!u)),123392&e.$$.dirty&&((o||!y&&r||!$&&h)&&n(10,b=!0),n(13,$=h),n(14,y=r))},[l,u,s,c,d,p,m,f,g,h,b,function(){n(10,b=!b||o)},v,$,y,r,o,i,function(){l=this.checked,n(0,l)},function(e){u=e,n(1,u)},a]}class U_ extends eh{constructor(e){super(),Yg(this,e,D_,O_,Qf,{label:2,type:3,checkboxChecked:0,toggleRadioValue:1,toggleRadioDefaultValue:4,helpContent:5,helpLink:6,disabled:7,disabledReason:8,required:9,error:12})}}function N_(e){let t;const n=e[9].default,o=eg(n,e,e[11],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||2048&r)&&og(o,n,e,e[11],t?ng(n,e[11],r,null):rg(e[11]),null)},i(e){t||(Jg(o,e),t=!0)},o(e){Gg(o,e),t=!1},d(e){o&&o.d(e)}}}function A_(e){let t,n,o;function r(t){e[10](t)}let i={type:"toggleradio",label:e[1],toggleRadioDefaultValue:e[2],helpContent:e[3],helpLink:e[4],disabled:e[5],disabledReason:e[6],required:e[7],error:e[8],$$slots:{default:[N_]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.toggleRadioValue=e[0]),t=new U_({props:i}),Og.push(()=>Bg(t,"toggleRadioValue",r)),{c(){Wg(t.$$.fragment)},m(e,n){Kg(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.toggleRadioDefaultValue=e[2]),8&o&&(r.helpContent=e[3]),16&o&&(r.helpLink=e[4]),32&o&&(r.disabled=e[5]),64&o&&(r.disabledReason=e[6]),128&o&&(r.required=e[7]),256&o&&(r.error=e[8]),2048&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.toggleRadioValue=e[0],Rg(()=>n=!1)),t.$set(r)},i(e){o||(Jg(t.$$.fragment,e),o=!0)},o(e){Gg(t.$$.fragment,e),o=!1},d(e){Xg(t,e)}}}function j_(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{value:a}=t,{defaultValue:s}=t,{helpContent:c}=t,{helpLink:l}=t,{disabled:u=!1}=t,{disabledReason:d}=t,{required:p=!1}=t,{error:m}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"value"in e&&n(0,a=e.value),"defaultValue"in e&&n(2,s=e.defaultValue),"helpContent"in e&&n(3,c=e.helpContent),"helpLink"in e&&n(4,l=e.helpLink),"disabled"in e&&n(5,u=e.disabled),"disabledReason"in e&&n(6,d=e.disabledReason),"required"in e&&n(7,p=e.required),"error"in e&&n(8,m=e.error),"$$scope"in e&&n(11,r=e.$$scope)},[a,i,s,c,l,u,d,p,m,o,function(e){a=e,n(0,a)},r]}class R_ extends eh{constructor(e){super(),Yg(this,e,j_,A_,Qf,{label:1,value:0,defaultValue:2,helpContent:3,helpLink:4,disabled:5,disabledReason:6,required:7,error:8})}}const P_="has-error";function Z_(e,t){const n=o_(e,{placement:"right",theme:"light-red border",trigger:"manual",hideOnClick:!1,interactive:!0});function o(t){t?(n.setContent(t),n.show(),e.classList.add(P_)):(n.hide(),e.classList.remove(P_))}return o(t),{update:o,destroy:n.destroy}}function M_(e){let t;return{c(){t=mg("Simple mechanism with a single account authorized for all privileged actions.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function L_(e){let t;return{c(){t=mg("Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function q_(e){let t;return{c(){t=mg("Provides additional enforced security measures on top of standard Roles mechanism for managing the most\n privileged role: default admin.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function V_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S;return r=new v_({props:{$$slots:{default:[F_]},$$scope:{ctx:e}}}),p=new v_({props:{$$slots:{default:[H_]},$$scope:{ctx:e}}}),y=new v_({props:{$$slots:{default:[J_]},$$scope:{ctx:e}}}),{c(){t=dg("label"),n=dg("span"),o=mg("Initial delay\n "),Wg(r.$$.fragment),i=fg(),a=dg("input"),c=fg(),l=dg("label"),u=dg("span"),d=mg("Default admin delay increase\n "),Wg(p.$$.fragment),m=fg(),f=dg("input"),h=fg(),v=dg("label"),b=dg("span"),$=mg("Max default admin transfer delay\n "),Wg(y.$$.fragment),_=fg(),x=dg("input"),vg(n,"class","flex justify-between pr-2"),vg(a,"placeholder",""),vg(t,"class","labeled-input"),vg(u,"class","flex justify-between pr-2"),vg(f,"placeholder",""),vg(l,"class","labeled-input"),vg(b,"class","flex justify-between pr-2"),vg(x,"placeholder",""),vg(v,"class","labeled-input")},m(C,E){lg(C,t,E),sg(t,n),sg(n,o),Kg(r,n,null),sg(t,i),sg(t,a),_g(a,e[1]),lg(C,c,E),lg(C,l,E),sg(l,u),sg(u,d),Kg(p,u,null),sg(l,m),sg(l,f),_g(f,e[2]),lg(C,h,E),lg(C,v,E),sg(v,b),sg(b,$),Kg(y,b,null),sg(v,_),sg(v,x),_g(x,e[3]),k=!0,I||(S=[hg(a,"input",e[13]),ag(s=Z_.call(null,a,e[5]?.darInitialDelay)),hg(f,"input",e[14]),ag(g=Z_.call(null,f,e[5]?.darDefaultDelayIncrease)),hg(x,"input",e[15]),ag(w=Z_.call(null,x,e[5]?.darMaxTransferDelay))],I=!0)},p(e,t){const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),2&t&&a.value!==e[1]&&_g(a,e[1]),s&&Xf(s.update)&&32&t&&s.update.call(null,e[5]?.darInitialDelay);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),4&t&&f.value!==e[2]&&_g(f,e[2]),g&&Xf(g.update)&&32&t&&g.update.call(null,e[5]?.darDefaultDelayIncrease);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),y.$set(i),8&t&&x.value!==e[3]&&_g(x,e[3]),w&&Xf(w.update)&&32&t&&w.update.call(null,e[5]?.darMaxTransferDelay)},i(e){k||(Jg(r.$$.fragment,e),Jg(p.$$.fragment,e),Jg(y.$$.fragment,e),k=!0)},o(e){Gg(r.$$.fragment,e),Gg(p.$$.fragment,e),Gg(y.$$.fragment,e),k=!1},d(e){e&&ug(t),Xg(r),e&&ug(c),e&&ug(l),Xg(p),e&&ug(h),e&&ug(v),Xg(y),I=!1,Kf(S)}}}function F_(e){let t;return{c(){t=mg("The initial delay before the default admin can be assigned.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function H_(e){let t;return{c(){t=mg("The duration by which the delay for the default admin increases after each assignment.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function J_(e){let t;return{c(){t=mg("The maximum delay in seconds for a default admin transfer.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function G_(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_;i=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/access#ownership-and-ownable",$$slots:{default:[M_]},$$scope:{ctx:e}}}),u=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/access#role-based-accesscontrol",$$slots:{default:[L_]},$$scope:{ctx:e}}}),g=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/access#AccessControlDefaultAdminRulesComponent",$$slots:{default:[q_]},$$scope:{ctx:e}}});let x="roles-dar"===e[0]&&V_(e);return $=bg(e[10][0]),{c(){t=dg("div"),n=dg("label"),o=dg("input"),r=mg("\n Ownable\n "),Wg(i.$$.fragment),a=fg(),s=dg("label"),c=dg("input"),l=mg("\n Roles\n "),Wg(u.$$.fragment),d=fg(),p=dg("label"),m=dg("input"),f=mg("\n Roles (Default Admin Rules)\n "),Wg(g.$$.fragment),h=fg(),x&&x.c(),v=gg(),vg(o,"type","radio"),o.__value="ownable",o.value=o.__value,wg(n,"checked","ownable"===e[0]),vg(c,"type","radio"),c.__value="roles",c.value=c.__value,wg(s,"checked","roles"===e[0]),vg(m,"type","radio"),m.__value="roles-dar",m.value=m.__value,wg(p,"checked","roles-dar"===e[0]),vg(t,"class","checkbox-group"),$.p(o,c,m)},m($,w){lg($,t,w),sg(t,n),sg(n,o),o.checked=o.__value===e[0],sg(n,r),Kg(i,n,null),sg(t,a),sg(t,s),sg(s,c),c.checked=c.__value===e[0],sg(s,l),Kg(u,s,null),sg(t,d),sg(t,p),sg(p,m),m.checked=m.__value===e[0],sg(p,f),Kg(g,p,null),lg($,h,w),x&&x.m($,w),lg($,v,w),b=!0,y||(_=[hg(o,"change",e[9]),hg(c,"change",e[11]),hg(m,"change",e[12])],y=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0]);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!b||1&t)&&wg(n,"checked","ownable"===e[0]),1&t&&(c.checked=c.__value===e[0]);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),u.$set(a),(!b||1&t)&&wg(s,"checked","roles"===e[0]),1&t&&(m.checked=m.__value===e[0]);const l={};131072&t&&(l.$$scope={dirty:t,ctx:e}),g.$set(l),(!b||1&t)&&wg(p,"checked","roles-dar"===e[0]),"roles-dar"===e[0]?x?(x.p(e,t),1&t&&Jg(x,1)):(x=V_(e),x.c(),Jg(x,1),x.m(v.parentNode,v)):x&&(Fg(),Gg(x,1,1,()=>{x=null}),Hg())},i(e){b||(Jg(i.$$.fragment,e),Jg(u.$$.fragment,e),Jg(g.$$.fragment,e),Jg(x),b=!0)},o(e){Gg(i.$$.fragment,e),Gg(u.$$.fragment,e),Gg(g.$$.fragment,e),Gg(x),b=!1},d(e){e&&ug(t),Xg(i),Xg(u),Xg(g),e&&ug(h),x&&x.d(e),e&&ug(v),$.r(),y=!1,Kf(_)}}}function B_(e){let t,n,o;function r(t){e[16](t)}let i={label:"Access Control",defaultValue:"ownable",helpContent:"Restrict who can access the functions of a contract or when they can do it.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/3.x/access",required:e[4],$$slots:{default:[G_]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.value=e[0]),t=new R_({props:i}),Og.push(()=>Bg(t,"value",r)),{c(){Wg(t.$$.fragment)},m(e,n){Kg(t,e,n),o=!0},p(e,[o]){const r={};16&o&&(r.required=e[4]),131119&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.value=e[0],Rg(()=>n=!1)),t.$set(r)},i(e){o||(Jg(t.$$.fragment,e),o=!0)},o(e){Gg(t.$$.fragment,e),o=!1},d(e){Xg(t,e)}}}function W_(e,t,n){let{accessType:o}=t,{darInitialDelay:r}=t,{darDefaultDelayIncrease:i}=t,{darMaxTransferDelay:a}=t,{required:s}=t,{errors:c}=t,l="ownable",u=s,d=o;return e.$$set=e=>{"accessType"in e&&n(0,o=e.accessType),"darInitialDelay"in e&&n(1,r=e.darInitialDelay),"darDefaultDelayIncrease"in e&&n(2,i=e.darDefaultDelayIncrease),"darMaxTransferDelay"in e&&n(3,a=e.darMaxTransferDelay),"required"in e&&n(4,s=e.required),"errors"in e&&n(5,c=e.errors)},e.$$.update=()=>{465&e.$$.dirty&&(u&&!s?n(0,o=d):(n(8,d=o),!1===o&&s&&n(0,o=l)),n(7,u=s),!1!==o&&n(6,l=o))},[o,r,i,a,s,c,l,u,d,function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},[[]],function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){o=this.__value,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)},function(){r=this.value,n(1,r)},function(){i=this.value,n(2,i)},function(){a=this.value,n(3,a)},function(e){o=e,n(0,o),n(7,u),n(4,s),n(8,d),n(6,l)}]}class K_ extends eh{constructor(e){super(),Yg(this,e,W_,B_,Qf,{accessType:0,darInitialDelay:1,darDefaultDelayIncrease:2,darMaxTransferDelay:3,required:4,errors:5})}}function X_(e){let t;return{c(){t=mg("Smart contracts are immutable by default unless they include code that allows them to be upgraded.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Q_(e){let t,n,o,r,i,a,s;return r=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/upgrades",$$slots:{default:[X_]},$$scope:{ctx:e}}}),{c(){t=dg("label"),n=dg("input"),o=mg("\n Upgradeable\n "),Wg(r.$$.fragment),vg(n,"type","checkbox"),wg(t,"checked",e[0])},m(c,l){lg(c,t,l),sg(t,n),n.checked=e[0],sg(t,o),Kg(r,t,null),i=!0,a||(s=hg(n,"change",e[1]),a=!0)},p(e,[o]){1&o&&(n.checked=e[0]);const a={};4&o&&(a.$$scope={dirty:o,ctx:e}),r.$set(a),(!i||1&o)&&wg(t,"checked",e[0])},i(e){i||(Jg(r.$$.fragment,e),i=!0)},o(e){Gg(r.$$.fragment,e),i=!1},d(e){e&&ug(t),Xg(r),a=!1,s()}}}function Y_(e,t,n){let{upgradeable:o}=t;return e.$$set=e=>{"upgradeable"in e&&n(0,o=e.upgradeable)},[o,function(){o=this.checked,n(0,o)}]}class ex extends eh{constructor(e){super(),Yg(this,e,Y_,Q_,Qf,{upgradeable:0})}}function tx(e){let t;return{c(){t=mg("Where people can contact you to report security issues. Will only be visible if contract metadata is verified.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function nx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$;return s=new v_({props:{$$slots:{default:[tx]},$$scope:{ctx:e}}}),{c(){t=dg("section"),n=dg("h1"),n.innerHTML='<label class="flex items-center tooltip-container pr-2"><span>Info</span></label>',o=fg(),r=dg("label"),i=dg("span"),a=mg("Security Contact\n "),Wg(s.$$.fragment),c=fg(),l=dg("input"),d=fg(),p=dg("label"),m=dg("span"),m.textContent="License",f=fg(),g=dg("input"),vg(i,"class","flex justify-between pr-2"),vg(l,"placeholder","security@example.com"),vg(r,"class","labeled-input"),vg(g,"placeholder",lv.license),vg(p,"class","labeled-input"),vg(t,"class","controls-section")},m(y,_){lg(y,t,_),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(i,a),Kg(s,i,null),sg(r,c),sg(r,l),_g(l,e[0].securityContact),sg(t,d),sg(t,p),sg(p,m),sg(p,f),sg(p,g),_g(g,e[0].license),v=!0,b||($=[hg(l,"input",e[2]),ag(u=Z_.call(null,l,e[1]?.securityContact)),hg(g,"input",e[3]),ag(h=Z_.call(null,g,e[1]?.license))],b=!0)},p(e,[t]){const n={};16&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n),1&t&&l.value!==e[0].securityContact&&_g(l,e[0].securityContact),u&&Xf(u.update)&&2&t&&u.update.call(null,e[1]?.securityContact),1&t&&g.value!==e[0].license&&_g(g,e[0].license),h&&Xf(h.update)&&2&t&&h.update.call(null,e[1]?.license)},i(e){v||(Jg(s.$$.fragment,e),v=!0)},o(e){Gg(s.$$.fragment,e),v=!1},d(e){e&&ug(t),Xg(s),b=!1,Kf($)}}}function ox(e,t,n){let{info:o}=t,{errors:r}=t;return e.$$set=e=>{"info"in e&&n(0,o=e.info),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.securityContact=this.value,n(0,o)},function(){o.license=this.value,n(0,o)}]}class rx extends eh{constructor(e){super(),Yg(this,e,ox,nx,Qf,{info:0,errors:1})}}function ix(e){let t,n,o;return{c(){t=mg("In order to compile Cairo contracts with macros enabled, you need to have the Rust toolchain installed and "),n=dg("code"),n.textContent="openzeppelin_macros",o=mg(" package added as a dependency.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function ax(e){let t,n,o;return{c(){t=mg("Use the "),n=dg("code"),n.textContent="with_components",o=mg(" macro for simplified contract structure.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function sx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g;return a=new v_({props:{$$slots:{default:[ix]},$$scope:{ctx:e}}}),p=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/macros/with_components",$$slots:{default:[ax]},$$scope:{ctx:e}}}),{c(){t=dg("section"),n=dg("h1"),o=dg("div"),r=dg("span"),r.textContent="Macros",i=fg(),Wg(a.$$.fragment),s=fg(),c=dg("div"),l=dg("label"),u=dg("input"),d=mg("\n with_components\n "),Wg(p.$$.fragment),vg(o,"class","items-center tooltip-container pr-2 flex justify-between"),vg(u,"type","checkbox"),wg(l,"checked",e[0].withComponents),vg(c,"class","checkbox-group"),vg(t,"class","controls-section")},m(h,v){lg(h,t,v),sg(t,n),sg(n,o),sg(o,r),sg(o,i),Kg(a,o,null),sg(t,s),sg(t,c),sg(c,l),sg(l,u),u.checked=e[0].withComponents,sg(l,d),Kg(p,l,null),m=!0,f||(g=hg(u,"change",e[1]),f=!0)},p(e,[t]){const n={};4&t&&(n.$$scope={dirty:t,ctx:e}),a.$set(n),1&t&&(u.checked=e[0].withComponents);const o={};4&t&&(o.$$scope={dirty:t,ctx:e}),p.$set(o),(!m||1&t)&&wg(l,"checked",e[0].withComponents)},i(e){m||(Jg(a.$$.fragment,e),Jg(p.$$.fragment,e),m=!0)},o(e){Gg(a.$$.fragment,e),Gg(p.$$.fragment,e),m=!1},d(e){e&&ug(t),Xg(a),Xg(p),f=!1,g()}}}function cx(e,t,n){let{macros:o}=t;return e.$$set=e=>{"macros"in e&&n(0,o=e.macros)},[o,function(){o.withComponents=this.checked,n(0,o)}]}class lx extends eh{constructor(e){super(),Yg(this,e,cx,sx,Qf,{macros:0})}}function ux(e){let t;const n=e[8].default,o=eg(n,e,e[10],null);return{c(){o&&o.c()},m(e,n){o&&o.m(e,n),t=!0},p(e,r){o&&o.p&&(!t||1024&r)&&og(o,n,e,e[10],t?ng(n,e[10],r,null):rg(e[10]),null)},i(e){t||(Jg(o,e),t=!0)},o(e){Gg(o,e),t=!1},d(e){o&&o.d(e)}}}function dx(e){let t,n,o;function r(t){e[9](t)}let i={type:"checkbox",label:e[1],helpContent:e[2],helpLink:e[3],disabled:e[4],disabledReason:e[5],required:e[6],error:e[7],$$slots:{default:[ux]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.checkboxChecked=e[0]),t=new U_({props:i}),Og.push(()=>Bg(t,"checkboxChecked",r)),{c(){Wg(t.$$.fragment)},m(e,n){Kg(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.label=e[1]),4&o&&(r.helpContent=e[2]),8&o&&(r.helpLink=e[3]),16&o&&(r.disabled=e[4]),32&o&&(r.disabledReason=e[5]),64&o&&(r.required=e[6]),128&o&&(r.error=e[7]),1024&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checkboxChecked=e[0],Rg(()=>n=!1)),t.$set(r)},i(e){o||(Jg(t.$$.fragment,e),o=!0)},o(e){Gg(t.$$.fragment,e),o=!1},d(e){Xg(t,e)}}}function px(e,t,n){let{$$slots:o={},$$scope:r}=t,{label:i}=t,{checked:a}=t,{helpContent:s}=t,{helpLink:c}=t,{disabled:l=!1}=t,{disabledReason:u}=t,{required:d=!1}=t,{error:p}=t;return e.$$set=e=>{"label"in e&&n(1,i=e.label),"checked"in e&&n(0,a=e.checked),"helpContent"in e&&n(2,s=e.helpContent),"helpLink"in e&&n(3,c=e.helpLink),"disabled"in e&&n(4,l=e.disabled),"disabledReason"in e&&n(5,u=e.disabledReason),"required"in e&&n(6,d=e.required),"error"in e&&n(7,p=e.error),"$$scope"in e&&n(10,r=e.$$scope)},[a,i,s,c,l,u,d,p,o,function(e){a=e,n(0,a)},r]}class mx extends eh{constructor(e){super(),Yg(this,e,px,dx,Qf,{label:1,checked:0,helpContent:2,helpLink:3,disabled:4,disabledReason:5,required:6,error:7})}}function fx(e){let t;return{c(){t=mg("The number of decimals to use for the contract. Defaults to 18.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function gx(e){let t;return{c(){t=mg("Create an initial amount of tokens for the recipient.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function hx(e){let t;return{c(){t=mg("Privileged accounts will be able to create more supply.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function vx(e){let t;return{c(){t=mg("Token holders will be able to destroy their tokens.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function bx(e){let t,n,o;return{c(){t=mg("Privileged accounts will be able to pause the functionality marked with "),n=dg("code"),n.textContent="self.pausable.assert_not_paused()",o=mg(". Useful for emergency response.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function $x(e){let t;return{c(){t=mg("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function yx(e){let t;return{c(){t=mg("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function _x(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y;return r=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[$x]},$$scope:{ctx:e}}}),m=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[yx]},$$scope:{ctx:e}}}),{c(){t=dg("label"),n=dg("span"),o=mg("Application Name\n "),Wg(r.$$.fragment),i=fg(),a=dg("input"),l=fg(),u=dg("label"),d=dg("span"),p=mg("Application Version\n "),Wg(m.$$.fragment),f=fg(),g=dg("input"),vg(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vg(t,"class","labeled-input"),vg(d,"class","flex justify-between pr-2"),g.disabled=h=!e[0].votes,vg(u,"class","labeled-input")},m(s,h){lg(s,t,h),sg(t,n),sg(n,o),Kg(r,n,null),sg(t,i),sg(t,a),_g(a,e[0].appName),lg(s,l,h),lg(s,u,h),sg(u,d),sg(d,p),Kg(m,d,null),sg(u,f),sg(u,g),_g(g,e[0].appVersion),b=!0,$||(y=[hg(a,"input",e[11]),ag(c=Z_.call(null,a,e[1]?.appName)),hg(g,"input",e[12]),ag(v=Z_.call(null,g,e[1]?.appVersion))],$=!0)},p(e,t){const n={};1048576&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t&&a.value!==e[0].appName&&_g(a,e[0].appName),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.appName);const o={};1048576&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&h!==(h=!e[0].votes))&&(g.disabled=h),1&t&&g.value!==e[0].appVersion&&_g(g,e[0].appVersion),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jg(r.$$.fragment,e),Jg(m.$$.fragment,e),b=!0)},o(e){Gg(r.$$.fragment,e),Gg(m.$$.fragment,e),b=!1},d(e){e&&ug(t),Xg(r),e&&ug(l),e&&ug(u),Xg(m),$=!1,Kf(y)}}}function xx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,ge,he,ve;function be(t){e[10](t)}y=new v_({props:{$$slots:{default:[fx]},$$scope:{ctx:e}}}),E=new v_({props:{$$slots:{default:[gx]},$$scope:{ctx:e}}}),M=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/erc20-supply",$$slots:{default:[hx]},$$scope:{ctx:e}}}),H=new v_({props:{$$slots:{default:[vx]},$$scope:{ctx:e}}}),K=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/security#pausable",$$slots:{default:[bx]},$$scope:{ctx:e}}});let $e={};function ye(t){e[13](t)}void 0!==e[0].upgradeable&&($e.upgradeable=e[0].upgradeable),Q=new ex({props:$e}),Og.push(()=>Bg(Q,"upgradeable",be));let _e={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/3.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[_x]},$$scope:{ctx:e}};function xe(t){e[14](t)}function we(t){e[15](t)}function ke(t){e[16](t)}function Ie(t){e[17](t)}void 0!==e[0].votes&&(_e.checked=e[0].votes),te=new mx({props:_e}),Og.push(()=>Bg(te,"checked",ye));let Se={required:e[2],errors:e[1]};function Ce(t){e[18](t)}void 0!==e[0].access.type&&(Se.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Se.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Se.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Se.darMaxTransferDelay=e[0].access.darMaxTransferDelay),re=new K_({props:Se}),Og.push(()=>Bg(re,"accessType",xe)),Og.push(()=>Bg(re,"darInitialDelay",we)),Og.push(()=>Bg(re,"darDefaultDelayIncrease",ke)),Og.push(()=>Bg(re,"darMaxTransferDelay",Ie));let Ee={};function ze(t){e[19](t)}void 0!==e[0].macros&&(Ee.macros=e[0].macros),ue=new lx({props:Ee}),Og.push(()=>Bg(ue,"macros",Ce));let Te={errors:e[1]};return void 0!==e[0].info&&(Te.info=e[0].info),me=new rx({props:Te}),Og.push(()=>Bg(me,"info",ze)),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("div"),i=dg("label"),a=dg("span"),a.textContent="Name",s=fg(),c=dg("input"),u=fg(),d=dg("label"),p=dg("span"),p.textContent="Symbol",m=fg(),f=dg("input"),h=fg(),v=dg("label"),b=dg("span"),$=mg("Decimals\n "),Wg(y.$$.fragment),_=fg(),x=dg("input"),k=fg(),I=dg("label"),S=dg("span"),C=mg("Premint\n "),Wg(E.$$.fragment),z=fg(),T=dg("input"),D=fg(),U=dg("section"),N=dg("h1"),N.textContent="Features",A=fg(),j=dg("div"),R=dg("label"),P=dg("input"),Z=mg("\n Mintable\n "),Wg(M.$$.fragment),L=fg(),q=dg("label"),V=dg("input"),F=mg("\n Burnable\n "),Wg(H.$$.fragment),J=fg(),G=dg("label"),B=dg("input"),W=mg("\n Pausable\n "),Wg(K.$$.fragment),X=fg(),Wg(Q.$$.fragment),ee=fg(),Wg(te.$$.fragment),oe=fg(),Wg(re.$$.fragment),le=fg(),Wg(ue.$$.fragment),pe=fg(),Wg(me.$$.fragment),vg(i,"class","labeled-input"),vg(d,"class","labeled-input"),vg(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vg(b,"class","flex justify-between pr-2"),vg(v,"class","labeled-input"),vg(S,"class","flex justify-between pr-2"),vg(T,"placeholder","0"),vg(T,"pattern",Xv.source),vg(I,"class","labeled-input"),vg(t,"class","controls-section"),vg(P,"type","checkbox"),wg(R,"checked",e[0].mintable),vg(V,"type","checkbox"),wg(q,"checked",e[0].burnable),vg(B,"type","checkbox"),wg(G,"checked",e[0].pausable),vg(j,"class","checkbox-group"),vg(U,"class","controls-section")},m(Y,ne){lg(Y,t,ne),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(i,a),sg(i,s),sg(i,c),_g(c,e[0].name),sg(r,u),sg(r,d),sg(d,p),sg(d,m),sg(d,f),_g(f,e[0].symbol),sg(t,h),sg(t,v),sg(v,b),sg(b,$),Kg(y,b,null),sg(v,_),sg(v,x),_g(x,e[0].decimals),sg(t,k),sg(t,I),sg(I,S),sg(S,C),Kg(E,S,null),sg(I,z),sg(I,T),_g(T,e[0].premint),lg(Y,D,ne),lg(Y,U,ne),sg(U,N),sg(U,A),sg(U,j),sg(j,R),sg(R,P),P.checked=e[0].mintable,sg(R,Z),Kg(M,R,null),sg(j,L),sg(j,q),sg(q,V),V.checked=e[0].burnable,sg(q,F),Kg(H,q,null),sg(j,J),sg(j,G),sg(G,B),B.checked=e[0].pausable,sg(G,W),Kg(K,G,null),sg(j,X),Kg(Q,j,null),lg(Y,ee,ne),Kg(te,Y,ne),lg(Y,oe,ne),Kg(re,Y,ne),lg(Y,le,ne),Kg(ue,Y,ne),lg(Y,pe,ne),Kg(me,Y,ne),ge=!0,he||(ve=[hg(c,"input",e[3]),ag(l=Z_.call(null,c,e[1]?.name)),hg(f,"input",e[4]),ag(g=Z_.call(null,f,e[1]?.symbol)),hg(x,"input",e[5]),ag(w=Z_.call(null,x,e[1]?.decimals)),hg(T,"input",e[6]),ag(O=Z_.call(null,T,e[1]?.premint)),hg(P,"change",e[7]),hg(V,"change",e[8]),hg(B,"change",e[9])],he=!0)},p(e,[t]){1&t&&c.value!==e[0].name&&_g(c,e[0].name),l&&Xf(l.update)&&2&t&&l.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&_g(f,e[0].symbol),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.symbol);const n={};1048576&t&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t&&x.value!==e[0].decimals&&_g(x,e[0].decimals),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.decimals);const o={};1048576&t&&(o.$$scope={dirty:t,ctx:e}),E.$set(o),1&t&&T.value!==e[0].premint&&_g(T,e[0].premint),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.premint),1&t&&(P.checked=e[0].mintable);const r={};1048576&t&&(r.$$scope={dirty:t,ctx:e}),M.$set(r),(!ge||1&t)&&wg(R,"checked",e[0].mintable),1&t&&(V.checked=e[0].burnable);const i={};1048576&t&&(i.$$scope={dirty:t,ctx:e}),H.$set(i),(!ge||1&t)&&wg(q,"checked",e[0].burnable),1&t&&(B.checked=e[0].pausable);const a={};1048576&t&&(a.$$scope={dirty:t,ctx:e}),K.$set(a),(!ge||1&t)&&wg(G,"checked",e[0].pausable);const s={};!Y&&1&t&&(Y=!0,s.upgradeable=e[0].upgradeable,Rg(()=>Y=!1)),Q.$set(s);const u={};2&t&&(u.error=e[1]?.appName||e[1]?.appVersion),1048579&t&&(u.$$scope={dirty:t,ctx:e}),!ne&&1&t&&(ne=!0,u.checked=e[0].votes,Rg(()=>ne=!1)),te.$set(u);const d={};4&t&&(d.required=e[2]),2&t&&(d.errors=e[1]),!ie&&1&t&&(ie=!0,d.accessType=e[0].access.type,Rg(()=>ie=!1)),!ae&&1&t&&(ae=!0,d.darInitialDelay=e[0].access.darInitialDelay,Rg(()=>ae=!1)),!se&&1&t&&(se=!0,d.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,Rg(()=>se=!1)),!ce&&1&t&&(ce=!0,d.darMaxTransferDelay=e[0].access.darMaxTransferDelay,Rg(()=>ce=!1)),re.$set(d);const p={};!de&&1&t&&(de=!0,p.macros=e[0].macros,Rg(()=>de=!1)),ue.$set(p);const m={};2&t&&(m.errors=e[1]),!fe&&1&t&&(fe=!0,m.info=e[0].info,Rg(()=>fe=!1)),me.$set(m)},i(e){ge||(Jg(y.$$.fragment,e),Jg(E.$$.fragment,e),Jg(M.$$.fragment,e),Jg(H.$$.fragment,e),Jg(K.$$.fragment,e),Jg(Q.$$.fragment,e),Jg(te.$$.fragment,e),Jg(re.$$.fragment,e),Jg(ue.$$.fragment,e),Jg(me.$$.fragment,e),ge=!0)},o(e){Gg(y.$$.fragment,e),Gg(E.$$.fragment,e),Gg(M.$$.fragment,e),Gg(H.$$.fragment,e),Gg(K.$$.fragment,e),Gg(Q.$$.fragment,e),Gg(te.$$.fragment,e),Gg(re.$$.fragment,e),Gg(ue.$$.fragment,e),Gg(me.$$.fragment,e),ge=!1},d(e){e&&ug(t),Xg(y),Xg(E),e&&ug(D),e&&ug(U),Xg(M),Xg(H),Xg(K),Xg(Q),e&&ug(ee),Xg(te,e),e&&ug(oe),Xg(re,e),e&&ug(le),Xg(ue,e),e&&ug(pe),Xg(me,e),he=!1,Kf(ve)}}}function wx(e,t,n){let o,{opts:r={kind:"ERC20",...Ub.defaults,premint:"",info:{...lv},macros:{...dv},access:{...Ub.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Ub.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.decimals=this.value,n(0,r)},function(){r.premint=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(){r.appName=this.value,n(0,r)},function(){r.appVersion=this.value,n(0,r)},function(t){e.$$.not_equal(r.votes,t)&&(r.votes=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function kx(e){let t;return{c(){t=mg("The royalty fraction that will be default for all tokens. It will be used for a token if there's no custom\n royalty fraction set for it.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Ix(e){let t;return{c(){t=mg("The denominator used to interpret a token's fee and to calculate the result fee fraction.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Sx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y;return r=new v_({props:{$$slots:{default:[kx]},$$scope:{ctx:e}}}),m=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/token_common#ERC2981Component-IC-FEE_DENOMINATOR",$$slots:{default:[Ix]},$$scope:{ctx:e}}}),{c(){t=dg("label"),n=dg("span"),o=mg("Default Royalty Fraction\n "),Wg(r.$$.fragment),i=fg(),a=dg("input"),l=fg(),u=dg("label"),d=dg("span"),p=mg("Fee Denominator\n "),Wg(m.$$.fragment),f=fg(),g=dg("input"),vg(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].enabled,vg(t,"class","labeled-input"),vg(d,"class","flex justify-between pr-2"),g.disabled=h=!e[0].enabled,vg(u,"class","labeled-input")},m(s,h){lg(s,t,h),sg(t,n),sg(n,o),Kg(r,n,null),sg(t,i),sg(t,a),_g(a,e[0].defaultRoyaltyFraction),lg(s,l,h),lg(s,u,h),sg(u,d),sg(d,p),Kg(m,d,null),sg(u,f),sg(u,g),_g(g,e[0].feeDenominator),b=!0,$||(y=[hg(a,"input",e[2]),ag(c=Z_.call(null,a,e[1]?.defaultRoyaltyFraction)),hg(g,"input",e[3]),ag(v=Z_.call(null,g,e[1]?.feeDenominator))],$=!0)},p(e,t){const n={};32&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].enabled))&&(a.disabled=s),1&t&&a.value!==e[0].defaultRoyaltyFraction&&_g(a,e[0].defaultRoyaltyFraction),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.defaultRoyaltyFraction);const o={};32&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&h!==(h=!e[0].enabled))&&(g.disabled=h),1&t&&g.value!==e[0].feeDenominator&&_g(g,e[0].feeDenominator),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.feeDenominator)},i(e){b||(Jg(r.$$.fragment,e),Jg(m.$$.fragment,e),b=!0)},o(e){Gg(r.$$.fragment,e),Gg(m.$$.fragment,e),b=!1},d(e){e&&ug(t),Xg(r),e&&ug(l),e&&ug(u),Xg(m),$=!1,Kf(y)}}}function Cx(e){let t,n,o;function r(t){e[4](t)}let i={label:"Royalty Info",helpContent:"Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/token_common#ERC2981Component",error:e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator,$$slots:{default:[Sx]},$$scope:{ctx:e}};return void 0!==e[0].enabled&&(i.checked=e[0].enabled),t=new mx({props:i}),Og.push(()=>Bg(t,"checked",r)),{c(){Wg(t.$$.fragment)},m(e,n){Kg(t,e,n),o=!0},p(e,[o]){const r={};2&o&&(r.error=e[1]?.defaultRoyaltyFraction||e[1]?.feeDenominator),35&o&&(r.$$scope={dirty:o,ctx:e}),!n&&1&o&&(n=!0,r.checked=e[0].enabled,Rg(()=>n=!1)),t.$set(r)},i(e){o||(Jg(t.$$.fragment,e),o=!0)},o(e){Gg(t.$$.fragment,e),o=!1},d(e){Xg(t,e)}}}function Ex(e,t,n){let{opts:o}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.defaultRoyaltyFraction=this.value,n(0,o)},function(){o.feeDenominator=this.value,n(0,o)},function(t){e.$$.not_equal(o.enabled,t)&&(o.enabled=t,n(0,o))}]}class zx extends eh{constructor(e){super(),Yg(this,e,Ex,Cx,Qf,{opts:0,errors:1})}}function Tx(e){let t;return{c(){t=mg("Will be concatenated with token IDs to generate the token URIs.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Ox(e){let t;return{c(){t=mg("Privileged accounts will be able to emit new tokens.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Dx(e){let t;return{c(){t=mg("Token holders will be able to destroy their tokens.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Ux(e){let t,n,o;return{c(){t=mg("Privileged accounts will be able to pause the functionality marked with "),n=dg("code"),n.textContent="self.pausable.assert_not_paused()",o=mg(". Useful for emergency response.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function Nx(e){let t;return{c(){t=mg("Allows a contract to publish its entire list of NFTs and make them discoverable by keeping track of all token\n ids and all tokens owned by an address.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Ax(e){let t;return{c(){t=mg("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function jx(e){let t;return{c(){t=mg("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Rx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y;return r=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[Ax]},$$scope:{ctx:e}}}),m=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[jx]},$$scope:{ctx:e}}}),{c(){t=dg("label"),n=dg("span"),o=mg("Application Name\n "),Wg(r.$$.fragment),i=fg(),a=dg("input"),l=fg(),u=dg("label"),d=dg("span"),p=mg("Application Version\n "),Wg(m.$$.fragment),f=fg(),g=dg("input"),vg(n,"class","flex justify-between pr-2"),a.disabled=s=!e[0].votes,vg(t,"class","labeled-input"),vg(d,"class","flex justify-between pr-2"),g.disabled=h=!e[0].votes,vg(u,"class","labeled-input")},m(s,h){lg(s,t,h),sg(t,n),sg(n,o),Kg(r,n,null),sg(t,i),sg(t,a),_g(a,e[0].appName),lg(s,l,h),lg(s,u,h),sg(u,d),sg(d,p),Kg(m,d,null),sg(u,f),sg(u,g),_g(g,e[0].appVersion),b=!0,$||(y=[hg(a,"input",e[11]),ag(c=Z_.call(null,a,e[1]?.appName)),hg(g,"input",e[12]),ag(v=Z_.call(null,g,e[1]?.appVersion))],$=!0)},p(e,t){const n={};2097152&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n),(!b||1&t&&s!==(s=!e[0].votes))&&(a.disabled=s),1&t&&a.value!==e[0].appName&&_g(a,e[0].appName),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.appName);const o={};2097152&t&&(o.$$scope={dirty:t,ctx:e}),m.$set(o),(!b||1&t&&h!==(h=!e[0].votes))&&(g.disabled=h),1&t&&g.value!==e[0].appVersion&&_g(g,e[0].appVersion),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.appVersion)},i(e){b||(Jg(r.$$.fragment,e),Jg(m.$$.fragment,e),b=!0)},o(e){Gg(r.$$.fragment,e),Gg(m.$$.fragment,e),b=!1},d(e){e&&ug(t),Xg(r),e&&ug(l),e&&ug(u),Xg(m),$=!1,Kf(y)}}}function Px(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,ge,he;function ve(t){e[10](t)}y=new v_({props:{$$slots:{default:[Tx]},$$scope:{ctx:e}}}),O=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/erc721",$$slots:{default:[Ox]},$$scope:{ctx:e}}}),j=new v_({props:{$$slots:{default:[Dx]},$$scope:{ctx:e}}}),L=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/security#pausable",$$slots:{default:[Ux]},$$scope:{ctx:e}}}),J=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/erc721#ERC721EnumerableComponent",$$slots:{default:[Nx]},$$scope:{ctx:e}}});let be={};function $e(t){e[13](t)}void 0!==e[0].upgradeable&&(be.upgradeable=e[0].upgradeable),B=new ex({props:be}),Og.push(()=>Bg(B,"upgradeable",ve));let ye={label:"Votes",helpContent:"Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.",helpLink:"https://docs.openzeppelin.com/contracts-cairo/3.x/governance/votes",error:e[1]?.appName||e[1]?.appVersion,$$slots:{default:[Rx]},$$scope:{ctx:e}};function _e(t){e[14](t)}void 0!==e[0].votes&&(ye.checked=e[0].votes),X=new mx({props:ye}),Og.push(()=>Bg(X,"checked",$e));let xe={errors:e[1]};function we(t){e[15](t)}function ke(t){e[16](t)}function Ie(t){e[17](t)}function Se(t){e[18](t)}void 0!==e[0].royaltyInfo&&(xe.opts=e[0].royaltyInfo),ee=new zx({props:xe}),Og.push(()=>Bg(ee,"opts",_e));let Ce={required:e[2],errors:e[1]};function Ee(t){e[19](t)}void 0!==e[0].access.type&&(Ce.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(Ce.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(Ce.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(Ce.darMaxTransferDelay=e[0].access.darMaxTransferDelay),oe=new K_({props:Ce}),Og.push(()=>Bg(oe,"accessType",we)),Og.push(()=>Bg(oe,"darInitialDelay",ke)),Og.push(()=>Bg(oe,"darDefaultDelayIncrease",Ie)),Og.push(()=>Bg(oe,"darMaxTransferDelay",Se));let ze={};function Te(t){e[20](t)}void 0!==e[0].macros&&(ze.macros=e[0].macros),le=new lx({props:ze}),Og.push(()=>Bg(le,"macros",Ee));let Oe={errors:e[1]};return void 0!==e[0].info&&(Oe.info=e[0].info),pe=new rx({props:Oe}),Og.push(()=>Bg(pe,"info",Te)),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("div"),i=dg("label"),a=dg("span"),a.textContent="Name",s=fg(),c=dg("input"),u=fg(),d=dg("label"),p=dg("span"),p.textContent="Symbol",m=fg(),f=dg("input"),h=fg(),v=dg("label"),b=dg("span"),$=mg("Base URI\n "),Wg(y.$$.fragment),_=fg(),x=dg("input"),w=fg(),k=dg("section"),I=dg("h1"),I.textContent="Features",S=fg(),C=dg("div"),E=dg("label"),z=dg("input"),T=mg("\n Mintable\n "),Wg(O.$$.fragment),D=fg(),U=dg("label"),N=dg("input"),A=mg("\n Burnable\n "),Wg(j.$$.fragment),R=fg(),P=dg("label"),Z=dg("input"),M=mg("\n Pausable\n "),Wg(L.$$.fragment),q=fg(),V=dg("label"),F=dg("input"),H=mg("\n Enumerable\n "),Wg(J.$$.fragment),G=fg(),Wg(B.$$.fragment),K=fg(),Wg(X.$$.fragment),Y=fg(),Wg(ee.$$.fragment),ne=fg(),Wg(oe.$$.fragment),ce=fg(),Wg(le.$$.fragment),de=fg(),Wg(pe.$$.fragment),vg(i,"class","labeled-input"),vg(d,"class","labeled-input"),vg(r,"class","grid grid-cols-[2fr,1fr] gap-2"),vg(b,"class","flex justify-between pr-2"),vg(x,"placeholder","https://..."),vg(v,"class","labeled-input"),vg(t,"class","controls-section"),vg(z,"type","checkbox"),wg(E,"checked",e[0].mintable),vg(N,"type","checkbox"),wg(U,"checked",e[0].burnable),vg(Z,"type","checkbox"),wg(P,"checked",e[0].pausable),vg(F,"type","checkbox"),wg(V,"checked",e[0].enumerable),vg(C,"class","checkbox-group"),vg(k,"class","controls-section")},m(W,Q){lg(W,t,Q),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(i,a),sg(i,s),sg(i,c),_g(c,e[0].name),sg(r,u),sg(r,d),sg(d,p),sg(d,m),sg(d,f),_g(f,e[0].symbol),sg(t,h),sg(t,v),sg(v,b),sg(b,$),Kg(y,b,null),sg(v,_),sg(v,x),_g(x,e[0].baseUri),lg(W,w,Q),lg(W,k,Q),sg(k,I),sg(k,S),sg(k,C),sg(C,E),sg(E,z),z.checked=e[0].mintable,sg(E,T),Kg(O,E,null),sg(C,D),sg(C,U),sg(U,N),N.checked=e[0].burnable,sg(U,A),Kg(j,U,null),sg(C,R),sg(C,P),sg(P,Z),Z.checked=e[0].pausable,sg(P,M),Kg(L,P,null),sg(C,q),sg(C,V),sg(V,F),F.checked=e[0].enumerable,sg(V,H),Kg(J,V,null),sg(C,G),Kg(B,C,null),lg(W,K,Q),Kg(X,W,Q),lg(W,Y,Q),Kg(ee,W,Q),lg(W,ne,Q),Kg(oe,W,Q),lg(W,ce,Q),Kg(le,W,Q),lg(W,de,Q),Kg(pe,W,Q),fe=!0,ge||(he=[hg(c,"input",e[3]),ag(l=Z_.call(null,c,e[1]?.name)),hg(f,"input",e[4]),ag(g=Z_.call(null,f,e[1]?.symbol)),hg(x,"input",e[5]),hg(z,"change",e[6]),hg(N,"change",e[7]),hg(Z,"change",e[8]),hg(F,"change",e[9])],ge=!0)},p(e,[t]){1&t&&c.value!==e[0].name&&_g(c,e[0].name),l&&Xf(l.update)&&2&t&&l.update.call(null,e[1]?.name),1&t&&f.value!==e[0].symbol&&_g(f,e[0].symbol),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.symbol);const n={};2097152&t&&(n.$$scope={dirty:t,ctx:e}),y.$set(n),1&t&&x.value!==e[0].baseUri&&_g(x,e[0].baseUri),1&t&&(z.checked=e[0].mintable);const o={};2097152&t&&(o.$$scope={dirty:t,ctx:e}),O.$set(o),(!fe||1&t)&&wg(E,"checked",e[0].mintable),1&t&&(N.checked=e[0].burnable);const r={};2097152&t&&(r.$$scope={dirty:t,ctx:e}),j.$set(r),(!fe||1&t)&&wg(U,"checked",e[0].burnable),1&t&&(Z.checked=e[0].pausable);const i={};2097152&t&&(i.$$scope={dirty:t,ctx:e}),L.$set(i),(!fe||1&t)&&wg(P,"checked",e[0].pausable),1&t&&(F.checked=e[0].enumerable);const a={};2097152&t&&(a.$$scope={dirty:t,ctx:e}),J.$set(a),(!fe||1&t)&&wg(V,"checked",e[0].enumerable);const s={};!W&&1&t&&(W=!0,s.upgradeable=e[0].upgradeable,Rg(()=>W=!1)),B.$set(s);const u={};2&t&&(u.error=e[1]?.appName||e[1]?.appVersion),2097155&t&&(u.$$scope={dirty:t,ctx:e}),!Q&&1&t&&(Q=!0,u.checked=e[0].votes,Rg(()=>Q=!1)),X.$set(u);const d={};2&t&&(d.errors=e[1]),!te&&1&t&&(te=!0,d.opts=e[0].royaltyInfo,Rg(()=>te=!1)),ee.$set(d);const p={};4&t&&(p.required=e[2]),2&t&&(p.errors=e[1]),!re&&1&t&&(re=!0,p.accessType=e[0].access.type,Rg(()=>re=!1)),!ie&&1&t&&(ie=!0,p.darInitialDelay=e[0].access.darInitialDelay,Rg(()=>ie=!1)),!ae&&1&t&&(ae=!0,p.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,Rg(()=>ae=!1)),!se&&1&t&&(se=!0,p.darMaxTransferDelay=e[0].access.darMaxTransferDelay,Rg(()=>se=!1)),oe.$set(p);const m={};!ue&&1&t&&(ue=!0,m.macros=e[0].macros,Rg(()=>ue=!1)),le.$set(m);const h={};2&t&&(h.errors=e[1]),!me&&1&t&&(me=!0,h.info=e[0].info,Rg(()=>me=!1)),pe.$set(h)},i(e){fe||(Jg(y.$$.fragment,e),Jg(O.$$.fragment,e),Jg(j.$$.fragment,e),Jg(L.$$.fragment,e),Jg(J.$$.fragment,e),Jg(B.$$.fragment,e),Jg(X.$$.fragment,e),Jg(ee.$$.fragment,e),Jg(oe.$$.fragment,e),Jg(le.$$.fragment,e),Jg(pe.$$.fragment,e),fe=!0)},o(e){Gg(y.$$.fragment,e),Gg(O.$$.fragment,e),Gg(j.$$.fragment,e),Gg(L.$$.fragment,e),Gg(J.$$.fragment,e),Gg(B.$$.fragment,e),Gg(X.$$.fragment,e),Gg(ee.$$.fragment,e),Gg(oe.$$.fragment,e),Gg(le.$$.fragment,e),Gg(pe.$$.fragment,e),fe=!1},d(e){e&&ug(t),Xg(y),e&&ug(w),e&&ug(k),Xg(O),Xg(j),Xg(L),Xg(J),Xg(B),e&&ug(K),Xg(X,e),e&&ug(Y),Xg(ee,e),e&&ug(ne),Xg(oe,e),e&&ug(ce),Xg(le,e),e&&ug(de),Xg(pe,e),ge=!1,Kf(he)}}}function Zx(e,t,n){let o,{opts:r={kind:"ERC721",...Nb.defaults,royaltyInfo:{...Nb.defaults.royaltyInfo},info:{...lv},macros:{...dv},access:{...Nb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Nb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.symbol=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.enumerable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(){r.appName=this.value,n(0,r)},function(){r.appVersion=this.value,n(0,r)},function(t){e.$$.not_equal(r.votes,t)&&(r.votes=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Mx(e){let t,n,o;return{c(){t=mg("Location of the metadata. Clients will replace any instance of "),n=mg("{id}"),o=mg(" in this string with the tokenId.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function Lx(e){let t;return{c(){t=mg("Privileged accounts will be able to create more supply.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function qx(e){let t;return{c(){t=mg("Token holders will be able to destroy their tokens.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Vx(e){let t,n,o;return{c(){t=mg("Privileged accounts will be able to pause the functionality marked with "),n=dg("code"),n.textContent="self.pausable.assert_not_paused()",o=mg(". Useful for emergency response.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function Fx(e){let t,n,o;return{c(){t=mg("Privileged accounts will be able to set a new URI for all token types. Clients will replace any instance of "),n=mg("{id}"),o=mg("\n in the URI with the tokenId.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function Hx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie;function ae(t){e[9](t)}p=new v_({props:{$$slots:{default:[Mx]},$$scope:{ctx:e}}}),w=new v_({props:{$$slots:{default:[Lx]},$$scope:{ctx:e}}}),E=new v_({props:{$$slots:{default:[qx]},$$scope:{ctx:e}}}),U=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/security#pausable",$$slots:{default:[Vx]},$$scope:{ctx:e}}}),P=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/erc1155#ERC1155Component-set_base_uri",$$slots:{default:[Fx]},$$scope:{ctx:e}}});let se={};function ce(t){e[10](t)}void 0!==e[0].upgradeable&&(se.upgradeable=e[0].upgradeable),M=new ex({props:se}),Og.push(()=>Bg(M,"upgradeable",ae));let le={errors:e[1]};function ue(t){e[11](t)}function de(t){e[12](t)}function pe(t){e[13](t)}function me(t){e[14](t)}void 0!==e[0].royaltyInfo&&(le.opts=e[0].royaltyInfo),V=new zx({props:le}),Og.push(()=>Bg(V,"opts",ce));let fe={required:e[2],errors:e[1]};function ge(t){e[15](t)}void 0!==e[0].access.type&&(fe.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(fe.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(fe.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(fe.darMaxTransferDelay=e[0].access.darMaxTransferDelay),J=new K_({props:fe}),Og.push(()=>Bg(J,"accessType",ue)),Og.push(()=>Bg(J,"darInitialDelay",de)),Og.push(()=>Bg(J,"darDefaultDelayIncrease",pe)),Og.push(()=>Bg(J,"darMaxTransferDelay",me));let he={};function ve(t){e[16](t)}void 0!==e[0].macros&&(he.macros=e[0].macros),Q=new lx({props:he}),Og.push(()=>Bg(Q,"macros",ge));let be={errors:e[1]};return void 0!==e[0].info&&(be.info=e[0].info),te=new rx({props:be}),Og.push(()=>Bg(te,"info",ve)),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),c=fg(),l=dg("label"),u=dg("span"),d=mg("Base URI\n "),Wg(p.$$.fragment),m=fg(),f=dg("input"),g=fg(),h=dg("section"),v=dg("h1"),v.textContent="Features",b=fg(),$=dg("div"),y=dg("label"),_=dg("input"),x=mg("\n Mintable\n "),Wg(w.$$.fragment),k=fg(),I=dg("label"),S=dg("input"),C=mg("\n Burnable\n "),Wg(E.$$.fragment),z=fg(),T=dg("label"),O=dg("input"),D=mg("\n Pausable\n "),Wg(U.$$.fragment),N=fg(),A=dg("label"),j=dg("input"),R=mg("\n Updatable URI\n "),Wg(P.$$.fragment),Z=fg(),Wg(M.$$.fragment),q=fg(),Wg(V.$$.fragment),H=fg(),Wg(J.$$.fragment),X=fg(),Wg(Q.$$.fragment),ee=fg(),Wg(te.$$.fragment),vg(r,"class","labeled-input"),vg(u,"class","flex justify-between pr-2"),vg(f,"placeholder","https://..."),vg(l,"class","labeled-input"),vg(t,"class","controls-section"),vg(_,"type","checkbox"),wg(y,"checked",e[0].mintable),vg(S,"type","checkbox"),wg(I,"checked",e[0].burnable),vg(O,"type","checkbox"),wg(T,"checked",e[0].pausable),vg(j,"type","checkbox"),wg(A,"checked",e[0].updatableUri),vg($,"class","checkbox-group"),vg(h,"class","controls-section")},m(L,F){lg(L,t,F),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),sg(t,c),sg(t,l),sg(l,u),sg(u,d),Kg(p,u,null),sg(l,m),sg(l,f),_g(f,e[0].baseUri),lg(L,g,F),lg(L,h,F),sg(h,v),sg(h,b),sg(h,$),sg($,y),sg(y,_),_.checked=e[0].mintable,sg(y,x),Kg(w,y,null),sg($,k),sg($,I),sg(I,S),S.checked=e[0].burnable,sg(I,C),Kg(E,I,null),sg($,z),sg($,T),sg(T,O),O.checked=e[0].pausable,sg(T,D),Kg(U,T,null),sg($,N),sg($,A),sg(A,j),j.checked=e[0].updatableUri,sg(A,R),Kg(P,A,null),sg($,Z),Kg(M,$,null),lg(L,q,F),Kg(V,L,F),lg(L,H,F),Kg(J,L,F),lg(L,X,F),Kg(Q,L,F),lg(L,ee,F),Kg(te,L,F),oe=!0,re||(ie=[hg(s,"input",e[3]),hg(f,"input",e[4]),hg(_,"change",e[5]),hg(S,"change",e[6]),hg(O,"change",e[7]),hg(j,"change",e[8])],re=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name);const n={};131072&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].baseUri&&_g(f,e[0].baseUri),1&t&&(_.checked=e[0].mintable);const o={};131072&t&&(o.$$scope={dirty:t,ctx:e}),w.$set(o),(!oe||1&t)&&wg(y,"checked",e[0].mintable),1&t&&(S.checked=e[0].burnable);const r={};131072&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),(!oe||1&t)&&wg(I,"checked",e[0].burnable),1&t&&(O.checked=e[0].pausable);const i={};131072&t&&(i.$$scope={dirty:t,ctx:e}),U.$set(i),(!oe||1&t)&&wg(T,"checked",e[0].pausable),1&t&&(j.checked=e[0].updatableUri);const a={};131072&t&&(a.$$scope={dirty:t,ctx:e}),P.$set(a),(!oe||1&t)&&wg(A,"checked",e[0].updatableUri);const c={};!L&&1&t&&(L=!0,c.upgradeable=e[0].upgradeable,Rg(()=>L=!1)),M.$set(c);const l={};2&t&&(l.errors=e[1]),!F&&1&t&&(F=!0,l.opts=e[0].royaltyInfo,Rg(()=>F=!1)),V.$set(l);const u={};4&t&&(u.required=e[2]),2&t&&(u.errors=e[1]),!G&&1&t&&(G=!0,u.accessType=e[0].access.type,Rg(()=>G=!1)),!B&&1&t&&(B=!0,u.darInitialDelay=e[0].access.darInitialDelay,Rg(()=>B=!1)),!W&&1&t&&(W=!0,u.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,Rg(()=>W=!1)),!K&&1&t&&(K=!0,u.darMaxTransferDelay=e[0].access.darMaxTransferDelay,Rg(()=>K=!1)),J.$set(u);const d={};!Y&&1&t&&(Y=!0,d.macros=e[0].macros,Rg(()=>Y=!1)),Q.$set(d);const m={};2&t&&(m.errors=e[1]),!ne&&1&t&&(ne=!0,m.info=e[0].info,Rg(()=>ne=!1)),te.$set(m)},i(e){oe||(Jg(p.$$.fragment,e),Jg(w.$$.fragment,e),Jg(E.$$.fragment,e),Jg(U.$$.fragment,e),Jg(P.$$.fragment,e),Jg(M.$$.fragment,e),Jg(V.$$.fragment,e),Jg(J.$$.fragment,e),Jg(Q.$$.fragment,e),Jg(te.$$.fragment,e),oe=!0)},o(e){Gg(p.$$.fragment,e),Gg(w.$$.fragment,e),Gg(E.$$.fragment,e),Gg(U.$$.fragment,e),Gg(P.$$.fragment,e),Gg(M.$$.fragment,e),Gg(V.$$.fragment,e),Gg(J.$$.fragment,e),Gg(Q.$$.fragment,e),Gg(te.$$.fragment,e),oe=!1},d(e){e&&ug(t),Xg(p),e&&ug(g),e&&ug(h),Xg(w),Xg(E),Xg(U),Xg(P),Xg(M),e&&ug(q),Xg(V,e),e&&ug(H),Xg(J,e),e&&ug(X),Xg(Q,e),e&&ug(ee),Xg(te,e),re=!1,Kf(ie)}}}function Jx(e,t,n){let o,{opts:r={kind:"ERC1155",...Ab.defaults,royaltyInfo:{...Ab.defaults.royaltyInfo},info:{...lv},macros:{...dv},access:{...Ab.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Ab.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.baseUri=this.value,n(0,r)},function(){r.mintable=this.checked,n(0,r)},function(){r.burnable=this.checked,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(){r.updatableUri=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.royaltyInfo,t)&&(r.royaltyInfo=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function Gx(e){let t;return{c(){t=mg("Starknet account that uses the STARK curve for signature checking.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Bx(e){let t;return{c(){t=mg("Ethereum-flavored account that uses the Secp256k1 curve for signature checking.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Wx(e){let t;return{c(){t=mg("Allows a protocol to submit transactions on behalf of the account, as long as it has the relevant signatures.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Kx(e){let t;return{c(){t=mg("Enables the account to declare other contract classes.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Xx(e){let t;return{c(){t=mg("Enables the account to be counterfactually deployed.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Qx(e){let t;return{c(){t=mg("Enables the account to change its own public key.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Yx(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie;function ae(t){e[11](t)}v=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/accounts#starknet_account",$$slots:{default:[Gx]},$$scope:{ctx:e}}}),x=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/accounts#ethereum_account",$$slots:{default:[Bx]},$$scope:{ctx:e}}}),O=new v_({props:{link:"https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-9.md",$$slots:{default:[Wx]},$$scope:{ctx:e}}}),j=new v_({props:{link:"https://docs.starknet.io/architecture-and-concepts/smart-contracts/contract-classes/",$$slots:{default:[Kx]},$$scope:{ctx:e}}}),L=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/accounts#deploying_an_account",$$slots:{default:[Xx]},$$scope:{ctx:e}}}),J=new v_({props:{$$slots:{default:[Qx]},$$scope:{ctx:e}}});let se={};function ce(t){e[12](t)}void 0!==e[0].upgradeable&&(se.upgradeable=e[0].upgradeable),B=new ex({props:se}),Og.push(()=>Bg(B,"upgradeable",ae));let le={};function ue(t){e[13](t)}void 0!==e[0].macros&&(le.macros=e[0].macros),X=new lx({props:le}),Og.push(()=>Bg(X,"macros",ce));let de={errors:e[1]};return void 0!==e[0].info&&(de.info=e[0].info),ee=new rx({props:de}),Og.push(()=>Bg(ee,"info",ue)),oe=bg(e[5][0]),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),l=fg(),u=dg("section"),d=dg("h1"),d.textContent="Account Type",p=fg(),m=dg("div"),f=dg("label"),g=dg("input"),h=mg("\n Starknet\n "),Wg(v.$$.fragment),b=fg(),$=dg("label"),y=dg("input"),_=mg("\n Ethereum\n "),Wg(x.$$.fragment),w=fg(),k=dg("section"),I=dg("h1"),I.textContent="Features",S=fg(),C=dg("div"),E=dg("label"),z=dg("input"),T=mg("\n Outside Execution\n "),Wg(O.$$.fragment),D=fg(),U=dg("label"),N=dg("input"),A=mg("\n Declarer\n "),Wg(j.$$.fragment),R=fg(),P=dg("label"),Z=dg("input"),M=mg("\n Deployable\n "),Wg(L.$$.fragment),q=fg(),V=dg("label"),F=dg("input"),H=mg("\n Public Key\n "),Wg(J.$$.fragment),G=fg(),Wg(B.$$.fragment),K=fg(),Wg(X.$$.fragment),Y=fg(),Wg(ee.$$.fragment),vg(r,"class","labeled-input"),vg(t,"class","controls-section"),vg(g,"type","radio"),g.__value="stark",g.value=g.__value,wg(f,"checked","stark"===e[2]),vg(y,"type","radio"),y.__value="eth",y.value=y.__value,wg($,"checked","eth"===e[2]),vg(m,"class","checkbox-group"),vg(u,"class","controls-section"),vg(z,"type","checkbox"),wg(E,"checked",e[0].outsideExecution),vg(N,"type","checkbox"),wg(U,"checked",e[0].declare),vg(Z,"type","checkbox"),wg(P,"checked",e[0].deploy),vg(F,"type","checkbox"),wg(V,"checked",e[0].pubkey),vg(C,"class","checkbox-group"),vg(k,"class","controls-section"),oe.p(g,y)},m(W,Q){lg(W,t,Q),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),lg(W,l,Q),lg(W,u,Q),sg(u,d),sg(u,p),sg(u,m),sg(m,f),sg(f,g),g.checked=g.__value===e[0].type,sg(f,h),Kg(v,f,null),sg(m,b),sg(m,$),sg($,y),y.checked=y.__value===e[0].type,sg($,_),Kg(x,$,null),lg(W,w,Q),lg(W,k,Q),sg(k,I),sg(k,S),sg(k,C),sg(C,E),sg(E,z),z.checked=e[0].outsideExecution,sg(E,T),Kg(O,E,null),sg(C,D),sg(C,U),sg(U,N),N.checked=e[0].declare,sg(U,A),Kg(j,U,null),sg(C,R),sg(C,P),sg(P,Z),Z.checked=e[0].deploy,sg(P,M),Kg(L,P,null),sg(C,q),sg(C,V),sg(V,F),F.checked=e[0].pubkey,sg(V,H),Kg(J,V,null),sg(C,G),Kg(B,C,null),lg(W,K,Q),Kg(X,W,Q),lg(W,Y,Q),Kg(ee,W,Q),ne=!0,re||(ie=[hg(s,"input",e[3]),ag(c=Z_.call(null,s,e[1]?.name)),hg(g,"change",e[4]),hg(y,"change",e[6]),hg(z,"change",e[7]),hg(N,"change",e[8]),hg(Z,"change",e[9]),hg(F,"change",e[10])],re=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(g.checked=g.__value===e[0].type);const n={};16384&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!ne||4&t)&&wg(f,"checked","stark"===e[2]),1&t&&(y.checked=y.__value===e[0].type);const o={};16384&t&&(o.$$scope={dirty:t,ctx:e}),x.$set(o),(!ne||4&t)&&wg($,"checked","eth"===e[2]),1&t&&(z.checked=e[0].outsideExecution);const r={};16384&t&&(r.$$scope={dirty:t,ctx:e}),O.$set(r),(!ne||1&t)&&wg(E,"checked",e[0].outsideExecution),1&t&&(N.checked=e[0].declare);const i={};16384&t&&(i.$$scope={dirty:t,ctx:e}),j.$set(i),(!ne||1&t)&&wg(U,"checked",e[0].declare),1&t&&(Z.checked=e[0].deploy);const a={};16384&t&&(a.$$scope={dirty:t,ctx:e}),L.$set(a),(!ne||1&t)&&wg(P,"checked",e[0].deploy),1&t&&(F.checked=e[0].pubkey);const l={};16384&t&&(l.$$scope={dirty:t,ctx:e}),J.$set(l),(!ne||1&t)&&wg(V,"checked",e[0].pubkey);const u={};!W&&1&t&&(W=!0,u.upgradeable=e[0].upgradeable,Rg(()=>W=!1)),B.$set(u);const d={};!Q&&1&t&&(Q=!0,d.macros=e[0].macros,Rg(()=>Q=!1)),X.$set(d);const p={};2&t&&(p.errors=e[1]),!te&&1&t&&(te=!0,p.info=e[0].info,Rg(()=>te=!1)),ee.$set(p)},i(e){ne||(Jg(v.$$.fragment,e),Jg(x.$$.fragment,e),Jg(O.$$.fragment,e),Jg(j.$$.fragment,e),Jg(L.$$.fragment,e),Jg(J.$$.fragment,e),Jg(B.$$.fragment,e),Jg(X.$$.fragment,e),Jg(ee.$$.fragment,e),ne=!0)},o(e){Gg(v.$$.fragment,e),Gg(x.$$.fragment,e),Gg(O.$$.fragment,e),Gg(j.$$.fragment,e),Gg(L.$$.fragment,e),Gg(J.$$.fragment,e),Gg(B.$$.fragment,e),Gg(X.$$.fragment,e),Gg(ee.$$.fragment,e),ne=!1},d(e){e&&ug(t),e&&ug(l),e&&ug(u),Xg(v),Xg(x),e&&ug(w),e&&ug(k),Xg(O),Xg(j),Xg(L),Xg(J),Xg(B),e&&ug(K),Xg(X,e),e&&ug(Y),Xg(ee,e),oe.r(),re=!1,Kf(ie)}}}function ew(e,t,n){let{opts:o={kind:"Account",...jb.defaults,info:{...lv},macros:{...dv}}}=t,{errors:r}=t,{accountType:i}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors),"accountType"in e&&n(2,i=e.accountType)},[o,r,i,function(){o.name=this.value,n(0,o)},function(){o.type=this.__value,n(0,o)},[[]],function(){o.type=this.__value,n(0,o)},function(){o.outsideExecution=this.checked,n(0,o)},function(){o.declare=this.checked,n(0,o)},function(){o.deploy=this.checked,n(0,o)},function(){o.pubkey=this.checked,n(0,o)},function(t){e.$$.not_equal(o.upgradeable,t)&&(o.upgradeable=t,n(0,o))},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function tw(e){let t;return{c(){t=mg("The minimal number of confirmations required to approve a transaction.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function nw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O;function D(t){e[4](t)}p=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/governance/multisig#signer_management",$$slots:{default:[tw]},$$scope:{ctx:e}}});let U={};function N(t){e[5](t)}void 0!==e[0].upgradeable&&(U.upgradeable=e[0].upgradeable),_=new ex({props:U}),Og.push(()=>Bg(_,"upgradeable",D));let A={};function j(t){e[6](t)}void 0!==e[0].macros&&(A.macros=e[0].macros),k=new lx({props:A}),Og.push(()=>Bg(k,"macros",N));let R={errors:e[1]};return void 0!==e[0].info&&(R.info=e[0].info),C=new rx({props:R}),Og.push(()=>Bg(C,"info",j)),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),c=fg(),l=dg("label"),u=dg("span"),d=mg("Quorum\n "),Wg(p.$$.fragment),m=fg(),f=dg("input"),h=fg(),v=dg("section"),b=dg("h1"),b.textContent="Features",$=fg(),y=dg("div"),Wg(_.$$.fragment),w=fg(),Wg(k.$$.fragment),S=fg(),Wg(C.$$.fragment),vg(r,"class","labeled-input"),vg(u,"class","flex justify-between pr-2"),vg(f,"placeholder",""),vg(l,"class","labeled-input"),vg(t,"class","controls-section"),vg(y,"class","checkbox-group"),vg(v,"class","controls-section")},m(x,I){lg(x,t,I),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),sg(t,c),sg(t,l),sg(l,u),sg(u,d),Kg(p,u,null),sg(l,m),sg(l,f),_g(f,e[0].quorum),lg(x,h,I),lg(x,v,I),sg(v,b),sg(v,$),sg(v,y),Kg(_,y,null),lg(x,w,I),Kg(k,x,I),lg(x,S,I),Kg(C,x,I),z=!0,T||(O=[hg(s,"input",e[2]),hg(f,"input",e[3]),ag(g=Z_.call(null,f,e[1]?.quorum))],T=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name);const n={};256&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&f.value!==e[0].quorum&&_g(f,e[0].quorum),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.quorum);const o={};!x&&1&t&&(x=!0,o.upgradeable=e[0].upgradeable,Rg(()=>x=!1)),_.$set(o);const r={};!I&&1&t&&(I=!0,r.macros=e[0].macros,Rg(()=>I=!1)),k.$set(r);const i={};2&t&&(i.errors=e[1]),!E&&1&t&&(E=!0,i.info=e[0].info,Rg(()=>E=!1)),C.$set(i)},i(e){z||(Jg(p.$$.fragment,e),Jg(_.$$.fragment,e),Jg(k.$$.fragment,e),Jg(C.$$.fragment,e),z=!0)},o(e){Gg(p.$$.fragment,e),Gg(_.$$.fragment,e),Gg(k.$$.fragment,e),Gg(C.$$.fragment,e),z=!1},d(e){e&&ug(t),Xg(p),e&&ug(h),e&&ug(v),Xg(_),e&&ug(w),Xg(k,e),e&&ug(S),Xg(C,e),T=!1,Kf(O)}}}function ow(e,t,n){const o=Rb.defaults;let{opts:r={kind:"Multisig",...o,info:{...lv},macros:{...dv}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},[r,i,function(){r.name=this.value,n(0,r)},function(){r.quorum=this.value,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}function rw(e){const t=()=>{if(""===e.value)return;const t=window.getComputedStyle(e),n=iw(e.value,t),o=`calc(5px + max(${iw(e.placeholder,t)}, ${n}) + ${["padding-left","padding-right","border-left-width","border-right-width"].map(e=>t.getPropertyValue(e)).join(" + ")})`;e.style.setProperty("width",o)};t(),e.addEventListener("input",t)}function iw(e,t){const n=["font-size","font-family"].map(e=>t.getPropertyValue(e)).join(" "),o=document.createElement("canvas").getContext("2d");return o.font=n,o.measureText(e).width+"px"}function aw(e){let t;return{c(){t=mg("Delay since proposal is created until voting starts.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function sw(e){let t;return{c(){t=mg("Length of period during which people can cast their vote.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function cw(e){let t;return{c(){t=mg("Minimum number of votes an account must have to create a proposal.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function lw(e){let t;return{c(){t=mg("Quorum required for a proposal to pass.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function uw(e){let t,n,o,r;return{c(){t=dg("input"),vg(t,"id","quorum-input")},m(i,a){lg(i,t,a),_g(t,e[0].quorumAbsolute),e[17](t),o||(r=[hg(t,"input",e[16]),ag(n=Z_.call(null,t,e[1]?.quorumAbsolute))],o=!0)},p(e,o){1&o&&t.value!==e[0].quorumAbsolute&&_g(t,e[0].quorumAbsolute),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumAbsolute)},d(n){n&&ug(t),e[17](null),o=!1,Kf(r)}}}function dw(e){let t,n,o,r;return{c(){t=dg("input"),vg(t,"id","quorum-input"),vg(t,"type","number"),vg(t,"placeholder",e[4].quorumPercent.toString())},m(i,a){lg(i,t,a),_g(t,e[0].quorumPercent),o||(r=[hg(t,"input",e[15]),ag(n=Z_.call(null,t,e[1]?.quorumPercent))],o=!0)},p(e,o){1&o&&$g(t.value)!==e[0].quorumPercent&&_g(t,e[0].quorumPercent),n&&Xf(n.update)&&2&o&&n.update.call(null,e[1]?.quorumPercent)},d(e){e&&ug(t),o=!1,Kf(r)}}}function pw(e){let t;return{c(){t=mg("Token amounts above will be extended with this number of zeroes. Does not apply to ERC721Votes.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function mw(e){let t;return{c(){t=mg("Allow governance to update voting settings (delay, period, proposal threshold).")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function fw(e){let t;return{c(){t=mg("Represent voting power with a votes-enabled ERC20 token. Voters can entrust their voting power to a delegate.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function gw(e){let t;return{c(){t=mg("Represent voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function hw(e){let t,n,o,r,i;return{c(){t=mg("The clock mode used by the voting token.\n "),n=dg("br"),o=fg(),r=dg("b"),r.textContent="NOTE:",i=mg(" This setting must be the same as what the token uses. For now, only timestamp mode is supported.")},m(e,a){lg(e,t,a),lg(e,n,a),lg(e,o,a),lg(e,r,a),lg(e,i,a)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o),e&&ug(r),e&&ug(i)}}}function vw(e){let t;return{c(){t=mg("The token uses voting durations expressed as timestamps.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function bw(e){let t,n,o;return{c(){t=mg("Module compatible with OpenZeppelin's "),n=dg("code"),n.textContent="TimelockController",o=mg(".")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function $w(e){let t,n,o,r,i,a,s,c,l;return i=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/governance#TimelockControllerComponent",$$slots:{default:[bw]},$$scope:{ctx:e}}}),s=bg(e[13][0]),{c(){t=dg("div"),n=dg("label"),o=dg("input"),r=mg("\n TimelockController\n "),Wg(i.$$.fragment),vg(o,"type","radio"),o.__value="openzeppelin",o.value=o.__value,wg(n,"checked","openzeppelin"===e[0].timelock),vg(t,"class","checkbox-group"),s.p(o)},m(s,u){lg(s,t,u),sg(t,n),sg(n,o),o.checked=o.__value===e[0].timelock,sg(n,r),Kg(i,n,null),a=!0,c||(l=hg(o,"change",e[24]),c=!0)},p(e,t){1&t&&(o.checked=o.__value===e[0].timelock);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),i.$set(r),(!a||1&t)&&wg(n,"checked","openzeppelin"===e[0].timelock)},i(e){a||(Jg(i.$$.fragment,e),a=!0)},o(e){Gg(i.$$.fragment,e),a=!1},d(e){e&&ug(t),Xg(i),s.r(),c=!1,l()}}}function yw(e){let t;return{c(){t=mg("Metadata for the SNIP12 domain separator.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function _w(e){let t;return{c(){t=mg("Name for domain separator. Prevents two applications from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function xw(e){let t;return{c(){t=mg("Version for domain separator. Prevents two versions of the same application from producing the same hash.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function ww(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te,ne,oe,re,ie,ae,se,ce,le,ue,de,pe,me,fe,ge,he,ve,be,$e,ye,_e,xe,we,ke,Ie,Se,Ce,Ee,ze,Te,Oe,De,Ue,Ne,Ae,je,Re,Pe,Ze,Me,Le,qe,Ve,Fe,He,Je,Ge,Be,We,Ke,Xe,Qe,Ye,et,tt,nt,ot,rt,it,at,st,ct,lt,ut,dt,pt,mt,ft,gt,ht,vt,bt,$t,yt,_t,xt,wt;function kt(e,t){return"percent"===e[0].quorumMode?dw:uw}f=new v_({props:{$$slots:{default:[aw]},$$scope:{ctx:e}}}),w=new v_({props:{$$slots:{default:[sw]},$$scope:{ctx:e}}}),O=new v_({props:{$$slots:{default:[cw]},$$scope:{ctx:e}}}),B=new v_({props:{$$slots:{default:[lw]},$$scope:{ctx:e}}});let It=kt(e),St=It(e);function Ct(t){e[20](t)}oe=new v_({props:{$$slots:{default:[pw]},$$scope:{ctx:e}}}),le=new v_({props:{$$slots:{default:[mw]},$$scope:{ctx:e}}});let Et={};function zt(t){e[25](t)}void 0!==e[0].upgradeable&&(Et.upgradeable=e[0].upgradeable),de=new ex({props:Et}),Og.push(()=>Bg(de,"upgradeable",Ct)),_e=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/governance#VotesComponent",$$slots:{default:[fw]},$$scope:{ctx:e}}}),Se=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/governance#VotesComponent",$$slots:{default:[gw]},$$scope:{ctx:e}}}),Ue=new v_({props:{$$slots:{default:[hw]},$$scope:{ctx:e}}}),Ze=new v_({props:{$$slots:{default:[vw]},$$scope:{ctx:e}}});let Tt={label:"Timelock",defaultValue:"openzeppelin",helpContent:"Add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions.",$$slots:{default:[$w]},$$scope:{ctx:e}};function Ot(t){e[28](t)}void 0!==e[0].timelock&&(Tt.value=e[0].timelock),Le=new R_({props:Tt}),Og.push(()=>Bg(Le,"value",zt)),We=new v_({props:{$$slots:{default:[yw]},$$scope:{ctx:e}}}),et=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[_w]},$$scope:{ctx:e}}}),ct=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/guides/snip12",$$slots:{default:[xw]},$$scope:{ctx:e}}});let Dt={};function Ut(t){e[29](t)}void 0!==e[0].macros&&(Dt.macros=e[0].macros),mt=new lx({props:Dt}),Og.push(()=>Bg(mt,"macros",Ot));let Nt={errors:e[1]};return void 0!==e[0].info&&(Nt.info=e[0].info),ht=new rx({props:Nt}),Og.push(()=>Bg(ht,"info",Ut)),$t=bg(e[13][1]),yt=bg(e[13][2]),_t=bg(e[13][3]),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),c=fg(),l=dg("div"),u=dg("label"),d=dg("span"),p=dg("span"),p.textContent="Voting Delay",m=fg(),Wg(f.$$.fragment),g=fg(),h=dg("input"),b=fg(),$=dg("label"),y=dg("span"),_=dg("span"),_.textContent="Voting Period",x=fg(),Wg(w.$$.fragment),k=fg(),I=dg("input"),C=fg(),E=dg("label"),z=dg("span"),T=mg("Proposal Threshold\n "),Wg(O.$$.fragment),D=fg(),U=dg("input"),A=fg(),j=dg("label"),R=dg("span"),P=dg("span"),Z=mg("Quorum\n "),M=dg("label"),L=mg("% "),q=dg("input"),V=fg(),F=dg("label"),H=mg("# "),J=dg("input"),G=fg(),Wg(B.$$.fragment),W=fg(),St.c(),K=fg(),X=dg("p"),Q=dg("label"),Y=mg("Token decimals:\n "),ee=dg("input"),ne=fg(),Wg(oe.$$.fragment),re=fg(),ie=dg("div"),ae=dg("label"),se=dg("input"),ce=mg("\n Updatable Settings\n "),Wg(le.$$.fragment),ue=fg(),Wg(de.$$.fragment),me=fg(),fe=dg("section"),ge=dg("h1"),ge.textContent="Votes",he=fg(),ve=dg("div"),be=dg("label"),$e=dg("input"),ye=mg("\n ERC20Votes\n "),Wg(_e.$$.fragment),xe=fg(),we=dg("label"),ke=dg("input"),Ie=mg("\n ERC721Votes\n "),Wg(Se.$$.fragment),Ce=fg(),Ee=dg("section"),ze=dg("h1"),Te=dg("label"),Oe=dg("span"),Oe.textContent="Token Clock Mode",De=fg(),Wg(Ue.$$.fragment),Ne=fg(),Ae=dg("div"),je=dg("label"),Re=dg("input"),Pe=mg("\n Timestamp\n "),Wg(Ze.$$.fragment),Me=fg(),Wg(Le.$$.fragment),Ve=fg(),Fe=dg("section"),He=dg("h1"),Je=dg("label"),Ge=dg("span"),Ge.textContent="SNIP12 Metadata",Be=fg(),Wg(We.$$.fragment),Ke=fg(),Xe=dg("label"),Qe=dg("span"),Ye=mg("Application Name\n "),Wg(et.$$.fragment),tt=fg(),nt=dg("input"),rt=fg(),it=dg("label"),at=dg("span"),st=mg("Application Version\n "),Wg(ct.$$.fragment),lt=fg(),ut=dg("input"),pt=fg(),Wg(mt.$$.fragment),gt=fg(),Wg(ht.$$.fragment),vg(r,"class","labeled-input"),vg(d,"class","flex justify-between"),vg(u,"class","labeled-input"),vg(y,"class","flex justify-between"),vg($,"class","labeled-input"),vg(l,"class","grid grid-cols-2 gap-2"),vg(z,"class","flex justify-between pr-2"),vg(U,"placeholder","0"),vg(E,"class","labeled-input"),vg(q,"type","radio"),q.__value="percent",q.value=q.__value,vg(J,"type","radio"),J.__value="absolute",J.value=J.__value,vg(R,"class","flex justify-between pr-2"),vg(j,"class","labeled-input"),vg(j,"for","quorum-input"),ee.disabled=e[3],vg(ee,"type","number"),vg(ee,"placeholder",e[4].decimals.toString()),vg(ee,"class","input-inline"),vg(Q,"class","text-sm"),vg(X,"class","tooltip-container flex justify-between items-center pr-2"),vg(se,"type","checkbox"),wg(ae,"checked",e[0].settings),vg(ie,"class","checkbox-group"),vg(t,"class","controls-section"),vg($e,"type","radio"),$e.__value="erc20votes",$e.value=$e.__value,wg(be,"checked","erc20votes"===e[0].votes),vg(ke,"type","radio"),ke.__value="erc721votes",ke.value=ke.__value,wg(we,"checked","erc721votes"===e[0].votes),vg(ve,"class","checkbox-group"),vg(fe,"class","controls-section"),vg(Te,"class","flex justify-between items-center tooltip-container pr-2"),vg(Re,"type","radio"),Re.__value="timestamp",Re.value=Re.__value,wg(je,"checked","timestamp"===e[0].clockMode),vg(Ae,"class","checkbox-group"),vg(Ee,"class","controls-section"),vg(Je,"class","flex justify-between items-center tooltip-container pr-2"),vg(Qe,"class","flex justify-between pr-2"),vg(Xe,"class","labeled-input"),vg(at,"class","flex justify-between pr-2"),vg(it,"class","labeled-input"),vg(Fe,"class","controls-section"),$t.p(Re),yt.p($e,ke),_t.p(q,J)},m(pe,qe){lg(pe,t,qe),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),sg(t,c),sg(t,l),sg(l,u),sg(u,d),sg(d,p),sg(d,m),Kg(f,d,null),sg(u,g),sg(u,h),_g(h,e[0].delay),sg(l,b),sg(l,$),sg($,y),sg(y,_),sg(y,x),Kg(w,y,null),sg($,k),sg($,I),_g(I,e[0].period),sg(t,C),sg(t,E),sg(E,z),sg(z,T),Kg(O,z,null),sg(E,D),sg(E,U),_g(U,e[0].proposalThreshold),sg(t,A),sg(t,j),sg(j,R),sg(R,P),sg(P,Z),sg(P,M),sg(M,L),sg(M,q),q.checked=q.__value===e[0].quorumMode,sg(P,V),sg(P,F),sg(F,H),sg(F,J),J.checked=J.__value===e[0].quorumMode,sg(R,G),Kg(B,R,null),sg(j,W),St.m(j,null),sg(t,K),sg(t,X),sg(X,Q),sg(Q,Y),sg(Q,ee),_g(ee,e[0].decimals),sg(X,ne),Kg(oe,X,null),sg(t,re),sg(t,ie),sg(ie,ae),sg(ae,se),se.checked=e[0].settings,sg(ae,ce),Kg(le,ae,null),sg(ie,ue),Kg(de,ie,null),lg(pe,me,qe),lg(pe,fe,qe),sg(fe,ge),sg(fe,he),sg(fe,ve),sg(ve,be),sg(be,$e),$e.checked=$e.__value===e[0].votes,sg(be,ye),Kg(_e,be,null),sg(ve,xe),sg(ve,we),sg(we,ke),ke.checked=ke.__value===e[0].votes,sg(we,Ie),Kg(Se,we,null),lg(pe,Ce,qe),lg(pe,Ee,qe),sg(Ee,ze),sg(ze,Te),sg(Te,Oe),sg(Te,De),Kg(Ue,Te,null),sg(Ee,Ne),sg(Ee,Ae),sg(Ae,je),sg(je,Re),Re.checked=Re.__value===e[0].clockMode,sg(je,Pe),Kg(Ze,je,null),lg(pe,Me,qe),Kg(Le,pe,qe),lg(pe,Ve,qe),lg(pe,Fe,qe),sg(Fe,He),sg(He,Je),sg(Je,Ge),sg(Je,Be),Kg(We,Je,null),sg(Fe,Ke),sg(Fe,Xe),sg(Xe,Qe),sg(Qe,Ye),Kg(et,Qe,null),sg(Xe,tt),sg(Xe,nt),_g(nt,e[0].appName),sg(Fe,rt),sg(Fe,it),sg(it,at),sg(at,st),Kg(ct,at,null),sg(it,lt),sg(it,ut),_g(ut,e[0].appVersion),lg(pe,pt,qe),Kg(mt,pe,qe),lg(pe,gt,qe),Kg(ht,pe,qe),bt=!0,xt||(wt=[hg(s,"input",e[8]),hg(h,"input",e[9]),ag(v=Z_.call(null,h,e[1]?.delay)),hg(I,"input",e[10]),ag(S=Z_.call(null,I,e[1]?.period)),hg(U,"input",e[11]),ag(N=Z_.call(null,U,e[1]?.proposalThreshold)),hg(q,"change",e[12]),hg(J,"change",e[14]),hg(J,"change",e[5]),hg(ee,"input",e[18]),ag(rw.call(null,ee)),ag(te=Z_.call(null,ee,e[1]?.decimals)),hg(se,"change",e[19]),hg($e,"change",e[21]),hg(ke,"change",e[22]),hg(Re,"change",e[23]),hg(nt,"input",e[26]),ag(ot=Z_.call(null,nt,e[1]?.appName)),hg(ut,"input",e[27]),ag(dt=Z_.call(null,ut,e[1]?.appVersion))],xt=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name);const n={};1073741824&t&&(n.$$scope={dirty:t,ctx:e}),f.$set(n),1&t&&h.value!==e[0].delay&&_g(h,e[0].delay),v&&Xf(v.update)&&2&t&&v.update.call(null,e[1]?.delay);const o={};1073741824&t&&(o.$$scope={dirty:t,ctx:e}),w.$set(o),1&t&&I.value!==e[0].period&&_g(I,e[0].period),S&&Xf(S.update)&&2&t&&S.update.call(null,e[1]?.period);const r={};1073741824&t&&(r.$$scope={dirty:t,ctx:e}),O.$set(r),1&t&&U.value!==e[0].proposalThreshold&&_g(U,e[0].proposalThreshold),N&&Xf(N.update)&&2&t&&N.update.call(null,e[1]?.proposalThreshold),1&t&&(q.checked=q.__value===e[0].quorumMode),1&t&&(J.checked=J.__value===e[0].quorumMode);const i={};1073741824&t&&(i.$$scope={dirty:t,ctx:e}),B.$set(i),It===(It=kt(e))&&St?St.p(e,t):(St.d(1),St=It(e),St&&(St.c(),St.m(j,null))),(!bt||8&t)&&(ee.disabled=e[3]),1&t&&$g(ee.value)!==e[0].decimals&&_g(ee,e[0].decimals),te&&Xf(te.update)&&2&t&&te.update.call(null,e[1]?.decimals);const a={};1073741824&t&&(a.$$scope={dirty:t,ctx:e}),oe.$set(a),1&t&&(se.checked=e[0].settings);const c={};1073741824&t&&(c.$$scope={dirty:t,ctx:e}),le.$set(c),(!bt||1&t)&&wg(ae,"checked",e[0].settings);const l={};!pe&&1&t&&(pe=!0,l.upgradeable=e[0].upgradeable,Rg(()=>pe=!1)),de.$set(l),1&t&&($e.checked=$e.__value===e[0].votes);const u={};1073741824&t&&(u.$$scope={dirty:t,ctx:e}),_e.$set(u),(!bt||1&t)&&wg(be,"checked","erc20votes"===e[0].votes),1&t&&(ke.checked=ke.__value===e[0].votes);const d={};1073741824&t&&(d.$$scope={dirty:t,ctx:e}),Se.$set(d),(!bt||1&t)&&wg(we,"checked","erc721votes"===e[0].votes);const p={};1073741824&t&&(p.$$scope={dirty:t,ctx:e}),Ue.$set(p),1&t&&(Re.checked=Re.__value===e[0].clockMode);const m={};1073741824&t&&(m.$$scope={dirty:t,ctx:e}),Ze.$set(m),(!bt||1&t)&&wg(je,"checked","timestamp"===e[0].clockMode);const g={};1073741825&t&&(g.$$scope={dirty:t,ctx:e}),!qe&&1&t&&(qe=!0,g.value=e[0].timelock,Rg(()=>qe=!1)),Le.$set(g);const b={};1073741824&t&&(b.$$scope={dirty:t,ctx:e}),We.$set(b);const $={};1073741824&t&&($.$$scope={dirty:t,ctx:e}),et.$set($),1&t&&nt.value!==e[0].appName&&_g(nt,e[0].appName),ot&&Xf(ot.update)&&2&t&&ot.update.call(null,e[1]?.appName);const y={};1073741824&t&&(y.$$scope={dirty:t,ctx:e}),ct.$set(y),1&t&&ut.value!==e[0].appVersion&&_g(ut,e[0].appVersion),dt&&Xf(dt.update)&&2&t&&dt.update.call(null,e[1]?.appVersion);const _={};!ft&&1&t&&(ft=!0,_.macros=e[0].macros,Rg(()=>ft=!1)),mt.$set(_);const x={};2&t&&(x.errors=e[1]),!vt&&1&t&&(vt=!0,x.info=e[0].info,Rg(()=>vt=!1)),ht.$set(x)},i(e){bt||(Jg(f.$$.fragment,e),Jg(w.$$.fragment,e),Jg(O.$$.fragment,e),Jg(B.$$.fragment,e),Jg(oe.$$.fragment,e),Jg(le.$$.fragment,e),Jg(de.$$.fragment,e),Jg(_e.$$.fragment,e),Jg(Se.$$.fragment,e),Jg(Ue.$$.fragment,e),Jg(Ze.$$.fragment,e),Jg(Le.$$.fragment,e),Jg(We.$$.fragment,e),Jg(et.$$.fragment,e),Jg(ct.$$.fragment,e),Jg(mt.$$.fragment,e),Jg(ht.$$.fragment,e),bt=!0)},o(e){Gg(f.$$.fragment,e),Gg(w.$$.fragment,e),Gg(O.$$.fragment,e),Gg(B.$$.fragment,e),Gg(oe.$$.fragment,e),Gg(le.$$.fragment,e),Gg(de.$$.fragment,e),Gg(_e.$$.fragment,e),Gg(Se.$$.fragment,e),Gg(Ue.$$.fragment,e),Gg(Ze.$$.fragment,e),Gg(Le.$$.fragment,e),Gg(We.$$.fragment,e),Gg(et.$$.fragment,e),Gg(ct.$$.fragment,e),Gg(mt.$$.fragment,e),Gg(ht.$$.fragment,e),bt=!1},d(e){e&&ug(t),Xg(f),Xg(w),Xg(O),Xg(B),St.d(),Xg(oe),Xg(le),Xg(de),e&&ug(me),e&&ug(fe),Xg(_e),Xg(Se),e&&ug(Ce),e&&ug(Ee),Xg(Ue),Xg(Ze),e&&ug(Me),Xg(Le,e),e&&ug(Ve),e&&ug(Fe),Xg(We),Xg(et),Xg(ct),e&&ug(pt),Xg(mt,e),e&&ug(gt),Xg(ht,e),$t.r(),yt.r(),_t.r(),xt=!1,Kf(wt)}}}function kw(e,t,n){const o=Pb.defaults;let r,{opts:i={kind:"Governor",...o,proposalThreshold:"",quorumAbsolute:"",info:{...lv},macros:{...dv}}}=t;let a,{errors:s}=t,c="erc721votes"===i.votes,l=i.decimals;return e.$$set=e=>{"opts"in e&&n(0,i=e.opts),"errors"in e&&n(1,s=e.errors)},e.$$.update=()=>{193&e.$$.dirty&&(c&&"erc721votes"!==i.votes?(n(0,i.decimals=l,i),n(3,a=!1)):c||"erc721votes"!==i.votes||(n(7,l=i.decimals),n(0,i.decimals=0,i),n(3,a=!0)),n(6,c="erc721votes"===i.votes))},[i,s,r,a,o,()=>{if(s){const e=s,t=s.quorumAbsolute;n(1,s.quorumAbsolute=void 0,s),r.focus(),setTimeout(()=>{s===e&&n(1,s.quorumAbsolute=t,s)},1e3)}},c,l,function(){i.name=this.value,n(0,i),n(6,c),n(7,l)},function(){i.delay=this.value,n(0,i),n(6,c),n(7,l)},function(){i.period=this.value,n(0,i),n(6,c),n(7,l)},function(){i.proposalThreshold=this.value,n(0,i),n(6,c),n(7,l)},function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},[[],[],[],[]],function(){i.quorumMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.quorumPercent=$g(this.value),n(0,i),n(6,c),n(7,l)},function(){i.quorumAbsolute=this.value,n(0,i),n(6,c),n(7,l)},function(e){Og[e?"unshift":"push"](()=>{r=e,n(2,r)})},function(){i.decimals=$g(this.value),n(0,i),n(6,c),n(7,l)},function(){i.settings=this.checked,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.upgradeable,t)&&(i.upgradeable=t,n(0,i),n(6,c),n(7,l))},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.votes=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.clockMode=this.__value,n(0,i),n(6,c),n(7,l)},function(){i.timelock=this.__value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.timelock,t)&&(i.timelock=t,n(0,i),n(6,c),n(7,l))},function(){i.appName=this.value,n(0,i),n(6,c),n(7,l)},function(){i.appVersion=this.value,n(0,i),n(6,c),n(7,l)},function(t){e.$$.not_equal(i.macros,t)&&(i.macros=t,n(0,i),n(6,c),n(7,l))},function(t){e.$$.not_equal(i.info,t)&&(i.info=t,n(0,i),n(6,c),n(7,l))}]}function Iw(e){let t;return{c(){t=mg("The timestamp marking the beginning of the vesting period.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Sw(e){let t;return{c(){t=mg("The total duration of the vesting period.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Cw(e){let t;return{c(){t=mg("The duration of the cliff period. Must be less than or equal to the total duration.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Ew(e){let t;return{c(){t=mg("A vesting schedule implementation when tokens are vested gradually following a linear curve.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function zw(e){let t;return{c(){t=mg("A custom vesting schedule that requires the implementation of the VestingSchedule trait.")},m(e,n){lg(e,t,n)},d(e){e&&ug(t)}}}function Tw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A,j,R,P,Z,M,L,q,V,F,H,J,G,B,W,K,X,Q,Y,ee,te;function ne(t){e[9](t)}p=new v_({props:{$$slots:{default:[Iw]},$$scope:{ctx:e}}}),y=new v_({props:{$$slots:{default:[Sw]},$$scope:{ctx:e}}}),E=new v_({props:{$$slots:{default:[Cw]},$$scope:{ctx:e}}}),M=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/finance#LinearVestingSchedule",$$slots:{default:[Ew]},$$scope:{ctx:e}}}),H=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/api/finance#VestingComponent-Vesting-Schedule",$$slots:{default:[zw]},$$scope:{ctx:e}}});let oe={};function re(t){e[10](t)}void 0!==e[0].macros&&(oe.macros=e[0].macros),G=new lx({props:oe}),Og.push(()=>Bg(G,"macros",ne));let ie={errors:e[1]};return void 0!==e[0].info&&(ie.info=e[0].info),K=new rx({props:ie}),Og.push(()=>Bg(K,"info",re)),Y=bg(e[7][0]),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),c=fg(),l=dg("label"),u=dg("span"),d=mg("Start date (UTC)\n "),Wg(p.$$.fragment),m=fg(),f=dg("input"),h=fg(),v=dg("label"),b=dg("span"),$=mg("Duration\n "),Wg(y.$$.fragment),_=fg(),x=dg("input"),k=fg(),I=dg("label"),S=dg("span"),C=mg("Cliff duration\n "),Wg(E.$$.fragment),z=fg(),T=dg("input"),D=fg(),U=dg("section"),N=dg("h1"),N.textContent="Vesting Schedule",A=fg(),j=dg("div"),R=dg("label"),P=dg("input"),Z=mg("\n Linear\n "),Wg(M.$$.fragment),L=fg(),q=dg("label"),V=dg("input"),F=mg("\n Custom\n "),Wg(H.$$.fragment),J=fg(),Wg(G.$$.fragment),W=fg(),Wg(K.$$.fragment),vg(r,"class","labeled-input"),vg(u,"class","flex justify-between pr-2"),vg(f,"type","datetime-local"),vg(f,"placeholder",""),vg(l,"class","labeled-input"),vg(b,"class","flex justify-between pr-2"),vg(x,"placeholder","0"),vg(v,"class","labeled-input"),vg(S,"class","flex justify-between pr-2"),vg(T,"placeholder","0"),vg(I,"class","labeled-input"),vg(t,"class","controls-section"),vg(P,"type","radio"),P.__value="linear",P.value=P.__value,wg(R,"checked","linear"===e[0].schedule),vg(V,"type","radio"),V.__value="custom",V.value=V.__value,wg(q,"checked","custom"===e[0].schedule),vg(j,"class","checkbox-group"),vg(U,"class","controls-section"),Y.p(P,V)},m(B,X){lg(B,t,X),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),sg(t,c),sg(t,l),sg(l,u),sg(u,d),Kg(p,u,null),sg(l,m),sg(l,f),_g(f,e[0].startDate),sg(t,h),sg(t,v),sg(v,b),sg(b,$),Kg(y,b,null),sg(v,_),sg(v,x),_g(x,e[0].duration),sg(t,k),sg(t,I),sg(I,S),sg(S,C),Kg(E,S,null),sg(I,z),sg(I,T),_g(T,e[0].cliffDuration),lg(B,D,X),lg(B,U,X),sg(U,N),sg(U,A),sg(U,j),sg(j,R),sg(R,P),P.checked=P.__value===e[0].schedule,sg(R,Z),Kg(M,R,null),sg(j,L),sg(j,q),sg(q,V),V.checked=V.__value===e[0].schedule,sg(q,F),Kg(H,q,null),lg(B,J,X),Kg(G,B,X),lg(B,W,X),Kg(K,B,X),Q=!0,ee||(te=[hg(s,"input",e[2]),hg(f,"input",e[3]),ag(g=Z_.call(null,f,e[1]?.startDate)),hg(x,"input",e[4]),ag(w=Z_.call(null,x,e[1]?.duration)),hg(T,"input",e[5]),ag(O=Z_.call(null,T,e[1]?.cliffDuration)),hg(P,"change",e[6]),hg(V,"change",e[8])],ee=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name);const n={};2048&t&&(n.$$scope={dirty:t,ctx:e}),p.$set(n),1&t&&_g(f,e[0].startDate),g&&Xf(g.update)&&2&t&&g.update.call(null,e[1]?.startDate);const o={};2048&t&&(o.$$scope={dirty:t,ctx:e}),y.$set(o),1&t&&x.value!==e[0].duration&&_g(x,e[0].duration),w&&Xf(w.update)&&2&t&&w.update.call(null,e[1]?.duration);const r={};2048&t&&(r.$$scope={dirty:t,ctx:e}),E.$set(r),1&t&&T.value!==e[0].cliffDuration&&_g(T,e[0].cliffDuration),O&&Xf(O.update)&&2&t&&O.update.call(null,e[1]?.cliffDuration),1&t&&(P.checked=P.__value===e[0].schedule);const i={};2048&t&&(i.$$scope={dirty:t,ctx:e}),M.$set(i),(!Q||1&t)&&wg(R,"checked","linear"===e[0].schedule),1&t&&(V.checked=V.__value===e[0].schedule);const a={};2048&t&&(a.$$scope={dirty:t,ctx:e}),H.$set(a),(!Q||1&t)&&wg(q,"checked","custom"===e[0].schedule);const c={};!B&&1&t&&(B=!0,c.macros=e[0].macros,Rg(()=>B=!1)),G.$set(c);const l={};2&t&&(l.errors=e[1]),!X&&1&t&&(X=!0,l.info=e[0].info,Rg(()=>X=!1)),K.$set(l)},i(e){Q||(Jg(p.$$.fragment,e),Jg(y.$$.fragment,e),Jg(E.$$.fragment,e),Jg(M.$$.fragment,e),Jg(H.$$.fragment,e),Jg(G.$$.fragment,e),Jg(K.$$.fragment,e),Q=!0)},o(e){Gg(p.$$.fragment,e),Gg(y.$$.fragment,e),Gg(E.$$.fragment,e),Gg(M.$$.fragment,e),Gg(H.$$.fragment,e),Gg(G.$$.fragment,e),Gg(K.$$.fragment,e),Q=!1},d(e){e&&ug(t),Xg(p),Xg(y),Xg(E),e&&ug(D),e&&ug(U),Xg(M),Xg(H),e&&ug(J),Xg(G,e),e&&ug(W),Xg(K,e),Y.r(),ee=!1,Kf(te)}}}function Ow(e,t,n){let{opts:o={kind:"Vesting",...Zb.defaults,info:{...lv},macros:{...dv}}}=t,{errors:r}=t;return e.$$set=e=>{"opts"in e&&n(0,o=e.opts),"errors"in e&&n(1,r=e.errors)},[o,r,function(){o.name=this.value,n(0,o)},function(){o.startDate=this.value,n(0,o)},function(){o.duration=this.value,n(0,o)},function(){o.cliffDuration=this.value,n(0,o)},function(){o.schedule=this.__value,n(0,o)},[[]],function(){o.schedule=this.__value,n(0,o)},function(t){e.$$.not_equal(o.macros,t)&&(o.macros=t,n(0,o))},function(t){e.$$.not_equal(o.info,t)&&(o.info=t,n(0,o))}]}function Dw(e){let t,n,o;return{c(){t=mg("Privileged accounts will be able to pause the functionality marked with "),n=dg("code"),n.textContent="self.pausable.assert_not_paused()",o=mg(". Useful for emergency response.")},m(e,r){lg(e,t,r),lg(e,n,r),lg(e,o,r)},p:Jf,d(e){e&&ug(t),e&&ug(n),e&&ug(o)}}}function Uw(e){let t,n,o,r,i,a,s,c,l,u,d,p,m,f,g,h,v,b,$,y,_,x,w,k,I,S,C,E,z,T,O,D,U,N,A;function j(t){e[5](t)}v=new v_({props:{link:"https://docs.openzeppelin.com/contracts-cairo/3.x/security#pausable",$$slots:{default:[Dw]},$$scope:{ctx:e}}});let R={};function P(t){e[6](t)}function Z(t){e[7](t)}function M(t){e[8](t)}function L(t){e[9](t)}void 0!==e[0].upgradeable&&(R.upgradeable=e[0].upgradeable),$=new ex({props:R}),Og.push(()=>Bg($,"upgradeable",j));let q={required:e[2],errors:e[1]};function V(t){e[10](t)}void 0!==e[0].access.type&&(q.accessType=e[0].access.type),void 0!==e[0].access.darInitialDelay&&(q.darInitialDelay=e[0].access.darInitialDelay),void 0!==e[0].access.darDefaultDelayIncrease&&(q.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease),void 0!==e[0].access.darMaxTransferDelay&&(q.darMaxTransferDelay=e[0].access.darMaxTransferDelay),x=new K_({props:q}),Og.push(()=>Bg(x,"accessType",P)),Og.push(()=>Bg(x,"darInitialDelay",Z)),Og.push(()=>Bg(x,"darDefaultDelayIncrease",M)),Og.push(()=>Bg(x,"darMaxTransferDelay",L));let F={};function H(t){e[11](t)}void 0!==e[0].macros&&(F.macros=e[0].macros),E=new lx({props:F}),Og.push(()=>Bg(E,"macros",V));let J={errors:e[1]};return void 0!==e[0].info&&(J.info=e[0].info),O=new rx({props:J}),Og.push(()=>Bg(O,"info",H)),{c(){t=dg("section"),n=dg("h1"),n.textContent="Settings",o=fg(),r=dg("label"),i=dg("span"),i.textContent="Name",a=fg(),s=dg("input"),l=fg(),u=dg("section"),d=dg("h1"),d.textContent="Features",p=fg(),m=dg("div"),f=dg("label"),g=dg("input"),h=mg("\n Pausable\n "),Wg(v.$$.fragment),b=fg(),Wg($.$$.fragment),_=fg(),Wg(x.$$.fragment),C=fg(),Wg(E.$$.fragment),T=fg(),Wg(O.$$.fragment),vg(r,"class","labeled-input"),vg(t,"class","controls-section"),vg(g,"type","checkbox"),wg(f,"checked",e[0].pausable),vg(m,"class","checkbox-group"),vg(u,"class","controls-section")},m(y,w){lg(y,t,w),sg(t,n),sg(t,o),sg(t,r),sg(r,i),sg(r,a),sg(r,s),_g(s,e[0].name),lg(y,l,w),lg(y,u,w),sg(u,d),sg(u,p),sg(u,m),sg(m,f),sg(f,g),g.checked=e[0].pausable,sg(f,h),Kg(v,f,null),sg(m,b),Kg($,m,null),lg(y,_,w),Kg(x,y,w),lg(y,C,w),Kg(E,y,w),lg(y,T,w),Kg(O,y,w),U=!0,N||(A=[hg(s,"input",e[3]),ag(c=Z_.call(null,s,e[1]?.name)),hg(g,"change",e[4])],N=!0)},p(e,[t]){1&t&&s.value!==e[0].name&&_g(s,e[0].name),c&&Xf(c.update)&&2&t&&c.update.call(null,e[1]?.name),1&t&&(g.checked=e[0].pausable);const n={};4096&t&&(n.$$scope={dirty:t,ctx:e}),v.$set(n),(!U||1&t)&&wg(f,"checked",e[0].pausable);const o={};!y&&1&t&&(y=!0,o.upgradeable=e[0].upgradeable,Rg(()=>y=!1)),$.$set(o);const r={};4&t&&(r.required=e[2]),2&t&&(r.errors=e[1]),!w&&1&t&&(w=!0,r.accessType=e[0].access.type,Rg(()=>w=!1)),!k&&1&t&&(k=!0,r.darInitialDelay=e[0].access.darInitialDelay,Rg(()=>k=!1)),!I&&1&t&&(I=!0,r.darDefaultDelayIncrease=e[0].access.darDefaultDelayIncrease,Rg(()=>I=!1)),!S&&1&t&&(S=!0,r.darMaxTransferDelay=e[0].access.darMaxTransferDelay,Rg(()=>S=!1)),x.$set(r);const i={};!z&&1&t&&(z=!0,i.macros=e[0].macros,Rg(()=>z=!1)),E.$set(i);const a={};2&t&&(a.errors=e[1]),!D&&1&t&&(D=!0,a.info=e[0].info,Rg(()=>D=!1)),O.$set(a)},i(e){U||(Jg(v.$$.fragment,e),Jg($.$$.fragment,e),Jg(x.$$.fragment,e),Jg(E.$$.fragment,e),Jg(O.$$.fragment,e),U=!0)},o(e){Gg(v.$$.fragment,e),Gg($.$$.fragment,e),Gg(x.$$.fragment,e),Gg(E.$$.fragment,e),Gg(O.$$.fragment,e),U=!1},d(e){e&&ug(t),e&&ug(l),e&&ug(u),Xg(v),Xg($),e&&ug(_),Xg(x,e),e&&ug(C),Xg(E,e),e&&ug(T),Xg(O,e),N=!1,Kf(A)}}}function Nw(e,t,n){let o,{opts:r={kind:"Custom",...Mb.defaults,info:{...lv},macros:{...dv},access:{...Mb.defaults.access}}}=t,{errors:i}=t;return e.$$set=e=>{"opts"in e&&n(0,r=e.opts),"errors"in e&&n(1,i=e.errors)},e.$$.update=()=>{1&e.$$.dirty&&n(2,o=Mb.isAccessControlRequired(r))},[r,i,o,function(){r.name=this.value,n(0,r)},function(){r.pausable=this.checked,n(0,r)},function(t){e.$$.not_equal(r.upgradeable,t)&&(r.upgradeable=t,n(0,r))},function(t){e.$$.not_equal(r.access.type,t)&&(r.access.type=t,n(0,r))},function(t){e.$$.not_equal(r.access.darInitialDelay,t)&&(r.access.darInitialDelay=t,n(0,r))},function(t){e.$$.not_equal(r.access.darDefaultDelayIncrease,t)&&(r.access.darDefaultDelayIncrease=t,n(0,r))},function(t){e.$$.not_equal(r.access.darMaxTransferDelay,t)&&(r.access.darMaxTransferDelay=t,n(0,r))},function(t){e.$$.not_equal(r.macros,t)&&(r.macros=t,n(0,r))},function(t){e.$$.not_equal(r.info,t)&&(r.info=t,n(0,r))}]}const Aw={ERC20:class extends eh{constructor(e){super(),Yg(this,e,wx,xx,Qf,{opts:0,errors:1})}},ERC721:class extends eh{constructor(e){super(),Yg(this,e,Zx,Px,Qf,{opts:0,errors:1})}},ERC1155:class extends eh{constructor(e){super(),Yg(this,e,Jx,Hx,Qf,{opts:0,errors:1})}},Account:class extends eh{constructor(e){super(),Yg(this,e,ew,Yx,Qf,{opts:0,errors:1,accountType:2})}},Multisig:class extends eh{constructor(e){super(),Yg(this,e,ow,nw,Qf,{opts:0,errors:1})}},Governor:class extends eh{constructor(e){super(),Yg(this,e,kw,ww,Qf,{opts:0,errors:1})}},Vesting:class extends eh{constructor(e){super(),Yg(this,e,Ow,Tw,Qf,{opts:0,errors:1})}},Custom:class extends eh{constructor(e){super(),Yg(this,e,Nw,Uw,Qf,{opts:0,errors:1})}}},jw={emptyContract:()=>new qh("MyToken",{withComponents:dv.withComponents}),build:e=>function(e){switch(e.kind){case"ERC20":return Kv(e);case"ERC721":return ib(e);case"ERC1155":return lb(e);case"Account":return gb(e);case"Multisig":return Eb(e);case"Governor":return xb(e);case"Vesting":return Ob(e);case"Custom":return mb(e);default:throw new Error("Unknown ERC")}}(e),print:e=>Dv(e),optionsErrors:e=>e instanceof Uh?e.messages:void 0,highlight:e=>Kb.highlight("cairo",e).value,injectHyperlinks:function(e){const t=/use<\/span> (openzeppelin)::([^A-Z]*)(::[a-zA-Z0-9]+|::{)/g;let n=e,o=t.exec(e);for(;null!=o;){const[r,i,a,s]=o;if(void 0!==r&&void 0!==i&&void 0!==a&&void 0!==s){const e="https://github.com/OpenZeppelin/cairo-contracts/blob/v3.0.0/packages/",t=a.split("::");if(t.splice(1,0,"src"),void 0!==t&&t.length>0){let o;if("::{"===s)o=`use</span> <a class="import-link" href='${e}${t.join("/")}.cairo' target='_blank' rel='noopener noreferrer'>${i}::${a}</a>${s}`;else{const n=s.substring(2,s.length),r=e$[n],c=r?`/${r}.cairo`:".cairo";o=`use</span> <a class="import-link" href='${e}${t.join("/")}${c}' target='_blank' rel='noopener noreferrer'>${i}::${a}${s}</a>`}n=n.replace(r,o)}}o=t.exec(e)}return n},highlightClass:"-cairo",fence:"cairo",controls:Aw,controlProps:(e,t)=>"Account"===e?{accountType:t?.type}:{}};!async function(e,t,n=document.body){const o=new Hf({name:`OpenZeppelin ${t}`,version:"1.0.0"},{},{autoResize:!1});document.documentElement.style.setProperty("--mcp-app-height","560px");const r=new Dh({target:n,props:{adapter:e,kind:t,mcpApp:o}}),i=new bf(window.parent,window.parent);o.connect(i).then(async()=>{const e=ih(o);console.info(`[mcp-apps] connected (${t}) hostCapabilities`,o.getHostCapabilities()),r.$set({hostConnected:!0,hostConnectError:void 0,hostSendCaps:e}),await o.sendSizeChanged({height:560})}).catch(e=>{const n=e instanceof Error?e.message:String(e);console.error(`[mcp-apps] connect failed for ${t}`,e),r.$set({hostConnected:!1,hostConnectError:n})})}(jw,"Vesting")}();
17
-
18
- </script>
19
- </body>
20
- </html>