UNPKG

@histoire/plugin-svelte

Version:

Histoire plugin for Svelte support

2 lines (1 loc) • 1.92 kB
import{space as N,empty as h,insert as m,transition_in as f,transition_out as u,detach as d,create_slot as g,get_all_dirty_from_scope as v,get_slot_changes as S,update_slot_base as V,group_outros as R,check_outros as j,SvelteComponent as q,safe_not_equal as I,init as O}from"svelte/internal";import"svelte/internal/disclose-version";import{getContext as a}from"svelte";const w=n=>({}),b=n=>({});function k(n){let o,i,t,e=n[1]==="default"&&z(n),l=n[1]==="controls"&&A(n);return{c(){e&&e.c(),o=N(),l&&l.c(),i=h()},m(r,s){e&&e.m(r,s),m(r,o,s),l&&l.m(r,s),m(r,i,s),t=!0},p(r,s){r[1]==="default"&&e.p(r,s),r[1]==="controls"&&l.p(r,s)},i(r){t||(f(e),f(l),t=!0)},o(r){u(e),u(l),t=!1},d(r){r&&(d(o),d(i)),e&&e.d(r),l&&l.d(r)}}}function z(n){let o;const i=n[4].default,t=g(i,n,n[3],null);return{c(){t&&t.c()},m(e,l){t&&t.m(e,l),o=!0},p(e,l){t&&t.p&&(!o||l&8)&&V(t,i,e,e[3],o?S(i,e[3],l,null):v(e[3]),null)},i(e){o||(f(t,e),o=!0)},o(e){u(t,e),o=!1},d(e){t&&t.d(e)}}}function A(n){let o;const i=n[4].controls,t=g(i,n,n[3],b);return{c(){t&&t.c()},m(e,l){t&&t.m(e,l),o=!0},p(e,l){t&&t.p&&(!o||l&8)&&V(t,i,e,e[3],o?S(i,e[3],l,w):v(e[3]),b)},i(e){o||(f(t,e),o=!0)},o(e){u(t,e),o=!1},d(e){t&&t.d(e)}}}function B(n){let o,i,t=n[0]&&k(n);return{c(){t&&t.c(),o=h()},m(e,l){t&&t.m(e,l),m(e,o,l),i=!0},p(e,[l]){e[0]?t?(t.p(e,l),l&1&&f(t,1)):(t=k(e),t.c(),f(t,1),t.m(o.parentNode,o)):t&&(R(),u(t,1,1,()=>{t=null}),j())},i(e){i||(f(t),i=!0)},o(e){u(t),i=!1},d(e){e&&d(o),t&&t.d(e)}}}function D(n,o,i){let t,{$$slots:e={},$$scope:l}=o;const r=a("__hstStory"),s=a("__hstVariant"),y=a("__hstSlot"),p=a("__hstIndex"),C=r.variants[p.value];p.value++;let{source:c=null}=o;return n.$$set=_=>{"source"in _&&i(2,c=_.source),"$$scope"in _&&i(3,l=_.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&c!=null&&Object.assign(s,{source:c})},i(0,t=s.id===C.id),[t,y,c,l,e]}class H extends q{constructor(o){super(),O(this,o,D,B,I,{source:2})}}export{H as default};