"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[958],{93405:function(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,h=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},d=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});d<p;++d)if(t=arguments[d],null!=t)for(n in t)r=l(h,n),h!==(i=l(t,n))&&(f&&i&&(s(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&s(r)?r:{},a(h,{name:n,newValue:e(f,c,i)})):void 0!==i&&a(h,{name:n,newValue:i}));return h}},90318:function(e,t,n){var r=n(57861).Buffer;let i=void 0!==r,o=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,s=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function a(e,t,n){null==n&&null!==t&&"object"==typeof t&&(n=t,t=void 0),i&&r.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let a=JSON.parse(e,t);if(null===a||"object"!=typeof a)return a;let u=n&&n.protoAction||"error",c=n&&n.constructorAction||"error";if("ignore"===u&&"ignore"===c)return a;if("ignore"!==u&&"ignore"!==c){if(!1===o.test(e)&&!1===s.test(e))return a}else if("ignore"!==u&&"ignore"===c){if(!1===o.test(e))return a}else if(!1===s.test(e))return a;return l(a,{protoAction:u,constructorAction:c,safe:n&&n.safe})}function l(e,{protoAction:t="error",constructorAction:n="error",safe:r}={}){let i=[e];for(;i.length;){let e=i;for(let o of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(!0===r)return null;if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if("ignore"!==n&&Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(!0===r)return null;if("error"===n)throw SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(let e in o){let t=o[e];t&&"object"==typeof t&&i.push(t)}}}return e}function u(e,t,n){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return a(e,t,n)}finally{Error.stackTraceLimit=r}}e.exports=u,e.exports.default=u,e.exports.parse=u,e.exports.safeParse=function(e,t){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return a(e,t,{safe:!0})}catch(e){return null}finally{Error.stackTraceLimit=n}},e.exports.scan=l},22153:function(e,t,n){/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var r=n(52983),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return a(function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})},[e,n,t]),s(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},99273:function(e,t,n){e.exports=n(22153)},83810:function(e,t,n){n.d(t,{x8:function(){return eR},VY:function(){return eA},dk:function(){return eI},aV:function(){return eC},h_:function(){return eT},fC:function(){return eS},Dx:function(){return eP},xz:function(){return eE}});var r=n(52983),i=n(74810),o=n(96664),s=n(88681),a=n(99279),l=n(63146),u=n(87997),c=n(62787),h=n(63730),d=n(73233),p=n(56101),f=n(97458),m=r.forwardRef((e,t)=>{let{container:n,...i}=e,[o,s]=r.useState(!1);(0,p.b)(()=>s(!0),[]);let a=n||o&&globalThis?.document?.body;return a?h.createPortal((0,f.jsx)(d.WV.div,{...i,ref:t}),a):null});m.displayName="Portal";var g=n(87170),y=0;function v(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var x=n(94154),b=n(62216),k=n(99457),w=(0,n(34514)._)(),S=function(){},E=r.forwardRef(function(e,t){var n=r.useRef(null),i=r.useState({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:S}),o=i[0],s=i[1],a=e.forwardProps,l=e.children,u=e.className,c=e.removeScrollBar,h=e.enabled,d=e.shards,p=e.sideCar,f=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=e.gapMode,b=(0,x._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=(0,k.q)([n,t]),T=(0,x.pi)((0,x.pi)({},b),o);return r.createElement(r.Fragment,null,h&&r.createElement(p,{sideCar:w,removeScrollBar:c,shards:d,noIsolation:f,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:v}),a?r.cloneElement(r.Children.only(l),(0,x.pi)((0,x.pi)({},T),{ref:E})):r.createElement(void 0===y?"div":y,(0,x.pi)({},T,{className:u,ref:E}),l))});E.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},E.classNames={fullWidth:b.zi,zeroRight:b.pF};var T=n(64760),C=n(32296),A=n(55815),P=!1;if("undefined"!=typeof window)try{var I=Object.defineProperty({},"passive",{get:function(){return P=!0,!0}});window.addEventListener("test",I,I),window.removeEventListener("test",I,I)}catch(e){P=!1}var R=!!P&&{passive:!1},D=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},_=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),O(e,r)){var i=M(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},O=function(e,t){return"v"===e?D(t,"overflowY"):D(t,"overflowX")},M=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},N=function(e,t,n,r,i){var o,s=(o=window.getComputedStyle(t).direction,"h"===e&&"rtl"===o?-1:1),a=s*r,l=n.target,u=t.contains(l),c=!1,h=a>0,d=0,p=0;do{var f=M(e,l),m=f[0],g=f[1]-f[2]-s*m;(m||g)&&O(e,l)&&(d+=g,p+=m),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return h&&(i&&1>Math.abs(d)||!i&&a>d)?c=!0:!h&&(i&&1>Math.abs(p)||!i&&-a>p)&&(c=!0),c},L=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F=function(e){return[e.deltaX,e.deltaY]},j=function(e){return e&&"current"in e?e.current:e},V=0,z=[],B=(0,T.L)(w,function(e){var t=r.useRef([]),n=r.useRef([0,0]),i=r.useRef(),o=r.useState(V++)[0],s=r.useState(A.Ws)[0],a=r.useRef(e);r.useEffect(function(){a.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,x.ev)([e.lockRef.current],(e.shards||[]).map(j),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!a.current.allowPinchZoom;var r,o=L(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],u="deltaY"in e?e.deltaY:s[1]-o[1],c=e.target,h=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===h&&"range"===c.type)return!1;var d=_(h,c);if(!d)return!0;if(d?r=h:(r="v"===h?"h":"v",d=_(h,c)),!d)return!1;if(!i.current&&"changedTouches"in e&&(l||u)&&(i.current=r),!r)return!0;var p=i.current||r;return N(p,t,e,"h"===p?l:u,!0)},[]),u=r.useCallback(function(e){if(z.length&&z[z.length-1]===s){var n="deltaY"in e?F(e):L(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(a.current.shards||[]).map(j).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!a.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=r.useCallback(function(e,n,r,i){var o={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),h=r.useCallback(function(e){n.current=L(e),i.current=void 0},[]),d=r.useCallback(function(t){c(t.type,F(t),t.target,l(t,e.lockRef.current))},[]),p=r.useCallback(function(t){c(t.type,L(t),t.target,l(t,e.lockRef.current))},[]);r.useEffect(function(){return z.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,R),document.addEventListener("touchmove",u,R),document.addEventListener("touchstart",h,R),function(){z=z.filter(function(e){return e!==s}),document.removeEventListener("wheel",u,R),document.removeEventListener("touchmove",u,R),document.removeEventListener("touchstart",h,R)}},[]);var f=e.removeScrollBar,m=e.inert;return r.createElement(r.Fragment,null,m?r.createElement(s,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,f?r.createElement(C.jp,{gapMode:e.gapMode}):null)}),U=r.forwardRef(function(e,t){return r.createElement(E,(0,x.pi)({},e,{ref:t,sideCar:B}))});U.classNames=E.classNames;var H=n(50726),q=n(97415),W="Dialog",[$,Y]=(0,s.b)(W),[K,X]=$(W),Z=e=>{let{__scopeDialog:t,children:n,open:i,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,c=r.useRef(null),h=r.useRef(null),[d=!1,p]=(0,l.T)({prop:i,defaultProp:o,onChange:s});return(0,f.jsx)(K,{scope:t,triggerRef:c,contentRef:h,contentId:(0,a.M)(),titleId:(0,a.M)(),descriptionId:(0,a.M)(),open:d,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:u,children:n})};Z.displayName=W;var J="DialogTrigger",G=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,s=X(J,n),a=(0,o.e)(t,s.triggerRef);return(0,f.jsx)(d.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":ey(s.open),...r,ref:a,onClick:(0,i.M)(e.onClick,s.onOpenToggle)})});G.displayName=J;var Q="DialogPortal",[ee,et]=$(Q,{forceMount:void 0}),en=e=>{let{__scopeDialog:t,forceMount:n,children:i,container:o}=e,s=X(Q,t);return(0,f.jsx)(ee,{scope:t,forceMount:n,children:r.Children.map(i,e=>(0,f.jsx)(g.z,{present:n||s.open,children:(0,f.jsx)(m,{asChild:!0,container:o,children:e})}))})};en.displayName=Q;var er="DialogOverlay",ei=r.forwardRef((e,t)=>{let n=et(er,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=X(er,e.__scopeDialog);return o.modal?(0,f.jsx)(g.z,{present:r||o.open,children:(0,f.jsx)(eo,{...i,ref:t})}):null});ei.displayName=er;var eo=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(er,n);return(0,f.jsx)(U,{as:q.g7,allowPinchZoom:!0,shards:[i.contentRef],children:(0,f.jsx)(d.WV.div,{"data-state":ey(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),es="DialogContent",ea=r.forwardRef((e,t)=>{let n=et(es,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=X(es,e.__scopeDialog);return(0,f.jsx)(g.z,{present:r||o.open,children:o.modal?(0,f.jsx)(el,{...i,ref:t}):(0,f.jsx)(eu,{...i,ref:t})})});ea.displayName=es;var el=r.forwardRef((e,t)=>{let n=X(es,e.__scopeDialog),s=r.useRef(null),a=(0,o.e)(t,n.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,H.hideOthers)(e)},[]),(0,f.jsx)(ec,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:(0,i.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,i.M)(e.onFocusOutside,e=>e.preventDefault())})}),eu=r.forwardRef((e,t)=>{let n=X(es,e.__scopeDialog),i=r.useRef(!1),o=r.useRef(!1);return(0,f.jsx)(ec,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||n.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let r=t.target;n.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),ec=r.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,...l}=e,h=X(es,n),d=r.useRef(null),p=(0,o.e)(t,d);return r.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??v()),document.body.insertAdjacentElement("beforeend",e[1]??v()),y++,()=>{1===y&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),y--}},[]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.M,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a,children:(0,f.jsx)(u.XB,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":ey(h.open),...l,ref:p,onDismiss:()=>h.onOpenChange(!1)})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ek,{titleId:h.titleId}),(0,f.jsx)(ew,{contentRef:d,descriptionId:h.descriptionId})]})]})}),eh="DialogTitle",ed=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(eh,n);return(0,f.jsx)(d.WV.h2,{id:i.titleId,...r,ref:t})});ed.displayName=eh;var ep="DialogDescription",ef=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(ep,n);return(0,f.jsx)(d.WV.p,{id:i.descriptionId,...r,ref:t})});ef.displayName=ep;var em="DialogClose",eg=r.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,o=X(em,n);return(0,f.jsx)(d.WV.button,{type:"button",...r,ref:t,onClick:(0,i.M)(e.onClick,()=>o.onOpenChange(!1))})});function ey(e){return e?"open":"closed"}eg.displayName=em;var ev="DialogTitleWarning",[ex,eb]=(0,s.k)(ev,{contentName:es,titleName:eh,docsSlug:"dialog"}),ek=({titleId:e})=>{let t=eb(ev),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return r.useEffect(()=>{e&&!document.getElementById(e)&&console.error(n)},[n,e]),null},ew=({contentRef:e,descriptionId:t})=>{let n=eb("DialogDescriptionWarning"),i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${n.contentName}}.`;return r.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&!document.getElementById(t)&&console.warn(i)},[i,e,t]),null},eS=Z,eE=G,eT=en,eC=ei,eA=ea,eP=ed,eI=ef,eR=eg},73681:function(e,t,n){let r;n.d(t,{RJ:function(){return eD}});var i=n(52983),o=n(90318);n(41187);var s=((e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r})("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);Symbol.for("vercel.ai.validator");var{btoa:a,atob:l}=globalThis;Symbol("Let zodToJsonSchema decide on which parser to use");let u=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};var c={code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},h={code:"1",name:"function_call",parse:e=>{if(null==e||"object"!=typeof e||!("function_call"in e)||"object"!=typeof e.function_call||null==e.function_call||!("name"in e.function_call)||!("arguments"in e.function_call)||"string"!=typeof e.function_call.name||"string"!=typeof e.function_call.arguments)throw Error('"function_call" parts expect an object with a "function_call" property.');return{type:"function_call",value:e}}},d={code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw Error('"data" parts expect an array value.');return{type:"data",value:e}}},p={code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},f={code:"4",name:"assistant_message",parse:e=>{if(null==e||"object"!=typeof e||!("id"in e)||!("role"in e)||!("content"in e)||"string"!=typeof e.id||"string"!=typeof e.role||"assistant"!==e.role||!Array.isArray(e.content)||!e.content.every(e=>null!=e&&"object"==typeof e&&"type"in e&&"text"===e.type&&"text"in e&&null!=e.text&&"object"==typeof e.text&&"value"in e.text&&"string"==typeof e.text.value))throw Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},m={code:"5",name:"assistant_control_data",parse:e=>{if(null==e||"object"!=typeof e||!("threadId"in e)||!("messageId"in e)||"string"!=typeof e.threadId||"string"!=typeof e.messageId)throw Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},g={code:"6",name:"data_message",parse:e=>{if(null==e||"object"!=typeof e||!("role"in e)||!("data"in e)||"string"!=typeof e.role||"data"!==e.role)throw Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},y={code:"7",name:"tool_calls",parse:e=>{if(null==e||"object"!=typeof e||!("tool_calls"in e)||"object"!=typeof e.tool_calls||null==e.tool_calls||!Array.isArray(e.tool_calls)||e.tool_calls.some(e=>null==e||"object"!=typeof e||!("id"in e)||"string"!=typeof e.id||!("type"in e)||"string"!=typeof e.type||!("function"in e)||null==e.function||"object"!=typeof e.function||!("arguments"in e.function)||"string"!=typeof e.function.name||"string"!=typeof e.function.arguments))throw Error('"tool_calls" parts expect an object with a ToolCallPayload.');return{type:"tool_calls",value:e}}},v={code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},x={code:"9",name:"tool_call",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName||!("args"in e)||"object"!=typeof e.args)throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},b={code:"a",name:"tool_result",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("result"in e))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},k={code:"b",name:"tool_call_streaming_start",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName)throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},w={code:"c",name:"tool_call_delta",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("argsTextDelta"in e)||"string"!=typeof e.argsTextDelta)throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},S={code:"d",name:"finish_message",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason||!("usage"in e)||null==e.usage||"object"!=typeof e.usage||!("promptTokens"in e.usage)||!("completionTokens"in e.usage))throw Error('"finish_message" parts expect an object with a "finishReason" and "usage" property.');return"number"!=typeof e.usage.promptTokens&&(e.usage.promptTokens=Number.NaN),"number"!=typeof e.usage.completionTokens&&(e.usage.completionTokens=Number.NaN),{type:"finish_message",value:e}}},E={[c.code]:c,[h.code]:h,[d.code]:d,[p.code]:p,[f.code]:f,[m.code]:m,[g.code]:g,[y.code]:y,[v.code]:v,[x.code]:x,[b.code]:b,[k.code]:k,[w.code]:w,[S.code]:S};c.name,c.code,h.name,h.code,d.name,d.code,p.name,p.code,f.name,f.code,m.name,m.code,g.name,g.code,y.name,y.code,v.name,v.code,x.name,x.code,b.name,b.code,k.name,k.code,w.name,w.code,S.name,S.code;var T=[c,h,d,p,f,m,g,y,v,x,b,k,w,S].map(e=>e.code),C=e=>{let t=e.indexOf(":");if(-1===t)throw Error("Failed to parse stream string. No separator found.");let n=e.slice(0,t);if(!T.includes(n))throw Error(`Failed to parse stream string. Invalid code ${n}.`);let r=JSON.parse(e.slice(t+1));return E[n].parse(r)};async function*A(e,{isAborted:t}={}){let n=new TextDecoder,r=[],i=0;for(;;){let{value:o}=await e.read();if(o&&(r.push(o),i+=o.length,10!==o[o.length-1]))continue;if(0===r.length)break;let s=function(e,t){let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return e.length=0,n}(r,i);for(let e of(i=0,n.decode(s,{stream:!0}).split("\n").filter(e=>""!==e).map(C)))yield e;if(null==t?void 0:t()){e.cancel();break}}}function P(e,t){return e&&t&&t.length?{...e,annotations:[...t]}:e}async function I({reader:e,abortControllerRef:t,update:n,onToolCall:r,onFinish:i,generateId:a=s,getCurrentDate:l=()=>new Date}){var u;let c;let h=l(),d={data:[]},p={},f={completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},m="unknown";for await(let{type:i,value:s}of A(e,{isAborted:()=>(null==t?void 0:t.current)===null})){if("error"===i)throw Error(s);if("text"===i&&(d.text?d.text={...d.text,content:(d.text.content||"")+s}:d.text={id:a(),role:"assistant",content:s,createdAt:h}),"finish_message"===i){let{completionTokens:e,promptTokens:t}=s.usage;m=s.finishReason,f={completionTokens:e,promptTokens:t,totalTokens:e+t}}if("tool_call_streaming_start"===i)null==d.text&&(d.text={id:a(),role:"assistant",content:"",createdAt:h}),null==d.text.toolInvocations&&(d.text.toolInvocations=[]),p[s.toolCallId]={text:"",toolName:s.toolName,prefixMapIndex:d.text.toolInvocations.length},d.text.toolInvocations.push({state:"partial-call",toolCallId:s.toolCallId,toolName:s.toolName,args:void 0});else if("tool_call_delta"===i){let e=p[s.toolCallId];e.text+=s.argsTextDelta;let{value:t}=function(e){if(void 0===e)return{value:void 0,state:"undefined-input"};try{return{value:o.parse(e),state:"successful-parse"}}catch(t){try{return{value:o.parse(function(e){let t=["ROOT"],n=-1,r=null;function i(e,i,o){switch(e){case'"':n=i,t.pop(),t.push(o),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=i,r=i,t.pop(),t.push(o),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=i,t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"{":n=i,t.pop(),t.push(o),t.push("INSIDE_OBJECT_START");break;case"[":n=i,t.pop(),t.push(o),t.push("INSIDE_ARRAY_START")}}function o(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function s(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(let a=0;a<e.length;a++){let l=e[a];switch(t[t.length-1]){case"ROOT":i(l,a,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":n=a,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":i(l,a,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":o(l,a);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),n=a;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:n=a}break;case"INSIDE_ARRAY_START":"]"===l?(n=a,t.pop()):(n=a,i(l,a,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=a,t.pop();break;default:n=a}break;case"INSIDE_ARRAY_AFTER_COMMA":i(l,a,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),n=a;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=a;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&o(l,a);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&o(l,a);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a);break;default:t.pop()}break;case"INSIDE_LITERAL":{let i=e.substring(r,a+1);"false".startsWith(i)||"true".startsWith(i)||"null".startsWith(i)?n=a:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?o(l,a):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a))}}}let a=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case"INSIDE_STRING":a+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":a+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":a+="]";break;case"INSIDE_LITERAL":{let t=e.substring(r,e.length);"true".startsWith(t)?a+="true".slice(t.length):"false".startsWith(t)?a+="false".slice(t.length):"null".startsWith(t)&&(a+="null".slice(t.length))}}return a}(e)),state:"repaired-parse"}}catch(e){}}return{value:void 0,state:"failed-parse"}}(e.text);d.text.toolInvocations[e.prefixMapIndex]={state:"partial-call",toolCallId:s.toolCallId,toolName:e.toolName,args:t},d.text.internalUpdateId=a()}else if("tool_call"===i){if(null!=p[s.toolCallId]?d.text.toolInvocations[p[s.toolCallId].prefixMapIndex]={state:"call",...s}:(null==d.text&&(d.text={id:a(),role:"assistant",content:"",createdAt:h}),null==d.text.toolInvocations&&(d.text.toolInvocations=[]),d.text.toolInvocations.push({state:"call",...s})),d.text.internalUpdateId=a(),r){let e=await r({toolCall:s});null!=e&&(d.text.toolInvocations[d.text.toolInvocations.length-1]={state:"result",...s,result:e})}}else if("tool_result"===i){let e=null==(u=d.text)?void 0:u.toolInvocations;if(null==e)throw Error("tool_result must be preceded by a tool_call");let t=e.findIndex(e=>e.toolCallId===s.toolCallId);if(-1===t)throw Error("tool_result must be preceded by a tool_call with the same toolCallId");e[t]={...e[t],state:"result",...s}}let e=null;"function_call"===i&&(d.function_call={id:a(),role:"assistant",content:"",function_call:s.function_call,name:s.function_call.name,createdAt:h},e=d.function_call);let t=null;"tool_calls"===i&&(d.tool_calls={id:a(),role:"assistant",content:"",tool_calls:s.tool_calls,createdAt:h},t=d.tool_calls),"data"===i&&d.data.push(...s);let l=d.text;"message_annotations"===i&&(c?c.push(...s):c=[...s],e=P(d.function_call,c),t=P(d.tool_calls,c),l=P(d.text,c)),(null==c?void 0:c.length)&&["text","function_call","tool_calls"].forEach(e=>{d[e]&&(d[e].annotations=[...c])}),n([e,t,l].filter(Boolean).map(e=>({...P(e,c)})),[...d.data])}return null==i||i({prefixMap:d,finishReason:m,usage:f}),{messages:[d.text,d.function_call,d.tool_calls].filter(Boolean),data:d.data}}var R=()=>fetch;async function D({api:e,body:t,streamProtocol:n="data",credentials:r,headers:i,abortController:o,restoreMessagesOnFailure:s,onResponse:a,onUpdate:l,onFinish:u,onToolCall:c,generateId:h,fetch:d=R()}){var p,f;let m=await d(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",...i},signal:null==(p=null==o?void 0:o())?void 0:p.signal,credentials:r}).catch(e=>{throw s(),e});if(a)try{await a(m)}catch(e){throw e}if(!m.ok)throw s(),Error(null!=(f=await m.text())?f:"Failed to fetch the chat response.");if(!m.body)throw Error("The response body is empty.");let g=m.body.getReader();switch(n){case"text":{let e=function(e){let t=new TextDecoder;return function(e){return e?t.decode(e,{stream:!0}):""}}(),t={id:h(),createdAt:new Date,role:"assistant",content:""};for(;;){let{done:n,value:r}=await g.read();if(n)break;if(t.content+=e(r),l([{...t}],[]),(null==o?void 0:o())===null){g.cancel();break}}return null==u||u(t,{usage:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},finishReason:"unknown"}),{messages:[t],data:[]}}case"data":return await I({reader:g,abortControllerRef:null!=o?{current:o()}:void 0,update:l,onToolCall:c,onFinish({prefixMap:e,finishReason:t,usage:n}){u&&null!=e.text&&u(e.text,{usage:n,finishReason:t})},generateId:h});default:throw Error(`Unknown stream protocol: ${n}`)}}async function _({getStreamedResponse:e,experimental_onFunctionCall:t,experimental_onToolCall:n,updateChatRequest:r,getCurrentMessages:i}){for(;;){let o=await e();if("messages"in o){let e=!1;for(let s of o.messages)if(void 0!==s.function_call&&"string"!=typeof s.function_call||void 0!==s.tool_calls&&"string"!=typeof s.tool_calls){if(e=!0,t){let n=s.function_call;if("object"!=typeof n){console.warn("experimental_onFunctionCall should not be defined when using tools");continue}let o=await t(i(),n);if(void 0===o){e=!1;break}r(o)}if(n){let t=s.tool_calls;if(!Array.isArray(t)||t.some(e=>"object"!=typeof e)){console.warn("experimental_onToolCall should not be defined when using tools");continue}let o=await n(i(),t);if(void 0===o){e=!1;break}r(o)}}if(!e)break}else{let e=function(e){for(let t of e.messages){if(void 0!==t.tool_calls)for(let e of t.tool_calls)"object"==typeof e&&e.function.arguments&&"string"!=typeof e.function.arguments&&(e.function.arguments=JSON.stringify(e.function.arguments));void 0!==t.function_call&&"object"==typeof t.function_call&&t.function_call.arguments&&"string"!=typeof t.function_call.arguments&&(t.function_call.arguments=JSON.stringify(t.function_call.arguments))}};if((void 0===o.function_call||"string"==typeof o.function_call)&&(void 0===o.tool_calls||"string"==typeof o.tool_calls))break;if(t){let n=o.function_call;if("object"!=typeof n){console.warn("experimental_onFunctionCall should not be defined when using tools");continue}let s=await t(i(),n);if(void 0===s)break;e(s),r(s)}if(n){let t=o.tool_calls;if("object"!=typeof t){console.warn("experimental_onToolCall should not be defined when using functions");continue}let s=await n(i(),t);if(void 0===s)break;e(s),r(s)}}}}Symbol.for("vercel.ai.schema");var O=n(99273);let M=()=>{},N=M(),L=Object,F=e=>e===N,j=e=>"function"==typeof e,V=(e,t)=>({...e,...t}),z=e=>j(e.then),B=new WeakMap,U=0,H=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(L(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=B.get(e))return t;if(t=++U+"~",B.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=H(e[n])+",";B.set(e,t)}if(i==L){t="#";let r=L.keys(e).sort();for(;!F(n=r.pop());)F(e[n])||(t+=n+":"+H(e[n])+",");B.set(e,t)}}return t},q=new WeakMap,W={},$={},Y="undefined",K=typeof window!=Y,X=typeof document!=Y,Z=()=>K&&typeof window.requestAnimationFrame!=Y,J=(e,t)=>{let n=q.get(e);return[()=>!F(t)&&e.get(t)||W,r=>{if(!F(t)){let i=e.get(t);t in $||($[t]=i),n[5](t,V(i,r),i||W)}},n[6],()=>!F(t)&&t in $?$[t]:!F(t)&&e.get(t)||W]},G=!0,[Q,ee]=K&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[M,M],et={initFocus:e=>(X&&document.addEventListener("visibilitychange",e),Q("focus",e),()=>{X&&document.removeEventListener("visibilitychange",e),ee("focus",e)}),initReconnect:e=>{let t=()=>{G=!0,e()},n=()=>{G=!1};return Q("online",t),Q("offline",n),()=>{ee("online",t),ee("offline",n)}}},en=!i.useId,er=!K||"Deno"in window,ei=e=>Z()?window.requestAnimationFrame(e):setTimeout(e,1),eo=er?i.useEffect:i.useLayoutEffect,es="undefined"!=typeof navigator&&navigator.connection,ea=!er&&es&&(["slow-2g","2g"].includes(es.effectiveType)||es.saveData),el=e=>{if(j(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?H(e):"",t]},eu=0,ec=()=>++eu;var eh={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function ed(...e){let[t,n,r,i]=e,o=V({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=o.populateCache,a=o.rollbackOnError,l=o.optimisticData,u=e=>"function"==typeof a?a(e):!1!==a,c=o.throwOnError;if(j(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(h))}return h(n);async function h(n){let i;let[a]=el(n);if(!a)return;let[h,d]=J(t,a),[p,f,m,g]=q.get(t),y=()=>{let e=p[a];return(j(o.revalidate)?o.revalidate(h().data,n):!1!==o.revalidate)&&(delete m[a],delete g[a],e&&e[0])?e[0](2).then(()=>h().data):h().data};if(e.length<3)return y();let v=r,x=ec();f[a]=[x,0];let b=!F(l),k=h(),w=k.data,S=k._c,E=F(S)?w:S;if(b&&d({data:l=j(l)?l(E,w):l,_c:E}),j(v))try{v=v(E)}catch(e){i=e}if(v&&z(v)){if(v=await v.catch(e=>{i=e}),x!==f[a][0]){if(i)throw i;return v}i&&b&&u(i)&&(s=!0,d({data:E,_c:N}))}if(s&&!i&&(j(s)?d({data:s(v,E),error:N,_c:N}):d({data:v,error:N,_c:N})),f[a][1]=ec(),Promise.resolve(y()).then(()=>{d({_c:N})}),i){if(c)throw i;return}return v}}let ep=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},ef=(e,t)=>{if(!q.has(e)){let n=V(et,t),r={},i=ed.bind(N,e),o=M,s={},a=(e,t)=>{let n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);let i=s[t];if(i)for(let e of i)e(n,r)},u=()=>{if(!q.has(e)&&(q.set(e,[r,{},{},{},i,l,a]),!er)){let t=n.initFocus(setTimeout.bind(N,ep.bind(N,r,0))),i=n.initReconnect(setTimeout.bind(N,ep.bind(N,r,1)));o=()=>{t&&t(),i&&i(),q.delete(e)}}};return u(),[e,i,u,o]}return[e,q.get(e)[4]]},[em,eg]=ef(new Map),ey=V({onLoadingSlow:M,onSuccess:M,onError:M,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;(F(o)||!(s>o))&&setTimeout(r,a,i)},onDiscarded:M,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ea?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:ea?5e3:3e3,compare:(e,t)=>H(e)==H(t),isPaused:()=>!1,cache:em,mutate:eg,fallback:{}},{isOnline:()=>G,isVisible:()=>{let e=X&&document.visibilityState;return F(e)||"hidden"!==e}}),ev=(e,t)=>{let n=V(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:s}=t;r&&o&&(n.use=r.concat(o)),i&&s&&(n.fallback=V(i,s))}return n},ex=(0,i.createContext)({}),eb=K&&window.__SWR_DEVTOOLS_USE__,ek=eb?window.__SWR_DEVTOOLS_USE__:[],ew=e=>j(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],eS=()=>V(ey,(0,i.useContext)(ex)),eE=ek.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=el(t),[,,,i]=q.get(em);if(r.startsWith("$inf$"))return n(...e);let o=i[r];return F(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),eT=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};eb&&(window.__SWR_DEVTOOLS_REACT__=i);let eC=i.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),eA={dedupe:!0};L.defineProperty(e=>{let{value:t}=e,n=(0,i.useContext)(ex),r=j(t),o=(0,i.useMemo)(()=>r?t(n):t,[r,n,t]),s=(0,i.useMemo)(()=>r?o:ev(n,o),[r,n,o]),a=o&&o.provider,l=(0,i.useRef)(N);a&&!l.current&&(l.current=ef(a(s.cache||em),o));let u=l.current;return u&&(s.cache=u[0],s.mutate=u[1]),eo(()=>{if(u)return u[2]&&u[2](),u[3]},[]),(0,i.createElement)(ex.Provider,V(e,{value:s}))},"defaultValue",{value:ey});let eP=(r=(e,t,n)=>{let{cache:r,compare:o,suspense:s,fallbackData:a,revalidateOnMount:l,revalidateIfStale:u,refreshInterval:c,refreshWhenHidden:h,refreshWhenOffline:d,keepPreviousData:p}=n,[f,m,g,y]=q.get(r),[v,x]=el(e),b=(0,i.useRef)(!1),k=(0,i.useRef)(!1),w=(0,i.useRef)(v),S=(0,i.useRef)(t),E=(0,i.useRef)(n),T=()=>E.current,C=()=>T().isVisible()&&T().isOnline(),[A,P,I,R]=J(r,v),D=(0,i.useRef)({}).current,_=F(a)?n.fallback[v]:a,M=(e,t)=>{for(let n in D)if("data"===n){if(!o(e[n],t[n])&&(!F(e[n])||!o(K,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},L=(0,i.useMemo)(()=>{let e=!!v&&!!t&&(F(l)?!T().isPaused()&&!s&&(!!F(u)||u):l),n=t=>{let n=V(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=A(),i=R(),o=n(r),a=r===i?o:n(i),c=o;return[()=>{let e=n(A());return M(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>a]},[r,v]),z=(0,O.useSyncExternalStore)((0,i.useCallback)(e=>I(v,(t,n)=>{M(n,t)||e()}),[r,v]),L[0],L[1]),B=!b.current,U=f[v]&&f[v].length>0,H=z.data,W=F(H)?_:H,$=z.error,Y=(0,i.useRef)(W),K=p?F(H)?Y.current:H:W,X=(!U||!!F($))&&(B&&!F(l)?l:!T().isPaused()&&(s?!F(W)&&u:F(W)||u)),Z=!!(v&&t&&B&&X),G=F(z.isValidating)?Z:z.isValidating,Q=F(z.isLoading)?Z:z.isLoading,ee=(0,i.useCallback)(async e=>{let t,r;let i=S.current;if(!v||!i||k.current||T().isPaused())return!1;let s=!0,a=e||{},l=!g[v]||!a.dedupe,u=()=>en?!k.current&&v===w.current&&b.current:v===w.current,c={isValidating:!1,isLoading:!1},h=()=>{P(c)},d=()=>{let e=g[v];e&&e[1]===r&&delete g[v]},p={isValidating:!0};F(A().data)&&(p.isLoading=!0);try{if(l&&(P(p),n.loadingTimeout&&F(A().data)&&setTimeout(()=>{s&&u()&&T().onLoadingSlow(v,n)},n.loadingTimeout),g[v]=[i(x),ec()]),[t,r]=g[v],t=await t,l&&setTimeout(d,n.dedupingInterval),!g[v]||g[v][1]!==r)return l&&u()&&T().onDiscarded(v),!1;c.error=N;let e=m[v];if(!F(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return h(),l&&u()&&T().onDiscarded(v),!1;let a=A().data;c.data=o(a,t)?a:t,l&&u()&&T().onSuccess(t,v,n)}catch(n){d();let e=T(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=n,l&&u()&&(e.onError(n,v,e),(!0===t||j(t)&&t(n))&&(!T().revalidateOnFocus||!T().revalidateOnReconnect||C())&&e.onErrorRetry(n,v,e,e=>{let t=f[v];t&&t[0]&&t[0](eh.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0})))}return s=!1,h(),!0},[v,r]),et=(0,i.useCallback)((...e)=>ed(r,w.current,...e),[]);if(eo(()=>{S.current=t,E.current=n,F(H)||(Y.current=H)}),eo(()=>{if(!v)return;let e=ee.bind(N,eA),t=0,n=eT(v,f,(n,r={})=>{if(n==eh.FOCUS_EVENT){let n=Date.now();T().revalidateOnFocus&&n>t&&C()&&(t=n+T().focusThrottleInterval,e())}else if(n==eh.RECONNECT_EVENT)T().revalidateOnReconnect&&C()&&e();else if(n==eh.MUTATE_EVENT)return ee();else if(n==eh.ERROR_REVALIDATE_EVENT)return ee(r)});return k.current=!1,w.current=v,b.current=!0,P({_k:x}),X&&(F(W)||er?e():ei(e)),()=>{k.current=!0,n()}},[v]),eo(()=>{let e;function t(){let t=j(c)?c(A().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!A().error&&(h||T().isVisible())&&(d||T().isOnline())?ee(eA).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[c,h,d,v]),(0,i.useDebugValue)(K),s&&F(W)&&v){if(!en&&er)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,E.current=n,k.current=!1;let e=y[v];if(F(e)||eC(et(e)),F($)){let e=ee(eA);F(K)||(e.status="fulfilled",e.value=!0),eC(e)}else throw $}return{mutate:et,get data(){return D.data=!0,K},get error(){return D.error=!0,$},get isValidating(){return D.isValidating=!0,G},get isLoading(){return D.isLoading=!0,Q}}},function(...e){let t=eS(),[n,i,o]=ew(e),s=ev(t,o),a=r,{use:l}=s,u=(l||[]).concat(eE);for(let e=u.length;e--;)a=u[e](a);return a(n,i||s.fetcher||null,s)});var eI=async(e,t,n,r,i,o,s,a,l,u,c,h,d,p,f,m,g)=>{var y;let v=s.current;n(t.messages,!1);let x=p?t.messages:t.messages.map(({role:e,content:t,experimental_attachments:n,name:r,data:i,annotations:o,toolInvocations:s,function_call:a,tool_calls:l,tool_call_id:u})=>({role:e,content:t,...void 0!==n&&{experimental_attachments:n},...void 0!==r&&{name:r},...void 0!==i&&{data:i},...void 0!==o&&{annotations:o},...void 0!==s&&{toolInvocations:s},tool_call_id:u,...void 0!==a&&{function_call:a},...void 0!==l&&{tool_calls:l}}));return await D({api:e,body:null!=(y=null==f?void 0:f({messages:t.messages,requestData:t.data,requestBody:t.body}))?y:{messages:x,data:t.data,...o.current.body,...t.body,...void 0!==t.functions&&{functions:t.functions},...void 0!==t.function_call&&{function_call:t.function_call},...void 0!==t.tools&&{tools:t.tools},...void 0!==t.tool_choice&&{tool_choice:t.tool_choice}},streamProtocol:u,credentials:o.current.credentials,headers:{...o.current.headers,...t.headers},abortController:()=>a.current,restoreMessagesOnFailure(){g||n(v,!1)},onResponse:h,onUpdate(e,o){n([...t.messages,...e],!1),r([...i||[],...o||[]],!1)},onToolCall:d,onFinish:c,generateId:l,fetch:m})};function eR(e){return"assistant"===e.role&&e.toolInvocations&&e.toolInvocations.length>0&&e.toolInvocations.every(e=>"result"in e)}var eD=function({api:e="/api/chat",id:t,initialMessages:n,initialInput:r="",sendExtraMessageFields:o,experimental_onFunctionCall:a,experimental_onToolCall:l,onToolCall:u,experimental_prepareRequestBody:c,experimental_maxAutomaticRoundtrips:h=0,maxAutomaticRoundtrips:d=h,maxToolRoundtrips:p=d,streamMode:f,streamProtocol:m,onResponse:g,onFinish:y,onError:v,credentials:x,headers:b,body:k,generateId:w=s,fetch:S,keepLastMessageOnError:E=!1}={}){f&&(null!=m||(m="text"===f?"text":void 0));let T=(0,i.useId)(),C=null!=t?t:T,A="string"==typeof e?[e,C]:C,[P]=(0,i.useState)([]),{data:I,mutate:R}=eP([A,"messages"],null,{fallbackData:null!=n?n:P}),{data:D=!1,mutate:O}=eP([A,"loading"],null),{data:M,mutate:N}=eP([A,"streamData"],null),{data:L,mutate:F}=eP([A,"error"],null),j=(0,i.useRef)(I||[]);(0,i.useEffect)(()=>{j.current=I||[]},[I]);let V=(0,i.useRef)(null),z=(0,i.useRef)({credentials:x,headers:b,body:k});(0,i.useEffect)(()=>{z.current={credentials:x,headers:b,body:k}},[x,b,k]);let B=(0,i.useCallback)(async t=>{let n=j.current.length;try{O(!0),F(void 0);let n=new AbortController;V.current=n,await _({getStreamedResponse:()=>eI(e,t,R,N,M,z,j,V,w,m,y,g,u,o,c,S,E),experimental_onFunctionCall:a,experimental_onToolCall:l,updateChatRequest:e=>{t=e},getCurrentMessages:()=>j.current}),V.current=null}catch(e){if("AbortError"===e.name)return V.current=null,null;v&&e instanceof Error&&v(e),F(e)}finally{O(!1)}let r=j.current,i=r[r.length-1];r.length>n&&null!=i&&p>0&&eR(i)&&function(e){let t=0;for(let n=e.length-1;n>=0;n--)if("assistant"===e[n].role)t++;else break;return t}(r)<=p&&await B({messages:r})},[R,O,e,z,g,y,v,F,N,M,m,o,a,l,c,u,p,j,V,w,S,E]),U=(0,i.useCallback)(async(e,{options:t,functions:n,function_call:r,tools:i,tool_choice:o,data:s,headers:a,body:l}={})=>{e.id||(e.id=w());let u={headers:null!=a?a:null==t?void 0:t.headers,body:null!=l?l:null==t?void 0:t.body};return B({messages:j.current.concat(e),options:u,headers:u.headers,body:u.body,data:s,...void 0!==n&&{functions:n},...void 0!==r&&{function_call:r},...void 0!==i&&{tools:i},...void 0!==o&&{tool_choice:o}})},[B,w]),H=(0,i.useCallback)(async({options:e,functions:t,function_call:n,tools:r,tool_choice:i,data:o,headers:s,body:a}={})=>{if(0===j.current.length)return null;let l={headers:null!=s?s:null==e?void 0:e.headers,body:null!=a?a:null==e?void 0:e.body};return"assistant"===j.current[j.current.length-1].role?B({messages:j.current.slice(0,-1),options:l,headers:l.headers,body:l.body,data:o,...void 0!==t&&{functions:t},...void 0!==n&&{function_call:n},...void 0!==r&&{tools:r},...void 0!==i&&{tool_choice:i}}):B({messages:j.current,options:l,headers:l.headers,body:l.body,data:o,...void 0!==t&&{functions:t},...void 0!==n&&{function_call:n},...void 0!==r&&{tools:r},...void 0!==i&&{tool_choice:i}})},[B]),q=(0,i.useCallback)(()=>{V.current&&(V.current.abort(),V.current=null)},[]),W=(0,i.useCallback)(e=>{"function"==typeof e&&(e=e(j.current)),R(e,!1),j.current=e},[R]),[$,Y]=(0,i.useState)(r),K=(0,i.useCallback)(async(e,t={},n)=>{var r,i,o,s,a;if(null==(r=null==e?void 0:e.preventDefault)||r.call(e),!$&&!t.allowEmptySubmit)return;n&&(z.current={...z.current,...n});let l=[],u=t.experimental_attachments;if(u){if(u instanceof FileList)for(let e of Array.from(u)){let{name:t,type:n}=e,r=await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{var n;t(null==(n=e.target)?void 0:n.result)},r.onerror=e=>n(e),r.readAsDataURL(e)});l.push({name:t,contentType:n,url:r})}else if(Array.isArray(u))for(let e of u){let{name:t,url:n,contentType:r}=e;l.push({name:t,contentType:r,url:n})}else throw Error("Invalid attachments type")}let c={headers:null!=(o=t.headers)?o:null==(i=t.options)?void 0:i.headers,body:null!=(a=t.body)?a:null==(s=t.options)?void 0:s.body};B({messages:$||l.length||!t.allowEmptySubmit?j.current.concat({id:w(),createdAt:new Date,role:"user",content:$,experimental_attachments:l.length>0?l:void 0}):j.current,options:c,headers:c.headers,body:c.body,data:t.data}),Y("")},[$,w,B]),X=({toolCallId:e,result:t})=>{let n=j.current.map((n,r,i)=>r===i.length-1&&"assistant"===n.role&&n.toolInvocations?{...n,toolInvocations:n.toolInvocations.map(n=>n.toolCallId===e?{...n,result:t}:n)}:n);R(n,!1),eR(n[n.length-1])&&B({messages:n})};return{messages:I||[],error:L,append:U,reload:H,stop:q,setMessages:W,input:$,setInput:Y,handleInputChange:e=>{Y(e.target.value)},handleSubmit:K,isLoading:D,data:M,addToolResult:X,experimental_addToolResult:X}}},69245:function(e,t,n){n.d(t,{ok:function(){return r}});function r(){}},51418:function(e,t,n){n.d(t,{M:function(){return y}});var r=n(97458),i=n(52983),o=n(88407),s=n(18295),a=n(23935);class l extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function u({children:e,isPresent:t}){let n=(0,i.useId)(),o=(0,i.useRef)(null),s=(0,i.useRef)({width:0,height:0,top:0,left:0}),{nonce:u}=(0,i.useContext)(a._);return(0,i.useInsertionEffect)(()=>{let{width:e,height:r,top:i,left:a}=s.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;let l=document.createElement("style");return u&&(l.nonce=u),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${e}px !important;
            height: ${r}px !important;
            top: ${i}px !important;
            left: ${a}px !important;
          }
        `),()=>{document.head.removeChild(l)}},[t]),(0,r.jsx)(l,{isPresent:t,childRef:o,sizeRef:s,children:i.cloneElement(e,{ref:o})})}let c=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:l,presenceAffectsLayout:c,mode:d})=>{let p=(0,s.h)(h),f=(0,i.useId)(),m=(0,i.useMemo)(()=>({id:f,initial:t,isPresent:n,custom:l,onExitComplete:e=>{for(let t of(p.set(e,!0),p.values()))if(!t)return;a&&a()},register:e=>(p.set(e,!1),()=>p.delete(e))}),c?[Math.random()]:[n]);return(0,i.useMemo)(()=>{p.forEach((e,t)=>p.set(t,!1))},[n]),i.useEffect(()=>{n||p.size||!a||a()},[n]),"popLayout"===d&&(e=(0,r.jsx)(u,{isPresent:n,children:e})),(0,r.jsx)(o.O.Provider,{value:m,children:e})};function h(){return new Map}var d=n(41184),p=n(15409);let f=e=>e.key||"";function m(e){let t=[];return i.Children.forEach(e,e=>{(0,i.isValidElement)(e)&&t.push(e)}),t}var g=n(86925);let y=({children:e,exitBeforeEnter:t,custom:n,initial:o=!0,onExitComplete:a,presenceAffectsLayout:l=!0,mode:u="sync"})=>{(0,p.k)(!t,"Replace exitBeforeEnter with mode='wait'");let h=(0,i.useMemo)(()=>m(e),[e]),y=h.map(f),v=(0,i.useRef)(!0),x=(0,i.useRef)(h),b=(0,s.h)(()=>new Map),[k,w]=(0,i.useState)(h),[S,E]=(0,i.useState)(h);(0,g.L)(()=>{v.current=!1,x.current=h;for(let e=0;e<S.length;e++){let t=f(S[e]);y.includes(t)?b.delete(t):!0!==b.get(t)&&b.set(t,!1)}},[S,y.length,y.join("-")]);let T=[];if(h!==k){let e=[...h];for(let t=0;t<S.length;t++){let n=S[t],r=f(n);y.includes(r)||(e.splice(t,0,n),T.push(n))}"wait"===u&&T.length&&(e=T),E(m(e)),w(h);return}let{forceRender:C}=(0,i.useContext)(d.p);return(0,r.jsx)(r.Fragment,{children:S.map(e=>{let t=f(e),i=h===S||y.includes(t);return(0,r.jsx)(c,{isPresent:i,initial:(!v.current||!!o)&&void 0,custom:i?void 0:n,presenceAffectsLayout:l,mode:u,onExitComplete:i?void 0:()=>{if(!b.has(t))return;b.set(t,!0);let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(null==C||C(),E(x.current),a&&a())},children:e},t)})})}},41184:function(e,t,n){n.d(t,{p:function(){return r}});let r=(0,n(52983).createContext)({})},23935:function(e,t,n){n.d(t,{_:function(){return r}});let r=(0,n(52983).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})},88407:function(e,t,n){n.d(t,{O:function(){return r}});let r=(0,n(52983).createContext)(null)},36930:function(e,t,n){let r;function i(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}n.d(t,{E:function(){return op}});let o=e=>Array.isArray(e);function s(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function a(e){return"string"==typeof e||Array.isArray(e)}function l(e){let t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function u(e,t,n,r){if("function"==typeof t){let[i,o]=l(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,o]=l(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function c(e,t,n){let r=e.getProps();return u(r,t,void 0!==n?n:r.custom,e)}let h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],d=["initial",...h],p=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],f=new Set(p),m=e=>1e3*e,g=e=>e/1e3,y={type:"spring",stiffness:500,damping:25,restSpeed:10},v=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),x={type:"keyframes",duration:.8},b={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},k=(e,{keyframes:t})=>t.length>2?x:f.has(e)?e.startsWith("scale")?v(t[1]):y:b;function w(e,t){return e[t]||e.default||e}let S={skipAnimations:!1,useManualTiming:!1},E={current:!1},T=e=>null!==e;function C(e,{repeat:t,repeatType:n="loop"},r){let i=e.filter(T),o=t&&"loop"!==n&&t%2==1?0:i.length-1;return o&&void 0!==r?r:i[o]}var A,P,I,R=n(20699);let D=["read","resolveKeyframes","update","preRender","render","postRender"];function _(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=D.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,i=!1,s=!1)=>{let a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(e))}};return l}(o),e),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=s,p=()=>{let o=S.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},f=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:D.reduce((e,t)=>{let r=s[t];return e[t]=(e,t=!1,i=!1)=>(n||f(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<D.length;t++)s[D[t]].cancel(e)},state:i,steps:s}}let{schedule:O,cancel:M,state:N,steps:L}=_("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:R.Z,!0),F=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function j(e,t,n,r){if(e===t&&n===r)return R.Z;let i=t=>(function(e,t,n,r,i){let o,s;let a=0;do(o=F(s=t+(n-t)/2,r,i)-e)>0?n=s:t=s;while(Math.abs(o)>1e-7&&++a<12);return s})(t,0,1,e,n);return e=>0===e||1===e?e:F(i(e),t,r)}let V=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,z=e=>t=>1-e(1-t),B=j(.33,1.53,.69,.99),U=z(B),H=V(U),q=e=>(e*=2)<1?.5*U(e):.5*(2-Math.pow(2,-10*(e-1))),W=e=>1-Math.sin(Math.acos(e)),$=z(W),Y=V(W),K=e=>/^0[^.\s]+$/u.test(e);var X=n(15409);let Z=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),J=e=>t=>"string"==typeof t&&t.startsWith(e),G=J("--"),Q=J("var(--"),ee=e=>!!Q(e)&&et.test(e.split("/*")[0].trim()),et=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,en=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,er=(e,t,n)=>n>t?t:n<e?e:n,ei={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},eo={...ei,transform:e=>er(0,1,e)},es={...ei,default:1},ea=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),el=ea("deg"),eu=ea("%"),ec=ea("px"),eh=ea("vh"),ed=ea("vw"),ep={...eu,parse:e=>eu.parse(e)/100,transform:e=>eu.transform(100*e)},ef=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),em=e=>e===ei||e===ec,eg=(e,t)=>parseFloat(e.split(", ")[t]),ey=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return eg(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?eg(t[1],e):0}},ev=new Set(["x","y","z"]),ex=p.filter(e=>!ev.has(e)),eb={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ey(4,13),y:ey(5,14)};eb.translateX=eb.x,eb.translateY=eb.y;let ek=e=>t=>t.test(e),ew=[ei,ec,eu,el,ed,eh,{test:e=>"auto"===e,parse:e=>e}],eS=e=>ew.find(ek(e)),eE=new Set,eT=!1,eC=!1;function eA(){if(eC){let e=Array.from(eE).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=function(e){let t=[];return ex.forEach(n=>{let r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eC=!1,eT=!1,eE.forEach(e=>e.complete()),eE.clear()}function eP(){eE.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eC=!0)})}class eI{constructor(e,t,n,r,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(eE.add(this),eT||(eT=!0,O.read(eP),O.resolveKeyframes(eA))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i]){if(0===i){let i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){let r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),eE.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,eE.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let eR=e=>Math.round(1e5*e)/1e5,eD=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,e_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,eO=(e,t)=>n=>!!("string"==typeof n&&e_.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),eM=(e,t,n)=>r=>{if("string"!=typeof r)return r;let[i,o,s,a]=r.match(eD);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},eN=e=>er(0,255,e),eL={...ei,transform:e=>Math.round(eN(e))},eF={test:eO("rgb","red"),parse:eM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+eL.transform(e)+", "+eL.transform(t)+", "+eL.transform(n)+", "+eR(eo.transform(r))+")"},ej={test:eO("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:eF.transform},eV={test:eO("hsl","hue"),parse:eM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+eu.transform(eR(t))+", "+eu.transform(eR(n))+", "+eR(eo.transform(r))+")"},ez={test:e=>eF.test(e)||ej.test(e)||eV.test(e),parse:e=>eF.test(e)?eF.parse(e):eV.test(e)?eV.parse(e):ej.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?eF.transform(e):eV.transform(e)},eB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,eU="number",eH="color",eq=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eW(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],o=0,s=t.replace(eq,e=>(ez.test(e)?(r.color.push(o),i.push(eH),n.push(ez.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(eU),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function e$(e){return eW(e).values}function eY(e){let{split:t,types:n}=eW(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){let t=n[o];t===eU?i+=eR(e[o]):t===eH?i+=ez.transform(e[o]):i+=e[o]}return i}}let eK=e=>"number"==typeof e?0:e,eX={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(eD))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(eB))||void 0===n?void 0:n.length)||0)>0},parse:e$,createTransformer:eY,getAnimatableNone:function(e){let t=e$(e);return eY(e)(t.map(eK))}},eZ=new Set(["brightness","contrast","saturate","opacity"]);function eJ(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(eD)||[];if(!r)return e;let i=n.replace(r,""),o=eZ.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}let eG=/\b([a-z-]*)\(.*?\)/gu,eQ={...eX,getAnimatableNone:e=>{let t=e.match(eG);return t?t.map(eJ).join(" "):e}},e0={...ei,transform:Math.round},e1={borderWidth:ec,borderTopWidth:ec,borderRightWidth:ec,borderBottomWidth:ec,borderLeftWidth:ec,borderRadius:ec,radius:ec,borderTopLeftRadius:ec,borderTopRightRadius:ec,borderBottomRightRadius:ec,borderBottomLeftRadius:ec,width:ec,maxWidth:ec,height:ec,maxHeight:ec,top:ec,right:ec,bottom:ec,left:ec,padding:ec,paddingTop:ec,paddingRight:ec,paddingBottom:ec,paddingLeft:ec,margin:ec,marginTop:ec,marginRight:ec,marginBottom:ec,marginLeft:ec,backgroundPositionX:ec,backgroundPositionY:ec,rotate:el,rotateX:el,rotateY:el,rotateZ:el,scale:es,scaleX:es,scaleY:es,scaleZ:es,skew:el,skewX:el,skewY:el,distance:ec,translateX:ec,translateY:ec,translateZ:ec,x:ec,y:ec,z:ec,perspective:ec,transformPerspective:ec,opacity:eo,originX:ep,originY:ep,originZ:ec,zIndex:e0,size:ec,fillOpacity:eo,strokeOpacity:eo,numOctaves:e0},e2={...e1,color:ez,backgroundColor:ez,outlineColor:ez,fill:ez,stroke:ez,borderColor:ez,borderTopColor:ez,borderRightColor:ez,borderBottomColor:ez,borderLeftColor:ez,filter:eQ,WebkitFilter:eQ},e5=e=>e2[e];function e3(e,t){let n=e5(e);return n!==eQ&&(n=eX),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let e4=new Set(["auto","none","0"]);class e9 extends eI{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&ee(r=r.trim())){let i=function e(t,n,r=1){(0,X.k)(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[i,o]=function(e){let t=en.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${null!=n?n:r}`,i]}(t);if(!i)return;let s=window.getComputedStyle(n).getPropertyValue(i);if(s){let e=s.trim();return Z(e)?parseFloat(e):e}return ee(o)?e(o,n,r+1):o}(r,t.current);void 0!==i&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ef.has(n)||2!==e.length)return;let[r,i]=e,o=eS(r),s=eS(i);if(o!==s){if(em(o)&&em(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++){var r;("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||K(r))&&n.push(t)}n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){let t=e[i];"string"==typeof t&&!e4.has(t)&&eW(t).values.length&&(r=e[i]),i++}if(r&&n)for(let i of t)e[i]=e3(n,r)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eb[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;let{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);let o=r.length-1,s=r[o];r[o]=eb[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function e6(e){return"function"==typeof e}function e7(){r=void 0}let e8={now:()=>(void 0===r&&e8.set(N.isProcessing||S.useManualTiming?N.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(e7)}},te=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(eX.test(e)||"0"===e)&&!e.startsWith("url("));class tt{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=e8.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(eP(),eA()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=e8.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let o=e[e.length-1],s=te(i,t),a=te(o,t);return(0,X.K)(s===a,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!!s&&!!a&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||e6(n))&&r)}(e,n,r,i)){if(E.current||!o){null==a||a(C(e,this.options,t)),null==s||s(),this.resolveFinishedPromise();return}this.options.duration=0}let u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function tn(e,t,n){var r,i;let o=Math.max(t-5,0);return r=n-e(o),(i=t-o)?1e3/i*r:0}function tr(e,t){return e*Math.sqrt(1-t*t)}let ti=["duration","bounce"],to=["stiffness","damping","mass"];function ts(e,t){return t.some(t=>void 0!==e[t])}function ta({keyframes:e,restDelta:t,restSpeed:n,...r}){let i;let o=e[0],s=e[e.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ts(e,to)&&ts(e,ti)){let n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;(0,X.K)(e<=m(10),"Spring duration must be 10 seconds or less");let s=1-t;s=er(.05,1,s),e=er(.01,10,g(e)),s<1?(i=t=>{let r=t*s,i=r*e;return .001-(r-n)/tr(t,s)*Math.exp(-i)},o=t=>{let r=t*s*e,o=Math.pow(s,2)*Math.pow(t,2)*e,a=tr(Math.pow(t,2),s);return(r*n+n-o)*Math.exp(-r)*(-i(t)+.001>0?-1:1)/a}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let a=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=m(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...r,velocity:-g(r.velocity||0)}),f=d||0,y=u/(2*Math.sqrt(l*c)),v=s-o,x=g(Math.sqrt(l/c)),b=5>Math.abs(v);if(n||(n=b?.01:2),t||(t=b?.005:.5),y<1){let e=tr(x,y);i=t=>s-Math.exp(-y*x*t)*((f+y*x*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}else if(1===y)i=e=>s-Math.exp(-x*e)*(v+(f+x*v)*e);else{let e=x*Math.sqrt(y*y-1);i=t=>{let n=Math.exp(-y*x*t),r=Math.min(e*t,300);return s-n*((f+y*x*v)*Math.sinh(r)+e*v*Math.cosh(r))/e}}return{calculatedDuration:p&&h||null,next:e=>{let r=i(e);if(p)a.done=e>=h;else{let o=0;y<1&&(o=0===e?m(f):tn(i,e,r));let l=Math.abs(o)<=n,u=Math.abs(s-r)<=t;a.done=l&&u}return a.value=a.done?s:r,a}}}function tl({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){let h,d;let p=e[0],f={done:!1,value:p},m=e=>void 0!==a&&e<a||void 0!==l&&e>l,g=e=>void 0===a?l:void 0===l?a:Math.abs(a-e)<Math.abs(l-e)?a:l,y=n*t,v=p+y,x=void 0===s?v:s(v);x!==v&&(y=x-p);let b=e=>-y*Math.exp(-e/r),k=e=>x+b(e),w=e=>{let t=b(e),n=k(e);f.done=Math.abs(t)<=u,f.value=f.done?x:n},S=e=>{m(f.value)&&(h=e,d=ta({keyframes:[f.value,g(f.value)],velocity:tn(k,e,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return(d||void 0!==h||(t=!0,w(e),S(e)),void 0!==h&&e>=h)?d.next(e-h):(t||w(e),f)}}}let tu=j(.42,0,1,1),tc=j(0,0,.58,1),th=j(.42,0,.58,1),td=e=>Array.isArray(e)&&"number"!=typeof e[0],tp={linear:R.Z,easeIn:tu,easeInOut:th,easeOut:tc,circIn:W,circInOut:Y,circOut:$,backIn:U,backInOut:H,backOut:B,anticipate:q},tf=e=>{if(Array.isArray(e)){(0,X.k)(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,n,r,i]=e;return j(t,n,r,i)}return"string"==typeof e?((0,X.k)(void 0!==tp[e],`Invalid easing type '${e}'`),tp[e]):e},tm=(e,t)=>n=>t(e(n)),tg=(...e)=>e.reduce(tm),ty=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},tv=(e,t,n)=>e+(t-e)*n;function tx(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tb(e,t){return n=>n>0?t:e}let tk=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},tw=[ej,eF,eV],tS=e=>tw.find(t=>t.test(e));function tE(e){let t=tS(e);if((0,X.K)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===eV&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=tx(a,r,e+1/3),o=tx(a,r,e),s=tx(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(n)),n}let tT=(e,t)=>{let n=tE(e),r=tE(t);if(!n||!r)return tb(e,t);let i={...n};return e=>(i.red=tk(n.red,r.red,e),i.green=tk(n.green,r.green,e),i.blue=tk(n.blue,r.blue,e),i.alpha=tv(n.alpha,r.alpha,e),eF.transform(i))},tC=new Set(["none","hidden"]);function tA(e,t){return n=>tv(e,t,n)}function tP(e){return"number"==typeof e?tA:"string"==typeof e?ee(e)?tb:ez.test(e)?tT:tD:Array.isArray(e)?tI:"object"==typeof e?ez.test(e)?tT:tR:tb}function tI(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>tP(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function tR(e,t){let n={...e,...t},r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=tP(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}let tD=(e,t)=>{let n=eX.createTransformer(t),r=eW(e),i=eW(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tC.has(e)&&!i.values.length||tC.has(t)&&!r.values.length?tC.has(e)?n=>n<=0?e:t:n=>n>=1?t:e:tg(tI(function(e,t){var n;let r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let s=t.types[o],a=e.indexes[s][i[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):((0,X.K)(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),tb(e,t))};function t_(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?tv(e,t,n):tP(e)(e,t)}function tO({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){let i=td(r)?r.map(tf):tf(r),o={done:!1,value:t[0]},s=function(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let o=e.length;if((0,X.k)(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,n){let r=[],i=n||t_,o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=tg(Array.isArray(t)?t[n]||R.Z:t,o)),r.push(o)}return r}(t,r,i),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);let r=ty(e[n],e[n+1],t);return s[n](r)};return n?t=>l(er(e[0],e[o-1],t)):l}((n&&n.length===t.length?n:function(e){let t=[0];return function(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ty(0,t,r);e.push(tv(n,1,i))}}(t,e.length-1),t}(t)).map(t=>t*e),t,{ease:Array.isArray(i)?i:t.map(()=>i||th).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}let tM=e=>{let t=({timestamp:t})=>e(t);return{start:()=>O.update(t,!0),stop:()=>M(t),now:()=>N.isProcessing?N.timestamp:e8.now()}},tN={decay:tl,inertia:tl,tween:tO,keyframes:tO,spring:ta},tL=e=>e/100;class tF extends tt{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,o=(null==r?void 0:r.KeyframeResolver)||eI;this.resolver=new o(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e){let t,n;let{type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s,velocity:a=0}=this.options,l=e6(r)?r:tN[r]||tO;l!==tO&&"number"!=typeof e[0]&&(t=tg(tL,t_(e[0],e[1])),e=[0,100]);let u=l({...this.options,keyframes:e});"mirror"===s&&(n=l({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(u));let{calculatedDuration:c}=u,h=c+o;return{generator:u,mirroredGenerator:n,mapPercentToKeyframes:t,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(i+1)-o}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);let{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=i;if(d){let e=Math.min(this.currentTime,u)/c,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,d+1))%2&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(x=o)),v=er(0,1,n)*c}let b=y?{done:!1,value:a[0]}:x.next(v);s&&(b.value=s(b.value));let{done:k}=b;y||null===l||(k=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return w&&void 0!==r&&(b.value=C(a,this.options,r)),m&&m(b.value),w&&this.finish(),b}get duration(){let{resolved:e}=this;return e?g(e.calculatedDuration):0}get time(){return g(this.currentTime)}set time(e){e=m(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=g(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=tM,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let tj=new Set(["opacity","clipPath","filter","transform"]),tV=e=>Array.isArray(e)&&"number"==typeof e[0],tz=(e,t)=>{let n="",r=Math.max(Math.round(t/10),2);for(let t=0;t<r;t++)n+=e(ty(0,r-1,t))+", ";return`linear(${n.substring(0,n.length-2)})`};function tB(e){let t;return()=>(void 0===t&&(t=e()),t)}let tU={linearEasing:void 0},tH=function(e,t){let n=tB(e);return()=>{var e;return null!==(e=tU[t])&&void 0!==e?e:n()}}(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),tq=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tW={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tq([0,.65,.55,1]),circOut:tq([.55,0,1,.45]),backIn:tq([.31,.01,.66,-.59]),backOut:tq([.33,1.53,.69,.99])};function t$(e,t){e.timeline=t,e.onfinish=null}let tY=tB(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tK={anticipate:q,backInOut:H,circInOut:Y};class tX extends tt{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new e9(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n,r;let{duration:i=300,times:o,ease:s,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(null===(n=l.owner)||void 0===n?void 0:n.current))return!1;if("string"==typeof s&&tH()&&s in tK&&(s=tK[s]),e6((r=this.options).type)||"spring"===r.type||!function e(t){return!!("function"==typeof t&&tH()||!t||"string"==typeof t&&(t in tW||tH())||tV(t)||Array.isArray(t)&&t.every(e))}(r.ease)){let{onComplete:t,onUpdate:n,motionValue:r,element:l,...u}=this.options,c=function(e,t){let n=new tF({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],o=0;for(;!r.done&&o<2e4;)i.push((r=n.sample(o)).value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(e,u);1===(e=c.keyframes).length&&(e[1]=e[0]),i=c.duration,o=c.times,s=c.ease,a="keyframes"}let h=function(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){let u={[t]:n};l&&(u.offset=l);let c=function e(t,n){if(t)return"function"==typeof t&&tH()?tz(t,n):tV(t)?tq(t):Array.isArray(t)?t.map(t=>e(t,n)||tW.easeOut):tW[t]}(a,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}(l.owner.current,u,e,{...this.options,duration:i,times:o,ease:s});return h.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(t$(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{let{onComplete:n}=this.options;l.set(C(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:o,type:a,ease:s,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return g(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return g(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=m(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return R.Z;let{animation:n}=t;t$(n,e)}else this.pendingTimeline=e;return R.Z}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:a,element:l,...u}=this.options,c=new tF({...u,keyframes:n,duration:r,type:i,ease:o,times:s,isGenerator:!0}),h=m(this.time);e.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}let{onStop:a}=this.options;a&&a(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=e;return tY()&&n&&tj.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==i&&0!==o&&"inertia"!==s}}let tZ=tB(()=>void 0!==window.ScrollTimeline);class tJ{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>tZ()&&n.attachTimeline?n.attachTimeline(e):t(n));return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}let tG=(e,t,n,r={},i,o)=>s=>{let a=w(r,e)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u-=m(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};!function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(a)&&(c={...c,...k(e,c)}),c.duration&&(c.duration=m(c.duration)),c.repeatDelay&&(c.repeatDelay=m(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(c.duration=0,0!==c.delay||(h=!0)),(E.current||S.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),h&&!o&&void 0!==t.get()){let e=C(c.keyframes,a);if(void 0!==e)return O.update(()=>{c.onUpdate(e),c.onComplete()}),new tJ([])}return!o&&tX.supports(c)?new tX(c):new tF(c)},tQ=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),t0=e=>o(e)?e[e.length-1]||0:e;function t1(e,t){-1===e.indexOf(t)&&e.push(t)}function t2(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class t5{constructor(){this.subscriptions=[]}add(e){return t1(this.subscriptions,e),()=>t2(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let t3=e=>!isNaN(parseFloat(e)),t4={current:void 0};class t9{constructor(e,t={}){this.version="11.9.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=e8.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=e8.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=t3(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new t5);let n=this.events[e].add(t);return"change"===e?()=>{n(),O.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return t4.current&&t4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=e8.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function t6(e,t){return new t9(e,t)}let t7=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),t8="data-"+t7("framerAppearId");function ne(e){return f.has(e)?"transform":tj.has(e)?t7(e):void 0}class nt extends t9{constructor(){super(...arguments),this.values=[]}add(e){let t=ne(e);t&&(t1(this.values,t),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}let nn=e=>!!(e&&e.getVelocity);function nr(e,t){var n,r;if(!e.applyWillChange)return;let i=e.getValue("willChange");if(i||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(i=new nt("auto"),e.addValue("willChange",i)),nn(r=i)&&r.add)return i.add(t)}function ni(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);let u=[],h=i&&e.animationState&&e.animationState.getState()[i];for(let t in l){let r=e.getValue(t,null!==(o=e.latestValues[t])&&void 0!==o?o:null),i=l[t];if(void 0===i||h&&function({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}(h,t))continue;let a={delay:n,...w(s||{},t)},c=!1;if(window.MotionHandoffAnimation){let n=e.props[t8];if(n){let e=window.MotionHandoffAnimation(n,t,O);null!==e&&(a.startTime=e,c=!0)}}nr(e,t),r.start(tG(t,r,i,e.shouldReduceMotion&&f.has(t)?{type:!1}:a,e,c));let d=r.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{O.update(()=>{a&&function(e,t){let{transitionEnd:n={},transition:r={},...i}=c(e,t)||{};for(let t in i={...i,...n}){let n=t0(i[t]);e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,t6(n))}}(e,a)})}),u}function no(e,t,n={}){var r;let i=c(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);let s=i?()=>Promise.all(ni(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=1,o){let s=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(ns).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(no(e,t,{...o,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,i+r,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(!l)return Promise.all([s(),a(n.delay)]);{let[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}}function ns(e,t){return e.sortNodePosition(t)}let na=d.length,nl=[...h].reverse(),nu=h.length;function nc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nh(){return{animate:nc(!0),whileInView:nc(),whileHover:nc(),whileTap:nc(),whileDrag:nc(),whileFocus:nc(),exit:nc()}}class nd{constructor(e){this.isMounted=!1,this.node=e}update(){}}class np extends nd{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>no(e,t,n)));else if("string"==typeof t)r=no(e,t,n);else{let i="function"==typeof t?c(e,t,n.custom):t;r=Promise.all(ni(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,n))),n=nh(),r=!0,l=t=>(n,r)=>{var i;let o=c(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){let{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function u(u){let{props:c}=e,h=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<na;e++){let r=d[e],i=t.props[r];(a(i)||!1===i)&&(n[r]=i)}return n}(e.parent)||{},p=[],f=new Set,m={},g=1/0;for(let t=0;t<nu;t++){var y;let d=nl[t],v=n[d],x=void 0!==c[d]?c[d]:h[d],b=a(x),k=d===u?v.isActive:null;!1===k&&(g=t);let w=x===h[d]&&x!==c[d]&&b;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...m},!v.isActive&&null===k||!x&&!v.prevProp||i(x)||"boolean"==typeof x)continue;let S=(y=v.prevProp,"string"==typeof x?x!==y:!!Array.isArray(x)&&!s(x,y)),E=S||d===u&&v.isActive&&!w&&b||t>g&&b,T=!1,C=Array.isArray(x)?x:[x],A=C.reduce(l(d),{});!1===k&&(A={});let{prevResolvedValues:P={}}=v,I={...P,...A},R=t=>{E=!0,f.has(t)&&(T=!0,f.delete(t)),v.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in I){let t=A[e],n=P[e];if(!m.hasOwnProperty(e))(o(t)&&o(n)?s(t,n):t===n)?void 0!==t&&f.has(e)?R(e):v.protectedKeys[e]=!0:null!=t?R(e):f.add(e)}v.prevProp=x,v.prevResolvedValues=A,v.isActive&&(m={...m,...A}),r&&e.blockInitialAnimation&&(E=!1);let D=!(w&&S)||T;E&&D&&p.push(...C.map(e=>({animation:e,options:{type:d}})))}if(f.size){let t={};f.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null}),p.push({animation:t})}let v=!!p.length;return r&&(!1===c.initial||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(p):Promise.resolve()}return{animateChanges:u,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let o=u(t);for(let e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=nh(),r=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();i(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let nf=0;class nm extends nd{constructor(){super(...arguments),this.id=nf++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}let ng=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ny(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}let nv=e=>t=>ng(t)&&e(t,ny(t));function nx(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function nb(e,t,n,r){return nx(e,t,nv(n),r)}let nk=(e,t)=>Math.abs(e-t);class nw{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=nT(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,i=(e=n.offset,t={x:0,y:0},Math.sqrt(nk(e.x,t.x)**2+nk(e.y,t.y)**2)>=3);if(!r&&!i)return;let{point:o}=n,{timestamp:s}=N;this.history.push({...o,timestamp:s});let{onStart:a,onMove:l}=this.handlers;r||(a&&a(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=nS(t,this.transformPagePoint),O.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let o=nT("pointercancel"===e.type?this.lastMoveEventInfo:nS(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!ng(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let o=nS(ny(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=N;this.history=[{...s,timestamp:a}];let{onSessionStart:l}=t;l&&l(e,nT(o,this.history)),this.removeListeners=tg(nb(this.contextWindow,"pointermove",this.handlePointerMove),nb(this.contextWindow,"pointerup",this.handlePointerUp),nb(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),M(this.updatePoint)}}function nS(e,t){return t?{point:t(e.point)}:e}function nE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nT({point:e},t){return{point:e,delta:nE(e,nC(t)),offset:nE(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=nC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>m(.1)));)n--;if(!r)return{x:0,y:0};let o=g(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};let s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,0)}}function nC(e){return e[e.length-1]}function nA(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let nP=nA("dragHorizontal"),nI=nA("dragVertical");function nR(e){let t=!1;if("y"===e)t=nI();else if("x"===e)t=nP();else{let e=nP(),n=nI();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function nD(){let e=nR(!0);return!e||(e(),!1)}function n_(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function nO(e){return e.max-e.min}function nM(e,t,n,r=.5){e.origin=r,e.originPoint=tv(t.min,t.max,e.origin),e.scale=nO(n)/nO(t),e.translate=tv(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function nN(e,t,n,r){nM(e.x,t.x,n.x,r?r.originX:void 0),nM(e.y,t.y,n.y,r?r.originY:void 0)}function nL(e,t,n){e.min=n.min+t.min,e.max=e.min+nO(t)}function nF(e,t,n){e.min=t.min-n.min,e.max=e.min+nO(t)}function nj(e,t,n){nF(e.x,t.x,n.x),nF(e.y,t.y,n.y)}function nV(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function nz(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nB(e,t,n){return{min:nU(e,t),max:nU(e,n)}}function nU(e,t){return"number"==typeof e?e:e[t]||0}let nH=()=>({translate:0,scale:1,origin:0,originPoint:0}),nq=()=>({x:nH(),y:nH()}),nW=()=>({min:0,max:0}),n$=()=>({x:nW(),y:nW()});function nY(e){return[e("x"),e("y")]}function nK({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nX(e){return void 0===e||1===e}function nZ({scale:e,scaleX:t,scaleY:n}){return!nX(e)||!nX(t)||!nX(n)}function nJ(e){return nZ(e)||nG(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nG(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function nQ(e,t,n,r,i){return void 0!==i&&(e=r+i*(e-r)),r+n*(e-r)+t}function n0(e,t=0,n=1,r,i){e.min=nQ(e.min,t,n,r,i),e.max=nQ(e.max,t,n,r,i)}function n1(e,{x:t,y:n}){n0(e.x,t.translate,t.scale,t.originPoint),n0(e.y,n.translate,n.scale,n.originPoint)}function n2(e,t){e.min=e.min+t,e.max=e.max+t}function n5(e,t,n,r,i=.5){let o=tv(e.min,e.max,i);n0(e,t,n,o,r)}function n3(e,t){n5(e.x,t.x,t.scaleX,t.scale,t.originX),n5(e.y,t.y,t.scaleY,t.scale,t.originY)}function n4(e,t){return nK(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let n9=({current:e})=>e?e.ownerDocument.defaultView:null,n6=new WeakMap;class n7{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=n$(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;let{dragSnapToOrigin:r}=this.getProps();this.panSession=new nw(e,{onSessionStart:e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ny(e,"page").point)},onStart:(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nR(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),nY(e=>{let t=this.getAxisMotionValue(e).get()||0;if(eu.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=nO(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),i&&O.postRender(()=>i(e,t)),nr(this.visualElement,"transform");let{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>nY(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:n9(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&O.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!n8(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?tv(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?tv(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&n_(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=function(e,{top:t,left:n,bottom:r,right:i}){return{x:nV(e.x,n,i),y:nV(e.y,t,r)}}(r.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:nB(e,"left","right"),y:nB(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&nY(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!n_(t))return!1;let r=t.current;(0,X.k)(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let o=function(e,t,n){let r=n4(e,n),{scroll:i}=t;return i&&(n2(r.x,i.offset.x),n2(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),s={x:nz((e=i.layout.layoutBox).x,o.x),y:nz(e.y,o.y)};if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=nK(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{};return Promise.all(nY(s=>{if(!n8(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nr(this.visualElement,e),n.start(tG(e,n,0,t,this.visualElement,!1))}stopAnimation(){nY(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){nY(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){nY(t=>{let{drag:n}=this.getProps();if(!n8(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-tv(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!n_(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};nY(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let n=t.get();r[e]=function(e,t){let n=.5,r=nO(e),i=nO(t);return i>r?n=ty(t.min,t.max-r,e.min):r>i&&(n=ty(e.min,e.max-i,t.min)),er(0,1,n)}({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),nY(t=>{if(!n8(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(tv(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;n6.set(this.visualElement,this);let e=nb(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();n_(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),O.read(t);let i=nx(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(nY(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function n8(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}class re extends nd{constructor(e){super(e),this.removeGroupControls=R.Z,this.removeListeners=R.Z,this.controls=new n7(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||R.Z}unmount(){this.removeGroupControls(),this.removeListeners()}}let rt=e=>(t,n)=>{e&&O.postRender(()=>e(t,n))};class rn extends nd{constructor(){super(...arguments),this.removePointerDownListener=R.Z}onPointerDown(e){this.session=new nw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n9(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:rt(e),onStart:rt(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&O.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=nb(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}var rr=n(97458),ri=n(52983),ro=n(88407),rs=n(41184);let ra=(0,ri.createContext)({}),rl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ru(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let rc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!ec.test(e))return e;e=parseFloat(e)}let n=ru(e,t.target.x),r=ru(e,t.target.y);return`${n}% ${r}%`}},rh={},{schedule:rd,cancel:rp}=_(queueMicrotask,!1);class rf extends ri.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Object.assign(rh,rg),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),rl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,r||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent===i||(i?o.promote():o.relegate()||O.postRender(()=>{let e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),rd.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rm(e){let[t,n]=function(){let e=(0,ri.useContext)(ro.O);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:n,register:r}=e,i=(0,ri.useId)();(0,ri.useEffect)(()=>r(i),[]);let o=(0,ri.useCallback)(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}(),r=(0,ri.useContext)(rs.p);return(0,rr.jsx)(rf,{...e,layoutGroup:r,switchLayoutGroup:(0,ri.useContext)(ra),isPresent:t,safeToRemove:n})}let rg={borderRadius:{...rc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rc,borderTopRightRadius:rc,borderBottomLeftRadius:rc,borderBottomRightRadius:rc,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=eX.parse(e);if(r.length>5)return e;let i=eX.createTransformer(e),o="number"!=typeof r[0]?1:0,s=n.x.scale*t.x,a=n.y.scale*t.y;r[0+o]/=s,r[1+o]/=a;let l=tv(s,a,.5);return"number"==typeof r[2+o]&&(r[2+o]/=l),"number"==typeof r[3+o]&&(r[3+o]/=l),i(r)}}},ry=["TopLeft","TopRight","BottomLeft","BottomRight"],rv=ry.length,rx=e=>"string"==typeof e?parseFloat(e):e,rb=e=>"number"==typeof e||ec.test(e);function rk(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let rw=rE(0,.5,$),rS=rE(.5,.95,R.Z);function rE(e,t,n){return r=>r<e?0:r>t?1:n(ty(e,t,r))}function rT(e,t){e.min=t.min,e.max=t.max}function rC(e,t){rT(e.x,t.x),rT(e.y,t.y)}function rA(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function rP(e,t,n,r,i){return e-=t,e=r+1/n*(e-r),void 0!==i&&(e=r+1/i*(e-r)),e}function rI(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){if(eu.test(t)&&(t=parseFloat(t),t=tv(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=tv(o.min,o.max,r);e===o&&(a-=t),e.min=rP(e.min,t,n,a,i),e.max=rP(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}let rR=["x","scaleX","originX"],rD=["y","scaleY","originY"];function r_(e,t,n,r){rI(e.x,t,rR,n?n.x:void 0,r?r.x:void 0),rI(e.y,t,rD,n?n.y:void 0,r?r.y:void 0)}function rO(e){return 0===e.translate&&1===e.scale}function rM(e){return rO(e.x)&&rO(e.y)}function rN(e,t){return e.min===t.min&&e.max===t.max}function rL(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rF(e,t){return rL(e.x,t.x)&&rL(e.y,t.y)}function rj(e){return nO(e.x)/nO(e.y)}function rV(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class rz{constructor(){this.members=[]}add(e){t1(this.members,e),e.scheduleRender()}remove(e){if(t2(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let rB=(e,t)=>e.depth-t.depth;class rU{constructor(){this.children=[],this.isDirty=!1}add(e){t1(this.children,e),this.isDirty=!0}remove(e){t2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rB),this.isDirty=!1,this.children.forEach(e)}}function rH(e){let t=nn(e)?e.get():e;return tQ(t)?t.toValue():t}let rq={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},rW="undefined"!=typeof window&&void 0!==window.MotionDebug,r$=["","X","Y","Z"],rY={visibility:"hidden"},rK=0;function rX(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function rZ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=null==t?void 0:t()){this.id=rK++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,rW&&(rq.totalNodes=rq.resolvedTargetDeltas=rq.recalculatedProjection=0),this.nodes.forEach(rQ),this.nodes.forEach(r9),this.nodes.forEach(r6),this.nodes.forEach(r0),rW&&window.MotionDebug.record(rq)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new rU)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new t5),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:r,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n;let r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){let n=e8.now(),r=({timestamp:t})=>{let i=t-n;i>=250&&(M(r),e(i-250))};return O.read(r,!0),()=>M(r)}(r,0),rl.hasAnimatedSinceResize&&(rl.hasAnimatedSinceResize=!1,this.nodes.forEach(r4))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||o.getDefaultTransition()||ii,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!rF(this.targetLayout,r)||n,u=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,u);let t={...w(i,"layout"),onPlay:s,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||r4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,M(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r7),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let r=n.props[t8];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",O,!(e||n))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(r2);return}this.isUpdating||this.nodes.forEach(r5),this.isUpdating=!1,this.nodes.forEach(r3),this.nodes.forEach(rJ),this.nodes.forEach(rG),this.clearAllSnapshots();let e=e8.now();N.delta=er(0,1e3/60,e-N.timestamp),N.timestamp=e,N.isProcessing=!0,L.update.process(N),L.preRender.process(N),L.render.process(N),N.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r1),this.sharedNodes.forEach(r8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=n$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!rM(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||nJ(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),ia((t=r).x),ia(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return n$();let n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(iu))){let{scroll:e}=this.root;e&&(n2(n.x,e.offset.x),n2(n.y,e.offset.y))}return n}removeElementScroll(e){var t;let n=n$();if(rC(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){let r=this.path[t],{scroll:i,options:o}=r;r!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&rC(n,e),n2(n.x,i.offset.x),n2(n.y,i.offset.y))}return n}applyTransform(e,t=!1){let n=n$();rC(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&n3(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),nJ(r.latestValues)&&n3(n,r.latestValues)}return nJ(this.latestValues)&&n3(n,this.latestValues),n}removeTransform(e){let t=n$();rC(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!nJ(n.latestValues))continue;nZ(n.latestValues)&&n.updateSnapshot();let r=n$();rC(r,n.measurePageBox()),r_(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return nJ(this.latestValues)&&r_(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==N.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t,n,r,i;let o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);let s=!!this.resumingFrom||this!==o;if(!(e||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:a,layoutId:l}=this.options;if(this.layout&&(a||l)){if(this.resolvedRelativeTargetAt=N.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=n$(),this.relativeTargetOrigin=n$(),nj(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),rC(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=n$(),this.targetWithTransforms=n$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),n=this.target,r=this.relativeTarget,i=this.relativeParent.target,nL(n.x,r.x,i.x),nL(n.y,r.y,i.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):rC(this.target,this.layout.layoutBox),n1(this.target,this.targetDelta)):rC(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=n$(),this.relativeTargetOrigin=n$(),nj(this.relativeTargetOrigin,this.target,e.target),rC(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}rW&&rq.resolvedTargetDeltas++}}}getClosestProjectingParent(){return!this.parent||nZ(this.parent.latestValues)||nG(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),n=!!this.resumingFrom||this!==t,r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===N.timestamp&&(r=!1),r)return;let{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||o))return;rC(this.layoutCorrected,this.layout.layoutBox);let s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){let i,o;let s=n.length;if(s){t.x=t.y=1;for(let a=0;a<s;a++){o=(i=n[a]).projectionDelta;let{visualElement:s}=i.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&n3(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,n1(e,o)),r&&nJ(i.latestValues)&&n3(e,i.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=n$());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(rA(this.prevProjectionDelta.x,this.projectionDelta.x),rA(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),nN(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&rV(this.projectionDelta.x,this.prevProjectionDelta.x)&&rV(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),rW&&rq.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nq(),this.projectionDelta=nq(),this.projectionDeltaWithTransform=nq()}setAnimationOrigin(e,t=!1){let n;let r=this.snapshot,i=r?r.latestValues:{},o={...this.latestValues},s=nq();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let a=n$(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,h=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(ir));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(ie(s.x,e.x,r),ie(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,d,p,f;nj(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,it(p.x,f.x,a.x,r),it(p.y,f.y,a.y,r),n&&(u=this.relativeTarget,d=n,rN(u.x,d.x)&&rN(u.y,d.y))&&(this.isProjectionDirty=!1),n||(n=n$()),rC(n,this.relativeTarget)}l&&(this.animationValues=o,function(e,t,n,r,i,o){i?(e.opacity=tv(0,void 0!==n.opacity?n.opacity:1,rw(r)),e.opacityExit=tv(void 0!==t.opacity?t.opacity:1,0,rS(r))):o&&(e.opacity=tv(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i<rv;i++){let o=`border${ry[i]}Radius`,s=rk(t,o),a=rk(n,o);(void 0!==s||void 0!==a)&&(s||(s=0),a||(a=0),0===s||0===a||rb(s)===rb(a)?(e[o]=Math.max(tv(rx(s),rx(a),r),0),(eu.test(a)||eu.test(s))&&(e[o]+="%")):e[o]=a)}(t.rotate||n.rotate)&&(e.rotate=tv(t.rotate||0,n.rotate||0,r))}(o,i,this.latestValues,r,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(M(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{rl.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){let r=nn(0)?0:t6(0);return r.start(tG("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&il(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||n$();let t=nO(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=nO(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rC(t,n),n3(t,i),nN(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rz),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&rX("z",e,r,this.animationValues);for(let t=0;t<r$.length;t++)rX(`rotate${r$[t]}`,e,r,this.animationValues),rX(`skew${r$[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rY;let r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=rH(null==e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;let o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=rH(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!nJ(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}let s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="",i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==a||1!==l)&&(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));let{x:a,y:l}=this.projectionDelta;for(let e in r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,rh){if(void 0===s[e])continue;let{correct:t,applyTo:n}=rh[e],i="none"===r.transform?s[e]:t(s[e],o);if(n){let e=n.length;for(let t=0;t<e;t++)r[n[t]]=i}else r[e]=i}return this.options.layoutId&&(r.pointerEvents=o===this?rH(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(r2),this.root.sharedNodes.clear()}}}function rJ(e){e.updateLayout()}function rG(e){var t;let n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?nY(e=>{let r=o?n.measuredBox[e]:n.layoutBox[e],i=nO(r);r.min=t[e].min,r.max=r.min+i}):il(i,n.layoutBox,t)&&nY(r=>{let i=o?n.measuredBox[r]:n.layoutBox[r],s=nO(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=nq();nN(s,t,n.layoutBox);let a=nq();o?nN(a,e.applyTransform(r,!0),n.measuredBox):nN(a,t,n.layoutBox);let l=!rM(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:o}=r;if(i&&o){let s=n$();nj(s,n.layoutBox,i.layoutBox);let a=n$();nj(a,t,o.layoutBox),rF(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function rQ(e){rW&&rq.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function r0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r1(e){e.clearSnapshot()}function r2(e){e.clearMeasurements()}function r5(e){e.isLayoutDirty=!1}function r3(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function r4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r9(e){e.resolveTargetDelta()}function r6(e){e.calcProjection()}function r7(e){e.resetSkewAndRotation()}function r8(e){e.removeLeadSnapshot()}function ie(e,t,n){e.translate=tv(t.translate,0,n),e.scale=tv(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function it(e,t,n,r){e.min=tv(t.min,n.min,r),e.max=tv(t.max,n.max,r)}function ir(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let ii={duration:.45,ease:[.4,0,.1,1]},io=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),is=io("applewebkit/")&&!io("chrome/")?Math.round:R.Z;function ia(e){e.min=is(e.min),e.max=is(e.max)}function il(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(rj(t)-rj(n)))}function iu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let ic=rZ({attachResizeListener:(e,t)=>nx(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ih={current:void 0},id=rZ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ih.current){let e=new ic({});e.mount(window),e.setOptions({layoutScroll:!0}),ih.current=e}return ih.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function ip(e,t){let n=t?"onHoverStart":"onHoverEnd";return nb(e.current,t?"pointerenter":"pointerleave",(r,i)=>{if("touch"===r.pointerType||nD())return;let o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);let s=o[n];s&&O.postRender(()=>s(r,i))},{passive:!e.getProps()[n]})}class im extends nd{mount(){this.unmount=tg(ip(this.node,!0),ip(this.node,!1))}unmount(){}}class ig extends nd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tg(nx(this.node.current,"focus",()=>this.onFocus()),nx(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let iy=(e,t)=>!!t&&(e===t||iy(e,t.parentElement));function iv(e,t){if(!t)return;let n=new PointerEvent("pointer"+e);t(n,ny(n))}class ix extends nd{constructor(){super(...arguments),this.removeStartListeners=R.Z,this.removeEndListeners=R.Z,this.removeAccessibleListeners=R.Z,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let n=this.node.getProps(),r=nb(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),o=i||iy(this.node.current,e.target)?n:r;o&&O.update(()=>o(e,t))},{passive:!(n.onTap||n.onPointerUp)}),i=nb(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=tg(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=nx(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=nx(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&iv("up",(e,t)=>{let{onTap:n}=this.node.getProps();n&&O.postRender(()=>n(e,t))})}),iv("down",(e,t)=>{this.startPress(e,t)}))}),t=nx(this.node.current,"blur",()=>{this.isPressing&&iv("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=tg(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&O.postRender(()=>n(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!nD()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:n}=this.node.getProps();n&&O.postRender(()=>n(e,t))}mount(){let e=this.node.getProps(),t=nb(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=nx(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=tg(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let ib=new WeakMap,ik=new WeakMap,iw=e=>{let t=ib.get(e.target);t&&t(e)},iS=e=>{e.forEach(iw)},iE={some:0,all:1};class iT extends nd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:iE[r]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;ik.has(n)||ik.set(n,{});let r=ik.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(iS,{root:e,...t})),r[i]}(t);return ib.set(e,n),r.observe(e),()=>{ib.delete(e),r.unobserve(e)}}(this.node.current,o,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}var iC=n(23935);let iA=(0,ri.createContext)({});var iP=n(86925);let iI=(0,ri.createContext)({strict:!1}),iR=!1;function iD(){window.MotionHandoffIsComplete=!0}function i_(e){return i(e.animate)||d.some(t=>a(e[t]))}function iO(e){return!!(i_(e)||e.variants)}function iM(e){return Array.isArray(e)?e.join(" "):e}let iN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iL={};for(let e in iN)iL[e]={isEnabled:t=>iN[e].some(e=>!!t[e])};var iF=n(48447);let ij=Symbol.for("motionComponentSymbol"),iV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function iz(e){if("string"!=typeof e||e.includes("-"));else if(iV.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function iB(e,{style:t,vars:n},r,i){for(let o in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(o,n[o])}let iU=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function iH(e,t,n,r){for(let n in iB(e,t,void 0,r),t.attrs)e.setAttribute(iU.has(n)?n:t7(n),t.attrs[n])}function iq(e,{layout:t,layoutId:n}){return f.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!rh[e]||"opacity"===e)}function iW(e,t,n){var r;let{style:i}=e,o={};for(let s in i)(nn(i[s])||t.style&&nn(t.style[s])||iq(s,e)||(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return n&&i&&"string"==typeof i.willChange&&(n.applyWillChange=!1),o}function i$(e,t,n){let r=iW(e,t,n);for(let n in e)(nn(e[n])||nn(t[n]))&&(r[-1!==p.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}var iY=n(18295);let iK=e=>(t,n)=>{let r=(0,ri.useContext)(iA),o=(0,ri.useContext)(ro.O),s=()=>(function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,a,l){let u={latestValues:function(e,t,n,r,o){var s;let a={},l=[],u=r&&(null===(s=e.style)||void 0===s?void 0:s.willChange)===void 0,c=o(e,{});for(let e in c)a[e]=rH(c[e]);let{initial:h,animate:d}=e,p=i_(e),f=iO(e);t&&f&&!p&&!1!==e.inherit&&(void 0===h&&(h=t.initial),void 0===d&&(d=t.animate));let m=!!n&&!1===n.initial,g=(m=m||!1===h)?d:h;return g&&"boolean"!=typeof g&&!i(g)&&iX(e,g,(e,t)=>{for(let t in e){let n=e[t];if(Array.isArray(n)){let e=m?n.length-1:0;n=n[e]}null!==n&&(a[t]=n)}for(let e in t)a[e]=t[e]}),u&&(d&&!1!==h&&!i(d)&&iX(e,d,e=>{for(let t in e)!function(e,t){let n=ne(t);n&&t1(e,n)}(l,t)}),l.length&&(a.willChange=l.join(","))),a}(o,s,a,!l&&e,t),renderState:n()};return r&&(u.mount=e=>r(o,e,u)),u})(e,t,r,o,n);return n?s():(0,iY.h)(s)};function iX(e,t,n){let r=Array.isArray(t)?t:[t];for(let t=0;t<r.length;t++){let i=u(e,r[t]);if(i){let{transitionEnd:e,transition:t,...r}=i;n(r,e)}}}let iZ=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),iJ=()=>({...iZ(),attrs:{}}),iG=(e,t)=>t&&"number"==typeof e?t.transform(e):e,iQ={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},i0=p.length;function i1(e,t,n){let{style:r,vars:i,transformOrigin:o}=e,s=!1,a=!1;for(let e in t){let n=t[e];if(f.has(e)){s=!0;continue}if(G(e)){i[e]=n;continue}{let t=iG(n,e1[e]);e.startsWith("origin")?(a=!0,o[e]=t):r[e]=t}}if(!t.transform&&(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<i0;o++){let s=p[o],a=e[s];if(void 0===a)continue;let l=!0;if(!(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a))||n){let e=iG(a,e1[s]);if(!l){i=!1;let t=iQ[s]||s;r+=`${t}(${e}) `}n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){let{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function i2(e,t,n){return"string"==typeof e?e:ec.transform(t+n*e)}let i5={offset:"stroke-dashoffset",array:"stroke-dasharray"},i3={offset:"strokeDashoffset",array:"strokeDasharray"};function i4(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(i1(e,u,h),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:p,dimensions:f}=e;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){let r=i2(t,e.x,e.width),i=i2(n,e.y,e.height);return`${r} ${i}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;let o=i?i5:i3;e[o.offset]=ec.transform(-r);let s=ec.transform(t),a=ec.transform(n);e[o.array]=`${s} ${a}`}(d,s,a,l,!1)}let i9=e=>"string"==typeof e&&"svg"===e.toLowerCase(),i6={useVisualState:iK({scrapeMotionValuesFromProps:i$,createRenderState:iJ,onMount:(e,t,{renderState:n,latestValues:r})=>{O.read(()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}}),O.render(()=>{i4(n,r,i9(t.tagName),e.transformTemplate),iH(t,n)})}})},i7={useVisualState:iK({applyWillChange:!0,scrapeMotionValuesFromProps:iW,createRenderState:iZ})};function i8(e,t,n){for(let r in t)nn(t[r])||iq(r,n)||(e[r]=t[r])}let oe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ot(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oe.has(e)}let on=e=>!ot(e);try{(A=require("@emotion/is-prop-valid").default)&&(on=e=>e.startsWith("on")?!ot(e):A(e))}catch(e){}let or={current:null},oi={current:!1},oo=new WeakMap,os=[...ew,ez,eX],oa=e=>os.find(ek(e)),ol=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ou{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eI,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=e8.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,O.render(this.render,!1,!0))};let{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=i_(t),this.isVariantNode=iO(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...c}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in c){let t=c[e];void 0!==a[e]&&nn(t)&&t.set(a[e],!1)}}mount(e){this.current=e,oo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),oi.current||function(){if(oi.current=!0,iF.j){if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>or.current=e.matches;e.addListener(t),t()}else or.current=!1}}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||or.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in oo.delete(this.current),this.projection&&this.projection.unmount(),M(this.notifyUpdate),M(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let r=f.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&O.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),o(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in iL){let t=iL[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):n$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ol.length;t++){let n=ol[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(let r in t){let i=t[r],o=n[r];if(nn(i))e.addValue(r,i);else if(nn(o))e.addValue(r,t6(i,{owner:e}));else if(o!==i){if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,t6(void 0!==t?t:i,{owner:e}))}}}for(let r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=t6(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Z(r)||K(r))?r=parseFloat(r):!oa(r)&&eX.test(t)&&(r=e3(e,t)),this.setBaseTarget(e,nn(r)?r.get():r)),nn(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let n;let{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let i=u(this.props,r,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(n=i[e])}if(r&&void 0!==n)return n;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||nn(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new t5),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class oc extends ou{constructor(){super(...arguments),this.KeyframeResolver=e9}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class oh extends oc{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=iB}readValueFromInstance(e,t){if(f.has(t)){let e=e5(t);return e&&e.default||0}{let n=window.getComputedStyle(e),r=(G(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return n4(e,t)}build(e,t,n){i1(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return iW(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;nn(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class od extends oc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=n$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(f.has(t)){let e=e5(t);return e&&e.default||0}return t=iU.has(t)?t:t7(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return i$(e,t,n)}build(e,t,n){i4(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){iH(e,t,n,r)}mount(e){this.isSVGTag=i9(e.tagName),super.mount(e)}}let op=function(e){if("undefined"==typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}((P={animation:{Feature:np},exit:{Feature:nm},inView:{Feature:iT},tap:{Feature:ix},focus:{Feature:ig},hover:{Feature:im},pan:{Feature:rn},drag:{Feature:re,ProjectionNode:id,MeasureLayout:rm},layout:{ProjectionNode:id,MeasureLayout:rm}},I=(e,t)=>iz(e)?new od(t):new oh(t,{allowProjection:e!==ri.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&function(e){for(let t in e)iL[t]={...iL[t],...e[t]}}(e);let o=(0,ri.forwardRef)(function(e,o){var s;let l;let u={...(0,ri.useContext)(iC._),...e,layoutId:function({layoutId:e}){let t=(0,ri.useContext)(rs.p).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:c}=u,h=function(e){let{initial:t,animate:n}=function(e,t){if(i_(e)){let{initial:t,animate:n}=e;return{initial:!1===t||a(t)?t:void 0,animate:a(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,ri.useContext)(iA));return(0,ri.useMemo)(()=>({initial:t,animate:n}),[iM(t),iM(n)])}(e),d=r(e,c);if(!c&&iF.j){(0,ri.useContext)(iI).strict;let e=function(e){let{drag:t,layout:n}=iL;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(u);l=e.MeasureLayout,h.visualElement=function(e,t,n,r,i){var o;let{visualElement:s}=(0,ri.useContext)(iA),a=(0,ri.useContext)(iI),l=(0,ri.useContext)(ro.O),u=(0,ri.useContext)(iC._).reducedMotion,c=(0,ri.useRef)();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u}));let h=c.current,d=(0,ri.useContext)(ra);h&&!h.projection&&i&&("html"===h.type||"svg"===h.type)&&function(e,t,n,r){let{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&n_(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(c.current,n,i,d),(0,ri.useInsertionEffect)(()=>{h&&h.update(n,l)});let p=n[t8],f=(0,ri.useRef)(!!p&&!window.MotionHandoffIsComplete&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,p)));return(0,iP.L)(()=>{h&&(h.updateFeatures(),rd.render(h.render),f.current&&h.animationState&&h.animationState.animateChanges())}),(0,ri.useEffect)(()=>{h&&(!f.current&&h.animationState&&h.animationState.animateChanges(),f.current=!1,iR||(iR=!0,queueMicrotask(iD)))}),h}(i,d,u,t,e.ProjectionNode)}return(0,rr.jsxs)(iA.Provider,{value:h,children:[l&&h.visualElement?(0,rr.jsx)(l,{visualElement:h.visualElement,...u}):null,n(i,e,(s=h.visualElement,(0,ri.useCallback)(e=>{e&&d.mount&&d.mount(e),s&&(e?s.mount(e):s.unmount()),o&&("function"==typeof o?o(e):n_(o)&&(o.current=e))},[s])),d,c,h.visualElement)]})});return o[ij]=i,o}({...iz(e)?i6:i7,preloadedFeatures:P,useRender:function(e=!1){return(t,n,r,{latestValues:i},o)=>{let s=(iz(t)?function(e,t,n,r){let i=(0,ri.useMemo)(()=>{let n=iJ();return i4(n,t,i9(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};i8(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let n={},r=function(e,t){let n=e.style||{},r={};return i8(r,n,e),Object.assign(r,function({transformTemplate:e},t){return(0,ri.useMemo)(()=>{let n=iZ();return i1(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n})(n,i,o,t),a=function(e,t,n){let r={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(on(i)||!0===n&&ot(i)||!t&&!ot(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),l=t!==ri.Fragment?{...a,...s,ref:r}:{},{children:u}=n,c=(0,ri.useMemo)(()=>nn(u)?u.get():u,[u]);return(0,ri.createElement)(t,{...l,children:c})}}(t),createVisualElement:I,Component:e})}))},15409:function(e,t,n){n.d(t,{K:function(){return i},k:function(){return o}});var r=n(20699);let i=r.Z,o=r.Z},48447:function(e,t,n){n.d(t,{j:function(){return r}});let r="undefined"!=typeof window},20699:function(e,t,n){n.d(t,{Z:function(){return r}});let r=e=>e},18295:function(e,t,n){n.d(t,{h:function(){return i}});var r=n(52983);function i(e){let t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},86925:function(e,t,n){n.d(t,{L:function(){return i}});var r=n(52983);let i=n(48447).j?r.useLayoutEffect:r.useEffect},77909:function(e,t,n){n.d(t,{AF:function(){return l},Av:function(){return s},B8:function(){return f},Ch:function(){return c},H$:function(){return i},Xh:function(){return p},jv:function(){return r},n9:function(){return o},pY:function(){return a},sR:function(){return u},xz:function(){return d},z3:function(){return h}});let r=m(/[A-Za-z]/),i=m(/[\dA-Za-z]/),o=m(/[#-'*+\--9=?A-Z^-~]/);function s(e){return null!==e&&(e<32||127===e)}let a=m(/\d/),l=m(/[\dA-Fa-f]/),u=m(/[!-/:-@[-`{-~]/);function c(e){return null!==e&&e<-2}function h(e){return null!==e&&(e<0||32===e)}function d(e){return -2===e||-1===e||32===e}let p=m(/\p{P}|\p{S}/u),f=m(/\s/);function m(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}},52786:function(e,t,n){let r;n.d(t,{Z:function(){return ex}});var i={};n.r(i),n.d(i,{boolean:function(){return h},booleanish:function(){return d},commaOrSpaceSeparated:function(){return y},commaSeparated:function(){return g},number:function(){return f},overloadedBoolean:function(){return p},spaceSeparated:function(){return m}});let o=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class s{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function a(e,t){let n={},r={},i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new s(n,r,t)}function l(e){return e.toLowerCase()}s.prototype.property={},s.prototype.normal={},s.prototype.space=null;class u{constructor(e,t){this.property=e,this.attribute=t}}u.prototype.space=null,u.prototype.boolean=!1,u.prototype.booleanish=!1,u.prototype.overloadedBoolean=!1,u.prototype.number=!1,u.prototype.commaSeparated=!1,u.prototype.spaceSeparated=!1,u.prototype.commaOrSpaceSeparated=!1,u.prototype.mustUseProperty=!1,u.prototype.defined=!1;let c=0,h=v(),d=v(),p=v(),f=v(),m=v(),g=v(),y=v();function v(){return 2**++c}let x=Object.keys(i);class b extends u{constructor(e,t,n,r){var o,s;let a=-1;if(super(e,t),r&&(this.space=r),"number"==typeof n)for(;++a<x.length;){let e=x[a];o=x[a],(s=(n&i[e])===i[e])&&(this[o]=s)}}}b.prototype.defined=!0;let k={}.hasOwnProperty;function w(e){let t;let n={},r={};for(t in e.properties)if(k.call(e.properties,t)){let i=e.properties[t],o=new b(t,e.transform(e.attributes||{},t),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(o.mustUseProperty=!0),n[t]=o,r[l(t)]=t,r[l(o.attribute)]=t}return new s(n,r,e.space)}let S=w({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),E=w({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function T(e,t){return t in e?e[t]:t}function C(e,t){return T(e,t.toLowerCase())}let A=w({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:C,properties:{xmlns:null,xmlnsXLink:null}}),P=w({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:d,ariaAutoComplete:null,ariaBusy:d,ariaChecked:d,ariaColCount:f,ariaColIndex:f,ariaColSpan:f,ariaControls:m,ariaCurrent:null,ariaDescribedBy:m,ariaDetails:null,ariaDisabled:d,ariaDropEffect:m,ariaErrorMessage:null,ariaExpanded:d,ariaFlowTo:m,ariaGrabbed:d,ariaHasPopup:null,ariaHidden:d,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:m,ariaLevel:f,ariaLive:null,ariaModal:d,ariaMultiLine:d,ariaMultiSelectable:d,ariaOrientation:null,ariaOwns:m,ariaPlaceholder:null,ariaPosInSet:f,ariaPressed:d,ariaReadOnly:d,ariaRelevant:null,ariaRequired:d,ariaRoleDescription:m,ariaRowCount:f,ariaRowIndex:f,ariaRowSpan:f,ariaSelected:d,ariaSetSize:f,ariaSort:null,ariaValueMax:f,ariaValueMin:f,ariaValueNow:f,ariaValueText:null,role:null}}),I=w({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:C,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:g,acceptCharset:m,accessKey:m,action:null,allow:null,allowFullScreen:h,allowPaymentRequest:h,allowUserMedia:h,alt:null,as:null,async:h,autoCapitalize:null,autoComplete:m,autoFocus:h,autoPlay:h,blocking:m,capture:null,charSet:null,checked:h,cite:null,className:m,cols:f,colSpan:null,content:null,contentEditable:d,controls:h,controlsList:m,coords:f|g,crossOrigin:null,data:null,dateTime:null,decoding:null,default:h,defer:h,dir:null,dirName:null,disabled:h,download:p,draggable:d,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:h,formTarget:null,headers:m,height:f,hidden:h,high:f,href:null,hrefLang:null,htmlFor:m,httpEquiv:m,id:null,imageSizes:null,imageSrcSet:null,inert:h,inputMode:null,integrity:null,is:null,isMap:h,itemId:null,itemProp:m,itemRef:m,itemScope:h,itemType:m,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:h,low:f,manifest:null,max:null,maxLength:f,media:null,method:null,min:null,minLength:f,multiple:h,muted:h,name:null,nonce:null,noModule:h,noValidate:h,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:h,optimum:f,pattern:null,ping:m,placeholder:null,playsInline:h,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:h,referrerPolicy:null,rel:m,required:h,reversed:h,rows:f,rowSpan:f,sandbox:m,scope:null,scoped:h,seamless:h,selected:h,shadowRootDelegatesFocus:h,shadowRootMode:null,shape:null,size:f,sizes:null,slot:null,span:f,spellCheck:d,src:null,srcDoc:null,srcLang:null,srcSet:null,start:f,step:null,style:null,tabIndex:f,target:null,title:null,translate:null,type:null,typeMustMatch:h,useMap:null,value:d,width:f,wrap:null,align:null,aLink:null,archive:m,axis:null,background:null,bgColor:null,border:f,borderColor:null,bottomMargin:f,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:h,declare:h,event:null,face:null,frame:null,frameBorder:null,hSpace:f,leftMargin:f,link:null,longDesc:null,lowSrc:null,marginHeight:f,marginWidth:f,noResize:h,noHref:h,noShade:h,noWrap:h,object:null,profile:null,prompt:null,rev:null,rightMargin:f,rules:null,scheme:null,scrolling:d,standby:null,summary:null,text:null,topMargin:f,valueType:null,version:null,vAlign:null,vLink:null,vSpace:f,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:h,disableRemotePlayback:h,prefix:null,property:null,results:f,security:null,unselectable:null}}),R=w({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:T,properties:{about:y,accentHeight:f,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:f,amplitude:f,arabicForm:null,ascent:f,attributeName:null,attributeType:null,azimuth:f,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:f,by:null,calcMode:null,capHeight:f,className:m,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:f,diffuseConstant:f,direction:null,display:null,dur:null,divisor:f,dominantBaseline:null,download:h,dx:null,dy:null,edgeMode:null,editable:null,elevation:f,enableBackground:null,end:null,event:null,exponent:f,externalResourcesRequired:null,fill:null,fillOpacity:f,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:g,g2:g,glyphName:g,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:f,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:f,horizOriginX:f,horizOriginY:f,id:null,ideographic:f,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:f,k:f,k1:f,k2:f,k3:f,k4:f,kernelMatrix:y,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:f,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:f,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:f,overlineThickness:f,paintOrder:null,panose1:null,path:null,pathLength:f,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:m,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:f,pointsAtY:f,pointsAtZ:f,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:y,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:y,rev:y,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:y,requiredFeatures:y,requiredFonts:y,requiredFormats:y,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:f,specularExponent:f,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:f,strikethroughThickness:f,string:null,stroke:null,strokeDashArray:y,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:f,strokeOpacity:f,strokeWidth:null,style:null,surfaceScale:f,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:y,tabIndex:f,tableValues:null,target:null,targetX:f,targetY:f,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:y,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:f,underlineThickness:f,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:f,values:null,vAlphabetic:f,vMathematical:f,vectorEffect:null,vHanging:f,vIdeographic:f,version:null,vertAdvY:f,vertOriginX:f,vertOriginY:f,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:f,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),D=a([E,S,A,P,I],"html"),_=a([E,S,A,P,R],"svg"),O={}.hasOwnProperty,M=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],N={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},L=["cent","copy","divide","gt","lt","not","para","times"],F={}.hasOwnProperty,j={};for(r in N)F.call(N,r)&&(j[N[r]]=r);function V(e,t,n){let r,i=function(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!/[\dA-Fa-f]/.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=function(e,t,n,r){let i=String.fromCharCode(e);if(F.call(j,i)){let e=j[i],o="&"+e;return n&&M.includes(e)&&!L.includes(e)&&(!r||t&&61!==t&&/[^\da-z]/i.test(String.fromCharCode(t)))?o:o+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=function(e,t,n){let r="&#"+String(e);return n&&t&&!/\d/.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);r.length<i.length&&(i=r)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function z(e,t){return function(e,t){if(e=e.replace(t.subset?function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,n),t.subset||t.escapeOnly)return e;return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,function(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,n);function n(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}(e,Object.assign({format:V},t))}let B=/^>|^->|<!--|-->|--!>|<!-$/g,U=[">"],H=["<",">"];function q(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}let W=/^data[-\w.:]+$/i,$=/-[a-z]/g,Y=/[A-Z]/g;function K(e){return"-"+e.toLowerCase()}function X(e){return e.charAt(1).toUpperCase()}let Z=/[ \t\n\f\r]/g;function J(e){return"object"==typeof e?"text"===e.type&&G(e.value):G(e)}function G(e){return""===e.replace(Z,"")}let Q=en(1),ee=en(-1),et=[];function en(e){return function(t,n,r){let i=t?t.children:et,o=(n||0)+e,s=i[o];if(!r)for(;s&&J(s);)o+=e,s=i[o];return s}}let er={}.hasOwnProperty;function ei(e){return function(t,n,r){return er.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let eo=ei({body:function(e,t,n){let r=Q(n,t);return!r||"comment"!==r.type},caption:es,colgroup:es,dd:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=Q(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:es,html:function(e,t,n){let r=Q(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=Q(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:ea,rt:ea,tbody:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:el,tfoot:function(e,t,n){return!Q(n,t)},th:el,thead:function(e,t,n){let r=Q(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function es(e,t,n){let r=Q(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&J(r.value.charAt(0)))}function ea(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function el(e,t,n){let r=Q(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let eu=ei({body:function(e){let t=Q(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&J(t.value.charAt(0)))&&!("element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName))},colgroup:function(e,t,n){let r=ee(n,t),i=Q(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&eo(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=e.children,n=[],r=-1;for(;++r<t.length;){let e=t[r];if("element"===e.type&&("title"===e.tagName||"base"===e.tagName)){if(n.includes(e.tagName))return!1;n.push(e.tagName)}}return t.length>0},html:function(e){let t=Q(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=ee(n,t),i=Q(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&eo(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),ec={name:[["	\n\f\r &/=>".split(""),"	\n\f\r \"&'/=>`".split("")],["\0	\n\f\r \"&'/<=>".split(""),"\0	\n\f\r \"&'/<=>`".split("")]],unquoted:[["	\n\f\r &>".split(""),"\0	\n\f\r \"&'<=>`".split("")],["\0	\n\f\r \"&'<=>`".split(""),"\0	\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},eh=["<","&"];function ed(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:z(e.value,Object.assign({},r.settings.characterReferences,{subset:eh}))}let ep=function(e,t){let n=t||{};function r(t,...n){let i=r.invalid,o=r.handlers;if(t&&O.call(t,e)){let n=String(t[e]);i=O.call(o,n)?o[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+z(e.value,Object.assign({},r.settings.characterReferences,{subset:U}))+">":"<!--"+e.value.replace(B,function(e){return z(e,Object.assign({},r.settings.characterReferences,{subset:H}))})+"-->"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i;let o=r.schema,s="svg"!==o.space&&r.settings.omitOptionalTags,a="svg"===o.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),c=[];"html"===o.space&&"svg"===e.tagName&&(r.schema=_);let h=function(e,t){let n;let r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r;let i=function(e,t){let n=l(t),r=t,i=u;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&W.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace($,X);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!$.test(e)){let n=e.replace(Y,K);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=b}return new i(r,t)}(e.schema,t),o=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,s=e.settings.allowDangerousCharacters?0:1,a=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean&&"string"!=typeof n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let c=z(i.attribute,Object.assign({},e.settings.characterReferences,{subset:ec.name[o][s]}));return!0===n?c:(n=Array.isArray(n)?(i.commaSeparated?function(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}:function(e){return e.join(" ").trim()})(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(r=z(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:ec.unquoted[o][s]}))),r!==n&&(e.settings.quoteSmart&&q(n,a)>q(n,e.alternative)&&(a=e.alternative),r=a+z(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?ec.single:ec.double)[o][s],attribute:!0}))+a),c+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),d=r.all("html"===o.space&&"template"===e.tagName?e.content:e);return r.schema=o,d&&(a=!1),!h&&s&&eu(e,t,n)||(c.push("<",e.tagName,h?" "+h:""),a&&("svg"===o.space||r.settings.closeSelfClosing)&&(i=h.charAt(h.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&c.push(" "),c.push("/")),c.push(">")),c.push(d),a||s&&eo(e,t,n)||c.push("</"+e.tagName+">"),c.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ed(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:ed}}),ef={},em={},eg=[];function ey(e,t,n){return ep(e,t,n,this)}function ev(e){let t=[],n=e&&e.children||eg,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ex(e){let t={...this.data("settings"),...e};this.compiler=function(e){return function(e,t){let n=t||ef,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:ey,all:ev,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||o,characterReferences:n.characterReferences||em,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?_:D,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}(e,t)}}},80126:function(e,t,n){n.d(t,{Z:function(){return eC}});var r={};n.r(r),n.d(r,{attentionMarkers:function(){return eg},contentInitial:function(){return ec},disable:function(){return ey},document:function(){return eu},flow:function(){return ed},flowInitial:function(){return eh},insideSpan:function(){return em},string:function(){return ep},text:function(){return ef}});let i={};function o(e,t,n){if(e&&"object"==typeof 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 s(e.children,t,n)}return Array.isArray(e)?s(e,t,n):""}function s(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=o(e[i],t,n);return r.join("")}function a(e,t,n,r){let i;let o=e.length,s=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<r.length;)(i=r.slice(s,s+1e4)).unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function l(e,t){return e.length>0?(a(e,e.length,0,t),e):t}class u{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),Number.POSITIVE_INFINITY);return n&&c(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),c(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),c(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length)){if(e<this.left.length){let t=this.left.splice(e,Number.POSITIVE_INFINITY);c(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);c(this.left,t.reverse())}}}}function c(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function h(e){let t,n,r,i,o,s,l;let c={},h=-1,d=new u(e);for(;++h<d.length;){for(;(h in c);)h=c[h];if(t=d.get(h),h&&"chunkFlow"===t[1].type&&"listItemPrefix"===d.get(h-1)[1].type&&((r=0)<(s=t[1]._tokenizer.events).length&&"lineEndingBlank"===s[r][1].type&&(r+=2),r<s.length&&"content"===s[r][1].type))for(;++r<s.length&&"content"!==s[r][1].type;)"chunkText"===s[r][1].type&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(c,function(e,t){let n,r;let i=e.get(t)[1],o=e.get(t)[2],s=t-1,a=[],l=i._tokenizer||o.parser[i.contentType](i.start),u=l.events,c=[],h={},d=-1,p=i,f=0,m=0,g=[0];for(;p;){for(;e.get(++s)[1]!==p;);a.push(s),!p._tokenizer&&(n=o.sliceStream(p),p.next||n.push(null),r&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++d<u.length;)"exit"===u[d][0]&&"enter"===u[d-1][0]&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(m=d+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){let t=u.slice(g[d],g[d+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),d=-1;++d<c.length;)h[f+c[d][0]]=f+c[d][1],f+=c[d][1]-c[d][0]-1;return h}(d,h)),h=c[h],l=!0);else if(t[1]._container){for(r=h,n=void 0;r--;)if("lineEnding"===(i=d.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(d.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else break;n&&(t[1].end=Object.assign({},d.get(n)[1].start),(o=d.slice(n,h)).unshift(t),d.splice(n,h-n+1,o))}}return a(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}let d={}.hasOwnProperty;var p=n(77909);function f(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return function(r){return(0,p.xz)(r)?(e.enter(n),function r(s){return(0,p.xz)(s)&&o++<i?(e.consume(s),r):(e.exit(n),t(s))}(r)):t(r)}}let m={tokenize:function(e){let t;let n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null===t){e.consume(t);return}return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f(e,n,"linePrefix")},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return(0,p.Ch)(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},g={tokenize:function(e){let t,n,r;let i=this,o=[],s=0;return l;function l(t){if(s<o.length){let n=o[s];return i.containerState=n[1],e.attempt(n[0].continuation,u,c)(t)}return c(t)}function u(e){if(s++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&b();let r=i.events.length,o=r;for(;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}x(s);let l=r;for(;l<i.events.length;)i.events[l][1].end=Object.assign({},n),l++;return a(i.events,o+1,0,i.events.slice(r)),i.events.length=l,c(e)}return l(e)}function c(n){if(s===o.length){if(!t)return f(n);if(t.currentConstruct&&t.currentConstruct.concrete)return g(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(y,h,d)(n)}function h(e){return t&&b(),x(s),f(e)}function d(e){return i.parser.lazy[i.now().line]=s!==o.length,r=i.now().offset,g(e)}function f(t){return i.containerState={},e.attempt(y,m,g)(t)}function m(e){return s++,o.push([i.currentConstruct,i.containerState]),f(e)}function g(r){if(null===r){t&&b(),x(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),function t(n){if(null===n){v(e.exit("chunkFlow"),!0),x(0),e.consume(n);return}return(0,p.Ch)(n)?(e.consume(n),v(e.exit("chunkFlow")),s=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function v(e,o){let l=i.sliceStream(e);if(o&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),i.parser.lazy[e.start.line]){let e,n,o=t.events.length;for(;o--;)if(t.events[o][1].start.offset<r&&(!t.events[o][1].end||t.events[o][1].end.offset>r))return;let l=i.events.length,u=l;for(;u--;)if("exit"===i.events[u][0]&&"chunkFlow"===i.events[u][1].type){if(e){n=i.events[u][1].end;break}e=!0}for(x(s),o=l;o<i.events.length;)i.events[o][1].end=Object.assign({},n),o++;a(i.events,u+1,0,i.events.slice(l)),i.events.length=o}}function x(t){let n=o.length;for(;n-- >t;){let t=o[n];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function b(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},y={tokenize:function(e,t,n){return f(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},v={tokenize:function(e,t,n){return function(t){return(0,p.xz)(t)?f(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||(0,p.Ch)(e)?t(e):n(e)}},partial:!0},x={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):(0,p.Ch)(t)?e.check(b,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return h(e),e}},b={tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f(e,i,"linePrefix")};function i(i){if(null===i||(0,p.Ch)(i))return n(i);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0},k={tokenize:function(e){let t=this,n=e.attempt(v,function(r){if(null===r){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,f(e,e.attempt(this.parser.constructs.flow,r,e.attempt(x,r)),"linePrefix")));return n;function r(r){if(null===r){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n}}},w={resolveAll:C()},S=T("string"),E=T("text");function T(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null===e){t.consume(e);return}return t.enter("data"),t.consume(e),a}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:C("text"===e?A:void 0)}}function C(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function A(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r;let i=e[n-1][1],o=t.sliceStream(i),s=o.length,a=-1,l=0;for(;s--;){let e=o[s];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{s++;break}}if(l){let o={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-l,offset:i.end.offset-l,_index:i.start._index+s,_bufferIndex:s?a:i.start._bufferIndex+a},end:Object.assign({},i.end)};i.end=Object.assign({},o.start),i.start.offset===i.end.offset?Object.assign(i,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}function P(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}let I={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(o){return e.enter("thematicBreak"),r=o,function o(s){return s===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),(0,p.xz)(n)?f(e,o,"whitespace")(n):o(n))}(s)):i>=3&&(null===s||(0,p.Ch)(s))?(e.exit("thematicBreak"),t(s)):n(s)}(o)}}},R={name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:(0,p.pY)(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(I,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return(0,p.pY)(i)&&++s<10?(e.consume(i),t):(!r.interrupt||s<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),a(i)):n(i)}(t)}return n(t)};function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(v,r.interrupt?n:l,e.attempt(D,c,u))}function l(e){return r.containerState.initialBlankLine=!0,o++,c(e)}function u(t){return(0,p.xz)(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(v,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,f(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!(0,p.xz)(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,f(e,e.attempt(R,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},D={tokenize:function(e,t,n){let r=this;return f(e,function(e){let i=r.events[r.events.length-1];return!(0,p.xz)(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},_={tokenize:function(e,t,n){let r=this;return f(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0},O={name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return(0,p.xz)(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){let r=this;return function(t){return(0,p.xz)(t)?f(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(O,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}};function M(e,t,n,r,i,o,s,a,l){let u=l||Number.POSITIVE_INFINITY,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),h):null===t||32===t||41===t||(0,p.Av)(t)?n(t):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(t))};function h(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),h(t)):null===t||60===t||(0,p.Ch)(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function m(i){return!c&&(null===i||41===i||(0,p.z3)(i))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,m):41===i?(e.consume(i),c--,m):null===i||32===i||40===i||(0,p.Av)(i)?n(i):(e.consume(i),92===i?g:m)}function g(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)}}function N(e,t,n,r,i,o){let s;let a=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(h){return l>999||null===h||91===h||93===h&&!s||94===h&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):93===h?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(0,p.Ch)(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(t){return null===t||91===t||93===t||(0,p.Ch)(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s||(s=!(0,p.xz)(t)),92===t?h:c)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function L(e,t,n,r,i,o){let s;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a):n(t)};function a(n){return n===s?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===s?(e.exit(o),a(s)):null===t?n(t):(0,p.Ch)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===s||null===t||(0,p.Ch)(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===s||92===t?(e.consume(t),u):u(t)}}function F(e,t){let n;return function r(i){return(0,p.Ch)(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):(0,p.xz)(i)?f(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function j(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let V={tokenize:function(e,t,n){return function(t){return(0,p.z3)(t)?F(e,r)(t):n(t)};function r(t){return L(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return(0,p.xz)(t)?f(e,o,"whitespace")(t):o(t)}function o(e){return null===e||(0,p.Ch)(e)?t(e):n(e)}},partial:!0},z={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),f(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?o(n):(0,p.Ch)(n)?e.attempt(B,t,o)(n):(e.enter("codeFlowValue"),function n(r){return null===r||(0,p.Ch)(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function o(n){return e.exit("codeIndented"),t(n)}}},B={tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):(0,p.Ch)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):f(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):(0,p.Ch)(e)?i(e):n(e)}},partial:!0},U={name:"setextUnderline",tokenize:function(e,t,n){let r;let i=this;return function(t){let s,a=i.events.length;for(;a--;)if("lineEnding"!==i.events[a][1].type&&"linePrefix"!==i.events[a][1].type&&"content"!==i.events[a][1].type){s="paragraph"===i.events[a][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||s)?(e.enter("setextHeadingLine"),r=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),(0,p.xz)(n)?f(e,o,"lineSuffix")(n):o(n))}(t)):n(t)};function o(r){return null===r||(0,p.Ch)(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);let s={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}},H=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],q=["pre","script","style","textarea"],W={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(v,t,n)}},partial:!0},$={tokenize:function(e,t,n){let r=this;return function(t){return(0,p.Ch)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},Y={tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},K={name:"codeFenced",tokenize:function(e,t,n){let r;let i=this,o={tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s};function s(t){return e.enter("codeFencedFence"),(0,p.xz)(t)?f(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o>=a?(e.exit("codeFencedFenceSequence"),(0,p.xz)(i)?f(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||(0,p.Ch)(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},s=0,a=0;return function(t){return function(t){let o=i.events[i.events.length-1];return s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,r=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a<3?n(i):(e.exit("codeFencedFenceSequence"),(0,p.xz)(i)?f(e,l,"whitespace")(i):l(i))}(t)}(t)};function l(o){return null===o||(0,p.Ch)(o)?(e.exit("codeFencedFence"),i.interrupt?t(o):e.check(Y,c,g)(o)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,p.Ch)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):(0,p.xz)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(o))}function u(t){return null===t||(0,p.Ch)(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,p.Ch)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function c(t){return e.attempt(o,g,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d}function d(t){return s>0&&(0,p.xz)(t)?f(e,m,"linePrefix",s+1)(t):m(t)}function m(t){return null===t||(0,p.Ch)(t)?e.check(Y,c,g)(t):(e.enter("codeFlowValue"),function t(n){return null===n||(0,p.Ch)(n)?(e.exit("codeFlowValue"),m(n)):(e.consume(n),t)}(t))}function g(n){return e.exit("codeFenced"),t(n)}},concrete:!0},X=document.createElement("i");function Z(e){let t="&"+e+";";X.innerHTML=t;let n=X.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let J={name:"characterReference",tokenize:function(e,t,n){let r,i;let o=this,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=p.H$,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=p.AF,u):(e.enter("characterReferenceValue"),r=7,i=p.pY,u(t))}function u(a){if(59===a&&s){let r=e.exit("characterReferenceValue");return i!==p.H$||Z(o.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&s++<r?(e.consume(a),u):n(a)}}},G={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return(0,p.sR)(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Q={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),f(e,t,"linePrefix")}}},ee={name:"labelEnd",tokenize:function(e,t,n){let r,i;let o=this,s=o.events.length;for(;s--;)if(("labelImage"===o.events[s][1].type||"labelLink"===o.events[s][1].type)&&!o.events[s][1]._balanced){r=o.events[s][1];break}return function(t){return r?r._inactive?c(t):(i=o.parser.defined.includes(j(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(et,u,i?u:c)(t):91===t?e.attempt(en,u,i?l:c)(t):i?u(t):c(t)}function l(t){return e.attempt(er,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,o,s=e.length,u=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){u=2;break}}else"labelEnd"===n.type&&(i=s);let c={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},h={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[r+u+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=l(o=[["enter",c,t],["enter",h,t]],e.slice(r+1,r+u+3)),o=l(o,[["enter",d,t]]),o=l(o,P(t.parser.constructs.insideSpan.null,e.slice(r+u+4,i-3),t)),o=l(o,[["exit",d,t],e[i-2],e[i-1],["exit",h,t]]),o=l(o,e.slice(i+1)),o=l(o,[["exit",c,t]]),a(e,r,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){let n=e[t][1];("labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type)&&(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},et={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return(0,p.z3)(t)?F(e,i)(t):i(t)}function i(t){return 41===t?u(t):M(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return(0,p.z3)(t)?F(e,a)(t):u(t)}function s(e){return n(e)}function a(t){return 34===t||39===t||40===t?L(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return(0,p.z3)(t)?F(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},en={tokenize:function(e,t,n){let r=this;return function(t){return N.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(j(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},er={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},ei={name:"labelStartImage",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ee.resolveAll};function eo(e){return null===e||(0,p.z3)(e)||(0,p.B8)(e)?1:(0,p.Xh)(e)?2:void 0}let es={name:"attention",tokenize:function(e,t){let n;let r=this.parser.constructs.attentionMarkers.null,i=this.previous,o=eo(i);return function(s){return n=s,e.enter("attentionSequence"),function s(a){if(a===n)return e.consume(a),s;let l=e.exit("attentionSequence"),u=eo(a),c=!u||2===u&&o||r.includes(a),h=!o||2===o&&u||r.includes(i);return l._open=!!(42===n?c:c&&(o||!h)),l._close=!!(42===n?h:h&&(u||!c)),t(a)}(s)}},resolveAll:function(e,t){let n,r,i,o,s,u,c,h,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close){for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;let p=Object.assign({},e[n][1].end),f=Object.assign({},e[d][1].start);ea(p,-u),ea(f,u),o={type:u>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[n][1].end)},s={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[d][1].start),end:f},i={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[d][1].start)},r={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},o.start),e[d][1].start=Object.assign({},s.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=l(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=l(c,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=l(c,P(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),c=l(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(h=2,c=l(c,[["enter",e[d][1],t],["exit",e[d][1],t]])):h=0,a(e,n-1,d-n+3,c),d=n+c.length-h-2;break}}for(d=-1;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e}};function ea(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let el={name:"labelStartLink",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:ee.resolveAll},eu={42:R,43:R,45:R,48:R,49:R,50:R,51:R,52:R,53:R,54:R,55:R,56:R,57:R,62:O},ec={91:{name:"definition",tokenize:function(e,t,n){let r;let i=this;return function(t){return e.enter("definition"),N.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return(r=j(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):n(t)}function s(t){return(0,p.z3)(t)?F(e,a)(t):a(t)}function a(t){return M(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(V,u,u)(t)}function u(t){return(0,p.xz)(t)?f(e,c,"whitespace")(t):c(t)}function c(o){return null===o||(0,p.Ch)(o)?(e.exit("definition"),i.parser.defined.push(r),t(o)):n(o)}}}},eh={[-2]:z,[-1]:z,32:z},ed={35:{name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(i){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),function i(o){return 35===o&&r++<6?(e.consume(o),i):null===o||(0,p.z3)(o)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||(0,p.Ch)(r)?(e.exit("atxHeading"),t(r)):(0,p.xz)(r)?f(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||(0,p.z3)(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(o)):n(o)}(i)}},resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},a(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},42:I,45:[U,I],60:{name:"htmlFlow",tokenize:function(e,t,n){let r,i,o,s,a;let l=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(s){return 33===s?(e.consume(s),c):47===s?(e.consume(s),i=!0,f):63===s?(e.consume(s),r=3,l.interrupt?t:O):(0,p.jv)(s)?(e.consume(s),o=String.fromCharCode(s),m):n(s)}function c(i){return 45===i?(e.consume(i),r=2,h):91===i?(e.consume(i),r=5,s=0,d):(0,p.jv)(i)?(e.consume(i),r=4,l.interrupt?t:O):n(i)}function h(r){return 45===r?(e.consume(r),l.interrupt?t:O):n(r)}function d(r){let i="CDATA[";return r===i.charCodeAt(s++)?(e.consume(r),s===i.length)?l.interrupt?t:T:d:n(r)}function f(t){return(0,p.jv)(t)?(e.consume(t),o=String.fromCharCode(t),m):n(t)}function m(s){if(null===s||47===s||62===s||(0,p.z3)(s)){let a=47===s,u=o.toLowerCase();return!a&&!i&&q.includes(u)?(r=1,l.interrupt?t(s):T(s)):H.includes(o.toLowerCase())?(r=6,a)?(e.consume(s),g):l.interrupt?t(s):T(s):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(s):i?function t(n){return(0,p.xz)(n)?(e.consume(n),t):S(n)}(s):y(s))}return 45===s||(0,p.H$)(s)?(e.consume(s),o+=String.fromCharCode(s),m):n(s)}function g(r){return 62===r?(e.consume(r),l.interrupt?t:T):n(r)}function y(t){return 47===t?(e.consume(t),S):58===t||95===t||(0,p.jv)(t)?(e.consume(t),v):(0,p.xz)(t)?(e.consume(t),y):S(t)}function v(t){return 45===t||46===t||58===t||95===t||(0,p.H$)(t)?(e.consume(t),v):x(t)}function x(t){return 61===t?(e.consume(t),b):(0,p.xz)(t)?(e.consume(t),x):y(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,k):(0,p.xz)(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||(0,p.z3)(n)?x(n):(e.consume(n),t)}(t)}function k(t){return t===a?(e.consume(t),a=null,w):null===t||(0,p.Ch)(t)?n(t):(e.consume(t),k)}function w(e){return 47===e||62===e||(0,p.xz)(e)?y(e):n(e)}function S(t){return 62===t?(e.consume(t),E):n(t)}function E(t){return null===t||(0,p.Ch)(t)?T(t):(0,p.xz)(t)?(e.consume(t),E):n(t)}function T(t){return 45===t&&2===r?(e.consume(t),I):60===t&&1===r?(e.consume(t),R):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),O):93===t&&5===r?(e.consume(t),_):(0,p.Ch)(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(W,N,C)(t)):null===t||(0,p.Ch)(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T)}function C(t){return e.check($,A,N)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||(0,p.Ch)(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(t){return 45===t?(e.consume(t),O):T(t)}function R(t){return 47===t?(e.consume(t),o="",D):T(t)}function D(t){if(62===t){let n=o.toLowerCase();return q.includes(n)?(e.consume(t),M):T(t)}return(0,p.jv)(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),D):T(t)}function _(t){return 93===t?(e.consume(t),O):T(t)}function O(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),O):T(t)}function M(t){return null===t||(0,p.Ch)(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),M)}function N(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},61:U,95:I,96:K,126:K},ep={38:J,92:G},ef={[-5]:Q,[-4]:Q,[-3]:Q,33:ei,38:J,42:es,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return(0,p.jv)(t)?(e.consume(t),o):64===t?n(t):a(t)}function o(t){return 43===t||45===t||46===t||(0,p.H$)(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,s):(43===n||45===n||46===n||(0,p.H$)(n))&&r++<32?(e.consume(n),t):(r=0,a(n))}(t)):a(t)}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||(0,p.Av)(r)?n(r):(e.consume(r),s)}function a(t){return 64===t?(e.consume(t),l):(0,p.n9)(t)?(e.consume(t),a):n(t)}function l(i){return(0,p.H$)(i)?function i(o){return 46===o?(e.consume(o),r=0,l):62===o?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(o),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(o){if((45===o||(0,p.H$)(o))&&r++<63){let n=45===o?t:i;return e.consume(o),n}return n(o)}(o)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,o;let s=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):(0,p.jv)(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,m):(0,p.jv)(t)?(e.consume(t),x):n(t)}function u(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),h):(0,p.Ch)(t)?(o=c,_(t)):(e.consume(t),c)}function h(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?D(e):45===e?h(e):c(e)}function m(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?g:m):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),y):(0,p.Ch)(t)?(o=g,_(t)):(e.consume(t),g)}function y(t){return 93===t?(e.consume(t),v):g(t)}function v(t){return 62===t?D(t):93===t?(e.consume(t),v):g(t)}function x(t){return null===t||62===t?D(t):(0,p.Ch)(t)?(o=x,_(t)):(e.consume(t),x)}function b(t){return null===t?n(t):63===t?(e.consume(t),k):(0,p.Ch)(t)?(o=b,_(t)):(e.consume(t),b)}function k(e){return 62===e?D(e):b(e)}function w(t){return(0,p.jv)(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||(0,p.H$)(t)?(e.consume(t),S):function t(n){return(0,p.Ch)(n)?(o=t,_(n)):(0,p.xz)(n)?(e.consume(n),t):D(n)}(t)}function E(t){return 45===t||(0,p.H$)(t)?(e.consume(t),E):47===t||62===t||(0,p.z3)(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),D):58===t||95===t||(0,p.jv)(t)?(e.consume(t),C):(0,p.Ch)(t)?(o=T,_(t)):(0,p.xz)(t)?(e.consume(t),T):D(t)}function C(t){return 45===t||46===t||58===t||95===t||(0,p.H$)(t)?(e.consume(t),C):function t(n){return 61===n?(e.consume(n),A):(0,p.Ch)(n)?(o=t,_(n)):(0,p.xz)(n)?(e.consume(n),t):T(n)}(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,P):(0,p.Ch)(t)?(o=A,_(t)):(0,p.xz)(t)?(e.consume(t),A):(e.consume(t),I)}function P(t){return t===r?(e.consume(t),r=void 0,R):null===t?n(t):(0,p.Ch)(t)?(o=P,_(t)):(e.consume(t),P)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||(0,p.z3)(t)?T(t):(e.consume(t),I)}function R(e){return 47===e||62===e||(0,p.z3)(e)?T(e):n(e)}function D(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return(0,p.xz)(t)?f(e,M,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),o(t)}}}],91:el,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return(0,p.Ch)(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},G],93:ee,95:es,96:{name:"codeText",tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),o++,t):(e.exit("codeTextSequence"),s(n))}(t)};function s(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),s):96===l?(i=e.enter("codeTextSequence"),r=0,function n(s){return 96===s?(e.consume(s),r++,n):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(s)):(i.type="codeTextData",a(s))}(l)):(0,p.Ch)(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(l))}function a(t){return null===t||32===t||96===t||(0,p.Ch)(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),a)}},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}}},em={null:[es,w]},eg={null:[42,95]},ey={null:[]},ev=/[\0\t\n\r]/g;function ex(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let eb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ek(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return ex(n.slice(t?2:1),t?16:10)}return Z(n)||e}var ew=n(40014);let eS={}.hasOwnProperty;function eE(e){return{line:e.line,column:e.column,offset:e.offset}}function eT(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+(0,ew.y)({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+(0,ew.y)({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+(0,ew.y)({start:t.start,end:t.end})+") is still open")}function eC(e){let t=this;t.parser=function(n){var s,u;let c,f,y,v;return"string"!=typeof(s={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(u=s,s=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:h,autolinkEmail:h,atxHeading:r(g),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:h,characterReference:h,codeFenced:r(m),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:r(m,s),codeText:r(function(){return{type:"inlineCode",value:""}},s),codeTextData:h,data:h,codeFlowValue:h,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(y),hardBreakTrailing:r(y),htmlFlow:r(v,s),htmlFlowData:h,htmlText:r(v,s),htmlTextData:h,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:s,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(b,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(b),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:r(g),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:l(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];if(!t.depth){let n=this.sliceSerialize(e).length;t.depth=n}},autolink:l(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:f,characterReferenceMarkerNumeric:f,characterReferenceValue:function(e){let t;let n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=ex(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=Z(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=eE(e.end)},codeFenced:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:l(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=j(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(p),hardBreakTrailing:l(p),htmlFlow:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:l(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){let t=e.children;n.children=t}else n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(eb,ek),n.identifier=j(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=eE(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(h.call(this,e),d.call(this,e))},link:l(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=j(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};(function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(eS.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}})(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},i={stack:[r],tokenStack:[],config:t,enter:a,exit:u,buffer:s,resume:c,data:n},o=[],l=-1;for(;++l<e.length;)("listOrdered"===e[l][1].type||"listUnordered"===e[l][1].type)&&("enter"===e[l][0]?o.push(l):l=function(e,t,n){let r,i,o,s,a=t-1,l=-1,u=!1;for(;++a<=n;){let t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let s=a;for(i=void 0;s--;){let t=e[s];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=s}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(a,0,["enter",i,t[2]]),a++,n++,o=void 0,s=!0}}}return e[t][1]._spread=u,n}(e,o.pop(),l));for(l=-1;++l<e.length;){let n=t[e[l][0]];eS.call(n,e[l][1].type)&&n[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},i),e[l][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||eT).call(i,void 0,e[0])}for(r.position={start:eE(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:eE(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r};function r(e,t){return function(n){a.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:eE(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||eT).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+(0,ew.y)({start:e.start,end:e.end})+"): it’s not open");n.position.end=eE(e.end)}function c(){return o(this.stack.pop(),"boolean"!=typeof i.includeImageAlt||i.includeImageAlt,"boolean"!=typeof i.includeHtml||i.includeHtml)}function h(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:eE(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=eE(e.end)}function p(){this.data.atHardBreak=!0}function f(e){this.data.characterReferenceType=e.type}function m(){return{type:"code",lang:null,meta:null,value:""}}function g(){return{type:"heading",depth:0,children:[]}}function y(){return{type:"break"}}function v(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function b(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(u)(function(e){for(;!h(e););return e}((function(e){let t={defined:[],lazy:{},constructs:function(e){let t={},n=-1;for(;++n<e.length;)(function(e,t){let n;for(n in t){let r;let i=(d.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(r in o){d.call(i,r)||(i[r]=[]);let e=o[r];(function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);a(e,0,0,r)})(i[r],Array.isArray(e)?e:e?[e]:[])}}})(t,e[n]);return t}([r,...(e||{}).extensions||[]]),content:n(m),document:n(g),flow:n(k),string:n(S),text:n(E)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),i={},o=[],s=[],u=[],c={consume:function(e){(0,p.Ch)(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,x()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=m(),h.events.push(["enter",n,h]),u.push(n),n},exit:function(e){let t=u.pop();return t.end=m(),h.events.push(["exit",t,h]),t},attempt:y(function(e,t){v(e,t.from)}),check:y(g),interrupt:y(g,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let o;let s=e[r];if("string"==typeof s)o=s;else switch(s){case -5:o="\r";break;case -4:o="\n";break;case -3:o="\r\n";break;case -2:o=t?" ":"	";break;case -1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(s)}n=-2===s,i.push(o)}return i.join("")}(f(e),t)},now:m,defineSkip:function(e){i[e.line]=e.column,x()},write:function(e){return(s=l(s,e),function(){let e;for(;r._index<s.length;){let n=s[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),d=d(t)}else d=d(n)}}(),null!==s[s.length-1])?[]:(v(t,0),h.events=P(o,h.events,h),h.events)}},d=t.tokenize.call(h,c);return t.resolveAll&&o.push(t),h;function f(e){return function(e,t){let n;let r=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;if(r===o)n=[e[r].slice(i,s)];else{if(n=e.slice(r,o),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}s>0&&n.push(e[o].slice(0,s))}return n}(s,e)}function m(){let{line:e,column:t,offset:n,_index:i,_bufferIndex:o}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:o}}function g(e,t){t.restore()}function y(e,t){return function(n,i,o){let s,a,l,d;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){let t=null!==e&&n[e],r=null!==e&&n.null;return p([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(e)};function p(e){return(s=e,a=0,0===e.length)?o:f(e[a])}function f(e){return function(n){return(d=function(){let e=m(),t=h.previous,n=h.currentConstruct,i=h.events.length,o=Array.from(u);return{restore:function(){r=e,h.previous=t,h.currentConstruct=n,h.events.length=i,u=o,x()},from:i}}(),l=e,e.partial||(h.currentConstruct=e),e.name&&h.parser.constructs.disable.null.includes(e.name))?y(n):e.tokenize.call(t?Object.assign(Object.create(h),t):h,c,g,y)(n)}}function g(t){return e(l,d),i}function y(e){return(d.restore(),++a<s.length)?f(s[a]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&a(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(u).document().write((f=1,y="",v=!0,function(e,t,n){let r,i,o,s,a;let l=[];for(e=y+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),o=0,y="",v&&(65279===e.charCodeAt(0)&&o++,v=void 0);o<e.length;){if(ev.lastIndex=o,s=(r=ev.exec(e))&&void 0!==r.index?r.index:e.length,a=e.charCodeAt(s),!r){y=e.slice(o);break}if(10===a&&o===s&&c)l.push(-3),c=void 0;else switch(c&&(l.push(-5),c=void 0),o<s&&(l.push(e.slice(o,s)),f+=s-o),a){case 0:l.push(65533),f++;break;case 9:for(i=4*Math.ceil(f/4),l.push(-2);f++<i;)l.push(-1);break;case 10:l.push(-4),f=1;break;default:c=!0,f=1}o=s+1}return n&&(c&&l.push(-5),y&&l.push(y),l.push(null)),l})(n,s,!0))))}}},39055:function(e,t,n){n.d(t,{Z:function(){return F}});var r=n(69245);let i="object"==typeof self?self:globalThis,o=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);let[s,a]=t[o];switch(s){case 0:case -1:return n(a,o);case 1:{let e=n([],o);for(let t of a)e.push(r(t));return e}case 2:{let e=n({},o);for(let[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{let{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{let e=n(new Map,o);for(let[t,n]of a)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,o);for(let t of a)e.add(r(t));return e}case 7:{let{name:e,message:t}=a;return n(new i[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new i[s](a),o)};return r},s=e=>o(new Map,e)(0),{toString:a}={},{keys:l}=Object,u=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=a.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},c=([e,t])=>0===e&&("function"===t||"symbol"===t),h=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},o=r=>{if(n.has(r))return n.get(r);let[s,a]=u(r);switch(s){case 0:{let t=r;switch(a){case"bigint":s=8,t=r.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+a);t=null;break;case"undefined":return i([-1],r)}return i([s,t],r)}case 1:{if(a)return i([a,[...r]],r);let e=[],t=i([s,e],r);for(let t of r)e.push(o(t));return t}case 2:{if(a)switch(a){case"BigInt":return i([a,r.toString()],r);case"Boolean":case"Number":case"String":return i([a,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());let n=[],h=i([s,n],r);for(let t of l(r))(e||!c(u(r[t])))&&n.push([o(t),o(r[t])]);return h}case 3:return i([s,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([s,{source:e,flags:t}],r)}case 5:{let t=[],n=i([s,t],r);for(let[n,i]of r)(e||!(c(u(n))||c(u(i))))&&t.push([o(n),o(i)]);return n}case 6:{let t=[],n=i([s,t],r);for(let n of r)(e||!c(u(n)))&&t.push(o(n));return n}}let{message:h}=r;return i([s,{name:a,message:h}],r)};return o},d=(e,{json:t,lossy:n}={})=>{let r=[];return h(!(t||n),!!t,new Map,r)(e),r};var p="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?s(d(e,t)):structuredClone(e):(e,t)=>s(d(e,t)),f=n(77909);function m(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),s="";if(37===o&&(0,f.H$)(e.charCodeAt(n+1))&&(0,f.H$)(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function g(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function y(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let v=function(e){if(null==e)return b;if("function"==typeof e)return x(e);if("object"==typeof e)return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=v(e[n]);return x(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):x(function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0});if("string"==typeof e)return x(function(t){return t&&t.type===e});throw Error("Expected function, string, or object as test")};function x(e){return function(t,n,r){var i;return!!(null!==(i=t)&&"object"==typeof i&&"type"in i&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function b(){return!0}let k=[],w=E("end"),S=E("start");function E(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function T(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});let s=i[i.length-1];return s&&"text"===s.type?s.value+=r:i.push({type:"text",value:r}),i}function C(e){let t=e.spread;return null==t?e.children.length>1:t}function A(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let P={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n;let r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=m(i.toLowerCase()),s=e.footnoteOrder.indexOf(i),a=e.footnoteCounts.get(i);void 0===a?(a=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=s+1,a+=1,e.footnoteCounts.set(i,a);let l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,l);let u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return T(e,t);let i={src:m(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){let n={src:m(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return T(e,t);let i={href:m(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){let n={href:m(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=C(n[r])}return t}(n):C(t),o={},s=[];if("boolean"==typeof t.checked){let e;let n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){let e=r[a];(i||0!==a||"element"!==e.type||"p"!==e.tagName)&&s.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?s.push(e):s.push(...e.children)}let l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&s.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=S(t.children[1]),s=w(t.children[t.children.length-1]);o&&s&&(r.position={start:o,end:s}),i.push(r)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,s=o?o.length:t.children.length,a=-1,l=[];for(;++a<s;){let n=t.children[a],r={},s=o?o[a]:void 0;s&&(r.align=s);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),l.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,o=[];for(;r;)o.push(A(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(A(t.slice(i),i>0,!1)),o.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:I,yaml:I,definition:I,footnoteDefinition:I};function I(){}let R={}.hasOwnProperty,D={};function _(e,t){e.position&&(t.position=function(e){let t=S(e),n=w(e);if(t&&n)return{start:t,end:n}}(e))}function O(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,p(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function M(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function N(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function L(e,t){let n=function(e,t){var n,r;let i,o,s;let a=t||D,l=new Map,u=new Map,c={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=c.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=N(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=N(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:O,definitionById:l,footnoteById:u,footnoteCounts:new Map,footnoteOrder:[],handlers:{...P,...a.handlers},one:function(e,t){let n=e.type,r=c.handlers[n];if(R.call(c.handlers,n)&&r)return r(c,e,t);if(c.options.passThrough&&c.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=p(n);return r.children=c.all(e),r}return p(e)}return(c.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(R.call(n,"hProperties")||R.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(c,e,t)},options:a,patch:_,wrap:M};return"function"==typeof(n=function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?l:u,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})?(o=void 0,s=n,i=r):(o=n,s=r,i=void 0),function(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let o=v(i),s=r?-1:1;(function e(i,a,l){let u=i&&"object"==typeof i?i:{};if("string"==typeof u.type){let e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(c,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return c;function c(){var u;let c,h,d,p=k;if((!t||o(i,a,l[l.length-1]||void 0))&&!1===(p=Array.isArray(u=n(i,l))?u:"number"==typeof u?[!0,u]:null==u?k:[u])[0])return p;if("children"in i&&i.children&&i.children&&"skip"!==p[0])for(h=(r?i.children.length:-1)+s,d=l.concat(i);h>-1&&h<i.children.length;){if(!1===(c=e(i.children[h],h,d)())[0])return c;h="number"==typeof c[1]?c[1]:h+s}return p}})(e,void 0,[])()}(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},i),c}(e,t),i=n.one(e,void 0),o=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||g,r=e.options.footnoteBackLabel||y,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let o=e.all(i),s=String(i.identifier).toUpperCase(),u=m(s.toLowerCase()),c=0,h=[],d=e.footnoteCounts.get(s);for(;void 0!==d&&++c<=d;){h.length>0&&h.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,c);"string"==typeof e&&(e={type:"text",value:e}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+u+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let p=o[o.length-1];if(p&&"element"===p.type&&"p"===p.tagName){let e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...h)}else o.push(...h);let f={type:"element",tagName:"li",properties:{id:t+"fn-"+u},children:e.wrap(o,!0)};e.patch(i,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...p(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&((0,r.ok)("children"in s),s.children.push({type:"text",value:"\n"},o)),s}function F(e,t){return e&&"run"in e?async function(n,r){let i=L(n,{file:r,...t});await e.run(i,r)}:function(n,r){return L(n,{file:r,...t||e})}}},40162:function(e,t,n){function r(e){if(e)throw e}n.d(t,{l:function(){return b}});var i=n(93405),o=n(69245);function s(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var a=n(40014);class l extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t?{place:t}:"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=s?s.line:void 0,this.name=(0,a.y)(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}l.prototype.file="",l.prototype.name="",l.prototype.reason="",l.prototype.message="",l.prototype.stack="",l.prototype.column=void 0,l.prototype.line=void 0,l.prototype.ancestors=void 0,l.prototype.cause=void 0,l.prototype.fatal=void 0,l.prototype.place=void 0,l.prototype.ruleId=void 0,l.prototype.source=void 0;let u={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');c(e);let r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),a>-1&&(e.codePointAt(o)===t.codePointAt(a--)?a<0&&(i=o):(a=-1,i=s));return r===i?i=s:i<0&&(i=e.length),e.slice(r,i)},dirname:function(e){let t;if(c(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){let t;c(e);let n=e.length,r=-1,i=0,o=-1,s=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1)}return o<0||r<0||0===s||1===s&&o===r-1&&o===i+1?"":e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)c(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){c(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,i="",o=0,s=-1,a=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(s===l-1||1===a);else if(s!==l-1&&2===a){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",o=0):o=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),s=l,a=0;continue}}else if(i.length>0){i="",o=0,s=l,a=0;continue}}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(s+1,l):i=e.slice(s+1,l),o=l-s-1;s=l,a=0}else 46===n&&a>-1?a++:a=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function c(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function h(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let d=["history","path","basename","stem","extname","dirname"];class p{constructor(e){let t,n;t=e?h(e)?{path:e}:"string"==typeof e||e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e?{value:e}:e:{},this.cwd="/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<d.length;){let e=d[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)d.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?u.basename(this.path):void 0}set basename(e){m(e,"basename"),f(e,"basename"),this.path=u.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?u.dirname(this.path):void 0}set dirname(e){g(this.basename,"dirname"),this.path=u.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?u.extname(this.path):void 0}set extname(e){if(f(e,"extname"),g(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=u.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){h(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!h(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),m(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?u.basename(this.path,this.extname):void 0}set stem(e){m(e,"stem"),f(e,"stem"),this.path=u.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new l(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function f(e,t){if(e&&e.includes(u.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+u.sep+"`")}function m(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function g(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let y=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},v={}.hasOwnProperty;class x extends y{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);(function i(o,...s){let a=e[++n],l=-1;if(o){r(o);return}for(;++l<t.length;)(null===s[l]||void 0===s[l])&&(s[l]=t[l]);t=s,a?(function(e,t){let n;return function(...t){let o;let s=e.length>t.length;s&&t.push(r);try{o=e.apply(this,t)}catch(e){if(s&&n)throw e;return r(e)}s||(o&&o.then&&"function"==typeof o.then?o.then(i,r):o instanceof Error?r(o):i(o))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(a,i)(...s):r(null,...s)})(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new x,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(i(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(S("data",this.frozen),this.namespace[e]=t,this):v.call(this.namespace,e)&&this.namespace[e]||void 0:e?(S("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=C(e),n=this.parser||this.Parser;return k("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),k("process",this.parser||this.Parser),w("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let s=C(e),a=n.parse(s);function l(e,n){e||!n?i(e):r?r(n):((0,o.ok)(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(a,s,function(e,t,r){if(e||!t||!r)return l(e);let i=n.stringify(t,r);"string"==typeof i||i&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?r.value=i:r.result=i,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),k("processSync",this.parser||this.Parser),w("processSync",this.compiler||this.Compiler),this.process(e,function(e,i){n=!0,r(e),t=i}),T("processSync","process",n),(0,o.ok)(t,"we either bailed on an error or have a tree"),t}run(e,t,n){E(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,s){(0,o.ok)("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let a=C(t);r.run(e,a,function(t,r,a){let l=r||e;t?s(t):i?i(l):((0,o.ok)(n,"`done` is defined if `resolve` is not"),n(void 0,l,a))})}}runSync(e,t){let n,i=!1;return this.run(e,t,function(e,t){r(e),n=t,i=!0}),T("runSync","run",i),(0,o.ok)(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=C(t),r=this.compiler||this.Compiler;return w("stringify",r),E(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(S("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else if("object"==typeof e)Array.isArray(e)?a(e):o(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function o(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=i(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)l(e,[]);else if("object"==typeof e){if(Array.isArray(e)){let[t,...n]=e;l(t,n)}else o(e)}else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,l=n[o][1];s(l)&&s(r)&&(r=i(!0,l,r)),n[o]=[e,r,...a]}}}}let b=new x().freeze();function k(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function w(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function S(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function E(e){if(!s(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function T(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function C(e){return e&&"object"==typeof e&&"message"in e&&"messages"in e?e:new p(e)}},40014:function(e,t,n){function r(e){return e&&"object"==typeof e?"position"in e||"type"in e?o(e.position):"start"in e||"end"in e?o(e):"line"in e||"column"in e?i(e):"":""}function i(e){return s(e&&e.line)+":"+s(e&&e.column)}function o(e){return i(e&&e.start)+"-"+i(e&&e.end)}function s(e){return e&&"number"==typeof e?e:1}n.d(t,{y:function(){return r}})}}]);