티스토리 수익 글 보기

티스토리 수익 글 보기

“use strict”;(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3416],{22720:function(t,e,n){n.d(e,{e:function(){return c}});var r=n(794682),u=n(652983),o=n(154005);let i=t=>{let e=(0,u.memo)((0,u.forwardRef)((e,n)=>{let i;let{asChild:c,children:l,…f}=e;if(!c)return(0,u.createElement)(t,{…f,ref:n},l);let a=u.Children.only(l);if(!(0,u.isValidElement)(a))return null;let s=(i=Object.getOwnPropertyDescriptor(a.props,”ref”)?.get)&&”isReactWarning”in i&&i.isReactWarning?a.ref:(i=Object.getOwnPropertyDescriptor(a,”ref”)?.get)&&”isReactWarning”in i&&i.isReactWarning?a.props.ref:a.props.ref||a.ref;return(0,u.cloneElement)(a,{…(0,r.dG)(f,a.props),ref:n?(0,o.F)(n,s):s})}));return e.displayName=t.displayName||t.name,e},c=(()=>{let t=new Map;return new Proxy(i,{apply:(t,e,n)=>i(n[0]),get:(e,n)=>(t.has(n)||t.set(n,i(n)),t.get(n))})})()},160180:function(t,e,n){n.d(e,{U:function(){return u}});let[r,u]=(0,n(74550).k)({name:”EnvironmentContext”,hookName:”useEnvironmentContext”,providerName:”“,strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}})},795206:function(t,e,n){n.d(e,{P:function(){return u}});let[r,u]=(0,n(74550).k)({name:”LocaleContext”,hookName:”useLocaleContext”,providerName:”“,strict:!1,defaultValue:{dir:”ltr”,locale:”en-US”}})},154005:function(t,e,n){n.d(e,{F:function(){return r}});function r(…t){return e=>{let n=[];for(let r of t)if(“function”==typeof r){let t=r(e);”function”==typeof t&&n.push(t)}else r&&(r.current=e);if(n.length)return()=>{for(let t of n)t()}}}},74550:function(t,e,n){n.d(e,{k:function(){return u}});var r=n(652983);function u(t={}){let{name:e,strict:n=!0,hookName:u=”useContext”,providerName:o=”Provider”,errorMessage:i,defaultValue:c}=t,l=(0,r.createContext)(c);return l.displayName=e,[l.Provider,function t(){let e=(0,r.useContext)(l);if(!e&&n){let e=Error(i??`${u} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw e.name=”ContextError”,Error.captureStackTrace?.(e,t),e}return e},l]}},472853:function(t,e,n){n.d(e,{x:function(){return r}});let r=()=>(t,e)=>e.reduce((t,e)=>{let[n,r]=t;return void 0!==r[e]&&(n[e]=r[e]),delete r[e],[n,r]},[{},{…t}])},226966:function(t,e,n){n.d(e,{F:function(){return r}});var r=(t,e=[])=>({parts:(…n)=>{if(o(e))return r(t,n);throw Error(“createAnatomy().parts(…) should only be called once. Did you mean to use .extendWith(…) ?”)},extendWith:(…n)=>r(t,[…e,…n]),rename:t=>r(t,e),keys:()=>e,build:()=>[…new Set(e)].reduce((e,n)=>Object.assign(e,{[n]:{selector:`&[data-scope=”${u(t)}”][data-part=”${u(n)}”], & [data-scope=”${u(t)}”][data-part=”${u(n)}”]`,attrs:{“data-scope”:u(t),”data-part”:u(n)}}}),{})}),u=t=>t.replace(/([A-Z])([A-Z])/g,”$1-$2″).replace(/([a-z])([A-Z])/g,”$1-$2″).replace(/[\s_]+/g,”-“).toLowerCase(),o=t=>0===t.length},794682:function(t,e,n){n.d(e,{Bo:function(){return p},C8:function(){return d},Fb:function(){return s},My:function(){return m},dG:function(){return a},tp:function(){return y}});var r,u=n(989143),o=n(183425),i=(…t)=>t.map(t=>t?.trim?.()).filter(Boolean).join(” “),c=/((?:–)?(?:\w+-?)+)\s*:\s*([^;]*)/g,l=t=>{let e;let n={};for(;e=c.exec(t);)n[e[1]]=e[2];return n},f=(t,e)=>{if((0,u.HD)(t)){if((0,u.HD)(e))return`${t};${e}`;t=l(t)}else(0,u.HD)(e)&&(e=l(e));return Object.assign({},t??{},e??{})};function a(…t){let e={};for(let n of t){for(let t in e){if(t.startsWith(“on”)&&”function”==typeof e[t]&&”function”==typeof n[t]){e[t]=(0,u.PP)(n[t],e[t]);continue}if(“className”===t||”class”===t){e[t]=i(e[t],n[t]);continue}if(“style”===t){e[t]=f(e[t],n[t]);continue}e[t]=void 0!==n[t]?n[t]:e[t]}for(let t in n)void 0===e[t]&&(e[t]=n[t])}return e}function s(){return{and:(…t)=>function(e){return t.every(t=>e.guard(t))},or:(…t)=>function(e){return t.some(t=>e.guard(t))},not:t=>function(e){return!e.guard(t)}}}function d(t){return t}var p=((r=p||{}).NotStarted=”Not Started”,r.Started=”Started”,r.Stopped=”Stopped”,r),m=”__init__”;function y(t){let e=()=>t.getRootNode?.()??document,n=()=>(0,o.Me)(e()),r=()=>(0,o.vY)(e());return{…t,getRootNode:e,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:r,isActiveElement:t=>t===r(),getById:t=>e().getElementById(t)}}},183425:function(t,e,n){n.d(e,{AK:function(){return tx},A_:function(){return tC},DV:function(){return f},Dx:function(){return k},EB:function(){return ti},EV:function(){return G},Em:function(){return X},FX:function(){return tp},Hx:function(){return b},IO:function(){return tj},J2:function(){return W},Jj:function(){return S},Kt:function(){return tN},Me:function(){return E},NI:function(){return D},NL:function(){return t$},NS:function(){return tn},OP:function(){return Y},P$:function(){return tm},PB:function(){return c},Q2:function(){return tf},Qm:function(){return l},Re:function(){return q},Sn:function(){return tL},Ud:function(){return L},VN:function(){return tc},Wn:function(){return td},Y3:function(){return ts},Zq:function(){return m},b1:function(){return O},cB:function(){return tP},g0:function(){return _},gX:function(){return ta},h_:function(){return tk},iP:function(){return Z},lG:function(){return tt},lJ:function(){return tA},pI:function(){return I},pW:function(){return V},r3:function(){return w},rT:function(){return F},rs:function(){return tb},t:function(){return h},uM:function(){return function t(e){let n=function(t){if(“html”===d(t))return t;let e=t.assignedSlot||t.parentNode||m(t)&&t.host||E(t).documentElement;return m(e)?e.host:e}(e);return[“html”,”body”,”#document”].includes(d(n))?E(n).body:f(n)&&tg(n)?n:t(n)}},v$:function(){return H},vY:function(){return x},wC:function(){return K},wq:function(){return ty},x$:function(){return te},zT:function(){return tv}});var r=t=>Math.max(0,Math.min(1,t)),u=(t,e)=>t.map((n,r)=>t[(Math.max(e,0)+r)%t.length]),o=()=>void 0,i=t=>”object”==typeof t&&null!==t,c=t=>t?””:void 0,l=t=>t?”true”:void 0,f=t=>i(t)&&1===t.nodeType&&”string”==typeof t.nodeName,a=t=>i(t)&&9===t.nodeType,s=t=>i(t)&&t===t.window,d=t=>f(t)?t.localName||””:”#document”,p=t=>i(t)&&void 0!==t.nodeType,m=t=>p(t)&&11===t.nodeType&&”host”in t,y=t=>f(t)&&”input”===t.localName,h=t=>!!t?.matches(“a[href]”),g=t=>!!f(t)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0),v=/(textarea|select)/;function b(t){if(null==t||!f(t))return!1;try{return y(t)&&null!=t.selectionStart||v.test(t.localName)||t.isContentEditable||”true”===t.getAttribute(“contenteditable”)||””===t.getAttribute(“contenteditable”)}catch{return!1}}function w(t,e){if(!t||!e||!f(t)||!f(e))return!1;let n=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(n&&m(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function E(t){return a(t)?t:s(t)?t.document:t?.ownerDocument??document}function S(t){return m(t)?S(t.host):a(t)?t.defaultView??window:f(t)?t.ownerDocument?.defaultView??window:window}function x(t){let e=t.activeElement;for(;e?.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}var A=new WeakMap;function k(t){return A.has(t)||A.set(t,S(t).getComputedStyle(t)),A.get(t)}var N=()=>”undefined”!=typeof document,j=t=>N()&&t.test(function(){let t=navigator.userAgentData;return t?.platform??navigator.platform}()),R=t=>N()&&t.test(function(){let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:t,version:e})=>`${t}/${e}`).join(” “):navigator.userAgent}()),O=()=>N()&&!!navigator.maxTouchPoints,T=()=>j(/^iPhone/i),M=()=>j(/^iPad/i)||P()&&navigator.maxTouchPoints>1,C=()=>T()||M(),P=()=>j(/^Mac/i),$=()=>R(/Firefox/i);function D(t){let e=t.composedPath?.()??t.nativeEvent?.composedPath?.();return e?.[0]??t.target}var L=t=>w(t.currentTarget,D(t));function K(t){let e=t.currentTarget;if(!e||!e.matches(“a[href], button[type=’submit’], input[type=’submit’]”))return!1;let n=1===t.button,r=P()?t.metaKey:t.ctrlKey;return n||r}function q(t){let e=t.currentTarget;if(!e)return!1;let n=e.localName;return!!t.altKey&&(“a”===n||”button”===n&&”submit”===e.type||”input”===n&&”submit”===e.type)}function F(t){return Z(t).isComposing||229===t.keyCode}function W(t){return 1===t.key.length&&!t.ctrlKey&&!t.metaKey}var V=t=>0===t.button,H=t=>2===t.button||P()&&t.ctrlKey&&0===t.button,I=t=>t.ctrlKey||t.altKey||t.metaKey,z=t=>”touches”in t&&t.touches.length>0,B={Up:”ArrowUp”,Down:”ArrowDown”,Esc:”Escape”,” “:”Space”,”,”:”Comma”,Left:”ArrowLeft”,Right:”ArrowRight”},U={ArrowLeft:”ArrowRight”,ArrowRight:”ArrowLeft”};function _(t,e={}){let{dir:n=”ltr”,orientation:r=”horizontal”}=e,u=t.key;return u=B[u]??u,”rtl”===n&&”horizontal”===r&&u in U&&(u=U[u]),u}function Z(t){return t.nativeEvent??t}var J=new Set([“PageUp”,”PageDown”]),Q=new Set([“ArrowUp”,”ArrowDown”,”ArrowLeft”,”ArrowRight”]);function Y(t){return t.ctrlKey||t.metaKey?.1:J.has(t.key)||t.shiftKey&&Q.has(t.key)?10:1}function X(t,e=”client”){let n=z(t)?t.touches[0]||t.changedTouches[0]:t;return{x:n[`${e}X`],y:n[`${e}Y`]}}var G=(t,e,n,r)=>{let u=”function”==typeof t?t():t;return u?.addEventListener(e,n,r),()=>{u?.removeEventListener(e,n,r)}};function tt(t,e,n=”value”){if(!t)return;let r=”input”===t.localName?”HTMLInputElement”:”textarea”===t.localName?”HTMLTextAreaElement”:”select”===t.localName?”HTMLSelectElement”:void 0;if(r){let u=function(t,e){let{type:n=”HTMLInputElement”,property:r=”value”}=e;return Object.getOwnPropertyDescriptor(S(t)[n].prototype,r)??{}}(t,{type:r,property:n});u.set?.call(t,e)}t.setAttribute(n,e)}function te(t,e){let{value:n,bubbles:r=!0}=e;if(!t)return;let u=S(t);t instanceof u.HTMLInputElement&&(tt(t,`${n}`),t.dispatchEvent(new u.Event(“input”,{bubbles:r})))}function tn(t,e){if(!t)return;let{onFieldsetDisabledChange:n,onFormReset:r}=e,u=[function(t,e){if(!t)return;let n=t.matches(“textarea, input, select, button”)?t.form:t.closest(“form”),r=t=>{t.defaultPrevented||e()};return n?.addEventListener(“reset”,r,{passive:!0}),()=>n?.removeEventListener(“reset”,r)}(t,r),function(t,e){let n=t?.closest(“fieldset”);if(!n)return;e(n.disabled);let r=new(S(n)).MutationObserver(()=>e(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[“disabled”]}),()=>r.disconnect()}(t,n)];return()=>u.forEach(t=>t?.())}var tr=t=>f(t)&&”IFRAME”===t.tagName,tu=t=>0>parseInt(t.getAttribute(“tabindex”)||”0″,10),to=”input:not([type=’hidden’]):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable=’false’]), details > summary:first-of-type”;function ti(t){return!(!t||t.closest(“[inert]”))&&t.matches(to)&&g(t)}function tc(t,e){if(!t)return[];let n=Array.from(t.querySelectorAll(to)),r=n.filter(tl);return(e&&tl(t)&&r.unshift(t),r.forEach((t,e)=>{if(tr(t)&&t.contentDocument){let n=tc(t.contentDocument.body);r.splice(e,1,…n)}}),!r.length&&e)?n:r}function tl(t){return null!=t&&t.tabIndex>0||ti(t)&&!tu(t)}function tf(t){let{root:e,getInitialEl:n,filter:r,enabled:u=!0}=t;if(!u)return;let o=null;if((o=”function”==typeof n?n():n)||(o=e?.querySelector(“[data-autofocus],[autofocus]”)),!o){let t=tc(e);o=r?t.filter(r)[0]:t[0]}return o||e||void 0}function ta(t){let e=t.currentTarget;if(!e)return!1;let[n,r]=function(t,e){let n=tc(t,void 0);return[n[0]||null,n[n.length-1]||null]}(e),u=e.ownerDocument||document;return(u.activeElement!==n||!t.shiftKey)&&(u.activeElement!==r||!!t.shiftKey)&&(!!n||!!r)}function ts(t){let e=new Set;function n(t){let n=globalThis.requestAnimationFrame(t);e.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(t)),function(){e.forEach(t=>t())}}function td(t){let e;let n=globalThis.requestAnimationFrame(()=>{e=t()});return()=>{globalThis.cancelAnimationFrame(n),e?.()}}function tp(t,e){let{defer:n}=e,r=[];return r.push((n?td:t=>t())(()=>{let n=”function”==typeof t?t():t;r.push(function(t,e){if(!t)return;let{attributes:n,callback:r}=e,u=new(t.ownerDocument.defaultView||window).MutationObserver(t=>{for(let e of t)”attributes”===e.type&&e.attributeName&&n.includes(e.attributeName)&&r(e)});return u.observe(t,{attributes:!0,attributeFilter:n}),()=>u.disconnect()}(n,e))})),()=>{r.forEach(t=>t?.())}}function tm(t,e){let{defer:n}=e,r=[];return r.push((n?td:t=>t())(()=>{let n=”function”==typeof t?t():t;r.push(function(t,e){let{callback:n}=e;if(!t)return;let r=new(t.ownerDocument.defaultView||window).MutationObserver(n);return r.observe(t,{childList:!0,subtree:!0}),()=>r.disconnect()}(n,e))})),()=>{r.forEach(t=>t?.())}}function ty(t){let e=()=>t.click();$()?function(t,e,n){let r=td(()=>{t.removeEventListener(e,u,!0),n()}),u=()=>{r(),n()};return t.addEventListener(e,u,{once:!0,capture:!0}),r}(t,”keyup”,e):queueMicrotask(e)}var th=/auto|scroll|overlay|hidden|clip/;function tg(t){let{overflow:e,overflowX:n,overflowY:r,display:u}=S(t).getComputedStyle(t);return th.test(e+r+n)&&![“inline”,”contents”].includes(u)}function tv(t,e){let{rootEl:n,…r}=e||{};t&&n&&tg(n)&&(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&t.scrollIntoView(r)}function tb(t,e){let{left:n,top:u,width:o,height:i}=e.getBoundingClientRect(),c={x:t.x-n,y:t.y-u},l={x:r(c.x/o),y:r(c.y/i)};return{offset:c,percent:l,getPercentValue:function(t={}){let{dir:e=”ltr”,orientation:n=”horizontal”,inverted:r}=t,u=”object”==typeof r?r.x:r,o=”object”==typeof r?r.y:r;return”horizontal”===n?”rtl”===e||u?1-l.x:l.x:o?1-l.y:l.y}}}var tw=”default”,tE=””,tS=new WeakMap;function tx(t={}){let{target:e,doc:n}=t,r=(n??document).documentElement;if(C()){if(“disabled”!==tw)return;tw=”restoring”,setTimeout(()=>{ts(()=>{“restoring”===tw&&(“none”===r.style.webkitUserSelect&&(r.style.webkitUserSelect=tE||””),tE=””,tw=”default”)})},300)}else if(e&&tS.has(e)){let t=tS.get(e);”none”===e.style.userSelect&&(e.style.userSelect=t??””),””===e.getAttribute(“style”)&&e.removeAttribute(“style”),tS.delete(e)}}function tA(t={}){let{defer:e,target:n,…r}=t,u=[];return u.push((e?td:t=>t())(()=>{let t=”function”==typeof n?n():n;u.push(function(t={}){let{target:e,doc:n}=t,r=n??document,u=r.documentElement;return C()?(“default”===tw&&(tE=u.style.webkitUserSelect,u.style.webkitUserSelect=”none”),tw=”disabled”):e&&(tS.set(e,e.style.userSelect),e.style.userSelect=”none”),()=>tx({target:e,doc:r})}({…r,target:t}))})),()=>{u.forEach(t=>t?.())}}function tk(t,e){let{onPointerMove:n,onPointerUp:r}=e,u=[G(t,”pointermove”,t=>{let e=X(t);if(!(Math.sqrt(e.x**2+e.y**2)<("touch"===t.pointerType?10:5))){if("mouse"===t.pointerType&&0===t.button){r();return}n({point:e,event:t})}},!1),G(t,"pointerup",r,!1),G(t,"pointercancel",r,!1),G(t,"contextmenu",r,!1),tA({doc:t})];return()=>{u.forEach(t=>t())}}function tN(t,e){return Array.from(t?.querySelectorAll(e)??[])}function tj(t,e){return t?.querySelector(e)??null}var tR=t=>t.id,tO=t=>t.split(“”).map(t=>{let e=t.charCodeAt(0);return e>0&&e<128?t:e>=128&&e<=255?`/x${e.toString(16)}`.replace("/","\\"):""}).join("").trim(),tT=t=>tO(t.dataset?.valuetext??t.textContent??””),tM=(t,e)=>t.trim().toLowerCase().startsWith(e.toLowerCase());function tC(t,e){if(!t)return o;let n=Object.keys(e).reduce((e,n)=>(e[n]=t.style.getPropertyValue(n),e),{});return Object.assign(t.style,e),()=>{Object.assign(t.style,n),0===t.style.length&&t.removeAttribute(“style”)}}var tP=Object.assign(function(t,e){let{state:n,activeId:r,key:o,timeout:i=350,itemToId:c}=e,l=n.keysSoFar+o,f=l.length>1&&Array.from(l).every(t=>t===l[0])?l[0]:l,a=function(t,e,n,r=tR){let o=n?function(t,e,n=tR){let r=function(t,e,n=tR){return t.find(t=>n(t)===e)}(t,e,n);return r?t.indexOf(r):-1}(t,n,r):-1,i=n?u(t,o):t;return 1===e.length&&(i=i.filter(t=>r(t)!==n)),i.find(t=>tM(tT(t),e))}(t.slice(),f,r,c);function s(){clearTimeout(n.timer),n.timer=-1}return!function t(e){n.keysSoFar=e,s(),””!==e&&(n.timer=+setTimeout(()=>{t(“”),s()},i))}(l),a},{defaultOptions:{keysSoFar:””,timer:-1},isValidEvent:function(t){return 1===t.key.length&&!t.ctrlKey&&!t.metaKey}}),t$={border:”0″,clip:”rect(0 0 0 0)”,height:”1px”,margin:”-1px”,overflow:”hidden”,padding:”0″,position:”absolute”,width:”1px”,whiteSpace:”nowrap”,wordWrap:”normal”},tD=1e3/60;function tL(t,e){let n=[];return t?.forEach(t=>{let r=function(t,e){let n=t();if(f(n)&&n.isConnected)return e(n),()=>void 0;{let n=setInterval(()=>{let r=t();f(r)&&r.isConnected&&(e(r),clearInterval(n))},tD);return()=>clearInterval(n)}}(t,e);n.push(r)}),()=>{n.forEach(t=>t())}}},439654:function(t,e,n){n.d(e,{eO:function(){return s},vs:function(){return m}});var r=n(794682),u=n(989143),o=n(652983),i=n(63730),c=n(906420);n(397458);var l=void 0!==globalThis.document?o.useLayoutEffect:o.useEffect;function f(t){let e=t().value??t().defaultValue,n=t().isEqual??Object.is,[r]=(0,o.useState)(e),[c,f]=(0,o.useState)(r),a=void 0!==t().value,s=(0,o.useRef)(c);s.current=a?t().value:c;let d=(0,o.useRef)(s.current);l(()=>{d.current=s.current},[c,t().value]);let p=e=>{let r=d.current,o=(0,u.mf)(e)?e(r):e;t().debug&&console.log(`[bindable > ${t().debug}] setValue`,{next:o,prev:r}),a||f(o),n(o,r)||t().onChange?.(o,r)};return{initial:r,ref:s,get:function(){return a?t().value:c},set(e){(t().sync?i.flushSync:u.yR)(()=>p(e))},invoke(e,n){t().onChange?.(e,n)},hash:e=>t().hash?.(e)??String(e)}}f.cleanup=t=>{(0,o.useEffect)(()=>t,[])},f.ref=t=>{let e=(0,o.useRef)(t);return{get:()=>e.current,set:t=>{e.current=t}}};var a=(t,e)=>{let n=(0,o.useRef)(!1),r=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(n.current&&r.current)return e();r.current=!0},[…(t??[]).map(t=>”function”==typeof t?t():t)]),(0,o.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])};function s(t,e={}){let n=(0,o.useMemo)(()=>{let{id:t,ids:n,getRootNode:u}=e;return(0,r.tp)({id:t,ids:n,getRootNode:u})},[e]),c=(…e)=>{t.debug&&console.log(…e)},s=function(t){let e=d(t);return function(t){return e.current[t]}}(t.props?.({props:u.oA(e),scope:n})??e),m=d(t.context?.({prop:s,bindable:f,scope:n,flush:p,getContext:()=>y,getComputed:()=>R,getRefs:()=>S})),y={get:t=>m.current?.[t].ref.current,set(t,e){m.current?.[t].set(e)},initial:t=>m.current?.[t].initial,hash(t){let e=m.current?.[t].get();return m.current?.[t].hash(e)}},h=(0,o.useRef)(new Map),g=(0,o.useRef)(null),v=(0,o.useRef)(null),b=(0,o.useRef)({type:””}),w=()=>({…b.current,current:()=>b.current,previous:()=>v.current}),E=()=>({…O,matches:(…t)=>t.includes(O.ref.current),hasTag:e=>!!t.states[O.ref.current]?.tags?.includes(e)}),S=function(t){let e=(0,o.useRef)(t);return{get:t=>e.current[t],set(t,n){e.current[t]=n}}}(t.refs?.({prop:s,context:y})??{}),x=()=>({state:E(),context:y,event:w(),prop:s,send:P,action:A,guard:k,track:a,refs:S,computed:R,flush:p,scope:n,choose:j}),A=e=>{let n=(0,u.mf)(e)?e(x()):e;if(n)for(let e of n.map(e=>{let n=t.implementations?.actions?.[e];return n||(0,u.ZK)(`[zag-js] No implementation found for action “${JSON.stringify(e)}”`),n}))e?.(x())},k=e=>(0,u.mf)(e)?e(x()):t.implementations?.guards?.[e](x()),N=e=>{let n=(0,u.mf)(e)?e(x()):e;if(!n)return;let r=n.map(e=>{let n=t.implementations?.effects?.[e];return n||(0,u.ZK)(`[zag-js] No implementation found for effect “${JSON.stringify(e)}”`),n}),o=[];for(let t of r){let e=t?.(x());e&&o.push(e)}return()=>o.forEach(t=>t?.())},j=t=>(0,u.qo)(t).find(t=>{let e=!t.guard;return(0,u.HD)(t.guard)?e=!!k(t.guard):(0,u.mf)(t.guard)&&(e=t.guard(x())),e}),R=e=>((0,u.zx)(t.computed,()=>”[zag-js] No computed object found on machine”),(0,t.computed[e])({context:y,event:w(),prop:s,refs:S,scope:n,computed:R})),O=f(()=>({defaultValue:t.initialState({prop:s}),onChange(e,n){if(n){let t=h.current.get(n);t?.(),h.current.delete(n)}n&&A(t.states[n]?.exit),A(g.current?.actions);let u=N(t.states[e]?.effects);if(u&&h.current.set(e,u),n===r.My){A(t.entry);let e=N(t.effects);e&&h.current.set(r.My,e)}A(t.states[e]?.entry)}})),T=(0,o.useRef)(void 0),M=(0,o.useRef)(r.Bo.NotStarted);l(()=>{queueMicrotask(()=>{let t=M.current===r.Bo.Started;M.current=r.Bo.Started,c(t?”rehydrating…”:”initializing…”);let e=T.current??O.initial;O.invoke(e,t?O.get():r.My)});let e=h.current,n=O.ref.current;return()=>{c(“unmounting…”),T.current=n,M.current=r.Bo.Stopped,e.forEach(t=>t?.()),h.current=new Map,g.current=null,queueMicrotask(()=>{A(t.exit)})}},[]);let C=()=>”ref”in O?O.ref.current:O.get(),P=e=>{queueMicrotask(()=>{if(M.current!==r.Bo.Started)return;v.current=b.current,b.current=e,c(“send”,e);let n=C(),u=j(t.states[n].on?.[e.type]??t.on?.[e.type]);if(!u)return;g.current=u;let o=u.target??n;c(“transition”,u);let l=o!==n;l?(0,i.flushSync)(()=>O.set(o)):u.reenter&&!l?O.invoke(n,n):A(u.actions??[])})};return t.watch?.(x()),{state:E(),send:P,context:y,prop:s,scope:n,refs:S,computed:R,event:w(),getStatus:()=>M.current}}function d(t){let e=(0,o.useRef)(t);return e.current=t,e}function p(t){queueMicrotask(()=>{(0,i.flushSync)(()=>t())})}var m=(0,c.F)(t=>t)},906420:function(t,e,n){function r(t){return new Proxy({},{get:(e,n)=>”style”===n?e=>t({style:e}).style:t})}n.d(e,{F:function(){return r},e:function(){return u}});var u=()=>t=>Array.from(new Set(t))},989143:function(t,e,n){function r(t){return null==t?[]:Array.isArray(t)?t:[t]}n.d(e,{EQ:function(){return M},Ft:function(){return A},HD:function(){return S},HU:function(){return U},IH:function(){return c},Kn:function(){return E},N4:function(){return Q},Od:function(){return l},P2:function(){return P},PP:function(){return T},Ps:function(){return u},Pu:function(){return N},Sm:function(){return p},Uq:function(){return z},WR:function(){return tn},Xy:function(){return v},Y3:function(){return C},Z$:function(){return o},ZK:function(){return tt},ZT:function(){return O},d5:function(){return s},h1:function(){return Z},jj:function(){return f},kb:function(){return a},lp:function(){return d},lt:function(){return Y},m2:function(){return k},mf:function(){return x},mp:function(){return m},oA:function(){return function t(e){if(!X(e)||void 0===e)return e;let n=Reflect.ownKeys(e).filter(t=>”string”==typeof t),r={};for(let u of n){let n=e[u];void 0!==n&&(r[u]=t(n))}return r}},pj:function(){return j},qo:function(){return r},wQ:function(){return I},xQ:function(){return G},xs:function(){return _},yR:function(){return R},yo:function(){return y},zx:function(){return te}});var u=t=>t[0],o=t=>t[t.length-1],i=(t,e)=>-1!==t.indexOf(e),c=(t,…e)=>t.concat(e),l=(t,…e)=>t.filter(t=>!e.includes(t)),f=t=>Array.from(new Set(t)),a=(t,e)=>i(t,e)?l(t,e):c(t,e);function s(t,e,n={}){let{step:r=1,loop:u=!0}=n,o=e+r,i=t.length,c=i-1;return -1===e?r>0?0:c:o<0?u?c:0:o>=i?u?0:e>i?i:e:o}function d(t,e,n={}){return t[s(t,e,n)]}function p(t,e,n={}){let{step:r=1,loop:u=!0}=n;return s(t,e,{step:-r,loop:u})}function m(t,e,n={}){return t[p(t,e,n)]}var y=(t,e)=>t.reduce((t,n,r)=>(r%e==0?t.push([n]):o(t)?.push(n),t),[]),h=t=>t?.constructor.name===”Array”,g=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n{if(Object.is(t,e))return!0;if(null==t&&null!=e||null!=t&&null==e)return!1;if(“function”==typeof t?.isEqual&&”function”==typeof e?.isEqual)return t.isEqual(e);if(“function”==typeof t&&”function”==typeof e)return t.toString()===e.toString();if(h(t)&&h(e))return g(Array.from(t),Array.from(e));if(“object”!=typeof t||”object”!=typeof e)return!1;let n=Object.keys(e??Object.create(null)),r=n.length;for(let e=0;eArray.isArray(t),w=t=>null!=t&&”object”==typeof t,E=t=>w(t)&&!b(t),S=t=>”string”==typeof t,x=t=>”function”==typeof t,A=t=>null==t,k=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Function.prototype.toString.call(Object);var N=(t,…e)=>(“function”==typeof t?t(…e):t)??void 0,j=t=>t,R=t=>t(),O=()=>{},T=(…t)=>(…e)=>{t.forEach(function(t){t?.(…e)})};function M(t,e,…n){if(t in e){let r=e[t];return x(r)?r(…n):r}let r=Error(`No matching key: ${JSON.stringify(t)} in ${JSON.stringify(Object.keys(e))}`);throw Error.captureStackTrace?.(r,M),r}var C=(t,e)=>{try{return t()}catch(t){return t instanceof Error&&Error.captureStackTrace?.(t,C),e?.()}};function P(t,e=0){let n=0,r=null;return(…u)=>{let o=Date.now(),i=o-n;i>=e?(r&&(clearTimeout(r),r=null),t(…u),n=o):r||(r=setTimeout(()=>{t(…u),n=Date.now(),r=null},e-i))}}var{floor:$,abs:D,round:L,min:K,max:q,pow:F,sign:W}=Math,V=t=>Number.isNaN(t),H=t=>V(t)?0:t,I=(t,e)=>(t%e+e)%e,z=(t,e,n)=>H(t)>=e&&H(t)<=n,B=(t,e,n)=>L((H(t)-e)/n)*n+e,U=(t,e,n)=>K(q(H(t),e),n),_=(t,e,n)=>(H(t)-e)/(n-e),Z=(t,e,n,r)=>U(B(t*(n-e)+e,e,r),e,n),J=(t,e)=>{let n=t,r=e.toString(),u=r.indexOf(“.”),o=u>=0?r.length-u:0;if(o>0){let t=F(10,o);n=L(n*t)/t}return n},Q=(t,e,n,r)=>{let u=null!=e?Number(e):0,o=Number(n),i=(t-u)%r,c=2*D(i)>=r?t+W(i)*(r-D(i)):t-i;if(c=J(c,r),!V(u)&&co){let t=$((o-u)/r),e=u+t*r;c=t<=0||e{let r=Math.pow(n,e);return L(t*r)/r},X=t=>t&&”object”==typeof t&&t.constructor===Object,G=t=>function(e){return function(t,e){let n={},r={},u=new Set(e);for(let e in t)u.has(e)?r[e]=t[e]:n[e]=t[e];return[r,n]}(e,t)};function tt(…t){1===t.length?t[0]:t[1],2!==t.length||t[0]}function te(t,e){if(null==t)throw Error(e())}function tn(t,e,n){let r=[];for(let n of e)null==t[n]&&r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:””}] missing required props: ${r.join(“, “)}`)}}}]); //# sourceMappingURL=3416-4d2ff9ed4d9d2da0.js.map