mirror of
https://github.com/imezx/Warp.git
synced 2025-04-25 15:40:02 +00:00
2 lines
86 KiB
JavaScript
2 lines
86 KiB
JavaScript
|
function fs(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const te={},yt=[],Ee=()=>{},no=()=>!1,Ut=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ds=e=>e.startsWith("onUpdate:"),ie=Object.assign,hs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},so=Object.prototype.hasOwnProperty,Y=(e,t)=>so.call(e,t),B=Array.isArray,_t=e=>_n(e)==="[object Map]",Pr=e=>_n(e)==="[object Set]",k=e=>typeof e=="function",ne=e=>typeof e=="string",Tt=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",Mr=e=>(Z(e)||k(e))&&k(e.then)&&k(e.catch),Ir=Object.prototype.toString,_n=e=>Ir.call(e),ro=e=>_n(e).slice(8,-1),Nr=e=>_n(e)==="[object Object]",ps=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pt=fs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},io=/-(\w)/g,Ie=bn(e=>e.replace(io,(t,n)=>n?n.toUpperCase():"")),oo=/\B([A-Z])/g,ut=bn(e=>e.replace(oo,"-$1").toLowerCase()),vn=bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),rn=bn(e=>e?`on${vn(e)}`:""),Qe=(e,t)=>!Object.is(e,t),Hn=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},cn=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},lo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},co=e=>{const t=ne(e)?Number(e):NaN;return isNaN(t)?e:t};let Vs;const Fr=()=>Vs||(Vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gs(e){if(B(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=ne(s)?ho(s):gs(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(ne(e)||Z(e))return e}const ao=/;(?![^(]*\))/g,uo=/:([^]+)/,fo=/\/\*[^]*?\*\//g;function ho(e){const t={};return e.replace(fo,"").split(ao).forEach(n=>{if(n){const s=n.split(uo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ms(e){let t="";if(ne(e))t=e;else if(B(e))for(let n=0;n<e.length;n++){const s=ms(e[n]);s&&(t+=s+" ")}else if(Z(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const po="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",go=fs(po);function $r(e){return!!e||e===""}const Oa=e=>ne(e)?e:e==null?"":B(e)||Z(e)&&(e.toString===Ir||!k(e.toString))?JSON.stringify(e,Hr,2):String(e),Hr=(e,t)=>t&&t.__v_isRef?Hr(e,t.value):_t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[jn(s,i)+" =>"]=r,n),{})}:Pr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>jn(n))}:Tt(t)?jn(t):Z(t)&&!B(t)&&!Nr(t)?String(t):t,jn=(e,t="")=>{var n;return Tt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let be;class mo{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=be,!t&&be&&(this.index=(be.scopes||(be.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=be;try{return be=this,t()}finally{be=n}}}on(){be=this}off(){be=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function yo(e,t=be){t&&t.active&&t.effects.push(e)}function jr(){return be}function _o(e){be&&be.cleanups.push(e)}let ot;class ys{constructor(t,n,s,r){this.fn=t,this.trigger=n,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,yo(this,r)}get dirty(){if(this._dirtyLevel===1){this._dirtyLevel=0,this._queryings++,ft();for(const t of this.deps)if(t.computed&&(bo(t.computed),this._dirtyLevel>=2))break;dt(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=ze,n=ot;try{return ze=!0,ot=this,this._runnings++,Ds(this),this.fn()}finally{Bs(this),
|