Chakshu123's picture
Duplicate from HighCWu/anime-colorization-with-hint
41ddeab
raw
history blame contribute delete
No virus
4.21 kB
import{S as q,i as D,s as E,a7 as I,e as S,c as h,a as F,b as y,f as C,m,g as T,a8 as j,l as K,j as g,k,n as P,o as v,F as L,t as O,h as R,a9 as d,P as U,R as V,T as z,I as A,O as G,U as H,V as J,L as M,K as B}from"./index.396f4a72.js";function N(s){let e;return{c(){e=O(s[1])},m(l,t){C(l,e,t)},p(l,t){t&2&&R(e,l[1])},d(l){l&&P(e)}}}function Q(s){let e,l,t,n,u,c,_;return l=new I({props:{show_label:s[3],$$slots:{default:[N]},$$scope:{ctx:s}}}),{c(){e=S("label"),h(l.$$.fragment),t=F(),n=S("input"),y(n,"type","color"),y(n,"class","gr-box-unrounded"),n.disabled=s[2],y(e,"class","block")},m(r,f){C(r,e,f),m(l,e,null),T(e,t),T(e,n),j(n,s[0]),u=!0,c||(_=K(n,"input",s[5]),c=!0)},p(r,[f]){const a={};f&8&&(a.show_label=r[3]),f&258&&(a.$$scope={dirty:f,ctx:r}),l.$set(a),(!u||f&4)&&(n.disabled=r[2]),f&1&&j(n,r[0])},i(r){u||(g(l.$$.fragment,r),u=!0)},o(r){k(l.$$.fragment,r),u=!1},d(r){r&&P(e),v(l),c=!1,_()}}}function W(s,e,l){let{value:t="#000000"}=e,{style:n={}}=e,{label:u}=e,{disabled:c=!1}=e,{show_label:_=!0}=e;const r=L();function f(i){r("change",i)}function a(){t=this.value,l(0,t)}return s.$$set=i=>{"value"in i&&l(0,t=i.value),"style"in i&&l(4,n=i.style),"label"in i&&l(1,u=i.label),"disabled"in i&&l(2,c=i.disabled),"show_label"in i&&l(3,_=i.show_label)},s.$$.update=()=>{s.$$.dirty&1,s.$$.dirty&1&&f(t)},[t,u,c,_,n,a]}class X extends q{constructor(e){super(),D(this,e,W,Q,E,{value:0,style:4,label:1,disabled:2,show_label:3})}}function Y(s){let e,l,t,n,u;const c=[s[6]];let _={};for(let a=0;a<c.length;a+=1)_=V(_,c[a]);e=new z({props:_});function r(a){s[8](a)}let f={style:s[5],label:s[1],show_label:s[4],disabled:s[7]==="static"};return s[0]!==void 0&&(f.value=s[0]),t=new X({props:f}),A.push(()=>G(t,"value",r)),t.$on("change",s[9]),t.$on("submit",s[10]),{c(){h(e.$$.fragment),l=F(),h(t.$$.fragment)},m(a,i){m(e,a,i),C(a,l,i),m(t,a,i),u=!0},p(a,i){const w=i&64?H(c,[J(a[6])]):{};e.$set(w);const b={};i&32&&(b.style=a[5]),i&2&&(b.label=a[1]),i&16&&(b.show_label=a[4]),i&128&&(b.disabled=a[7]==="static"),!n&&i&1&&(n=!0,b.value=a[0],M(()=>n=!1)),t.$set(b)},i(a){u||(g(e.$$.fragment,a),g(t.$$.fragment,a),u=!0)},o(a){k(e.$$.fragment,a),k(t.$$.fragment,a),u=!1},d(a){v(e,a),a&&P(l),v(t,a)}}}function Z(s){let e,l;return e=new U({props:{visible:s[3],elem_id:s[2],disable:typeof s[5].container=="boolean"&&!s[5].container,$$slots:{default:[Y]},$$scope:{ctx:s}}}),{c(){h(e.$$.fragment)},m(t,n){m(e,t,n),l=!0},p(t,[n]){const u={};n&8&&(u.visible=t[3]),n&4&&(u.elem_id=t[2]),n&32&&(u.disable=typeof t[5].container=="boolean"&&!t[5].container),n&2291&&(u.$$scope={dirty:n,ctx:t}),e.$set(u)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){k(e.$$.fragment,t),l=!1},d(t){v(e,t)}}}function p(s,e,l){let{label:t="ColorPicker"}=e,{elem_id:n=""}=e,{visible:u=!0}=e,{value:c}=e,{show_label:_}=e,{style:r={}}=e,{loading_status:f}=e,{mode:a}=e;function i(o){c=o,l(0,c)}function w(o){B.call(this,s,o)}function b(o){B.call(this,s,o)}return s.$$set=o=>{"label"in o&&l(1,t=o.label),"elem_id"in o&&l(2,n=o.elem_id),"visible"in o&&l(3,u=o.visible),"value"in o&&l(0,c=o.value),"show_label"in o&&l(4,_=o.show_label),"style"in o&&l(5,r=o.style),"loading_status"in o&&l(6,f=o.loading_status),"mode"in o&&l(7,a=o.mode)},[c,t,n,u,_,r,f,a,i,w,b]}class x extends q{constructor(e){super(),D(this,e,p,Z,E,{label:1,elem_id:2,visible:3,value:0,show_label:4,style:5,loading_status:6,mode:7})}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),d()}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),d()}get visible(){return this.$$.ctx[3]}set visible(e){this.$$set({visible:e}),d()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),d()}get show_label(){return this.$$.ctx[4]}set show_label(e){this.$$set({show_label:e}),d()}get style(){return this.$$.ctx[5]}set style(e){this.$$set({style:e}),d()}get loading_status(){return this.$$.ctx[6]}set loading_status(e){this.$$set({loading_status:e}),d()}get mode(){return this.$$.ctx[7]}set mode(e){this.$$set({mode:e}),d()}}var ee=x;const te=["static","dynamic"],le=s=>({type:"string",description:"hex color code",example_data:s.value??"#000000"});export{ee as Component,le as document,te as modes};
//# sourceMappingURL=index.2035cf67.js.map