PageSourceSearch

https://www.joinkudos.com/6835.cedfa6264dab15795af2.js

js joinkudos.com collected 2026-09-24 10:00:28 UTC 112,433 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5a21ce50-736b-432f-bab3-183b10112592",e._sentryDebugIdIdentifier="sentry-dbid-5a21ce50-736b-432f-bab3-183b10112592")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"2b92991d99f92e33e079a8241d5dc3965c249983"},(self.webpackChunkkudos_portal=self.webpackChunkkudos_portal||[]).push([[6835],{4848:(e,t,n)=>{n.d(t,{BC:()=>P,C6:()=>C,Dz:()=>r.Dz,J$:()=>r.J$,Jo:()=>ee,Lb:()=>q,Qk:()=>r.Qk,T8:()=>D,Z4:()=>$,i7:()=>I,n5:()=>z,pM:()=>N,tO:()=>S,w4:()=>h,x4:()=>O,xI:()=>ue,yn:()=>_});var r=n(78246),o=n(81144),i=o.KC([o.ai(),o.Ik({$state:o.Yj()})]),s={eq:o.L5().optional(),neq:o.L5().optional(),gt:i.optional(),gte:i.optional(),lt:i.optional(),lte:i.optional(),not:o.eu(!0).optional()},a=o.Ik({$state:o.Yj(),...s}),c=o.Ik({$item:o.Yj(),...s}),l=o.Ik({$index:o.eu(!0),...s}),u=o.KC([a,c,l]),p=o.RZ(()=>o.KC([o.zM(),u,o.YO(u),o.Ik({$and:o.YO(p)}),o.Ik({$or:o.YO(p)})]));function f(e,t){return"object"==typeof e&&null!==e&&"$state"in e&&"string"==typeof e.$state?(0,r.Dz)(t.stateModel,e.$state):e}function d(e,t){const n=function(e,t){if(function(e){return"$index"in e}(e))return t.repeatIndex;if(function(e){return"$item"in e}(e)){if(void 0===t.repeatItem)return;return""===e.$item?t.repeatItem:(0,r.Dz)(t.repeatItem,e.$item)}return(0,r.Dz)(t.stateModel,e.$state)}(e,t);let o;if(void 0!==e.eq){o=n===f(e.eq,t)}else if(void 0!==e.neq){o=n!==f(e.neq,t)}else if(void 0!==e.gt){const r=f(e.gt,t);o="number"==typeof n&&"number"==typeof r&&n>r}else if(void 0!==e.gte){const r=f(e.gte,t);o="number"==typeof n&&"number"==typeof r&&n>=r}else if(void 0!==e.lt){const r=f(e.lt,t);o="number"==typeof n&&"number"==typeof r&&n<r}else if(void 0!==e.lte){const r=f(e.lte,t);o="number"==typeof n&&"number"==typeof r&&n<=r}else o=Boolean(n);return!0===e.not?!o:o}function h(e,t){return void 0===e||("boolean"==typeof e?e:Array.isArray(e)?e.every(e=>d(e,t)):function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&"$and"in e}(e)?e.$and.every(e=>h(e,t)):function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&"$or"in e}(e)?e.$or.some(e=>h(e,t)):d(e,t))}function m(e){return"object"==typeof e&&null!==e&&"$item"in e&&"string"==typeof e.$item}function g(e){return"object"==typeof e&&null!==e&&"$index"in e&&!0===e.$index}function y(e){return"object"==typeof e&&null!==e&&"$bindState"in e&&"string"==typeof e.$bindState}function b(e){return"object"==typeof e&&null!==e&&"$bindItem"in e&&"string"==typeof e.$bindItem}var v=100,k=new Set;function x(e,t){if(null!=t.repeatBasePath)return""===e?t.repeatBasePath:t.repeatBasePath+"/"+e}function w(e,t){if(null==e)return e;if(function(e){return"object"==typeof e&&null!==e&&"$state"in e&&"string"==typeof e.$state}(e))return(0,r.Dz)(t.stateModel,e.$state);if(m(e)){if(void 0===t.repeatItem)return;return""===e.$item?t.repeatItem:(0,r.Dz)(t.repeatItem,e.$item)}if(g(e))return t.repeatIndex;if(y(e))return(0,r.Dz)(t.stateModel,e.$bindState);if(b(e)){const n=x(e.$bindItem,t);if(void 0===n)return;return(0,r.Dz)(t.stateModel,n)}if(function(e){return"object"==typeof e&&null!==e&&"$cond"in e&&"$then"in e&&"$else"in e}(e)){return w(h(e.$cond,t)?e.$then:e.$else,t)}if(function(e){return"object"==typeof e&&null!==e&&"$computed"in e&&"string"==typeof e.$computed}(e)){const n=t.functions?.[e.$computed];if(!n)return void(k.has(e.$computed)||k.size<v&&k.add(e.$computed));const r={};if(e.args)for(const[n,o]of Object.entries(e.args))r[n]=w(o,t);return n(r)}if(function(e){return"object"==typeof e&&null!==e&&"$template"in e&&"string"==typeof e.$template}(e))return e.$template.replace(/\$\{([^}]+)\}/g,(e,n)=>{if(n.startsWith("/")){const e=(0,r.Dz)(t.stateModel,n);return null!=e?String(e):""}if(void 0!==t.repeatItem){const e=(0,r.Dz)(t.repeatItem,n);if(null!=e)return String(e)}const o=(0,r.Dz)(t.stateModel,"/"+n);return null!=o?String(o):""});if(Array.isArray(e))return e.map(e=>w(e,t));if("object"==typeof e){const n={};for(const[r,o]of Object.entries(e))n[r]=w(o,t);return n}return e}function S(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=w(o,t);return n}function O(e,t){let n;for(const[r,o]of Object.entries(e))if(y(o))n||(n={}),n[r]=o.$bindState;else if(b(o)){const e=x(o.$bindItem,t);void 0!==e&&(n||(n={}),n[r]=e)}return n}function I(e,t){return m(e)?x(e.$item,t):g(e)?t.repeatIndex:w(e,t)}var j=new Set;function C(e){for(const t of j){const n=t.onDispatch;if(n)try{n(e)}catch(e){0}}}function $(e){for(const t of j){const n=t.onSettle;if(n)try{n(e)}catch(e){0}}}var A=0;function N(){return A+=1,`${Date.now()}-${A}`}var T=0,E=new Set;function P(){return T>0}function D(e){return E.add(e),()=>{E.delete(e)}}var L=o.Ik({title:o.Yj(),message:o.Yj(),confirmLabel:o.Yj().optional(),cancelLabel:o.Yj().optional(),variant:o.k5(["default","danger"]).optional()}),F=o.KC([o.Ik({navigate:o.Yj()}),o.Ik({set:o.g1(o.Yj(),o.L5())}),o.Ik({action:o.Yj()})]),R=o.KC([o.Ik({set:o.g1(o.Yj(),o.L5())}),o.Ik({action:o.Yj()})]);o.Ik({action:o.Yj(),params:o.g1(o.Yj(),r.i0).optional(),confirm:L.optional(),onSuccess:F.optional(),onError:R.optional(),preventDefault:o.zM().optional()});function z(e,t){const n={};if(e.params)for(const[o,i]of Object.entries(e.params))n[o]=(0,r.h2)(i,t);let o=e.confirm;return o&&(o={...o,message:M(o.message,t),title:M(o.title,t)}),{action:e.action,params:n,confirm:o,onSuccess:e.onSuccess,onError:e.onError}}function M(e,t){return e.replace(/\$\{([^}]+)\}/g,(e,n)=>{const o=(0,r.h2)({$state:n},t);return String(o??"")})}async function _(e){const{action:t,handler:n,setState:r,navigate:o,executeAction:i}=e;try{if(await n(t.params),t.onSuccess)if("navigate"in t.onSuccess&&o)o(t.onSuccess.navigate);else if("set"in t.onSuccess)for(const[e,n]of Object.entries(t.onSuccess.set))r(e,n);else"action"in t.onSuccess&&i&&await i(t.onSuccess.action)}catch(e){if(!t.onError)throw e;if("set"in t.onError)for(const[n,o]of Object.entries(t.onError.set)){r(n,"string"==typeof o&&"$error.message"===o?e.message:o)}else"action"in t.onError&&i&&await i(t.onError.action)}}var Z=o.Ik({type:o.Yj(),args:o.g1(o.Yj(),r.i0).optional(),message:o.Yj()}),J=(o.Ik({checks:o.YO(Z).optional(),validateOn:o.k5(["change","blur","submit"]).optional(),enabled:p.optional()}),(e,t)=>{const n=t?.other;return e===n}),U={required:e=>null!=e&&("string"==typeof e?e.trim().length>0:!Array.isArray(e)||e.length>0),email:e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),minLength:(e,t)=>{if("string"!=typeof e)return!1;const n=t?.min;return"number"==typeof n&&e.length>=n},maxLength:(e,t)=>{if("string"!=typeof e)return!1;const n=t?.max;return"number"==typeof n&&e.length<=n},pattern:(e,t)=>{if("string"!=typeof e)return!1;const n=t?.pattern;if("string"!=typeof n)return!1;try{return new RegExp(n).test(e)}catch{return!1}},min:(e,t)=>{if("number"!=typeof e)return!1;const n=t?.min;return"number"==typeof n&&e>=n},max:(e,t)=>{if("number"!=typeof e)return!1;const n=t?.max;return"number"==typeof n&&e<=n},numeric:e=>"number"==typeof e?!isNaN(e):"string"==typeof e&&!isNaN(parseFloat(e)),url:e=>{if("string"!=typeof e)return!1;try{return new URL(e),!0}catch{return!1}},matches:J,equalTo:J,lessThan:(e,t)=>{const n=t?.other;if(null==e||null==n||""===e||""===n)return!1;if("number"==typeof e&&"number"==typeof n)return e<n;if("string"==typeof e&&"string"==typeof n)return e<n;const r=Number(e),o=Number(n);return!isNaN(r)&&!isNaN(o)&&r<o},greaterThan:(e,t)=>{const n=t?.other;if(null==e||null==n||""===e||""===n)return!1;if("number"==typeof e&&"number"==typeof n)return e>n;if("string"==typeof e&&"string"==typeof n)return e>n;const r=Number(e),o=Number(n);return!isNaN(r)&&!isNaN(o)&&r>o},requiredIf:(e,t)=>
1{const n=t?.field;return!n||null!=e&&("string"==typeof e?e.trim().length>0:!Array.isArray(e)||e.length>0)}};function Y(e,t){const{value:n,stateModel:r,customFunctions:o}=t,i={};if(e.args)for(const[t,n]of Object.entries(e.args))i[t]=w(n,{stateModel:r});const s=U[e.type]??o?.[e.type];if(!s)return{type:e.type,valid:!0,message:e.message};const a=s(n,i);return{type:e.type,valid:a,message:e.message}}function q(e,t){const n=[],r=[];if(e.enabled){if(!h(e.enabled,{stateModel:t.stateModel}))return{valid:!0,errors:[],checks:[]}}if(e.checks)for(const o of e.checks){const e=Y(o,t);n.push(e),e.valid||r.push(e.message)}return{valid:0===r.length,errors:r,checks:n}}var B=["patch"];function W(e){return e?.modes?.length?e.modes:B}function V(){return["PATCH MODE (RFC 6902 JSON Patch):","Output one JSON object per line. Each line is a patch operation.",'- Add: {"op":"add","path":"/elements/new-key","value":{...}}','- Replace: {"op":"replace","path":"/elements/existing-key","value":{...}}','- Remove: {"op":"remove","path":"/elements/old-key"}',"Only output patches for what needs to change."].join("\n")}function H(){return["MERGE MODE (RFC 7396 JSON Merge Patch):","Output a single JSON object on one line with __json_edit set to true.","Include only the keys that changed. Unmentioned keys are preserved.","Set a key to null to delete it.","","Example (update a title and add an element):",'{"__json_edit":true,"elements":{"main":{"props":{"title":"New Title"}},"new-el":{"type":"Card","props":{},"children":[]}}}',"","Example (delete an element):",'{"__json_edit":true,"elements":{"old-widget":null}}'].join("\n")}function K(){return["DIFF MODE (unified diff):","Output a unified diff inside a ```diff code fence.","The diff applies against the JSON-serialized current spec.","","Example:","```diff","--- a/spec.json","+++ b/spec.json","@@ -3,1 +3,1 @@",'-      "title": "Login"','+      "title": "Welcome Back"',"```"].join("\n")}function G(){return["PATCH MODE (RFC 6902 JSON Patch):","Output RFC 6902 JSON Patch lines inside a ```yaml-patch code fence.","Each line is one JSON patch operation.","","Example:","```yaml-patch",'{"op":"replace","path":"/elements/main/props/title","value":"New Title"}','{"op":"add","path":"/elements/new-el","value":{"type":"Card","props":{},"children":[]}}',"```"].join("\n")}function Q(){return["MERGE MODE (RFC 7396 JSON Merge Patch):","Output only the changed parts in a ```yaml-edit code fence.","Uses deep merge semantics: only keys you include are updated. Unmentioned elements and props are preserved.","Set a key to null to delete it.","","Example edit (update title, add a new element):","```yaml-edit","elements:","  main:","    props:","      title: Updated Title","  new-chart:","    type: Card","    props: {}","    children: []","```","","Example deletion:","```yaml-edit","elements:","  old-widget: null","```"].join("\n")}function X(){return["DIFF MODE (unified diff):","Output a unified diff inside a ```diff code fence.","The diff applies against the YAML-serialized current spec.","","Example:","```diff","--- a/spec.yaml","+++ b/spec.yaml","@@ -6,1 +6,1 @@","-      title: Login","+      title: Welcome Back","```"].join("\n")}function ee(e,t){return{definition:e({string:()=>({kind:"string"}),number:()=>({kind:"number"}),boolean:()=>({kind:"boolean"}),array:e=>({kind:"array",inner:e}),object:e=>({kind:"object",inner:e}),record:e=>({kind:"record",inner:e}),any:()=>({kind:"any"}),zod:()=>({kind:"zod"}),ref:e=>({kind:"ref",inner:e}),propsOf:e=>({kind:"propsOf",inner:e}),map:e=>({kind:"map",inner:e}),optional:()=>({optional:!0})}),promptTemplate:t?.promptTemplate,defaultRules:t?.defaultRules,builtInActions:t?.builtInActions,createCatalog(e){return function(e,t){const n=t.components,r=t.actions,o=n?Object.keys(n):[],i=r?Object.keys(r):[],s=function(e,t){return te(e.spec,t)}(e.definition,t);return{schema:e,data:t,componentNames:o,actionNames:i,prompt(e={}){return function(e,t){if(e.schema.promptTemplate){const n={catalog:e.data,componentNames:e.componentNames,actionNames:e.actionNames,options:t,formatZodType:se};return e.schema.promptTemplate(n)}const{system:n="You are a UI generator that outputs JSON.",customRules:r=[],mode:o="standalone"}=t,i="chat"===o?"inline":"generate"===o?"standalone":o,s=[];s.push(n),s.push(""),"inline"===i?(s.push("OUTPUT FORMAT (text + JSONL, RFC 6902 JSON Patch):"),s.push("You respond conversationally. When generating UI, first write a brief explanation (1-3 sentences), then output JSONL patch lines wrapped in a ```spec code fence."),s.push("The JSONL lines use RFC 6902 JSON Patch operations to build a UI tree. Always wrap them in a ```spec fence block:"),s.push("  ```spec"),s.push('  {"op":"add","path":"/root","value":"main"}'),s.push('  {"op":"add","path":"/elements/main","value":{"type":"Card","props":{"title":"Hello"},"children":[]}}'),s.push("  ```"),s.push("If the user's message does not require a UI (e.g. a greeting or clarifying question), respond with text only — no JSONL.")):(s.push("OUTPUT FORMAT (JSONL, RFC 6902 JSON Patch):"),s.push("Output JSONL (one JSON object per line) using RFC 6902 JSON Patch operations to build a UI tree."));s.push("Each line is a JSON patch operation (add, remove, replace). Start with /root, then stream /elements and /state patches interleaved so the UI fills in progressively as it streams."),s.push(""),s.push("Example output (each line is a separate JSON object):"),s.push("");const a=e.data.components,c=e.componentNames,l=c[0]||"Component",u=c.length>1?c[1]:l,p=a?.[l],f=a?.[u],d=p?ne(p):{},h=f?ne(f):{},m=f?.props?function(e){if(!e||!e._def)return null;const t=e._def,n=ie(e);if("ZodObject"!==n&&"object"!==n)return null;const r="function"==typeof t.shape?t.shape():t.shape;if(!r)return null;for(const[e,t]of Object.entries(r)){const n=ie(t);if("ZodOptional"!==n&&"optional"!==n&&"ZodNullable"!==n&&"nullable"!==n&&("ZodString"===n||"string"===n))return e}return null}(f.props):null,g=m?{...h,[m]:{$item:"title"}}:h,y=[JSON.stringify({op:"add",path:"/root",value:"main"}),JSON.stringify({op:"add",path:"/elements/main",value:{type:l,props:d,children:["child-1","list"]}}),JSON.stringify({op:"add",path:"/elements/child-1",value:{type:u,props:h,children:[]}}),JSON.stringify({op:"add",path:"/elements/list",value:{type:l,props:d,repeat:{statePath:"/items",key:"id"},children:["item"]}}),JSON.stringify({op:"add",path:"/elements/item",value:{type:u,props:g,children:[]}}),JSON.stringify({op:"add",path:"/state/items",value:[]}),JSON.stringify({op:"add",path:"/state/items/0",value:{id:"1",title:"First Item"}}),JSON.stringify({op:"add",path:"/state/items/1",value:{id:"2",title:"Second Item"}})].join("\n");s.push(`${y}\n\nNote: state patches appear right after the elements that use them, so the UI fills in as it streams. ONLY use component types from the AVAILABLE COMPONENTS list below.`),s.push(""),s.push("INITIAL STATE:"),s.push("Specs include a /state field to seed the state model. Components with { $bindState } or { $bindItem } read from and write to this state, and $state expressions read from it."),s.push("CRITICAL: You MUST include state patches whenever your UI displays data via $state, $bindState, $bindItem, $item, or $index expressions, or uses repeat to iterate over arrays. Without state, these references resolve to nothing and repeat lists render zero items."),s.push("Output state patches right after the elements that reference them, so the UI fills in progressively as it streams."),s.push("Stream state progressively - output one patch per array item instead of one giant blob:"),s.push('  For arrays: {"op":"add","path":"/state/posts/0","value":{"i
1d":"1","title":"First Post",...}} then /state/posts/1, /state/posts/2, etc.'),s.push('  For scalars: {"op":"add","path":"/state/newTodoText","value":""}'),s.push('  Initialize the array first if needed: {"op":"add","path":"/state/posts","value":[]}'),s.push('When content comes from the state model, use { "$state": "/some/path" } dynamic props to display it instead of hardcoding the same value in both state and props. The state model is the single source of truth.'),s.push("Include realistic sample data in state. For blogs: 3-4 posts with titles, excerpts, authors, dates. For product lists: 3-5 items with names, prices, descriptions. Never leave arrays empty."),s.push(""),s.push("DYNAMIC LISTS (repeat field):"),s.push('Any element can have a top-level "repeat" field to render its children once per item in a state array: { "repeat": { "statePath": "/arrayPath", "key": "id" } }.'),s.push('The element itself renders once (as the container), and its children are expanded once per array item. "statePath" is the state array path. "key" is an optional field name on each item for stable React keys.'),s.push(`Example: ${JSON.stringify({type:l,props:d,repeat:{statePath:"/todos",key:"id"},children:["todo-item"]})}`),s.push('Inside children of a repeated element, use { "$item": "field" } to read a field from the current item, and { "$index": true } to get the current array index. For two-way binding to an item field use { "$bindItem": "completed" } on the appropriate prop.'),s.push("ALWAYS use the repeat field for lists backed by state arrays. NEVER hardcode individual elements for each array item."),s.push('IMPORTANT: "repeat" is a top-level field on the element (sibling of type/props/children), NOT inside props.'),s.push(""),s.push("ARRAY STATE ACTIONS:"),s.push('Use action "pushState" to append items to arrays. Params: { statePath: "/arrayPath", value: { ...item }, clearStatePath: "/inputPath" }.'),s.push('Values inside pushState can contain { "$state": "/statePath" } references to read current state (e.g. the text from an input field).'),s.push('Use "$id" inside a pushState value to auto-generate a unique ID.'),s.push('Example: on: { "press": { "action": "pushState", "params": { "statePath": "/todos", "value": { "id": "$id", "title": { "$state": "/newTodoText" }, "completed": false }, "clearStatePath": "/newTodoText" } } }'),s.push('Use action "removeState" to remove items from arrays by index. Params: { statePath: "/arrayPath", index: N }. Inside a repeated element\'s children, use { "$index": true } for the current item index. Action params support the same expressions as props: { "$item": "field" } resolves to the absolute state path, { "$index": true } resolves to the index number, and { "$state": "/path" } reads a value from state.'),s.push("For lists where users can add/remove items (todos, carts, etc.), use pushState and removeState instead of hardcoding with setState."),s.push(""),s.push('IMPORTANT: State paths use RFC 6901 JSON Pointer syntax (e.g. "/todos/0/title"). Do NOT use JavaScript-style dot notation (e.g. "/todos.length" is WRONG). To generate unique IDs for new items, use "$id" instead of trying to read array length.'),s.push("");const b=a;if(b){s.push(`AVAILABLE COMPONENTS (${e.componentNames.length}):`),s.push("");for(const[e,t]of Object.entries(b)){const n=t.props?se(t.props):"{}",r=t.slots&&t.slots.length>0?" [accepts children]":"",o=t.events&&t.events.length>0?` [events: ${t.events.join(", ")}]`:"",i=t.description?` - ${t.description}`:"";s.push(`- ${e}: ${n}${i}${r}${o}`)}s.push("")}const v=e.data.actions,k=e.schema.builtInActions??[],x=v&&e.actionNames.length>0,w=k.length>0;if(x||w){s.push("AVAILABLE ACTIONS:"),s.push("");for(const e of k)s.push(`- ${e.name}: ${e.description} [built-in]`);if(x)for(const[e,t]of Object.entries(v))s.push(`- ${e}${t.description?`: ${t.description}`:""}`);s.push("")}s.push("EVENTS (the `on` field):"),s.push("Elements can have an optional `on` field to bind events to actions. The `on` field is a top-level field on the element (sibling of type/props/children), NOT inside props."),s.push('Each key in `on` is an event name (from the component\'s supported events), and the value is an action binding: `{ "action": "<actionName>", "params": { ... } }`.'),s.push(""),s.push("Example:"),s.push(`  ${JSON.stringify({type:l,props:d,on:{press:{action:"setState",params:{statePath:"/saved",value:!0}}},children:[]})}`),s.push(""),s.push('Action params can use dynamic references to read from state: { "$state": "/statePath" }.'),s.push("IMPORTANT: Do NOT put action/actionParams inside props. Always use the `on` field for event bindings."),s.push(""),s.push("VISIBILITY CONDITIONS:"),s.push("Elements can have an optional `visible` field to conditionally show/hide based on state. IMPORTANT: `visible` is a top-level field on the element object (sibling of type/props/children), NOT inside props."),s.push(`Correct: ${JSON.stringify({type:l,props:d,visible:{$state:"/activeTab",eq:"home"},children:["..."]})}`),s.push('- `{ "$state": "/path" }` - visible when state at path is truthy'),s.push('- `{ "$state": "/path", "not": true }` - visible when state at path is falsy'),s.push('- `{ "$state": "/path", "eq": "value" }` - visible when state equals value'),s.push('- `{ "$state": "/path", "neq": "value" }` - visible when state does not equal value'),s.push('- `{ "$state": "/path", "gt": N }` / `gte` / `lt` / `lte` - numeric comparisons'),s.push("- Use ONE operator per condition (eq, neq, gt, gte, lt, lte). Do not combine multiple operators."),s.push('- Any condition can add `"not": true` to invert its result'),s.push("- `[condition, condition]` - all conditions must be true (implicit AND)"),s.push('- `{ "$and": [condition, condition] }` - explicit AND (use when nesting inside $or)'),s.push('- `{ "$or": [condition, condition] }` - at least one must be true (OR)'),s.push("- `true` / `false` - always visible/hidden"),s.push(""),s.push("Use a component with on.press bound to setState to update state and drive visibility."),s.push(`Example: A ${l} with on: { "press": { "action": "setState", "params": { "statePath": "/activeTab", "value": "home" } } } sets state, then a container with visible: { "$state": "/activeTab", "eq": "home" } shows only when that tab is active.`),s.push(""),s.push('For tab patterns where the first/default tab should be visible when no tab is selected yet, use $or to handle both cases: visible: { "$or": [{ "$
1state": "/activeTab", "eq": "home" }, { "$state": "/activeTab", "not": true }] }. This ensures the first tab is visible both when explicitly selected AND when /activeTab is not yet set.'),s.push(""),s.push("DYNAMIC PROPS:"),s.push("Any prop value can be a dynamic expression that resolves based on state. Three forms are supported:"),s.push(""),s.push('1. Read-only state: `{ "$state": "/statePath" }` - resolves to the value at that state path (one-way read).'),s.push('   Example: `"color": { "$state": "/theme/primary" }` reads the color from state.'),s.push(""),s.push('2. Two-way binding: `{ "$bindState": "/statePath" }` - resolves to the value at the state path AND enables write-back. Use on form input props (value, checked, pressed, etc.).'),s.push('   Example: `"value": { "$bindState": "/form/email" }` binds the input value to /form/email.'),s.push('   Inside repeat scopes: `"checked": { "$bindItem": "completed" }` binds to the current item\'s completed field.'),s.push(""),s.push('3. Conditional: `{ "$cond": <condition>, "$then": <value>, "$else": <value> }` - evaluates the condition (same syntax as visibility conditions) and picks the matching value.'),s.push('   Example: `"color": { "$cond": { "$state": "/activeTab", "eq": "home" }, "$then": "#007AFF", "$else": "#8E8E93" }`'),s.push(""),s.push("Use $bindState for form inputs (text fields, checkboxes, selects, sliders, etc.) and $state for read-only data display. Inside repeat scopes, use $bindItem for form inputs bound to the current item. Use dynamic props instead of duplicating elements with opposing visible conditions when only prop values differ."),s.push(""),s.push('4. Template: `{ "$template": "Hello, ${/name}!" }` - interpolates references in the string. Absolute paths like `${/path}` resolve against the state model. Bare names like `${field}` resolve against the current repeat item first, then fall back to the state model at `/<field>`.'),s.push('   Example: `"label": { "$template": "Items: ${/cart/count} | Total: ${/cart/total}" }` renders "Items: 3 | Total: 42.00" when /cart/count is 3 and /cart/total is 42.00. Inside a repeat, `{ "$template": "${name} - ${email}" }` reads name and email from each item.'),s.push("");const S=e.data.functions;if(S&&Object.keys(S).length>0){s.push('5. Computed: `{ "$computed": "<functionName>", "args": { "key": <expression> } }` - calls a registered function with resolved args and returns the result.'),s.push('   Example: `"value": { "$computed": "fullName", "args": { "first": { "$state": "/form/firstName" }, "last": { "$state": "/form/lastName" } } }`'),s.push("   Available functions:");for(const e of Object.keys(S))s.push(`   - ${e}`);s.push("")}a&&Object.entries(a).some(([,e])=>{if(!e.props)return!1;return se(e.props).includes("checks")})&&(s.push("VALIDATION:"),s.push("Form components that accept a `checks` prop support client-side validation."),s.push('Each check is an object: { "type": "<name>", "message": "...", "args": { ... } }'),s.push(""),s.push("Built-in validation types:"),s.push("  - required — value must be non-empty"),s.push("  - email — valid email format"),s.push('  - minLength — minimum string length (args: { "min": N })'),s.push('  - maxLength — maximum string length (args: { "max": N })'),s.push('  - pattern — match a regex (args: { "pattern": "regex" })'),s.push('  - min — minimum numeric value (args: { "min": N })'),s.push('  - max — maximum numeric value (args: { "max": N })'),s.push("  - numeric — value must be a number"),s.push("  - url — valid URL format"),s.push('  - matches — must equal another field (args: { "other": { "$state": "/path" } })'),s.push('  - equalTo — alias for matches (args: { "other": { "$state": "/path" } })'),s.push('  - lessThan — value must be less than another field (args: { "other": { "$state": "/path" } })'),s.push('  - greaterThan — value must be greater than another field (args: { "other": { "$state": "/path" } })'),s.push('  - requiredIf — required only when another field is truthy (args: { "field": { "$state": "/path" } })'),s.push(""),s.push("Example:"),s.push('  "checks": [{ "type": "required", "message": "Email is required" }, { "type": "email", "message": "Invalid email" }]'),s.push(""),s.push("IMPORTANT: When using checks, the component must also have a { $bindState } or { $bindItem } on its value/checked prop for two-way binding."),s.push("Always include validation checks on form inputs for a good user experience (e.g. required, email, minLength)."),s.push(""));(x||w)&&(s.push("STATE WATCHERS:"),s.push("Elements can have an optional `watch` field to react to state changes and trigger actions. The `watch` field is a top-level field on the element (sibling of type/props/children), NOT inside props."),s.push("Maps state paths (JSON Pointers) to action bindings. When the value at a watched path changes, the bound actions fire automatically."),s.push(""),s.push("Example (cascading select — country changes trigger city loading):"),s.push(`  ${JSON.stringify({type:"Select",props:{value:{$bindState:"/form/country"},options:["US","Canada","UK"]},watch:{"/form/country":{action:"loadCities",params:{country:{$state:"/form/country"}}}},children:[]})}`),s.push(""),s.push("Use `watch` for cascading dependencies where changing one field should trigger side effects (loading data, resetting dependent fields, computing derived values)."),s.push("IMPORTANT: `watch` is a top-level field on the element (sibling of type/props/children), NOT inside props. Watchers only fire when the value changes, not on initial render."),s.push(""));const O=t.editModes;O&&O.length>0&&s.push(function(e,t){const n=W(e),r=[];r.push("EDITING EXISTING SPECS:"),r.push("");const o=function(e){if(1===e.length)return"";const t=["Choose the best edit strategy for the requested change:"];return e.includes("patch")&&t.push("- PATCH: best for precise, targeted single-field updates"),e.includes("merge")&&t.push("- MERGE: best for structural changes (add/remove elements, reparent children, update multiple props at once)"),e.includes("diff")&&t.push("- DIFF: best for small text-level changes when you can see the exact lines to change"),t.join("\n")}(n);o&&(r.push(o),r.push(""));for(const e of n){if("json"===t)switch(e){case"patch":r.push(V());break;case"merge":r.push(H());break;case"diff":r.push(K())}else switch(e){case"patch":r.push(G());break;case"merge":r.push(Q());break;case"diff":r.push(X())}r.push("")}return r.join("\n")}({modes:O},"json"));s.push("RULES:");const I="inline"===i?["When generating UI, wrap all JSONL patches in a ```spec code fence - one JSON object per line inside the fence","Write a brief conversational response before any JSONL output",'First set root: {"op":"add","path":"/root","value":"<root-key>"}','Then add each element: {"op":"add","path":"/elements/<key>","value":{...}}',"Output /state patches right after the elements that use them, one per array item for progressive loading. REQUIRED whenever using $state, $bindState, $bindItem, $item, $index, or repeat.","O
1NLY use components listed above","Each element value needs: type, props, children (array of child keys)","Use unique keys for the element map entries (e.g., 'header', 'metric-1', 'chart-revenue')"]:["Output ONLY JSONL patches - one JSON object per line, no markdown, no code fences",'First set root: {"op":"add","path":"/root","value":"<root-key>"}','Then add each element: {"op":"add","path":"/elements/<key>","value":{...}}',"Output /state patches right after the elements that use them, one per array item for progressive loading. REQUIRED whenever using $state, $bindState, $bindItem, $item, $index, or repeat.","ONLY use components listed above","Each element value needs: type, props, children (array of child keys)","Use unique keys for the element map entries (e.g., 'header', 'metric-1', 'chart-revenue')"],j=e.schema.defaultRules??[];return[...I,...j,...r].forEach((e,t)=>{s.push(`${t+1}. ${e}`)}),s.join("\n")}(this,e)},jsonSchema:(e={})=>le(s,e.strict??!1),validate(e){const t=s.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,error:t.error}},zodSchema:()=>s,get _specType(){throw new Error("_specType is only for type inference")}}}(this,e)}}}function te(e,t){switch(e.kind){case"string":return o.Yj();case"number":return o.ai();case"boolean":return o.zM();case"any":return o.bz();case"array":{const n=te(e.inner,t);return o.YO(n)}case"object":{const n=e.inner,r={};for(const[e,o]of Object.entries(n)){let n=te(o,t);o.optional&&(n=n.optional()),r[e]=n}return o.Ik(r)}case"record":{const n=te(e.inner,t);return o.g1(o.Yj(),n)}case"ref":{const n=function(e,t){const n=e.split(".");let r={catalog:t};for(const e of n){if(!r||"object"!=typeof r)return[];r=r[e]}if(r&&"object"==typeof r)return Object.keys(r);return[]}(e.inner,t);return 0===n.length?o.Yj():1===n.length?o.eu(n[0]):o.k5(n)}case"propsOf":{const n=function(e,t){const n=e.split(".");let r={catalog:t};for(const e of n){if(!r||"object"!=typeof r)return[];r=r[e]}if(r&&"object"==typeof r)return Object.values(r).map(e=>e.props).filter(e=>void 0!==e);return[]}(e.inner,t);return 0===n.length?o.g1(o.Yj(),o.L5()):1===n.length?n[0]:o.g1(o.Yj(),o.L5())}default:return o.L5()}}function ne(e){return e.example&&Object.keys(e.example).length>0?e.example:e.props?re(e.props):{}}function re(e){if(!e||!e._def)return{};const t=e._def,n=ie(e);if("ZodObject"!==n&&"object"!==n)return{};const r="function"==typeof t.shape?t.shape():t.shape;if(!r)return{};const o={};for(const[e,t]of Object.entries(r)){const n=ie(t);"ZodOptional"!==n&&"optional"!==n&&"ZodNullable"!==n&&"nullable"!==n&&(o[e]=oe(t))}return o}function oe(e){if(!e||!e._def)return"...";const t=e._def;switch(ie(e)){case"ZodString":case"string":return"example";case"ZodNumber":case"number":return 0;case"ZodBoolean":case"boolean":return!0;case"ZodLiteral":case"literal":return t.value;case"ZodEnum":case"enum":if(Array.isArray(t.values)&&t.values.length>0)return t.values[0];if(t.entries&&"object"==typeof t.entries){const e=Object.values(t.entries);return e.length>0?e[0]:"example"}return"example";case"ZodOptional":case"optional":case"ZodNullable":case"nullable":case"ZodDefault":case"default":{const e=t.innerType??t.wrapped;return e?oe(e):null}case"ZodArray":case"array":return[];case"ZodObject":case"object":return re(e);case"ZodUnion":case"union":{const e=t.options;return e&&e.length>0?oe(e[0]):"..."}default:return"..."}}function ie(e){if(!e||!e._def)return"";const t=e._def;return t.typeName??t.type??""}function se(e){if(!e||!e._def)return"unknown";const t=e._def;switch(ie(e)){case"ZodString":case"string":return"string";case"ZodNumber":case"number":return"number";case"ZodBoolean":case"boolean":return"boolean";case"ZodLiteral":case"literal":{const e=t.values,n=e?.[0]??t.value;return JSON.stringify(n)}case"ZodEnum":case"enum":{let e;if(Array.isArray(t.values))e=t.values;else{if(!t.entries||"object"!=typeof t.entries)return"enum";e=Object.values(t.entries)}return e.map(e=>`"${e}"`).join(" | ")}case"ZodArray":case"array":{const e="object"==typeof t.element?t.element:"object"==typeof t.type?t.type:void 0;return e?`Array<${se(e)}>`:"Array<unknown>"}case"ZodObject":case"object":{const e="function"==typeof t.shape?t.shape():t.shape;if(!e)return"object";return`{ ${Object.entries(e).map(([e,t])=>{const n=ie(t);return`${e}${"ZodOptional"===n||"ZodNullable"===n||"optional"===n||"nullable"===n?"?":""}: ${se(t)}`}).join(", ")} }`}case"ZodOptional":case"optional":case"ZodNullable":case"nullable":{const e=t.innerType??t.wrapped;return e?se(e):"unknown"}case"ZodUnion":case"union":{const e=t.options;return e?e.map(e=>se(e)).join(" | "):"unknown"}case"ZodRecord":case"record":{const e=t.keyType??void 0,n=t.valueType??t.element??void 0;
1return`Record<${e?se(e):"string"}, ${n?se(n):"unknown"}>`}case"ZodDefault":case"default":{const e=t.innerType??t.wrapped;return e?se(e):"unknown"}default:return"unknown"}}function ae(e){return"string"==typeof e.type?e.type:"string"==typeof e.typeName?e.typeName:""}function ce(e){return e.startsWith("Zod")?e.slice(3).toLowerCase():e.toLowerCase()}function le(e,t=!1){const n=e._def;switch(ce(ae(n))){case"string":return{type:"string"};case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"literal":{const e=n.values;return{const:e?e[0]:n.value}}case"enum":{const e=n.entries;return{enum:(e?Object.values(e):n.values)??[]}}case"array":{const e=n.element??n.type;return{type:"array",items:e?le(e,t):{}}}case"object":{const e=n.shape,r="function"==typeof e?e():e;if(!r)return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{type:"object"};const o={},i=[];for(const[e,n]of Object.entries(r)){const r=ce(ae(n._def)),s="optional"===r||"nullable"===r;if(t)if(i.push(e),s){const r=le(n,t);o[e]={anyOf:[r,{type:"null"}]}}else o[e]=le(n,t);else o[e]=le(n),s||i.push(e)}return{type:"object",properties:o,required:i.length>0?i:void 0,additionalProperties:!1}}case"record":{const e=n.valueType;return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{type:"object",additionalProperties:!e||le(e)}}case"optional":case"nullable":{const e=n.innerType;return e?le(e,t):{}}case"union":{const e=n.options;return e?{anyOf:e.map(e=>le(e,t))}:{}}case"any":case"unknown":return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{};default:return{}}}function ue(e,t){return e.createCatalog(t)}},5879:(e,t,n)=>{n.d(t,{oz:()=>y});var r=n(69820),o=n(50713),i=n(85124),s=n(31085),a=(n(14041),n(24041)),c=n(31374),l=n(984),u=n(74269),p=n(73765);const f="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",d=[],h={allowDangerousHtml:!0},m=/^(https?|ircs?|mailto|xmpp)$/i,g=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function y(e){const t=b(e),n=v(e);return k(t.runSync(t.parse(n),n),e)}function b(e){const t=e.rehypePlugins||d,n=e.remarkPlugins||d,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...h}:h;return(0,l.l)().use(a.A).use(n).use(c.A,r).use(t)}function v(e){const t=e.children||"",n=new p.T;return"string"==typeof t?n.value=t:(0,r.HB)("Unexpected value `"+t+"` for `children` prop, expected `string`"),n}function k(e,t){const n=t.allowedElements,a=t.allowElement,c=t.components,l=t.disallowedElements,p=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||x;for(const e of g)Object.hasOwn(t,e.from)&&(0,r.HB)("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <"+f+"#"+e.id+"> for more info)");return n&&l&&(0,r.HB)("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),(0,u.YR)(e,function(e,t,r){if("raw"===e.type&&r&&"number"==typeof t)return p?r.children.splice(t,1):r.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in i.$)if(Object.hasOwn(i.$,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=i.$[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=h(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!l&&l.includes(e.tagName);if(!o&&a&&"number"==typeof t&&(o=!a(e,t,r)),o&&r&&"number"==typeof t)return d&&e.children?r.children.splice(t,1,...e.children):r.children.splice(t,1),t}}),(0,o.H)(e,{Fragment:s.Fragment,components:c,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0})}function x(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||m.test(e.slice(0,t))?e:""}},36017:(e,t,n)=>{n.d(t,{yW:()=>E,A4:()=>T,Z8:()=>D,wQ:()=>o,dN:()=>w});var r=n(4848),o=(0,r.Jo)(e=>({spec:e.object({root:e.string(),elements:e.record(e.object({type:e.ref("catalog.components"),props:e.propsOf("catalog.components"),children:e.array(e.string()),visible:e.any()}))}),catalog:e.object({components:e.map({props:e.zod(),slots:e.array(e.string()),description:e.string(),example:e.any()}),actions:e.map({params:e.zod(),description:e.string()})})}),{builtInActions:[{name:"setState",description:"Update a value in the state model at the given statePath. Params: { statePath: string, value: any }"},{name:"pushState",description:'Append an item to an array in state. Param
1s: { statePath: string, value: any, clearStatePath?: string }. Value can contain {"$state":"/path"} refs and "$id" for auto IDs.'},{name:"removeState",description:"Remove an item from an array in state by index. Params: { statePath: string, index: number }"},{name:"validateForm",description:"Validate all registered form fields and write the result to state. Params: { statePath?: string }. Defaults to /formValidation. Result: { valid: boolean, errors: Record<string, string[]> }."}],defaultRules:["CRITICAL INTEGRITY CHECK: Before outputting ANY element that references children, you MUST have already output (or will output) each child as its own element. If an element has children: ['a', 'b'], then elements 'a' and 'b' MUST exist. A missing child element causes that entire branch of the UI to be invisible.","SELF-CHECK: After generating all elements, mentally walk the tree from root. Every key in every children array must resolve to a defined element. If you find a gap, output the missing element immediately.",'CRITICAL: The "visible" field goes on the ELEMENT object, NOT inside "props". Correct: {"type":"<ComponentName>","props":{},"visible":{"$state":"/tab","eq":"home"},"children":[...]}.','CRITICAL: The "on" field goes on the ELEMENT object, NOT inside "props". Use on.press, on.change, on.submit etc. NEVER put action/actionParams inside props.',"When the user asks for a UI that displays data (e.g. blog posts, products, users), ALWAYS include a state field with realistic sample data. The state field is a top-level field on the spec (sibling of root/elements).",'When building repeating content backed by a state array (e.g. posts, products, items), use the "repeat" field on a container element. Example: { "type": "<ContainerComponent>", "props": {}, "repeat": { "statePath": "/posts", "key": "id" }, "children": ["post-card"] }. Replace <ContainerComponent> with an appropriate component from the AVAILABLE COMPONENTS list. Inside repeated children, use { "$item": "field" } to read a field from the current item, and { "$index": true } for the current array index. For two-way binding to an item field use { "$bindItem": "completed" }. Do NOT hardcode individual elements for each array item.',"Design with visual hierarchy: use container components to group content, heading components for section titles, proper spacing, and status indicators. ONLY use components from the AVAILABLE COMPONENTS list.","For data-rich UIs, use multi-column layout components if available. For forms and single-column content, use vertical layout components. ONLY use components from the AVAILABLE COMPONENTS list.","Always include realistic, professional-looking sample data. For blogs include 3-4 posts with varied titles, authors, dates, categories. For products include names, prices, images. Never leave data empty."]}),i=n(14041),s=n(78246),a=n(31085),c=(0,i.createContext)(null);function l({store:e,initialState:t={},onStateChange:n,children:o}){const l=(0,i.useRef)(void 0);e||l.current||(l.current=(0,r.J$)(t));const u=e??l.current,p=(0,i.useRef)(u);p.current=u;const f=(0,i.useRef)(!!e);f.current=!!e;(0,i.useRef)(e?"controlled":"uncontrolled"),(0,i.useRef)(!1);const d=(0,i.useRef)(t),h=(0,i.useRef)(function(e,t){return e?null:0===Object.keys(t).length?{}:(0,s.Y0)(t)}(!!e,t));(0,i.useEffect)(()=>{if(e)return;if(t===d.current)return;d.current=t;const n=t&&Object.keys(t).length>0?(0,s.Y0)(t):{},r=h.current??{},o=new Set([...Object.keys(r),...Object.keys(n)]),i={};for(const e of o)r[e]!==n[e]&&(i[e]=e in n?n[e]:void 0);h.current=n,Object.keys(i).length>0&&u.update(i)},[e,t,u]);const m=(0,i.useSyncExternalStore)(u.subscribe,u.getSnapshot,u.getServerSnapshot??u.getSnapshot),g=(0,i.useRef)(n);g.current=n;const y=(0,i.useCallback)((e,t)=>{const n=p.current,r=n.getSnapshot();n.set(e,t),f.current||n.getSnapshot()===r||g.current?.([{path:e,value:t}])},[]),b=(0,i.useCallback)(e=>{const t=p.current,n=t.getSnapshot();if(t.update(e),!f.current&&t.getSnapshot()!==n){const t=[];for(const[o,i]of Object.entries(e))(0,r.Dz)(n,o)!==i&&t.push({path:o,value:i});t.length>0&&g.current?.(t)}},[]),v=(0,i.useCallback)(e=>p.current.get(e),[]),k=(0,i.useCallback)(()=>p.current.getSnapshot(),[]),x=(0,i.useMemo)(()=>({state:m,get:v,set:y,update:b,getSnapshot:k}),[m,v,y,b,k]);return(0,a.jsx)(c.Provider,{value:x,children:o})}function u(){const e=(0,i.useContext)(c);if(!e)throw new Error("useStateStore must be used within a StateProvider");return e}var p=(0,i.createContext)(null);function f({children:e}){const{state:t}=u(),n=(0,i.useMemo)(()=>({stateModel:t}),[t]),o=(0,i.useMemo)(()=>e=>(0,r.w4)(e,n),[n]),s=(0,i.useMemo)(()=>({isVisible:o,ctx:n}),[o,n]);return(0,a.jsx)(p.Provider,{value:s,children:e})}function d(){const e=(0,i.useContext)(p);if(!e)throw new Error("useVisibility must be used within a VisibilityProvi
1der");return e}var h=(0,i.createContext)(null);function m(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n){const n=e[r],o=t[r];if(n!==o){if("object"==typeof n&&null!==n&&"object"==typeof o&&null!==o){const e=n.$state,t=o.$state;if("string"==typeof e&&e===t)continue}return!1}}return!0}function g({customFunctions:e={},children:t}){const{state:n,getSnapshot:o}=u(),[s,c]=(0,i.useState)({}),l=(0,i.useRef)({}),[p,f]=(0,i.useState)({}),d=(0,i.useCallback)((e,t)=>{f(n=>{const r=n[e];return r&&function(e,t){if(e===t)return!0;if(e.validateOn!==t.validateOn)return!1;const n=e.checks??[],r=t.checks??[];if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],o=r[e];if(t.type!==o.type)return!1;if(t.message!==o.message)return!1;if(!m(t.args,o.args))return!1}return!0}(r,t)?n:{...n,[e]:t}})},[]),g=(0,i.useCallback)((t,n)=>{const i=o(),s=t.split("/").filter(Boolean);let a=i;for(const e of s){if(null==a||"object"!=typeof a){a=void 0;break}a=a[e]}const u=(0,r.Lb)(n,{value:a,stateModel:i,customFunctions:e}),p={touched:l.current[t]?.touched??!0,validated:!0,result:u};return l.current={...l.current,[t]:p},c(l.current),u},[e,o]),y=(0,i.useCallback)(e=>{l.current={...l.current,[e]:{...l.current[e],touched:!0,validated:l.current[e]?.validated??!1,result:l.current[e]?.result??null}},c(l.current)},[]),b=(0,i.useCallback)(e=>{const{[e]:t,...n}=l.current;l.current=n,c(n)},[]),v=(0,i.useCallback)(()=>{let e=!0;for(const[t,n]of Object.entries(p)){g(t,n).valid||(e=!1)}return e},[p,g]),k=(0,i.useMemo)(()=>({customFunctions:e,get fieldStates(){return l.current},validate:g,touch:y,clear:b,validateAll:v,registerField:d}),[e,s,g,y,b,v,d]);return(0,a.jsx)(h.Provider,{value:k,children:t})}var y=0;function b(){return y+=1,`${Date.now()}-${y}`}function v(e,t){if(null==e)return e;if("$id"===e)return b();if("object"==typeof e&&!Array.isArray(e)){const n=e,r=Object.keys(n);if(1===r.length&&"string"==typeof n.$state)return t(n.$state);if(1===r.length&&"$id"in n)return b()}if(Array.isArray(e))return e.map(e=>v(e,t));if("object"==typeof e){const n={};for(const[r,o]of Object.entries(e))n[r]=v(o,t);return n}return e}var k=(0,i.createContext)(null);function x({handlers:e={},navigate:t,children:n}){const{get:o,set:s,getSnapshot:c}=u(),l=(0,i.useContext)(h),[p,f]=(0,i.useState)(e),[d,m]=(0,i.useState)(new Set),[g,y]=(0,i.useState)(null),b=(0,i.useCallback)((e,t)=>{f(n=>({...n,[e]:t}))},[]),x=(0,i.useCallback)(async e=>{const n=(0,r.n5)(e,c()),i=(0,r.pM)(),a=Date.now();(0,r.C6)({id:i,name:n.action,params:n.params,at:a});let u,f=!0;try{if("setState"===n.action&&n.params){const e=n.params.statePath,t=n.params.value;return void(e&&s(e,t))}if("pushState"===n.action&&n.params){const e=n.params.statePath,t=n.params.value;if(e){const r=v(t,o),i=o(e)??[];s(e,[...i,r]);const a=n.params.clearStatePath;a&&s(a,"")}return}if("removeState"===n.action&&n.params){const e=n.params.statePath,t=n.params.index;if(void 0!==e&&void 0!==t){const n=o(e)??[];s(e,n.filter((e,n)=>n!==t))}return}if("push"===n.action&&n.params){const e=n.params.screen;if(e){const t=o("/currentScreen"),n=o("/navStack")??[];s("/navStack",t?[...n,t]:[...n,""]),s("/currentScreen",e)}return}if("pop"===n.action){const e=o("/navStack")??[];if(e.length>0){const t=e[e.length-1];s("/navStack",e.slice(0,-1)),s("/currentScreen",t||void 0)}return}if("validateForm"===n.action){const e=l?.validateAll;if(!e)return;const t=e(),r={};for(const[e,t]of Object.entries(l.fieldStates))t.result&&!t.result.valid&&(r[e]=t.result.errors);const o=n.params?.statePath||"/formValidation";return void s(o,{valid:t,errors:r})}const e=p[n.action];if(!e)return;if(n.confirm)return new Promise((t,r)=>{y({action:n,handler:e,resolve:()=>{y(null),t()},reject:()=>{y(null),r(new Error("Action cancelled"))}})}).then(async()=>{m(e=>new Set(e).add(n.action));try{await(0,r.yn)({action:n,handler:e,setState:s,navigate:t,executeAction:async e=>{const t={action:e};await x(t)}})}finally{m(e=>{const t=new Set(e);return t.delete(n.action),t})}});m(e=>new Set(e).add(n.action));try{await(0,r.yn)({action:n,handler:e,setState:s,navigate:t,executeAction:async e=>{const t={action:e};await x(t)}})}finally{m(e=>{const t=new Set(e);return t.delete(n.action),t})}}catch(e){throw f=!1,u=e,e}finally{const e=Date.now();(0,r.Z4)({id:i,name:n.action,ok:f,at:e,durationMs:e-a,error:u})}},[p,o,s,c,t,l]),w=(0,i.useCallback)(()=>{g?.resolve()},[g]),S=(0,i.useCallback)(()=>{g?.reject()},[g]),O=(0,i.useMemo)(()=>({handlers:p,loadingActions:d,pendingConfirmation:g,execute:x,confirm:w,cancel:S,registerHandler:b}),[p,d,g,x,w,S,b]);return(0,a.jsx)(k.Provider,{value:O,children:n})}function w(){const e=(0,i.useContext)(k);if(!e)throw new Error("useActions must be used within an ActionProvider");return e}function S({confirm:e,onConfirm:t,onCancel:n}){const r="danger"===e.variant;return(0,a.jsx)("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50},onClick:n,children:(0,a.jsxs)("div",{style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"400px",
1width:"100%",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1)"},onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("h3",{style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:600},children:e.title}),(0,a.jsx)("p",{style:{margin:"0 0 24px 0",color:"#6b7280"},children:e.message}),(0,a.jsxs)("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[(0,a.jsx)("button",{onClick:n,style:{padding:"8px 16px",borderRadius:"6px",border:"1px solid #d1d5db",backgroundColor:"white",cursor:"pointer"},children:e.cancelLabel??"Cancel"}),(0,a.jsx)("button",{onClick:t,style:{padding:"8px 16px",borderRadius:"6px",border:"none",backgroundColor:r?"#dc2626":"#3b82f6",color:"white",cursor:"pointer"},children:e.confirmLabel??"Confirm"})]})]})})}var O=(0,i.createContext)(null);function I({item:e,index:t,basePath:n,children:r}){return(0,a.jsx)(O.Provider,{value:{item:e,index:t,basePath:n},children:r})}var j=class extends i.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?null:this.props.children}},C={},$=i.createContext(C);
1var A=i.memo(function e({element:t,elementKey:n,spec:o,registry:s,loading:c,fallback:l}){const p=i.useSyncExternalStore(r.T8,r.BC,()=>!1),f=(0,i.useContext)(O),{ctx:h}=d(),{execute:m}=w(),{getSnapshot:g,state:y}=u(),b=i.useContext($),v=(0,i.useMemo)(()=>{const e=f?{...h,repeatItem:f.item,repeatIndex:f.index,repeatBasePath:f.basePath}:{...h};return e.functions=b,e},[h,f,b]),k=void 0===t.visible||(0,r.w4)(t.visible,v),x=t.on,S=(0,i.useCallback)(async e=>{const t=x?.[e];if(!t)return;const n=Array.isArray(t)?t:[t];for(const e of n){if(!e.params){await m(e);continue}const t={...v,stateModel:g()},n={};for(const[o,i]of Object.entries(e.params))n[o]=(0,r.i7)(i,t);await m({...e,params:n})}},[x,m,v,g]),I=(0,i.useCallback)(e=>{const t=x?.[e];if(!t)return{emit:()=>{},shouldPreventDefault:!1,bound:!1};return{emit:()=>S(e),shouldPreventDefault:(Array.isArray(t)?t:[t]).some(e=>e.preventDefault),bound:!0}},[x,S]),C=t.watch,A=(0,i.useRef)(null),T=(0,i.useRef)(void 0),E=(0,i.useMemo)(()=>{if(!C)return;const e={};for(const t of Object.keys(C))e[t]=(0,r.Dz)(y,t);const t=T.current;if(t){const n=Object.keys(e);if(n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n]))return t}return T.current=e,e},[C,y]);if((0,i.useEffect)(()=>{if(!C||!E)return;const e=Object.keys(C);if(0===e.length)return;const t=A.current;if(A.current=E,null===t)return;let n=!1;return(async()=>{for(const o of e){if(n)break;if(E[o]!==t[o]){const e=C[o];if(!e)continue;const t=Array.isArray(e)?e:[e];for(const e of t){if(n)break;if(!e.params){if(await m(e),n)break;continue}const t={...v,stateModel:g()},o={};for(const[n,i]of Object.entries(e.params))o[n]=(0,r.i7)(i,t);if(await m({...e,params:o}),n)break}}}})().catch(console.error),()=>{n=!0}},[C,E,m,v,g]),!k)return null;const P=t.props,D=(0,r.x4)(P,v),L=(0,r.tO)(P,v),F=L!==t.props?{...t,props:L}:t,R=s[F.type]??l;if(!R)return null;const z=F.repeat?(0,a.jsx)(N,{element:F,spec:o,registry:s,loading:c,fallback:l}):F.children?.map(t=>{const n=o.elements[t];return n?(0,a.jsx)(e,{element:n,elementKey:t,spec:o,registry:s,loading:c,fallback:l},t):null}),M=(0,a.jsx)(R,{element:F,emit:S,on:I,bindings:D,loading:c,children:z}),_=p&&n?(0,a.jsx)("span",{"data-jr-key":n,style:{display:"contents"},children:M}):M;return(0,a.jsx)(j,{elementType:F.type,children:_})});function N({element:e,spec:t,registry:n,loading:o,fallback:i}){const{state:s}=u(),c=e.repeat,l=c.statePath,p=(0,r.Dz)(s,l)??[];return(0,a.jsx)(a.Fragment,{children:p.map((r,s)=>{const u=c.key&&"object"==typeof r&&null!==r?String(r[c.key]??s):String(s);return(0,a.jsx)(I,{item:r,index:s,basePath:`${l}/${s}`,children:e.children?.map(e=>{const r=t.elements[e];return r?(0,a.jsx)(A,{element:r,elementKey:e,spec:t,registry:n,loading:o,fallback:i},e):null})},u)})})}function T({spec:e,registry:t,loading:n,fallback:r}){if(!e||!e.root)return null;const o=e.elements[e.root];return o?(0,a.jsx)(A,{element:o,elementKey:e.root,spec:e,registry:t,loading:n,fallback:r}):null}function E({registry:e,store:t,initialState:n,handlers:r,navigate:o,validationFunctions:i,functions:s,onStateChange:c,children:u}){return(0,a.jsx)(l,{store:t,initialState:n,onStateChange:c,children:(0,a.jsx)(f,{children:(0,a.jsx)(g,{customFunctions:i,children:(0,a.jsx)(x,{handlers:r,navigate:o,children:(0,a.jsxs)($.Provider,{value:s??C,children:[u,(0,a.jsx)(P,{})]})})})})})}function P(){const{pendingConfirmation:e,confirm:t,cancel:n}=w();return e?.action.confirm?(0,a.jsx)(S,{confirm:e.action.confirm,onConfirm:t,onCancel:n}):null}function D(e,t){const n={};if(t.components)for(const[e,r]of Object.entries(t.components))n[e]=({element:e,children:t,emit:n,on:o,bindings:i,loading:s})=>r({props:e.props,children:t,emit:n,on:o,bindings:i,loading:s});const r=t.actions?Object.entries(t.actions):[];return{registry:n,handlers:(e,t)=>{const n={};for(const[o,i]of r)n[o]=async n=>{const r=e(),o=t();r&&await i(n,r,o)};return n},executeAction:async(e,t,n,o={})=>{const i=r.find(([t])=>t===e);i&&await i[1](t,n,o)}}}},63717:(e,t,n)=>{function r(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}n.d(t,{A:()=>St});var o=n(69820),i=n(57949);const s=function(e){if(null==e)return c;if("function"==typeof e)return a(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=s(e[n]);return a(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return a(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return a(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function a(e){return function(t,n,r){return Boolean(l(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function c(){return!0}function l(e){return null!==e&&"object"==typeof e&&"type"in e}const u=[],p=!0,f=!1,d="skip";function h(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=s(o),a=r?-1:1;!function e(o,s,c){const l=o&&"object"==typeof o?o:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(h,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return h;function h(){let l,h,m,g=u;if((!t||i(o,s,c[c.length-1]||void 0))&&(g=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[p,e];return null==e?u:[e]}(n(o,c)),g[0]===f))return g;if("children"in o&&o.children){const t=o;if(t.children&&g[0]!==d)for(h=(r?t.children.length:-1)+a,m=c.concat(t);h>-1&&h<t.children.length;){const n=t.children[h];if(l=e(n,h,m)(),l[0]===f)return l;h="number"==typeof l[1]?l[1]:h+a}}return g}}(e,void 0,[])()}function m(e,t,n){const r=s((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([g(e[0]),y(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)h(e,"text",a);function a(e,t){let n,s=-1;for(;++s<t.length;){const e=t[s],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],s=o[i][1];let a=0;const c=n.children.indexOf(e);let l=!1,u=[];r.lastIndex=0;let p=r.exec(e.value);for(;p;){const n=p.index,o={index:p.index,input:p.input,stack:[...t,e]};let i=s(...p,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&u.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),a=n+p[0].length,l=!0),!r.global)break;p=r.exec(e.value)}l?(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),n.children.splice(c,1,...u)):u=[e];return c+u.length}(e,t)}}function g(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function y(e){return"function"==typeof e?e:function(){return e}}const b="phrasing",v=["autolink","link","image","label"];function k(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function x(e){this.config.enter.autolinkProtocol.call(this,e)}function w(e){this.config.exit.autolinkProtocol.call(this,e)}function S(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];(0,o.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function O(e){this.config.exit.autolinkEmail.call(this,e)}function I(e){this.exit(e)}function j(e){m(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,C],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$]],{ignore:["link","linkReference"]})}function C(e,t,n,o,i){let s="";if(!A(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],o=n.indexOf(")");const i=r(e,"(");let s=r(e,")");for(;-1!==o&&i>s;)e+=n.slice(0,o+1),n=n.slice(o+1),o=n.indexOf(")"),s++;return[e,n]}(n+o);if(!a[0])return!1;const c={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function $(e,t,n,r){return!(!A(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function A(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||(0,i.Ny)(n)||(0,i.es)(n))&&(!t||47!==n)}var N=n(26243);function T(){this.buffer()}function E(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function P(){this.buffer()}function D(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function L(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,o.ok)("footnoteReference"===n.type),n.identifier=(0,N.B)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function F(e){this.exit(e)}function R(e){const t=this.resume(),n=this.stack[this.stack.length-1];(0,o.ok)("footnoteDefinition"===n.type),n.identifier=(0,N.B)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z(e){this.exit(e)}function M(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),a(),s(),i+=o.move("]"),i}function _(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let s=i.move("[^");const a=r.enter("footnoteDefinition"),c=r.enter("label");s+=i.move(r.safe(r.associationId(e),{before:s,after:"]"})),c(),s+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),s+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?J:Z)));return a(),s},footnoteReference:M},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Z(e,t,n){return 0===t?e:J(e,t,n)}function J(e,t,n){return(n?"":"    ")+e}M.peek=function(){return"["};const U=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Y(e){this.enter({type:"delete",children:[]},e)}function q(e){this.exit(e)}function B(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let s=o.move("~~");return s+=n.containerPhrasing(e,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function W(e){return e.length}function V(e){return null==e?"":String(e)}function H(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function K(e,t,n){return">"+(n?"":" ")+e}function G(e,t){return Q(e,t.inConstruct,!0)&&!Q(e,t.notInConstruct,!1)}function Q(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function X(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&G(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function ee(e,t,n){return(n?"":"    ")+e}function te(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ne(e){return"&#x"+e.toString(16).toUpperCase()+";"}B.peek=function(){return"~"};var re=n(66990);function oe(e,t,n){const r=(0,re.S)(e),o=(0,re.S)(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function ie(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),s=n.createTracker(r),a=s.move(o);let c=s.move(n.containerPhrasing(e,{after:o,before:a,...s.current()}));const l=c.charCodeAt(0),u=oe(r.before.charCodeAt(r.before.length-1),l,o);u.inside&&(c=ne(l)+c.slice(1));const p=c.charCodeAt(c.length-1),f=oe(r.after.charCodeAt(0),p,o);f.inside&&(c=c.slice(0,-1)+ne(p));const d=s.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},a+c+d}ie.peek=function(e,t,n){return n.options.emphasis||"*"};var se=n(74269),ae=n(66197);const ce={};function le(e,t){const n=t||ce;return ue(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ue(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pe(e.children,t,n)}return Array.isArray(e)?pe(e,t,n):""}function pe(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ue(e[o],t,n);return r.join("")}function fe(e){return e.value||""}function de(e,t,n,r){const o=te(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(a=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),a()),l+=c.move(")"),s(),l}function he(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("![");const l=n.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&l&&l===p?"shortcut"===o?c=c.slice(0,-1):c+=a.move("]"):c+=a.move(p+"]"),c}function me(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function ge(e,t){const n=le(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function ye(e,t,n,r){const o=te(n),i='"'===o?"Quote":"Apostrophe",s=n.createTracker(r);let a,c;if(ge(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=s.move("<");return r+=s.move(n.containerPhrasing(e,{before:r,after:">",...s.current()})),r+=s.move(">"),a(),n.stack=t,r}
vendor: 11,923 bytes, line 1
1a=n.enter("link"),c=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(c=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),l+=s.move(" "+o),l+=s.move(n.safe(e.title,{before:l,after:o,...s.current()})),l+=s.move(o),c()),l+=s.move(")"),a(),l}function be(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(l+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=u,i(),"full"!==o&&l&&l===p?"shortcut"===o?c=c.slice(0,-1):c+=a.move("]"):c+=a.move(p+"]"),c}function ve(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ke(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}fe.peek=function(){return"<"},de.peek=function(){return"!"},he.peek=function(){return"!"},me.peek=function(){return"`"},ye.peek=function(e,t,n){return ge(e,n)?"<":"["},be.peek=function(){return"["};const xe=function(e){if(null==e)return Se;if("function"==typeof e)return we(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xe(e[n]);return we(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return we(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return we(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function we(e){return function(t,n,r){return Boolean(Oe(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Se(){return!0}function Oe(e){return null!==e&&"object"==typeof e&&"type"in e}const Ie=xe(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function je(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),s=n.createTracker(r),a=s.move(o+o);let c=s.move(n.containerPhrasing(e,{after:o,before:a,...s.current()}));const l=c.charCodeAt(0),u=oe(r.before.charCodeAt(r.before.length-1),l,o);u.inside&&(c=ne(l)+c.slice(1));const p=c.charCodeAt(c.length-1),f=oe(r.after.charCodeAt(0),p,o);f.inside&&(c=c.slice(0,-1)+ne(p));const d=s.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},a+c+d}je.peek=function(e,t,n){return n.options.strong||"*"};const Ce={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),K);return o(),s},break:X,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",s="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,ee);return e(),t}const a=n.createTracker(r),c=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,s=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>s&&(s=i):i=1,o=r+t.length,r=n.indexOf(t,o);return s}(i,o)+1,3)),l=n.enter("codeFenced");let u=a.move(c);if(e.lang){const t=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),i&&(u+=a.move(i+"\n")),u+=a.move(c),l(),u},definition:function(e,t,n,r){const o=te(n),i='"'===o?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(a=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":"\n",...c.current()}))),a(),e.title&&(a=n.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(n.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),a()),s(),l},emphasis:ie,hardBreak:X,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return(0,se.YR)(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,ae.dc}),Boolean((!e.depth||e.depth<3)&&le(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),s=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),s+"\n"+(1===o?"=":"-").repeat(s.length-(Math.max(s.lastIndexOf("\r"),s.lastIndexOf("\n"))+1))}const s="#".repeat(o),a=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(l)&&(l=ne(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),c(),a(),l},html:fe,image:de,imageReference:he,inlineCode:me,link:ye,linkReference:be,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):ve(n);const a=e.ordered?"."===s?")":".":function(e){const t=ve(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let c=!(!t||!n.bulletLastUsed)&&s===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==s&&"-"!==s||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(c=!0),ke(n)===s&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){c=!0;break}}}}c&&(s=a),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,o(),l},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||ve(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let s=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(s=4*Math.ceil(s/4));const a=n.createTracker(r);a.move(i+" ".repeat(s-i.length)),a.shift(s);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){if(t)return(n?"":" ".repeat(s))+e;return(n?i:i+" ".repeat(s-i.length))+e});return c(),l},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),o(),s},root:function(e,t,n,r){return(e.children.some(function(e){return Ie(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:je,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(ke(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function $e(e){const t=e._align;(0,o.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Ae(e){this.exit(e),this.data.inTable=void 0}function Ne(e){this.enter({type:"tableRow",children:[]},e)}function Te(e){this.exit(e)}function Ee(e){this.enter({type:"tableCell",children:[]},e)}function Pe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,De));const n=this.stack[this.stack.length-1];(0,o.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function De(e,t){return"|"===t?t:e}function Le(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ce.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("table");for(;++o<r.length;)i[o]=c(r[o],t,n);return s(),i}(e,n,r),e.align)},tableCell:s,tableRow:function(e,t,n,r){const o=c(e,n,r),i=a([o]);return i.slice(0,i.indexOf("\n"))}}};function s(e,t,n,r){const o=n.enter("tableCell"),s=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return s(),o(),a}function a(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||W,i=[],s=[],a=[],c=[];let l=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>l&&(l=e[u].length);++i<e[u].length;){const s=V(e[u][i]);if(!1!==n.alignDelimiters){const e=o(s);r[i]=e,(void 0===c[i]||e>c[i])&&(c[i]=e)}t.push(s)}s[u]=t,a[u]=r}let p=-1;if("object"==typeof r&&"length"in r)for(;++p<l;)i[p]=H(r[p]);else{const e=H(r);for(;++p<l;)i[p]=e}p=-1;const f=[],d=[];for(;++p<l;){const e=i[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,c[p]-t.length-r.length);const s=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>c[p]&&(c[p]=o),d[p]=o),f[p]=s}s.splice(1,0,f),a.splice(1,0,d),u=-1;const h=[];for(;++u<s.length;){const e=s[u],t=a[u];p=-1;const r=[];for(;++p<l;){const o=e[p]||"";let s="",a="";if(!1!==n.alignDelimiters){const e=c[p]-(t[p]||0),n=i[p];114===n?s=" ".repeat(e):99===n?e%2?(s=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(s=" ".repeat(e/2),a=s):a=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(s),r.push(o),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===l-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}
1function c(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=s(r[o],0,t,n);return a(),i}}function Fe(e){const t=this.stack[this.stack.length-2];(0,o.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function Re(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];(0,o.ok)("paragraph"===e.type);const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ze(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(s);let c=Ce.listItem(e,t,n,{...r,...a.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+s})),c}var Me=n(10660);const _e={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Ze={tokenize:function(e,t,n){let r,o,s;return a;function a(t){return 46===t||95===t?e.check(Ue,l,c)(t):null===t||(0,i.Ee)(t)||(0,i.Ny)(t)||45!==t&&(0,i.es)(t)?l(t):(s=!0,e.consume(t),a)}function c(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!s?n(e):t(e)}},partial:!0},Je={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?s(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Ue,t,s)(a):null===a||(0,i.Ee)(a)||(0,i.Ny)(a)?t(a):(e.consume(a),o)}function s(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Ue={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),s):93===a?(e.consume(a),o):60===a||null===a||(0,i.Ee)(a)||(0,i.Ny)(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||(0,i.Ee)(e)||(0,i.Ny)(e)?t(e):r(e)}function s(e){return(0,i.CW)(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):(0,i.CW)(t)?(e.consume(t),a):n(t)}},partial:!0},Ye={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return(0,i.lV)(e)?n(e):t(e)}},partial:!0},qe={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!Ke.call(r,r.previous)||et(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_e,e.attempt(Ze,e.attempt(Je,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Ke},Be={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",s=!1;return function(t){if((72===t||104===t)&&Ge.call(r,r.previous)&&!et(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if((0,i.CW)(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),c}return n(t)}function c(t){return 47===t?(e.consume(t),s?l:(s=!0,c)):n(t)}function l(t){return null===t||(0,i.JQ)(t)||(0,i.Ee)(t)||(0,i.Ny)(t)||(0,i.es)(t)?n(t):e.attempt(Ze,e.attempt(Je,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Ge},We={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,s;return function(t){if(!Xe(t)||!Qe.call(r,r.previous)||et(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return Xe(t)?(e.consume(t),a):64===t?(e.consume(t),c):n(t)}function c(t){return 46===t?e.check(Ye,u,l)(t):45===t||95===t||(0,i.lV)(t)?(s=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),o=!0,c}function u(a){return s&&o&&(0,i.CW)(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:Qe},Ve={};let He=48;for(;He<123;)Ve[He]=We,He++,58===He?He=65:91===He&&(He=97);function Ke(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||(0,i.Ee)(e)}function Ge(e){return!(0,i.CW)(e)}function Qe(e){return!(47===e||Xe(e))}function Xe(e){return 43===e||45===e||46===e||95===e||(0,i.lV)(e)}function et(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Ve[43]=We,Ve[45]=We,Ve[46]=We,Ve[95]=We,Ve[72]=[We,Be],Ve[104]=[We,Be],Ve[87]=[We,qe],Ve[119]=[We,qe];var tt=n(35460),nt=n(77508);const rt={tokenize:function(e,t,n){const r=this;return(0,nt.N)(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function ot(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){s=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}
1return function(o){if(!s||!s._balanced)return n(o);const a=(0,N.B)(r.sliceSerialize({start:s.end,end:r.now()}));if(94!==a.codePointAt(0)||!i.includes(a.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function it(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...c),e}function st(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),c};function c(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(c){if(a>999||93===c&&!s||null===c||91===c||(0,i.Ee)(c))return n(c);if(93===c){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes((0,N.B)(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return(0,i.Ee)(c)||(s=!0),a++,e.consume(c),92===c?u:l}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function at(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a,c=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(c>999||93===t&&!a||null===t||91===t||(0,i.Ee)(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return s=(0,N.B)(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return(0,i.Ee)(t)||(a=!0),c++,e.consume(t),92===t?p:u}function p(t){return 91===t||92===t||93===t?(e.consume(t),c++,u):u(t)}function f(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(s)||o.push(s),(0,nt.N)(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function ct(e,t,n){return e.check(tt.B,t,e.attempt(rt,t,n))}function lt(e){e.exit("gfmFootnoteDefinition")}var ut=n(43890),pt=n(23796);function ft(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let s=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(i){const c=(0,re.S)(o);if(126===i)return s>1?r(i):(e.consume(i),s++,a);if(s<2&&!t)return r(i);const l=e.exit("strikethroughSequenceTemporary"),u=(0,re.S)(i);return l._open=!u||2===u&&Boolean(c),l._close=!c||2===c&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},s=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&(0,ut.m)(s,s.length,0,(0,pt.W)(a,e.slice(r+1,n),t)),(0,ut.m)(s,s.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]
vendor: 7,529 bytes, line 1
1),(0,ut.m)(e,r-1,n-r+3,s),n=r+s.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class dt{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function ht(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function mt(e,t,n){const r=this;let o,s=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?x:c;if(i===x&&r.parser.lazy[r.now().line])return n(e);return i(e)};function c(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):(0,i.HP)(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f):n(t):(0,i.On)(t)?(0,nt.N)(e,l,"whitespace")(t):(a+=1,o&&(o=!1,s+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),u(t)))}function u(t){return null===t||124===t||(0,i.Ee)(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?p:u)}function p(t){return 92===t||124===t?(e.consume(t),u):u(t)}function f(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,(0,i.On)(t)?(0,nt.N)(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?m(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),h):k(t)}function h(t){return(0,i.On)(t)?(0,nt.N)(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(a+=1,g(t)):null===t||(0,i.HP)(t)?v(t):k(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),y(t)):k(t)}function y(t){return 45===t?(e.consume(t),y):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return(0,i.On)(t)?(0,nt.N)(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||(0,i.HP)(n))&&o&&s===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):k(n)}function k(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||(0,i.HP)(n)?(e.exit("tableRow"),t(n)):(0,i.On)(n)?(0,nt.N)(e,w,"whitespace")(n):(e.enter("data"),S(n))}function S(t){return null===t||124===t||(0,i.Ee)(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?O:S)}function O(t){return 92===t||124===t?(e.consume(t),S):S(t)}}function gt(e,t){let n,r,o,i=-1,s=!0,a=0,c=[0,0,0,0],l=[0,0,0,0],u=!1,p=0;const f=new dt;for(;++i<e.length;){const d=e[i],h=d[1];"enter"===d[0]?"tableHead"===h.type?(u=!1,0!==p&&(bt(f,t,p,n,r),r=void 0,p=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(s=!0,o=void 0,c=[0,0,0,0],l=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===h.type?2:r?3:1):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(s?s=!1:(0!==c[1]&&(l[0]=l[1],o=yt(f,t,c,a,void 0,o)),c=l,l=[c[1],i,0,0])):(s=!1,0===l[2]&&(0!==c[1]&&(l[0]=l[1],o=yt(f,t,c,a,void 0,o),c=[0,0,0,0]),l[2]=i)):"tableHead"===h.type?(u=!0,p=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(p=i,0!==c[1]?(l[0]=l[1],o=yt(f,t,c,a,i,o)):0!==l[1]&&(o=yt(f,t,l,a,i,o)),a=0):!a||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(l[3]=i)}for(0!==p&&bt(f,t,p,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=ht(t.events,i))}return e}function yt(e,t,n,r,o,i){const s=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},vt(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=vt(t.events,n[1]);if(i={type:s,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=vt(t.events,n[2]),i=vt(t.events,n[3]),s={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",s,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",s,t]])}return void 0!==o&&(i.end=Object.assign({},vt(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function bt(e,t,n,r,o){const i=[],s=vt(t.events,n);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function vt(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const kt={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return(0,i.Ee)(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),s):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),s):n(t)}function s(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return(0,i.HP)(r)?t(r):(0,i.On)(r)?e.check({tokenize:xt},t,n)(r):n(r)}}};function xt(e,t,n){return(0,nt.N)(e,function(e){return null===e?n(e):t(e)},"whitespace")}const wt={};function St(e){const t=e||wt,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return(0,Me.y)([{text:Ve},{document:{91:{name:"gfmFootnoteDefinition",tokenize:at,continuation:{tokenize:ct},exit:lt}},text:{91:{name:"gfmFootnoteCall",tokenize:st},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ot,resolveTo:it}}},ft(e),{flow:{null:{name:"table",tokenize:mt,resolveAll:gt}}},{text:{91:kt}}])}(t)),o.push([{transforms:[j],enter:{literalAutolink:k,literalAutolinkEmail:x,literalAutolinkHttp:x,literalAutolinkWww:x},exit:{literalAutolink:I,literalAutolinkEmail:O,literalAutolinkHttp:w,literalAutolinkWww:S}}
1,{enter:{gfmFootnoteCallString:T,gfmFootnoteCall:E,gfmFootnoteDefinitionLabelString:P,gfmFootnoteDefinition:D},exit:{gfmFootnoteCallString:L,gfmFootnoteCall:F,gfmFootnoteDefinitionLabelString:R,gfmFootnoteDefinition:z}},{canContainEols:["delete"],enter:{strikethrough:Y},exit:{strikethrough:q}},{enter:{table:$e,tableData:Ee,tableHeader:Ee,tableRow:Ne},exit:{codeText:Pe,table:Ae,tableData:Te,tableHeader:Te,tableRow:Te}},{exit:{taskListCheckValueChecked:Fe,taskListCheckValueUnchecked:Fe,paragraph:Re}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:b,notInConstruct:v},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:b,notInConstruct:v},{character:":",before:"[ps]",after:"\\/",inConstruct:b,notInConstruct:v}]},_(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U}],handlers:{delete:B}},Le(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ze}}]}}(t))}},78246:(e,t,n)=>{n.d(t,{Dz:()=>c,J$:()=>p,Qk:()=>l,Y0:()=>d,h2:()=>i,i0:()=>o});var r=n(81144),o=r.KC([r.Yj(),r.ai(),r.zM(),r.ch(),r.Ik({$state:r.Yj()})]);r.KC([r.Yj(),r.Ik({$state:r.Yj()})]),r.KC([r.ai(),r.Ik({$state:r.Yj()})]),r.KC([r.zM(),r.Ik({$state:r.Yj()})]);function i(e,t){if(null!=e)return"object"==typeof e&&"$state"in e?c(t,e.$state):e}function s(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function a(e){return(e.startsWith("/")?e.slice(1).split("/"):e.split("/")).map(s)}function c(e,t){if(!t||"/"===t)return e;const n=a(t);let r=e;for(const e of n){if(null==r)return;if(Array.isArray(r)){r=r[parseInt(e,10)]}else{if("object"!=typeof r)return;r=r[e]}}return r}var l="data-spec";function u(e,t,n){const r=a(t);if(0===r.length)return e;const o={...e};let i=o;for(let e=0;e<r.length-1;e++){const t=r[e],n=i[t];if(Array.isArray(n))i[t]=[...n];else if(null!==n&&"object"==typeof n)i[t]={...n};else{const n=r[e+1];i[t]=void 0!==n&&/^\d+$/.test(n)?[]:{}}i=i[t]}const s=r[r.length-1];return Array.isArray(i)?"-"===s?i.push(n):i[parseInt(s,10)]=n:i[s]=n,o}function p(e={}){let t={...e};const n=new Set;function r(){for(const e of n)e()}return{get:e=>c(t,e),set(e,n){c(t,e)!==n&&(t=u(t,e,n),r())},update(e){let n=!1,o=t;for(const[t,r]of Object.entries(e))c(o,t)!==r&&(o=u(o,t,r),n=!0);n&&(t=o,r())},getSnapshot:()=>t,getServerSnapshot:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)})}}var f=20;function d(e,t="",n=0,r,o){const i=r??new Set,s=o??{current:!1},a={};for(const[r,o]of Object.entries(e)){const e=`${t}/${r}`;n<f&&null!==o&&"object"==typeof o&&!Array.isArray(o)&&Object.getPrototypeOf(o)===Object.prototype&&!i.has(o)?(i.add(o),Object.assign(a,d(o,e,n+1,i,s))):a[e]=o}return a}},81144:(e,t,n)=>{n.d(t,{EB:()=>F,bz:()=>pe,YO:()=>ye,zM:()=>ae,k5:()=>je,RZ:()=>Ye,eu:()=>$e,ch:()=>le,ai:()=>re,Ik:()=>ve,g1:()=>Oe,Yj:()=>L,KC:()=>xe,L5:()=>de});var r=n(98824),o=n(62252),i=n(18399),s=n(1080),a=n(76635),c=n(9363),l=n(96121);const u=r.xI("ZodISODateTime",(e,t)=>{o.Ko.init(e,t),F.init(e,t)});const p=r.xI("ZodISODate",(e,t)=>{o.v1.init(e,t),F.init(e,t)});const f=r.xI("ZodISOTime",(e,t)=>{o.Ax.init(e,t),F.init(e,t)});const d=r.xI("ZodISODuration",(e,t)=>{o.$N.init(e,t),F.init(e,t)});var h=n(7432),m=n(29896);const g=(e,t)=>{m.a$.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>m.Wk(e,t)},flatten:{value:t=>m.JM(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,i.k8,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,i.k8,2)}},isEmpty:{get:()=>0===e.issues.length}})},y=r.xI("ZodError",g,{Parent:Error}),b=h.Tj(y),v=h.Rb(y),k=h.Od(y),x=h.wG(y),w=h.Mv(y),S=h.e2(y),O=h.GW(y),I=h.or(y),j=h.rh(y),C=h.VS(y),$=h.v_(y),A=h.R3(y),N=new WeakMap;function T(e,t,n){const r=Object.getPrototypeOf(e);let o=N.get(r);if(o||(o=new Set,N.set(r,o)),!o.has(t)){o.add(t);for(const e in n){const t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const E=r.xI("ZodType",(e,t)=>(o.W4.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:(0,l.uE)(e,"input"),output:(0,l.uE)(e,"output")}}),e.toJSONSchema=(0,l.OA)(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>b(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>k(e,t,n),e.parseAsync=async(t,n)=>v(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>x(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>w(e,t,n),e.decode=(t,n)=>S(e,t,n),e.encodeAsync=async(t,n)=>O(e,t,n),e.decodeAsync=async(t,n)=>I(e,t,n),e.safeEncode=(t,n)=>j(e,t,n),e.safeDecode=(t,n)=>C(e,t,n),e.safeEncodeAsync=async(t,n)=>$(e,t,n),e.safeDecodeAsync=async(t,n)=>A(e,t,n),T(e,"ZodType",{check(...e){const t=this.def;return this.clone(i.zM(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)}
1,clone(e,t){return i.o8(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return a.fU(qe,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return a.MB(e,t)}(e,t))},overwrite(e){return this.check(a.bS(e))},optional(){return Ee(this)},exactOptional(){return new Pe({type:"optional",innerType:this})},nullable(){return Le(this)},nullish(){return Ee(Le(this))},nonoptional(e){return function(e,t){return new ze({type:"nonoptional",innerType:e,...i.A2(t)})}(this,e)},array(){return ye(this)},or(e){return xe([this,e])},and(e){return new we({type:"intersection",left:this,right:e})},transform(e){return Ze(this,Ne(e))},default(e){return t=e,new Fe({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():i.yG(t)}});var t},prefault(e){return t=e,new Re({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():i.yG(t)}});var t},catch(e){return new Me({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:()=>t});var t},pipe(e){return Ze(this,e)},readonly(){return new Je({type:"readonly",innerType:this})},describe(e){const t=this.clone();return s.fd.add(t,{description:e}),t},meta(...e){if(0===e.length)return s.fd.get(this);const t=this.clone();return s.fd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get:()=>s.fd.get(e)?.description,configurable:!0}),e)),P=r.xI("_ZodString",(e,t)=>{o.$v.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.SW(e,t,n,r);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,T(e,"_ZodString",{regex(...e){return this.check(a.Fk(...e))},includes(...e){return this.check(a.dR(...e))},startsWith(...e){return this.check(a.$S(...e))},endsWith(...e){return this.check(a.ER(...e))},min(...e){return this.check(a.m9(...e))},max(...e){return this.check(a.Eb(...e))},length(...e){return this.check(a.YA(...e))},nonempty(...e){return this.check(a.m9(1,...e))},lowercase(e){return this.check(a.hH(e))},uppercase(e){return this.check(a.qF(e))},trim(){return this.check(a.WN())},normalize(...e){return this.check(a.lo(...e))},toLowerCase(){return this.check(a.Il())},toUpperCase(){return this.check(a.xY())},slugify(){return this.check(a.TL())}})}),D=r.xI("ZodString",(e,t)=>{o.$v.init(e,t),P.init(e,t),e.email=t=>e.check(a.Mu(R,t)),e.url=t=>e.check(a.Fn(_,t)),e.jwt=t=>e.check(a.rk(te,t)),e.emoji=t=>e.check(a.aC(Z,t)),e.guid=t=>e.check(a.tB(z,t)),e.uuid=t=>e.check(a.Be(M,t)),e.uuidv4=t=>e.check(a.nA(M,t)),e.uuidv6=t=>e.check(a.pY(M,t)),e.uuidv7=t=>e.check(a.wA(M,t)),e.nanoid=t=>e.check(a.Dl(J,t)),e.guid=t=>e.check(a.tB(z,t)),e.cuid=t=>e.check(a.fs(U,t)),e.cuid2=t=>e.check(a.Bj(Y,t)),e.ulid=t=>e.check(a.Ct(q,t)),e.base64=t=>e.check(a.rt(Q,t)),e.base64url=t=>e.check(a.cU(X,t)),e.xid=t=>e.check(a.Pw(B,t)),e.ksuid=t=>e.check(a._z(W,t)),e.ipv4=t=>e.check(a.Ny(V,t)),e.ipv6=t=>e.check(a.$O(H,t)),e.cidrv4=t=>e.check(a.Uy(K,t)),e.cidrv6=t=>e.check(a.gP(G,t)),e.e164=t=>e.check(a.KB(ee,t)),e.datetime=t=>e.check(function(e){return a.G1(u,e)}(t)),e.date=t=>e.check(function(e){return a.db(p,e)}(t)),e.time=t=>e.check(function(e){return a.Kn(f,e)}(t)),e.duration=t=>e.check(function(e){return a.f2(d,e)}(t))});function L(e){return a.Rl(D,e)}const F=r.xI("ZodStringFormat",(e,t)=>{o.EY.init(e,t),P.init(e,t)}),R=r.xI("ZodEmail",(e,t)=>{o.qG.init(e,t),F.init(e,t)});const z=r.xI("ZodGUID",(e,t)=>{o.Zc.init(e,t),F.init(e,t)});const M=r.xI("ZodUUID",(e,t)=>{o.Zn.init(e,t),F.init(e,t)});const _=r.xI("ZodURL",(e,t)=>{o.VY.init(e,t),F.init(e,t)});const Z=r.xI("ZodEmoji",(e,t)=>{o.cG.init(e,t),F.init(e,t)});const J=r.xI("ZodNanoID",(e,t)=>{o.Py.init(e,t),F.init(e,t)});const U=r.xI("ZodCUID",(e,t)=>{o.bl.init(e,t),F.init(e,t)});const Y=r.xI("ZodCUID2",(e,t)=>{o.Zu.init(e,t),F.init(e,t)});const q=r.xI("ZodULID",(e,t)=>{o.g5.init(e,t),F.init(e,t)});const B=r.xI("ZodXID",(e,t)=>{o.TF.init(e,t),F.init(e,t)});const W=r.xI("ZodKSUID",(e,t)=>{o.GY.init(e,t),F.init(e,t)});const V=r.xI("ZodIPv4",(e,t)=>{o.Lc.init(e,t),F.init(e,t)});const H=r.xI("ZodIPv6",(e,t)=>{o.Zy.init(e,t),F.init(e,t)});const K=r.xI("ZodCIDRv4",(e,t)=>{o.CI.init(e,t),F.init(e,t)});const G=r.xI("ZodCIDRv6",(e,t)=>{o.Cn.init(e,t),F.init(e,t)});const Q=r.xI("ZodBase64",(e,t)=>{o.Dq.init(e,t),F.init(e,t)});const X=r.xI("ZodBase64URL",(e,t)=>{o.CQ.init(e,t),F.init(e,t)});const ee=r.xI("ZodE164",(e,t)=>{o.Oy.init(e,t),F.init(e,t)});const te=r.xI("ZodJWT",(e,t)=>{o.h8.init(e,t),F.init(e,t)});const ne=r.xI("ZodNumber",(e,t)=>{o.vz.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.Wg(e,t,n,r),T(e,"ZodNumber",{gt(e,t){return this.check(a.Tx(e,t))},gte(e,t){return this.check(a.qm(e,t))},min(e,t){return this.check(a.qm(e,t))},lt(e,t){return this.check(a.Au(e,t))},lte(e,t){return this.check(a.Zm(e,t))},max(e,t){return this.check(a.Zm(e,t))},int(e){return this.check(ie(e))},safe(e){return this.check(ie(e))},positive(e){return this.check(a.Tx(0,e))},nonnegative(e){return this.check(a.qm(0,e))},negative(e){return this.check(a.Au(0,e))},nonpositive(e){return this.check(a.Zm(0,e))},multipleOf(e,t){return this.check(a.Hi(e,t))},step(e,t){return this.check(a.Hi(e,t))},finite(){return this}});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 re(e){return a.F7(ne,e)}const oe=r.xI("ZodNumberFormat",(e,t)=>{o.I.init(e,t),ne.init(e,t)});function ie(e){return a.LK(oe,e)}const se=r.xI("ZodBoolean",(e,t)=>{o.sF.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.dO(e,t,n,r)});function ae(e){return a._L(se,e)}const ce=r.xI("ZodNull",(e,t)=>{o.x8.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.In(e,t,n,r)});function le(e){return a.jw(ce,e)}const ue=r.xI("ZodAny",(e,t)=>{o.Gb.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.NX(e,t,n,r)});function pe(){return a.KA(ue)}const fe=r.xI("ZodUnknown",(e,t)=>{o.GP.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.NV(e,t,n,r)});function de(){return a.em(fe)}const he=r.xI("ZodNever",(e,t)=>{o.Um.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.RH(e,t,n,r)});function me(e){return a.G8(he,e)}const ge=r.xI("ZodArray",(e,t)=>{o.$p.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.cY(e,t,n,r),e.element=t.element,T(e,"ZodArray",{min(e,t){return this.check(a.m9(e,t))},nonempty(e){return this.check(a.m9(1,e))},max(e,t){return this.check(a.Eb(e,t))},length(e,t){return this.check(a.YA(e,t))},unwrap(){return this.element}})});function ye(e,t){return a.dZ(ge,e,t)}const be=r.xI("ZodObject",(e,t)=>{o.w.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.Ec(e,t,n,r),i.gJ(e,"shape",()=>t.shape),T(e,"ZodObject",{keyof(){return je(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:de()})},loose(){return this.clone({...this._zod.def,catchall:de()})},strict(){return this.clone({...this._zod.def,catchall:me()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return i.X$(this,e)},safeExtend(e){return i.W0(this,e)},merge(e){return i.h1(this,e)},pick(e){return i.Up(this,e)},omit(e){return i.cJ(this,e)},partial(...e){return i.OH(Te,this,e[0])},required(...e){return i.mw(ze,this,e[0])}})});function ve(e,t){const n={type:"object",shape:e??{},...i.A2(t)};return new be(n)}const ke=r.xI("ZodUnion",(e,t)=>{o.cu.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.iC(e,t,n,r),e.options=t.options});function xe(e,t){return new ke({type:"union",options:e,...i.A2(t)})}const we=r.xI("ZodIntersection",(e,t)=>{o.LJ.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.i_(e,t,n,r)});const Se=r.xI("ZodRecord",(e,t)=>{o.h.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.GC(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Oe(e,t,n){return t&&t._zod?new Se({type:"record",keyType:e,valueType:t,...i.A2(n)}):new Se({type:"record",keyType:L(),valueType:e,...i.A2(t)})}const Ie=r.xI("ZodEnum",(e,t)=>{o.VO.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.C0(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Ie({...t,checks:[],...i.A2(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Ie({...t,checks:[],...i.A2(r),entries:o})}});function je(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ie({type:"enum",entries:n,...i.A2(t)})}const Ce=r.xI("ZodLiteral",(e,t)=>{o.nu.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.Yv(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
1(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $e(e,t){return new Ce({type:"literal",values:Array.isArray(e)?e:[e],...i.A2(t)})}const Ae=r.xI("ZodTransform",(e,t)=>{o.Wc.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.xi(e,t,n,r),e._zod.parse=(n,o)=>{if("backward"===o.direction)throw new r.cV(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(i.sn(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(i.sn(t))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=s,n.fallback=!0,n)}});function Ne(e){return new Ae({type:"transform",transform:e})}const Te=r.xI("ZodOptional",(e,t)=>{o.ig.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.$k(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ee(e){return new Te({type:"optional",innerType:e})}const Pe=r.xI("ZodExactOptional",(e,t)=>{o.RL.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.$k(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const De=r.xI("ZodNullable",(e,t)=>{o.qc.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.yq(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Le(e){return new De({type:"nullable",innerType:e})}const Fe=r.xI("ZodDefault",(e,t)=>{o.rv.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.mh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const Re=r.xI("ZodPrefault",(e,t)=>{o.VF.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.A(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const ze=r.xI("ZodNonOptional",(e,t)=>{o.N$.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.cR(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const Me=r.xI("ZodCatch",(e,t)=>{o.t$.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.Q9(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const _e=r.xI("ZodPipe",(e,t)=>{o._m.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.fs(e,t,n,r),e.in=t.in,e.out=t.out});function Ze(e,t){return new _e({type:"pipe",in:e,out:t})}const Je=r.xI("ZodReadonly",(e,t)=>{o.Sb.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.$X(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});const Ue=r.xI("ZodLazy",(e,t)=>{o.kU.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.Tr(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Ye(e){return new Ue({type:"lazy",getter:e})}const qe=r.xI("ZodCustom",(e,t)=>{o.b0.init(e,t),E.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c.A6(e,t,n,r)});a.q0,a.mI}}]);
2//# sourceMappingURL=6835.cedfa6264dab15795af2.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.