Update 32131
Browse files
32131
CHANGED
|
@@ -19,5 +19,6 @@
|
|
| 19 |
`,tj=(t,e)=>{const{colors:n,getTextColor:r,getColor:o,currentPresetName:i,applyPreset:s}=He(),l=(d=n)=>{if(!d)return;const f=Object.keys(d),h=f.map(v=>`${Hc(v)}: ${d[v]}`).join(";"),p=f.map(v=>`${Hc(`on-${v}`)}: ${o(r(d[v]))}`).join(";");return`${h};${p}`},a=(d=n)=>{const f=Object.keys(d);let h=`:root {
|
| 20 |
`;return f.forEach(p=>{h+=tb(p,d[p])}),f.forEach(p=>{h+=tb(`on-${p}`,o(r(d[p])))}),h+=`}
|
| 21 |
`,h},u=g(Qm),c=d=>{if(!d||as())return;const f=a(d);Zm(`va-color-variables-${u.value}`,()=>f)};return fe(n,d=>{c(d)},{immediate:!0,deep:!0}),{colors:n,currentPresetName:i,renderCSSVariables:l,updateColors:c,renderCSSVariablesStyleContent:a}},nj=So(t=>({install(e){ri(e,"$vaColorConfig",tj())}})),yk=t=>{const e=g(Jm),n=W(null);return fe(e,()=>{e.value&&(n.value=t())},{immediate:!0}),n},qd=()=>yk(()=>window),Rt=t=>{if(t&&typeof t=="object"&&(t=m(t),!!t))return typeof t.$el<"u"?t.$el:t},np=(t,...e)=>{if(!(!t||typeof t!="object")){if("addEventListener"in t&&typeof t.addEventListener=="function"){t.addEventListener(...e);return}"parentElement"in t&&np(t.parentElement,...e)}},rp=(t,...e)=>{if(!(!t||typeof t!="object")){if("removeEventListener"in t&&typeof t.removeEventListener=="function"){t.removeEventListener(...e);return}"parentElement"in t&&rp(t.parentElement,...e)}},At=(t,e,n)=>{const r=n&&typeof n!="boolean"?n:qd(),o=typeof n=="boolean"?n:!1;fe(r,(i,s)=>{Array.isArray(t)?t.forEach(l=>{np(Rt(m(i)),l,e,o),rp(Rt(m(s)),l,e,o)}):(np(Rt(m(i)),t,e,o),rp(Rt(m(s)),t,e,o))},{immediate:!0})};function rj(){const t=ar({width:void 0,height:void 0}),e=()=>{t.width=window==null?void 0:window.innerWidth,t.height=window==null?void 0:window.innerHeight},n=g(Jm);return fe(n,r=>{r&&e()},{immediate:!0}),At("resize",e,!0),{windowSizes:t}}const us=()=>yk(()=>document),oj=t=>{var e;const n=(e=J6(t,"$vaConfig"))==null?void 0:e.globalConfig;if(!n)return pt("createBreakpointConfigPlugin: globalConfig is not defined!"),{};const r=g(()=>{const f=n.value.breakpoint;return f||pt("createBreakpointConfigPlugin: breakpointConfig is not defined!"),f??{}});if(!r.value.enabled)return{};if(!r.value.thresholds||!Object.values(r.value.thresholds).length)return pt("createBreakpointConfigPlugin: there are no defined thresholds!"),{};const{windowSizes:o}=rj(),i=g(Jm),s=g(()=>{if(!(!i.value||!o.width))return Object.entries(r.value.thresholds).reduce((f,[h,p])=>(o.width>=p&&(f=h),f),"xs")}),l=g(()=>Object.keys(r.value.thresholds).reduce((f,h)=>(f[h]=`va-screen-${h}`,f),{})),a=()=>{let f="";return Object.values(r.value.thresholds).forEach((h,p)=>{f+=`@media screen and (min-width: ${h}px) {`,f+=`:root { --va-media-ratio: ${(p+1)*.2} }`,f+=`}
|
|
|
|
| 22 |
|
| 23 |
|
|
|
|
| 19 |
`,tj=(t,e)=>{const{colors:n,getTextColor:r,getColor:o,currentPresetName:i,applyPreset:s}=He(),l=(d=n)=>{if(!d)return;const f=Object.keys(d),h=f.map(v=>`${Hc(v)}: ${d[v]}`).join(";"),p=f.map(v=>`${Hc(`on-${v}`)}: ${o(r(d[v]))}`).join(";");return`${h};${p}`},a=(d=n)=>{const f=Object.keys(d);let h=`:root {
|
| 20 |
`;return f.forEach(p=>{h+=tb(p,d[p])}),f.forEach(p=>{h+=tb(`on-${p}`,o(r(d[p])))}),h+=`}
|
| 21 |
`,h},u=g(Qm),c=d=>{if(!d||as())return;const f=a(d);Zm(`va-color-variables-${u.value}`,()=>f)};return fe(n,d=>{c(d)},{immediate:!0,deep:!0}),{colors:n,currentPresetName:i,renderCSSVariables:l,updateColors:c,renderCSSVariablesStyleContent:a}},nj=So(t=>({install(e){ri(e,"$vaColorConfig",tj())}})),yk=t=>{const e=g(Jm),n=W(null);return fe(e,()=>{e.value&&(n.value=t())},{immediate:!0}),n},qd=()=>yk(()=>window),Rt=t=>{if(t&&typeof t=="object"&&(t=m(t),!!t))return typeof t.$el<"u"?t.$el:t},np=(t,...e)=>{if(!(!t||typeof t!="object")){if("addEventListener"in t&&typeof t.addEventListener=="function"){t.addEventListener(...e);return}"parentElement"in t&&np(t.parentElement,...e)}},rp=(t,...e)=>{if(!(!t||typeof t!="object")){if("removeEventListener"in t&&typeof t.removeEventListener=="function"){t.removeEventListener(...e);return}"parentElement"in t&&rp(t.parentElement,...e)}},At=(t,e,n)=>{const r=n&&typeof n!="boolean"?n:qd(),o=typeof n=="boolean"?n:!1;fe(r,(i,s)=>{Array.isArray(t)?t.forEach(l=>{np(Rt(m(i)),l,e,o),rp(Rt(m(s)),l,e,o)}):(np(Rt(m(i)),t,e,o),rp(Rt(m(s)),t,e,o))},{immediate:!0})};function rj(){const t=ar({width:void 0,height:void 0}),e=()=>{t.width=window==null?void 0:window.innerWidth,t.height=window==null?void 0:window.innerHeight},n=g(Jm);return fe(n,r=>{r&&e()},{immediate:!0}),At("resize",e,!0),{windowSizes:t}}const us=()=>yk(()=>document),oj=t=>{var e;const n=(e=J6(t,"$vaConfig"))==null?void 0:e.globalConfig;if(!n)return pt("createBreakpointConfigPlugin: globalConfig is not defined!"),{};const r=g(()=>{const f=n.value.breakpoint;return f||pt("createBreakpointConfigPlugin: breakpointConfig is not defined!"),f??{}});if(!r.value.enabled)return{};if(!r.value.thresholds||!Object.values(r.value.thresholds).length)return pt("createBreakpointConfigPlugin: there are no defined thresholds!"),{};const{windowSizes:o}=rj(),i=g(Jm),s=g(()=>{if(!(!i.value||!o.width))return Object.entries(r.value.thresholds).reduce((f,[h,p])=>(o.width>=p&&(f=h),f),"xs")}),l=g(()=>Object.keys(r.value.thresholds).reduce((f,h)=>(f[h]=`va-screen-${h}`,f),{})),a=()=>{let f="";return Object.values(r.value.thresholds).forEach((h,p)=>{f+=`@media screen and (min-width: ${h}px) {`,f+=`:root { --va-media-ratio: ${(p+1)*.2} }`,f+=`}
|
| 22 |
+
**/let qn;class D_{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=qn,!e&&qn&&(this.index=(qn.scopes||(qn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=qn;try{return qn=this,e()}finally{qn=n}}}on(){qn=this}off(){qn=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function E_(t,e=qn){e&&e.active&&e.effects.push(t)}function kS(){return qn}function L_(t){qn&&qn.cleanups.push(t)}let Hi;class um{constructor(e,n,r,o){this.fn=e,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,E_(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,hi();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed&&(V_(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),pi()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Yo,n=Hi;try{return Yo=!0,Hi=this,this._runnings++,lv(this),this.fn()}finally{av(this),this._runnings--,Hi=n,Yo=e}}stop(){this.active&&(lv(this),av(this),this.onStop&&this.onStop(),this.active=!1)}}function V_(t){return t.value}function lv(t){t._trackId++,t._depsLength=0}function av(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)xS(t.deps[e],t);t.deps.length=t._depsLength}}function xS(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}let Yo=!0,xh=0;const $S=[];function hi(){$S.push(Yo),Yo=!1}function pi(){const t=$S.pop();Yo=t===void 0?!0:t}function cm(){xh++}function dm(){for(xh--;!xh&&$h.length;)$h.shift()()}function AS(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const r=t.deps[t._depsLength];r!==e?(r&&xS(r,t),t.deps[t._depsLength++]=e):t._depsLength++}}const $h=[];function TS(t,e,n){cm();for(const r of t.keys()){let o;r._dirtyLevel<e&&(o??(o=t.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=e),r._shouldSchedule&&(o??(o=t.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&$h.push(r.scheduler)))}dm()}const _S=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},Ac=new WeakMap,zi=Symbol(""),Ah=Symbol("");function jn(t,e,n){if(Yo&&Hi){let r=Ac.get(t);r||Ac.set(t,r=new Map);let o=r.get(n);o||r.set(n,o=_S(()=>r.delete(n))),AS(Hi,o)}}function ao(t,e,n,r,o,i){const s=Ac.get(t);if(!s)return;let l=[];if(e==="clear")l=[...s.values()];else if(n==="length"&&je(t)){const a=Number(r);s.forEach((u,c)=>{(c==="length"||!uo(c)&&c>=a)&&l.push(u)})}else switch(n!==void 0&&l.push(s.get(n)),e){case"add":je(t)?lm(n)&&l.push(s.get("length")):(l.push(s.get(zi)),_s(t)&&l.push(s.get(Ah)));break;case"delete":je(t)||(l.push(s.get(zi)),_s(t)&&l.push(s.get(Ah)));break;case"set":_s(t)&&l.push(s.get(zi));break}cm();for(const a of l)a&&TS(a,4);dm()}function R_(t,e){const n=Ac.get(t);return n&&n.get(e)}const F_=om("__proto__,__v_isRef,__isVue"),OS=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(uo)),uv=N_();function N_(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=vt(this);for(let i=0,s=this.length;i<s;i++)jn(r,"get",i+"");const o=r[e](...n);return o===-1||o===!1?r[e](...n.map(vt)):o}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){hi(),cm();const r=vt(this)[e].apply(this,n);return dm(),pi(),r}}),t}function H_(t){uo(t)||(t=String(t));const e=vt(this);return jn(e,"has",t),e.hasOwnProperty(t)}class PS{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?LS:ES:i?DS:IS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const s=je(e);if(!o){if(s&&St(uv,n))return Reflect.get(uv,n,r);if(n==="hasOwnProperty")return H_}const l=Reflect.get(e,n,r);return(uo(n)?OS.has(n):F_(n))||(o||jn(e,"get",n),i)?l:Tt(l)?s&&lm(n)?l:l.value:Pt(l)?o?VS(l):ar(l):l}}class BS extends PS{constructor(e=!1){super(!1,e)}set(e,n,r,o){let i=e[n];if(!this._isShallow){const a=pa(i);if(!Tc(r)&&!pa(r)&&(i=vt(i),r=vt(r)),!je(e)&&Tt(i)&&!Tt(r))return a?!1:(i.value=r,!0)}const s=je(e)&&lm(n)?Number(n)<e.length:St(e,n),l=Reflect.set(e,n,r,o);return e===vt(o)&&(s?ei(r,i)&&ao(e,"set",n,r):ao(e,"add",n,r)),l}deleteProperty(e,n){const r=St(e,n);e[n];const o=Reflect.deleteProperty(e,n);return o&&r&&ao(e,"delete",n,void 0),o}has(e,n){const r=Reflect.has(e,n);return(!uo(n)||!OS.has(n))&&jn(e,"has",n),r}ownKeys(e){return jn(e,"iterate",je(e)?"length":zi),Reflect.ownKeys(e)}}class MS extends PS{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const z_=new BS,j_=new MS,W_=new BS(!0),U_=new MS(!0),fm=t=>t,wd=t=>Reflect.getPrototypeOf(t);function pu(t,e,n=!1,r=!1){t=t.__v_raw;const o=vt(t),i=vt(e);n||(ei(e,i)&&jn(o,"get",e),jn(o,"get",i));const{has:s}=wd(o),l=r?fm:n?pm:ma;if(s.call(o,e))return l(t.get(e));if(s.call(o,i))return l(t.get(i));t!==o&&t.get(e)}function mu(t,e=!1){const n=this.__v_raw,r=vt(n),o=vt(t);return e||(ei(t,o)&&jn(r,"has",t),jn(r,"has",o)),t===o?n.has(t):n.has(t)||n.has(o)}function gu(t,e=!1){return t=t.__v_raw,!e&&jn(vt(t),"iterate",zi),Reflect.get(t,"size",t)}function cv(t){t=vt(t);const e=vt(this);return wd(e).has.call(e,t)||(e.add(t),ao(e,"add",t,t)),this}function dv(t,e){e=vt(e);const n=vt(this),{has:r,get:o}=wd(n);let i=r.call(n,t);i||(t=vt(t),i=r.call(n,t));const s=o.call(n,t);return n.set(t,e),i?ei(e,s)&&ao(n,"set",t,e):ao(n,"add",t,e),this}function fv(t){const e=vt(this),{has:n,get:r}=wd(e);let o=n.call(e,t);o||(t=vt(t),o=n.call(e,t)),r&&r.call(e,t);const i=e.delete(t);return o&&ao(e,"delete",t,void 0),i}function hv(){const t=vt(this),e=t.size!==0,n=t.clear();return e&&ao(t,"clear",void 0,void 0),n}function vu(t,e){return function(r,o){const i=this,s=i.__v_raw,l=vt(s),a=e?fm:t?pm:ma;return!t&&jn(l,"iterate",zi),s.forEach((u,c)=>r.call(o,a(u),a(c),i))}}function yu(t,e,n){return function(...r){const o=this.__v_raw,i=vt(o),s=_s(i),l=t==="entries"||t===Symbol.iterator&&s,a=t==="keys"&&s,u=o[t](...r),c=n?fm:e?pm:ma;return!e&&jn(i,"iterate",a?Ah:zi),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Oo(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function K_(){const t={get(i){return pu(this,i)},get size(){return gu(this)},has:mu,add:cv,set:dv,delete:fv,clear:hv,forEach:vu(!1,!1)},e={get(i){return pu(this,i,!1,!0)},get size(){return gu(this)},has:mu,add:cv,set:dv,delete:fv,clear:hv,forEach:vu(!1,!0)},n={get(i){return pu(this,i,!0)},get size(){return gu(this,!0)},has(i){return mu.call(this,i,!0)},add:Oo("add"),set:Oo("set"),delete:Oo("delete"),clear:Oo("clear"),forEach:vu(!0,!1)},r={get(i){return pu(this,i,!0,!0)},get size(){return gu(this,!0)},has(i){return mu.call(this,i,!0)},add:Oo("add"),set:Oo("set"),delete:Oo("delete"),clear:Oo("clear"),forEach:vu(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{t[i]=yu(i,!1,!1),n[i]=yu(i,!0,!1),e[i]=yu(i,!1,!0),r[i]=yu(i,!0,!0)}),[t,n,e,r]}const[G_,q_,Y_,X_]=K_();function kd(t,e){const n=e?t?X_:Y_:t?q_:G_;return(r,o,i)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?r:Reflect.get(St(n,o)&&o in r?n:r,o,i)}const J_={get:kd(!1,!1)},Q_={get:kd(!1,!0)},Z_={get:kd(!0,!1)},eO={get:kd(!0,!0)},IS=new WeakMap,DS=new WeakMap,ES=new WeakMap,LS=new WeakMap;function tO(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nO(t){return t.__v_skip||!Object.isExtensible(t)?0:tO(x_(t))}function ar(t){return pa(t)?t:xd(t,!1,z_,J_,IS)}function hm(t){return xd(t,!1,W_,Q_,DS)}function VS(t){return xd(t,!0,j_,Z_,ES)}function Ti(t){return xd(t,!0,U_,eO,LS)}function xd(t,e,n,r,o){if(!Pt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=o.get(t);if(i)return i;const s=nO(t);if(s===0)return t;const l=new Proxy(t,s===2?r:n);return o.set(t,l),l}function Zl(t){return pa(t)?Zl(t.__v_raw):!!(t&&t.__v_isReactive)}function pa(t){return!!(t&&t.__v_isReadonly)}function Tc(t){return!!(t&&t.__v_isShallow)}function RS(t){return t?!!t.__v_raw:!1}function vt(t){const e=t&&t.__v_raw;return e?vt(e):t}function rO(t){return Object.isExtensible(t)&&yS(t,"__v_skip",!0),t}const ma=t=>Pt(t)?ar(t):t,pm=t=>Pt(t)?VS(t):t;class FS{constructor(e,n,r,o){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new um(()=>e(this._value),()=>ea(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const e=vt(this);return(!e._cacheable||e.effect.dirty)&&ei(e._value,e._value=e.effect.run())&&ea(e,4),mm(e),e.effect._dirtyLevel>=2&&ea(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function oO(t,e,n=!1){let r,o;const i=Je(t);return i?(r=t,o=lr):(r=t.get,o=t.set),new FS(r,o,i||!o,n)}function mm(t){var e;Yo&&Hi&&(t=vt(t),AS(Hi,(e=t.dep)!=null?e:t.dep=_S(()=>t.dep=void 0,t instanceof FS?t:void 0)))}function ea(t,e=4,n){t=vt(t);const r=t.dep;r&&TS(r,e)}function Tt(t){return!!(t&&t.__v_isRef===!0)}function W(t){return NS(t,!1)}function Ne(t){return NS(t,!0)}function NS(t,e){return Tt(t)?t:new iO(t,e)}class iO{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:vt(e),this._value=n?e:ma(e)}get value(){return mm(this),this._value}set value(e){const n=this.__v_isShallow||Tc(e)||pa(e);e=n?e:vt(e),ei(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:ma(e),ea(this,4))}}function m(t){return Tt(t)?t.value:t}const sO={get:(t,e,n)=>m(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const o=t[e];return Tt(o)&&!Tt(n)?(o.value=n,!0):Reflect.set(t,e,n,r)}};function HS(t){return Zl(t)?t:new Proxy(t,sO)}class lO{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>mm(this),()=>ea(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function aO(t){return new lO(t)}function Or(t){const e=je(t)?new Array(t.length):{};for(const n in t)e[n]=zS(t,n);return e}class uO{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return R_(vt(this._object),this._key)}}class cO{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function $n(t,e,n){return Tt(t)?t:Je(t)?new cO(t):Pt(t)&&arguments.length>1?zS(t,e,n):W(t)}function zS(t,e,n){const r=t[e];return Tt(r)?r:new uO(t,e,n)}/**
|
| 23 |
|
| 24 |
|