PageSourceSearch

https://shadcnstudio-svelte.netlify.app/_app/immutable/chunks/C34bkhr6.js

js shadcnstudio-svelte.netlify.app collected 2026-10-03 11:24:50 UTC 4,252 bytes, 1 lines download raw bytes

1import{v as r,J as p,M as c,w as S,y as g,aK as P,d4 as d,p as b,A as f,a as A,B as T,b as N,j as y,s as O,n as M}from"./DGDe16yr.js";import{i as _}from"./BGFdVicR.js";import{w as l}from"./B-46czCI.js";import{P as U}from"./Bl0P36xq.js";import{u as x,e as C,b as I}from"./B24CSAh2.js";function E(e,n){if(_(e)){const i=e();return i===void 0?n:i}return e===void 0?n:e}function G(e,n){let t=p(null);const i=S(()=>E(n,250));function o(...a){if(r(t))r(t).timeout&&clearTimeout(r(t).timeout);else{let s,u;const h=new Promise((v,w)=>{s=v,u=w});c(t,{timeout:null,runner:null,promise:h,resolve:s,reject:u},!0)}return r(t).runner=async()=>{if(!r(t))return;const s=r(t);c(t,null);try{s.resolve(await e.apply(this,a))}catch(u){s.reject(u)}},r(t).timeout=setTimeout(r(t).runner,r(i)),r(t).promise}return o.cancel=async()=>{(!r(t)||r(t).timeout===null)&&(await new Promise(a=>setTimeout(a,0)),!r(t)||r(t).timeout===null)||(clearTimeout(r(t).timeout),r(t).reject("Cancelled"),c(t,null))},o.runScheduledNow=async()=>{(!r(t)||!r(t).timeout)&&(await new Promise(a=>setTimeout(a,0)),!r(t)||!r(t).timeout)||(clearTimeout(r(t).timeout),r(t).timeout=null,await r(t).runner?.())},Object.defineProperty(o,"pending",{enumerable:!0,get(){return!!r(t)?.timeout}}),o}class H{#e;#t;constructor(n,t){this.#e=n,this.#t=t,this.handler=this.handler.bind(this),g(this.handler)}handler(){let n=0;const t=this.#e();if(!t)return;const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(this.#t)});return i.observe(t),()=>{window.cancelAnimationFrame(n),i.unobserve(t)}}}class j{state;#e;constructor(n,t){this.state=x(n),this.#e=t,this.dispatch=this.dispatch.bind(this)}#t(n){return this.#e[this.state.current][n]??this.state.current}dispatch(n){this.state.current=this.#t(n)}}const F={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}};class z{opts;#e=p("none");get prevAnimationNameState(){return r(this.#e)}set prevAnimationNameState(n){c(this.#e,n,!0)}#t=p(P({}));get styles(){return r(this.#t)}set styles(n){c(this.#t,n,!0)}initialStatus;previousPresent;machine;present;constructor(n){this.opts=n,this.present=this.opts.open,this.initialStatus=n.open.current?"mounted":"unmounted",this.previousPresent=new U(()=>this.present.current),this.machine=new j(this.initialStatus,F),this.handleAnimationEnd=this.handleAnimationEnd.bind(this),this.handleAnimationStart=this.handleAnimationStart.bind(this),R(this),D(this),k(this)}handleAnimationEnd(n){if(!this.opts.ref.current)return;const t=m(this.opts.ref.current),i=t.includes(n.animationName)||t==="none";n.target===this.opts.ref.current&&i&&this.machine.dispatch("ANIMATION_END")}handleAnimationStart(n){this.opts.ref.current&&n.target===this.opts.ref.current&&(this.prevAnimationNameState=m(this.opts.ref.current))}#n=S(()=>["mounted","unmountSuspended"].includes(this.machine.state.current));get isPresent(){return r(this.#n)}set isPresent(n){c(this.#n,n)}}function R(e){l(()=>e.present.current,()=>{if(!e.opts.ref.current||!(e.present.current!==e.previousPresent.current))return;const t=e.prevAnimationNameState,i=m(e.opts.ref.current);if(e.present.current)e.machine.dispatch("MOUNT");else if(i==="none"||e.styles.display==="none")e.machine.dispatch("UNMOUNT");else{const o=t!==i;e.previousPresent.current&&o?e.machine.dispatch("ANIMATION_OUT"):e.machine.dispatch("UNMOUNT")}})}function D(e){l(()=>e.machine.state.current,()=>{if(!e.opts.ref.current)return;const n=m(e.opts.ref.current);e.prevAnimationNameState=e.machine.state.current==="mounted"?n:"none"})}function k(e){l(()=>e.opts.ref.current,()=>{if(e.opts.ref.current)return e.styles=getComputedStyle(e.opts.ref.current),C(d(e.opts.ref.current,"animationstart",e.handleAnimationStart),d(e.opts.ref.current,"animationcancel",e.handleAnimationEnd),d(e.opts.ref.current,"animationend",e.handleAnimationEnd))})}function m(e){return e&&getComputedStyle(e).animationName||"none"}function L(e,n){b(n,!0);const t=new z({open:I(()=>n.open),ref:n.ref});var i=f(),o=A(i);{var a=s=>{var u=f(),h=A(u);O(h,()=>n.presence??M,()=>({present:t.isPresent})),N(s,u)};T(o,s=>{(n.forceMount||n.open||t.isPresent)&&s(a)})}N(e,i),y()}export{L as P,H as S,j as a,G as u};

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