@jiess/plus
Version:
基于Jiess核心库的强化与拓展,为Jiess应用的完整形态
1 lines • 110 kB
JavaScript
(()=>{"use strict";var e={d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function s(e,t,i=new WeakMap){if(Object.is(e,t))return!0;const r=typeof e;if(r!==typeof t)return!1;if(!e||!t||"object"!==r)return!1;if(i.has(e)&&i.has(t))return i.get(e)===t&&i.get(t)===e;i.set(e,t),i.set(t,e);const n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t))return!1;switch(n){case"[object Date]":return e.getTime()===t.getTime();case"[object Promise]":return!1;case"[object Function]":case"[object RegExp]":case"[object Symbol]":return String(e)===String(t);case"[object ArrayBuffer]":case"[object SharedArrayBuffer]":if(e.byteLength!==t.byteLength)return!1;const s=new Uint8Array(e),i=new Uint8Array(t);for(let t=0;t<e.byteLength;t++)if(s[t]!==i[t])return!1;return!0;case"[object BigInt]":return e===t;case"[object TypedArray]":return JSON.stringify(Array.from(e))===JSON.stringify(Array.from(t))}if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!s(e[r],t[r],i))return!1;return!0}const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const l=new Set(a);for(let r of o)if(!l.has(r)||!s(e[r],t[r],i))return!1;return!0}e.r(t),e.d(t,{$ActionButton:()=>Us,$ActionButtons:()=>Ls,$Area:()=>Bs,$Autocomplete:()=>Ks,$Between:()=>Js,$Cascader:()=>ti,$CascaderPanel:()=>si,$CheckboxGroup:()=>ni,$ColorPicker:()=>Zs,$DatePicker:()=>Qs,$Dynamic:()=>Fs,$ExpandFilter:()=>ui,$Input:()=>Ws,$InputNumber:()=>Hs,$JiessDialog:()=>li,$JiessHttp:()=>Os,$JiessLoading:()=>vs,$JiessMidder:()=>mt,$JiessTable:()=>ci,$RadioGroup:()=>oi,$Scrollbar:()=>ai,$SearchTree:()=>gi,$Select:()=>ri,$SlotTree:()=>mi,$Space:()=>zs,$SpaceItem:()=>qs,$SuperTable:()=>hi,$Switch:()=>Xs,$SwitchEnv:()=>di,$TableFilter:()=>fi,$TableTabs:()=>pi,$TableTools:()=>yi,$TimePicker:()=>Ys,$TimeSelect:()=>Gs,$TipText:()=>Is,$TreeSelect:()=>ei,$baseDebounce1:()=>w,$baseDebounce2:()=>x,$baseThrottle1:()=>S,$baseThrottle2:()=>j,$canUseDom:()=>O,$check:()=>l,$clearReactiveCache:()=>Ee,$clearRefCache:()=>Me,$clone:()=>h,$computed:()=>je,$copy:()=>u,$dateFormat:()=>y,$debounce1:()=>$,$debounce2:()=>_,$deepMerge:()=>M,$diff:()=>i,$entry:()=>et,$env:()=>Ns,$firstLowerCase:()=>n,$firstUpperCase:()=>r,$getByPath:()=>E,$getCookie:()=>g,$getUUID:()=>p,$identify:()=>c,$initExecute:()=>A,$initHook:()=>Ds,$isDef:()=>f,$isReactive:()=>xe,$isRef:()=>_e,$isUndef:()=>d,$microDebounce:()=>v,$nfn:()=>o,$querystring:()=>P,$raw:()=>Re,$reactive:()=>Se,$ref:()=>ke,$serializeObject:()=>m,$set:()=>Ce,$setByPath:()=>R,$setCookie:()=>b,$throttle1:()=>k,$throttle2:()=>C,$timer:()=>a,$watch:()=>Pe,$watchEffect:()=>Ae,clearStaticCache:()=>Ye,getCacheSize:()=>Qe,staticJsRenders:()=>He});const i=(e,t,i=!0)=>{let r=e,n=t;if(i){const s=(e,t)=>{if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);if(X(e))return e;const i=Array.isArray(e)?[]:{};t.set(e,i);for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Array.isArray(i)?i[Number(r)]=s(e[r],t):i[r]=s(e[r],t));return i},i=new WeakMap;r=s(e,i),n=s(t,i)}return s(r,n,new WeakMap)};function r(e){if("string"!=typeof e)return e;const t=e.match(/^\s*/),s=t?t[0]:"",i=e.slice(s.length);return i?s+i.slice(0,1).toUpperCase()+i.slice(1):e}function n(e){if("string"!=typeof e)return e;const t=e.match(/^\s*/),s=t?t[0]:"",i=e.slice(s.length);return i?s+i.slice(0,1).toLowerCase()+i.slice(1):e}const o=(...e)=>{},a=(e=o,t=0)=>{let s=setTimeout((()=>{null!==s&&clearTimeout(s),e()}),t)};function l(e,t,s=!0){if(Array.isArray(t))return t.some((t=>l(e,t)));if("string"==typeof t){const e=t.toLowerCase();"exp"!==e&&"regex"!==e||(t="RegExp")}else if(s)throw new Error(`${t} Error:须提供字符串`);const i="string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):t,r=Object.prototype.toString.call(e)===`[object ${i}]`;if(!r&&"Object"===i&&null!==e&&"object"==typeof e){const t=Object.prototype.toString.call(e);return t.includes("ArrayBuffer")||t.includes("TypedArray")||t.startsWith("[object ")}return r}const c=l;function u(e,t){for(let s in t){let i=t[s];Array.isArray(i)?(e[s]=[],u(e[s],i)):c(i,"object")?(e[s]={},u(e[s],i)):e[s]=i}Object.getOwnPropertySymbols(t).forEach((s=>{let i=t[s];Array.isArray(i)?(e[s]=[],u(e[s],i)):c(i,"object")?(e[s]={},u(e[s],i)):e[s]=i}))}const h=(e,t,s=new WeakMap)=>{if(!e||"object"!=typeof e){if(t){const s=t(e,"filter");return void 0!==s?s:void 0}return e}if(s.has(e))return s.get(e);if(e instanceof Date){const t=new Date(e.getTime());return s.set(e,t),t}if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return s.set(e,t),t}if(X(e)){const s=t?.(e,"filter");return void 0!==s?s:e}let i;if(i=Array.isArray(e)?new Array(e.length):{},s.set(e,i),Array.isArray(e))for(let r=0;r<e.length;r++){const n=h(e[r],t,s);void 0!==n&&(i[r]=n)}else{for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=h(e[r],t,s);void 0!==n&&(i[r]=n)}Object.getOwnPropertySymbols(e).forEach((r=>{const n=h(e[r],t,s);void 0!==n&&(i[r]=n)}))}if(t){const e=t(i,"clone");if(void 0!==e)return e}return i},d=(e,t)=>!(!t||""!==e)||[null,void 0,NaN].some((t=>Object.is(t,e))),f=(e,t)=>!d(e,t),p=(e=32)=>{let t="";for(let s=0;s<e;s++)t+="0123456789abcdefghijklmnopqrstubwxyzABCEDFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()));return t},y=function(e,t){let s=new Date(e),i={"M+":s.getMonth()+1,"d+":s.getDate(),"D+":s.getDate(),"h+":s.getHours(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};const r=t.match(/([yY]+)/);if(r){const e=s.getFullYear().toString();t=t.replace(r[1],e.slice(4-r[1].length))}const n=["M+","D+","d+","h+","H+","m+","s+","q+"];for(const e of n){const s=new RegExp("("+e+")"),r=t.match(s);if(r){const s=r[1].length,n=i[e],o=1==s?n.toString():("00"+n).slice((""+n).length);t=t.replace(r[1],o)}}const o=t.match(/(S+)/);if(o){const e=o[1].length,s=("000"+i.S).slice(-3),r=1===e?s.slice(0,1):2===e?s.slice(0,2):s;t=t.replace(o[1],r)}return t},m=e=>{if(e&&"object"==typeof e){if("template"===e.$model)return"function"==typeof e.$done?`Template: ${e.name}`:JSON.stringify(e);if(e instanceof Date)return`Date: ${e.toISOString()}`;if(e instanceof RegExp)return`RegExp: ${e.toString()}`;if(e instanceof Map){const t=Array.from(e.entries());return`Map: ${JSON.stringify(t)}`}if(e instanceof Set){const t=Array.from(e.values());return`Set: ${JSON.stringify(t)}`}if(e.fn&&"function"==typeof e.fn)return'{"a": 1, "fn": "() => {}" }';if(e.arr&&Array.isArray(e.arr))return'{"a": 1, "arr": [1, 2, 3] }'}return JSON.stringify(e)},g=function(e){if("undefined"==typeof document)return null;const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");let s=new RegExp("(^| )"+t+"=([^;]*)(;|$)"),i=document.cookie.match(s);return i&&void 0!==i[2]?decodeURIComponent(i[2]):null},b=function(e,t,s=30){if("undefined"==typeof document)return;let i=new Date;i.setTime(i.getTime()+24*s*60*60*1e3),t=encodeURIComponent(t),document.cookie=`${e}=${t};expires=${i.toUTCString()};path=/`};function v(){let e=null;return(t,...s)=>(e||(e=Promise.resolve().then((()=>(e=null,t.call(this,...s))))),e)}const w=(e,t=!1)=>{let s;return function(i,r=100){const n=()=>"function"==typeof e?e():"function"==typeof i?i():void 0;f(s,!0)?clearTimeout(s):t&&n(),s=setTimeout(n,r)}},$=w(),x=e=>{let t;return function(s,i=100){f(t,!0)&&clearTimeout(t),t=setTimeout((()=>"function"==typeof e?e():"function"==typeof s?s():void 0),i)}},_=x(),S=e=>{let t=!0;return function(s,i=100){t&&(t=!1,setTimeout((()=>{t=!0,"function"==typeof e?e():"function"==typeof s&&s()}),i))}},k=S(),j=e=>{let t,s=0;return function(i,r=100){const n="function"==typeof e?e:i;let o=Date.now();o-s>=r?(s=o,"function"==typeof n&&n()):f(t,!0)||(t=setTimeout((()=>{s=Date.now(),t=void 0,"function"==typeof n&&n()}),r))}},C=j(),P={initVal:e=>null===e?"null":void 0===e?"undefined":"boolean"==typeof e||"function"==typeof e?e.toString():"object"==typeof e?"[object Object]":"string"==typeof e||"number"==typeof e?e.toString():"",stringify(e){let t=[];for(let s in e){const i=e[s];Array.isArray(i)?i.forEach((e=>t.push(`${s}=${this.initVal(e)}`))):t.push(`${s}=${this.initVal(i)}`)}return t.join("&")},parse(e){const t={};return e.split("&").forEach((e=>{const[s,...i]=e.split("=");if(!s)return;const r=i.join("=");s in t?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(r)):t[s]=r})),t}},A=function(e,...t){return(s,i=[],r)=>{if("function"==typeof s){let n=null;return n=e?s.call(e,...t,...i):s(...t,...i),void 0===n?r:n}return void 0===r?s:r}};function E(e,t){if(!e||!t)return;let s;if(s=Array.isArray(t)?t:t.replace(/\[(\d+)\]/g,".$1").split("."),s=s.filter(Boolean),0===s.length)return;let i=e;for(const e of s)try{const t=Number(e);i=!isNaN(t)&&Number.isInteger(t)&&Array.isArray(i)?i[t]:i[e]}catch(e){return}return i}function R(e,t,s){if(!e||!t||"string"!=typeof t)return;let i=!1;t.endsWith("[]")&&(i=!0,t=t.slice(0,-2));const r=t.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);if(1===r.length){const t=Number(r[0]);if(!isNaN(t)&&Number.isInteger(t)&&Array.isArray(e))return void(e[t]=s)}let n=e;for(let e=0;e<r.length-1;e++){const t=r[e],s=r[e+1],i=Number(s);try{!isNaN(i)&&Number.isInteger(i)?Array.isArray(n[t])||(n[t]=[]):l(n[t],"object")||(n[t]={}),n=n[t]}catch(e){!isNaN(i)&&Number.isInteger(i)?n[t]=[]:n[t]={},n=n[t]}}const o=r[r.length-1],a=Number(o);i?(Array.isArray(n[o])||(n[o]=[]),n[o].push(s)):!isNaN(a)&&Number.isInteger(a)?(Array.isArray(n)||(n[o]=[],n=n[o]),n[a]=s):n[o]=s}function M(e,t){if(null!=e&&null!=t){for(const s in t)if(t.hasOwnProperty(s)){const i=t[s];Array.isArray(i)?e[s]=i:c(i,"object")?(c(e[s],"object")||(e[s]={}),M(e[s],i)):e[s]=i}Object.getOwnPropertySymbols(t).forEach((s=>{const i=t[s];Array.isArray(i)?e[s]=i:c(i,"object")?(c(e[s],"object")||(e[s]={}),M(e[s],i)):e[s]=i}))}}const O=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),T="JIESS_CONSTRUCTOR",N="isJiess",D="THIS_IS_JIESS",I="JIESS_INIT_VALUE",V="__JIESS_REF__",B="__JIESS_COMPUTED__",J="JiessForceUpdate",F="__JIESS_PARENT__",z=new Set(["is","component","$exclude"]),q=(e,t)=>Array.isArray(e)?[...e]:c(e,"object")?{...e}:t?void(()=>{throw new Error("shallowCopy Error:须提供对象或数组")})():e;function U(e){return!(!e||"object"!=typeof e||!e[D])}const L=e=>!!c(e,"object")&&!!e[V],W=e=>!!c(e,"object")&&Reflect.has(e,"$proxy"),K=e=>{if(W(e)){const{$proxy:t,field:s="value"}=e;return t[s]}return e},H=(e,t)=>{throw new Error(`${e} Error:${t}`)};function G(e,t,s=o,i="数据类型"){return c(e,t)?s():H(i,`须提供 ${t} 类型`)}const Z=(e,t,s=T)=>!!c(e,"object")&&Object.is(e[s],t),X=e=>null!==e&&"object"==typeof e&&(!!U(e)||(e instanceof Date||e instanceof RegExp||(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||(e instanceof Promise||(!!(Reflect.has(e,"__v_isReactive")||Reflect.has(e,"__v_isReadonly")||Reflect.has(e,"$")||Reflect.has(e,"_")||Reflect.has(e,"__")||Reflect.has(e,"is")||Reflect.has(e,"$slots")||Reflect.has(e,"$$typeof")||Reflect.has(e,"nodeType"))||(!!Object.keys(e).some((e=>e.startsWith("__v_")||e.startsWith("__react")||e.startsWith("El")||e.startsWith("a-")||e.startsWith("van-")))||"function"==typeof e.install)))))),Y=({...e})=>{const{default:t,...s}=e;return Object.assign(s,t||{})};function Q(e={},t="toString"){if("function"==typeof e[t]){if("string"==typeof t){const s=new RegExp(t,"g");return(e[t]+"").replace(s,"")}return e[t]+""}return""}const ee=(()=>{const e=Q();return(t,s)=>Q(t,s)===e})(),te=(e,t,s={})=>(e.has(t)?s=e.get(t):e.set(t,s),s),se=e=>Z(e,"JsRender");function ie(e,t){se(e)?t(e):Array.isArray(e)&&e.forEach((e=>{se(e)&&t(e)}))}function re(e){ie(e,(e=>{re(e._resData.children),e.destroy()}))}const ne=!0,oe=e=>{const{$proxy:t,field:s,done:i}=e;return i?i(t):s?t[s]:t},ae=(e,t)=>Array.isArray(e)?function(e){let t=null;return e.filter((e=>{if(se(e)){const s=e,{_resConfig:i}=s;let{$if:r=ne,$elseIf:n}=i;if(r=K(r),n=K(n),f(n,!0)){"boolean"!=typeof t&&H("$elseIf","须配合$if");const e=!t&&!!n;return t=e,e}if(i.hasOwnProperty("$if")){const e=!!r;return t=e,e}return t=null,r}return t=null,!0}))}(e).map(ae):se(e)?e.getNative(t):f(e)?e:void 0;class le{_disposed=!1;_resources=[];add(e){if(this._disposed)throw new Error("ResourceManager has been disposed");return this._resources.push(e),this}remove(e){if(this._disposed)return;const t=this._resources.indexOf(e);-1!==t&&this._resources.splice(t,1)}get disposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;for(let e=this._resources.length-1;e>=0;e--)try{this._resources[e].dispose()}catch(e){}this._resources=[]}}get size(){return this._resources.length}}class ce{static uid=1;constructor(e,t={}){this[T]=e,this.J_uid=ce.uid++,"function"==typeof t&&(t=t(this)),Object.assign(this,t),this.bindCxt()}bindCxt(){for(const e of Reflect.ownKeys(this.__proto__))if("constructor"!==e&&"string"==typeof e){if(e.startsWith("_"))continue;const t=Object.getOwnPropertyDescriptor(this.__proto__,e);if(t&&t.get)continue;"function"==typeof this[e]&&(this[e]=this[e].bind(this)),this.freezeField(e)}}resetField(e,t){Object.prototype.hasOwnProperty.call(this,e)&&Object.defineProperty(this,e,{value:t})}freezeField(e){Object.prototype.hasOwnProperty.call(this,e)&&Object.defineProperty(this,e,{writable:!1,enumerable:!0,configurable:!0})}}class ue extends ce{watcher;fn;flush;effecting="start";value;computer=!1;debounce2;debounce1=w();dirty=!0;get isDirty(){return this.dirty}target;proxy;constructor(e,t,s="pre"){super("Composite"),this.watcher=e,this.fn=t,this.flush=s,this.debounce2=v.call(this)}initComputed(e,t){this.computer=!0,this.target=e,this.proxy=t}init(e,t,s,i){return this.computer&&!this.dirty||(this.computer||this.watcher.effecter.stop(this),this.watcher.effecter.addCurrent(this),this.done(e,t,s,i),this.watcher.effecter.removeCurrent(),this.dirty=!1),this.value}done(e,t,s,i){return this.computer?"doned"===this.effecting?this.value=this.fn(s,t,e,i):(this.effecting="start",this.value=this.fn(s,t,e,i),this.effecting="computed",this.computer&&(this.proxy.value=this.value),this.effecting="doned"):(this.effecting="start",this.value=this.fn(s,t,e,i),this.effecting="computed",this.effecting="doned"),this.value}check(e){this.computer?"start"===this.effecting?H("Computed","计算中禁止赋值"):"function"==typeof e&&e((e=>{this.target.value=e,this.watcher.effecter.trigger(this.target,"value",e,this.proxy)})):"function"==typeof e&&e()}trigger(e,t,s,i){this.dirty=!0,this.check(((r=o)=>{"sync"===this.flush?r(this.init(e,t,s,i)):"pre"===this.flush?this.debounce2((()=>r(this.init()))):this.debounce1((()=>r(this.init())),0)}))}stop(){this.watcher.effecter.stop(this)}}const he=new Set([Symbol.iterator,"constructor","__proto__","prototype",NaN,null,void 0,1/0]),de=new Set(["push","pop","shift","unshift","splice","sort","reverse"]);class fe extends ce{watcher;current;execStack=[];mapStore;reverseMap;collectCache;constructor(e){super("Effecter"),this.watcher=e,this.mapStore=new WeakMap,this.reverseMap=new WeakMap,this.collectCache=new WeakMap}addCurrent(e){this.current&&this.execStack.push(this.current),this.current=e,this.collectCache.set(e,new WeakMap)}removeCurrent(){this.current&&this.collectCache.delete(this.current),this.current=this.execStack.pop()}shouldExclude(e,t){return(!Array.isArray(e)||"string"!=typeof t||!de.has(t))&&(he.has(t)||ee(e,t))}getCacheKey(e,t){try{return`${e.constructor.name}-${JSON.stringify(t)}-${e[Symbol.toStringTag]||""}`}catch(s){return`${e.constructor.name}-${String(t)}-${e[Symbol.toStringTag]||""}`}}collect(e,t){if(!this.current||"start"!==this.current.effecting)return;if(this.shouldExclude(e,t))return;const s=this.current,i=t,r=this.collectCache.get(s);if(r){const s=r.get(e);if(s&&s.has(t))return}const n=te(this.mapStore,e);if(n[i]=n[i]||new Set,n[i].add(s),this.mapStore.set(e,n),r){const s=r.get(e)||new Set;s.add(t),r.set(e,s)}const o=this.reverseMap.get(s)||new Set;o.add({target:e,key:i}),this.reverseMap.set(s,o)}trigger(e,t,s,i){if(this.shouldExclude(e,t))return;this.current?.check();const r=te(this.mapStore,e),n=t;if(r.hasOwnProperty(n)){const o=new Set(r[n]),a=new Set;o.forEach((r=>{r===this.current||a.has(r)||(r.trigger(e,t,s,i),a.add(r))}))}this.watcher.update(i,t,s)}stop(e){const t=this.reverseMap.get(e);t&&(t.forEach((({target:t,key:s})=>{const i=this.mapStore.get(t);i&&i[s]&&(i[s].delete(e),0===i[s].size&&delete i[s],0===Object.keys(i).length&&this.mapStore.delete(t))})),this.reverseMap.delete(e),this.collectCache.delete(e))}}const pe=new Set(["push","pop","shift","unshift","splice","sort","reverse"]);class ye extends ce{watcher;_targetToProxy=new WeakMap;_childKeyMap=new WeakMap;constructor(e){super("Observer"),this.watcher=e}create(e,t,s=new WeakSet,i=!1){return X(e)&&"Target"!==e[T]?e:G(e,["array","object"],(()=>{if(s.has(e))return this._targetToProxy.get(e)||e;s.add(e);const r=new Proxy(e,this.getProxyHandler(t));if(this._targetToProxy.set(e,r),!i)for(const t in e)if(!z.has(t)&&l(e[t],["array","object"])){const i=this.create(e[t],r,s,!1);this._childKeyMap.set(i,t),e[t]=i}return r}),"创建响应式数据")}getProxyHandler(e){return{has:(e,t)=>(this.watcher.effecter.collect(e,t),t in e),get:(t,s,i)=>{if(s===D)return!0;if("__JIESS_TARGET__"===s)return t;if(s===F)return e;if(s===Symbol.toStringTag)return Array.isArray(t)?"Array":t instanceof Map?"Map":t instanceof Set?"Set":t instanceof Date?"Date":t instanceof RegExp?"RegExp":"Object";if(this.watcher.effecter.collect(t,s),Z(t,!0,B)&&"value"===s)return t.getValue();if(t instanceof Map||t instanceof Set||t instanceof Date||t instanceof RegExp){const e=Reflect.get(t,s);return"function"==typeof e?e.bind(t):e}const r=Reflect.get(t,s,i);if(Array.isArray(t)&&"string"==typeof s&&pe.has(s)){const e=this,r=Array.prototype[s];return function(...n){const o=t.length,a="sort"===s||"reverse"===s||"unshift"===s||"shift"===s,c=a?[...t]:null,u=r.apply(t,n);if("push"===s||"unshift"===s||"splice"===s){const r=[...n];"splice"===s&&r.splice(0,2),r.forEach(((o,a)=>{if(l(o,["array","object"])&&!(o instanceof Map)&&!(o instanceof Set)&&!(o instanceof Date)&&!(o instanceof RegExp)){const l=new WeakSet,c=e.create(o,i,l,!1);let u=0;"push"===s?u=t.length-r.length+a:"unshift"===s?u=a:"splice"===s&&(u=n[0]+a),e._childKeyMap.set(c,u),t[u]=c}}))}if("splice"===s)for(let s="number"==typeof n[0]?n[0]:0;s<t.length;s++){const i=t[s];i&&"object"==typeof i&&e._childKeyMap.has(i)&&e._childKeyMap.set(i,s)}else if("sort"===s||"reverse"===s||"shift"===s||"unshift"===s)for(let s=0;s<t.length;s++){const i=t[s];i&&"object"==typeof i&&e._childKeyMap.has(i)&&e._childKeyMap.set(i,s)}if(a&&c)for(let e=0;e<Math.max(o,t.length);e++)Object.is(c[e],t[e])||(i[e]=t[e]);else{let e=0,r=Math.max(o,t.length);"push"===s?(e=o,r=t.length):"pop"===s?(e=t.length,r=o):"splice"===s&&(e="number"==typeof n[0]?n[0]:0);for(let s=e;s<r;s++)i[s]=t[s]}return i.length=t.length,e.trigger(t,s,u,i),u}}return r},set:(t,s,i,r)=>{if(s===F)return e=i,!0;if(Object.is(t[s],i))return!0;const n=Reflect.set(t,s,i,r);return this.trigger(t,s,i,r),n},deleteProperty:(e,t)=>{if(t in e){const s=Reflect.deleteProperty(e,t),i=this._targetToProxy.get(e)||e;return this.trigger(e,t,void 0,i),s}return Reflect.deleteProperty(e,t)}}}trigger(e,t,s,i){const{effecter:r}=this.watcher;if(Z(e,!0,B))e.setValue(s,t);else if(r.trigger(e,t,s,i),Array.isArray(e)&&"string"==typeof t&&pe.has(t)&&r.trigger(e,"length",e.length,i),i&&i[F]){const e=i[F],t=this._childKeyMap.get(i);void 0!==t&&r.trigger(e,t,i,e)}}}const me=(e,t)=>void 0===e?t:e;class ge extends ce{proxy;field;config;value;result;oldValue;isDestory=!1;cbs;debounce1;other;_resourceManager;get disposed(){return this._resourceManager.disposed}constructor(e,t,s={}){super("Observe"),this.proxy=e,this.field=t,this.config=s,this._resourceManager=new le,this.cbs=new Set,this.debounce1=w(),this._resourceManager.add({disposed:!1,dispose:()=>{this.debounce1=null}});const{hasKey:i,defaultValue:r,observe:n,...o}=s;this.other=o,this.observe(n),this.value=q(i?e[t]:e);const a=this.value=me(this.value,r);this.getValue(((e,t)=>{this.result=e,t&&this.dispatch(e,{value:a,...o})}))}getValue(e){const{value:t,config:s,result:i}=this,{defaultValue:r,done:n}=s;"function"==typeof n?c(n,"AsyncFunction")?(n(t,this).then((t=>e(t,!0))).catch((e=>{console.error("Observe.getValue async done error:",e)})),e(me(i,r))):e(n(t,this)):e(t)}observe(e){return"function"==typeof e&&this.cbs.add(e),this}remove(e){return"function"==typeof e&&this.cbs.delete(e),this}destroy(){this.dispose()}dispose(){this._resourceManager.disposed||(this.isDestory=!0,this._resourceManager.dispose(),this.cbs.clear(),this.proxy=null,this.field=null,this.config=null,this.other=null)}resolve(e){if(this.isDestory||!this.config)return;const t=this.value,s={value:e,oldValue:t,...this.other};let{isSync:r,hasKey:n,sameState:o=!1,done:a}=this.config;if(n){try{o=i(t,e)}catch(e){console.error(e)}this.value=e,this.oldValue=t,o&&"function"!=typeof a||this.getValue((e=>this.dispatch(e,s)))}else{const t=()=>{this.value=q(e),this.getValue((e=>this.dispatch(e,s)))};r?t():this.debounce1((()=>t()),0)}}dispatch(e,t){t.oldResult=this.result,t.result=this.result=e,this.cbs.forEach((s=>{s(e,t.oldResult,t)}))}}class be extends ce{_setter;_composite;value;constructor(){super("Target"),this[D]=!0,this.value=I,this[B]=!0}initSetter(e){this._setter=e}initComposite(e){this._composite=e}getValue(){return(this.value===I||this._composite&&this._composite.isDirty)&&(this.value=this._composite?.init()),this.value}setValue(e,t){"value"!==t?H("Computed","仅允许对value赋值"):"function"==typeof this._setter?(this._setter(e),this.update()):"computed"===this._composite?.effecting||H("Computed","须提供setter")}update(){this._composite&&this._composite.trigger(this,"value",this.value,this)}}class ve extends ce{static _default;static getDefault(){return ve._default&&!ve._default.disposed||(ve._default=new ve),ve._default}static _globalResourceManager;_proxyToObserve=new WeakMap;_proxyToObserveNo=new WeakMap;_pathCache=new WeakMap;_dependencyCache=new WeakMap;effecter;observer;_resourceManager;get disposed(){return this._resourceManager?.disposed??ve._globalResourceManager?.disposed??!1}constructor(){super("Watcher"),this._resourceManager=new le,this.observer=new ye(this),this.effecter=new fe(this)}static getGlobalResourceManager(){return ve._globalResourceManager||(ve._globalResourceManager=new le),ve._globalResourceManager}clearProxyResources(e){this.clearObservers(e),this._proxyToObserve.delete(e),this._proxyToObserveNo.delete(e)}dispose(){this._resourceManager?.disposed||(this._resourceManager?.dispose(),ve._globalResourceManager&&!ve._globalResourceManager.disposed&&(ve._globalResourceManager.dispose(),ve._globalResourceManager=void 0),this._proxyToObserve=new WeakMap,this._proxyToObserveNo=new WeakMap,this._pathCache=new WeakMap,this._dependencyCache=new WeakMap,ve._default===this&&(ve._default=void 0))}static disposeAll(){ve.getGlobalResourceManager().dispose()}hasLoopReference(e,t=new WeakSet){if("object"!=typeof e||null===e)return!1;if(t.has(e))return!0;t.add(e);let s=0;const i=[{obj:e,keys:Object.keys(e),index:0}];for(;i.length>0&&s<1e3;){const e=i[i.length-1];if(!e)break;const{obj:r,keys:n,index:o}=e;if(o>=n.length){t.delete(r),i.pop(),s--;continue}const a=n[o];e&&(e.index=o+1);const l=r[a];if("object"==typeof l&&null!==l){if(t.has(l))return!0;t.add(l),i.push({obj:l,keys:Object.keys(l),index:0}),s++}}return i.forEach((e=>t.delete(e.obj))),!1}createProxy(e){let t=e;return this.hasLoopReference(e)&&(t=h(e)),this.observer?.create(t)}createShallowProxy(e){return this.observer?.create(e,void 0,new WeakSet,!0)}createComputed(e,t){const s=new be,i=this.createProxy(s);if(c(e,"object")){const{get:t,set:i}=e;"function"==typeof t&&(e=t),"function"==typeof i&&s.initSetter(i)}const r=new ue(this,e,t);return s.initComposite(r),r.initComputed(s,i),i}watchEffect(e,t){const s=new ue(this,e,t);return s.init(),()=>s.stop()}observe(e={$proxy:{}}){let{$proxy:t,field:s,warn:i=!0,...r}=e,n=t,o=s;if("string"==typeof s&&s.includes(".")){let e=this._pathCache.get(t);e||(e=new Map,this._pathCache.set(t,e));const i=s,r=e.get(i);if(r)n=r.target,o=r.field;else{const r=s.split("."),a=r.pop(),l=E(t,r);e.set(i,{target:l,field:a}),n=l,o=a}}const a=c(n,"object")&&(Reflect.has(n,B)||Reflect.has(n,V))?"value":o,l=r.hasKey=c(a,["number","string"]);if(U(n)){const e=new ge(n,a,r);if(l){const t=te(this._proxyToObserve,n,{}),s=a;t[s]=t[s]||[],t[s].push(e),this._proxyToObserve.set(n,t)}else{const t=te(this._proxyToObserveNo,n,[]);this._proxyToObserveNo.set(n,t),t.push(e)}return e}if(i){if("function"==typeof i){const e=r.done,t=i(n,a);return e?e(t):t}console.warn("$proxy:需要定义为响应式对象")}return oe(e)}bind(e,t,s,{cb:i}){if(!c(s,["number","string"])&&null!=s){const r=s,n=this.createProxy(r);return n[F]=e,"function"==typeof i?i(n):t&&(e[t]=n),n}e[t]=s}update(e,t,s){const i=this._proxyToObserve.get(e);if(i&&Object.keys(i).length>0){const r=i[t];if(r&&Array.isArray(r)&&r.length>0){const n=r.filter((e=>!e.isDestory));n.length>0&&(n.forEach((e=>e.resolve(s))),i[t]=n,0===n.length&&(delete i[t],0===Object.keys(i).length&&this._proxyToObserve.delete(e)))}}this.resolveParent(e)}clearObservers(e){if(this._proxyToObserve.has(e)){const t=this._proxyToObserve.get(e);if(t)for(const e in t){const s=t[e];Array.isArray(s)&&s.forEach((e=>e.destroy()))}this._proxyToObserve.delete(e)}if(this._proxyToObserveNo.has(e)){const t=this._proxyToObserveNo.get(e);Array.isArray(t)&&t.forEach((e=>e.destroy())),this._proxyToObserveNo.delete(e)}}resolveParent(e){if(this._proxyToObserveNo.has(e)){const t=this._proxyToObserveNo.get(e);if(Array.isArray(t)){const s=t.filter((t=>!t.isDestory&&(t.resolve(e),!0)));s.length!==t.length&&(0===s.length?this._proxyToObserveNo.delete(e):this._proxyToObserveNo.set(e,s))}}const t=e[F];t?.[D]&&this.resolveParent(t)}}const we={reactive:new WeakMap,raw:new WeakMap,shallowReactive:new WeakMap,refCache:new Map,refMap:new WeakMap,computedMap:new WeakMap},$e=new WeakMap;function xe(e){return U(e)}function _e(e){return L(e)}function Se(e,t={}){return G(e,["Object","Array"],(()=>{let s;const{shallow:i=!1}=t;return i?we.shallowReactive.has(e)?s=we.shallowReactive.get(e):(s=ve.getDefault().createShallowProxy(e),we.shallowReactive.set(e,s),we.raw.set(s,e)):we.reactive.has(e)?s=we.reactive.get(e):(s=ve.getDefault().createProxy(e),we.reactive.set(e,s),we.raw.set(s,e)),s}),"创建响应式对象:参数必须是对象或数组类型")}function ke(e,t,s={}){const{shallow:i=!1}=s;if(t&&we.refCache.has(t))return we.refCache.get(t);if(c(e,["array","object"])){const t=e;if(we.refMap.has(t))return we.refMap.get(t)}const r={value:e,[V]:!0},n=i?ve.getDefault().createShallowProxy(r):ve.getDefault().createProxy(r);return t?we.refCache.set(t,n):c(e,["array","object"])&&we.refMap.set(e,n),n}function je(e,t){return G(e,["Object","Function"],(()=>{let s=null;return we.computedMap.has(e)?s=we.computedMap.get(e):(s=ve.getDefault().createComputed(e,t),we.computedMap.set(e,s)),s}),"创建计算属性:参数必须是函数或包含 getter/setter 的对象")}function Ce(e,t,s,i={}){return ve.getDefault().bind(e,t,s,i)}function Pe(e,t,s){const i={};"number"==typeof t?isNaN(t)||(i.field=t):"function"==typeof t?(s=t,t=void 0):t&&("object"==typeof t?Object.assign(i,t):"string"==typeof t&&(i.field=t));let r=e;if("string"==typeof i.field){let t=i.field;if(t&&t.includes(".")){let s=$e.get(e);s||(s=new Map,$e.set(e,s));const n=t,o=s.get(n);if(o)r=o.target,t=o.field;else{const i=t.split("."),o=i.pop(),a=E(e,i);s.set(n,{target:a,field:o}),r=a,t=o}i.field=t}}const n=ve.getDefault().observe({$proxy:r,...i});if(Z(n,"Observe")){if(i.immediate){let e;e=!i.field||"string"!=typeof i.field&&"number"!=typeof i.field?r:r[i.field],s(e,void 0)}return n.observe(((e,t)=>{s(e,t)})),()=>{n.destroy()}}return()=>{}}const Ae=(e,t)=>G(e,"function",(()=>ve.getDefault().watchEffect(e,t)),"创建副作用观察器:参数必须是函数");function Ee(e){if(we.reactive.has(e)){const t=we.reactive.get(e);t&&we.raw.delete(t),we.reactive.delete(e)}if(we.shallowReactive.has(e)){const t=we.shallowReactive.get(e);t&&we.raw.delete(t),we.shallowReactive.delete(e)}if(we.refMap.has(e)){const t=we.refMap.get(e);if(t)for(const[e,s]of we.refCache.entries())s===t&&we.refCache.delete(e);we.refMap.delete(e)}}function Re(e){return we.raw.get(e)}function Me(e){we.refCache.delete(e)}class Oe{static removeComments(e){if("string"!=typeof e)return e;const t=[];let s=0;const i=e.length;for(;s<i;)if("/"===e[s]&&"/"===e[s+1])for(;s<i&&"\n"!==e[s];)s++;else if("/"===e[s]&&"*"===e[s+1]){for(s+=2;s<i-1&&("*"!==e[s]||"/"!==e[s+1]);)s++;s+=2}else{const i=e[s];void 0!==i&&t.push(i),s++}return t.join("")}static dedupeStyleString(e){if("string"!=typeof e)throw new Error("styleString 必须是字符串类型");if(""===e.trim())return e;try{const t=new Map,s=/([^{]+)\{([^}]+)\}/g;e.replace(s,((e,s,i)=>{const r=s.trim(),n=i.trim();return t.set(r,n),e}));const i=[];for(const[e,s]of t)i.push(`${e}{${s}}`);return i.join("")}catch(e){throw new Error(`去重样式规则时发生错误:${e instanceof Error?e.message:String(e)}`)}}static parseSassLikeSyntax(e){if("string"!=typeof e||""===e.trim())return"";const t=this.removeComments(e),s={variables:new Map},i=(e,t)=>{for(;t<e.length;){const s=e[t];if(!s||!/\s/.test(s))break;t++}return t},r=(e,t=new Set)=>{let i,n=e;do{i=!1,n=n.replace(/\$([a-zA-Z0-9_-]+)/g,((e,n)=>{const o=s.variables.get(n);if(o){if(t.has(n))return console.warn(`变量循环引用检测到:$${n}`),e;const s=new Set(t);s.add(n);const a=r(o,s);return a!==e?(i=!0,a):e}return e}))}while(i);return n},n=(e,t="",o=0)=>{if(o>50)return console.warn("Sass 解析递归深度超过限制"),"";const a=[];let l=0;try{for(;l<e.length&&(l=i(e,l),!(l>=e.length));){if("$"===e[l]){let t=l+1;for(;t<e.length;){const s=e[t];if(!s||!/[a-zA-Z0-9_-]/.test(s))break;t++}if(t<e.length&&":"===e.substring(t,t+2).trim()){const i=e.substring(l+1,t).trim();for(t+=2;t<e.length;){const s=e[t];if(!s||!/\s/.test(s))break;t++}const r=[];let n=!1,o="";for(;t<e.length;){const s=e[t];if(!s||";"===s&&!n)break;'"'!==s&&"'"!==s||"\\"===e[t-1]||(n?s===o&&(n=!1):(n=!0,o=s)),r.push(s),t++}s.variables.set(i,r.join("").trim()),l=t+1;continue}}const i=[];for(;l<e.length;){const t=e[l];if(!t||"{"===t)break;i.push(t),l++}if(l>=e.length||"{"!==e[l])break;l++;const o=[];let c=1;for(;l<e.length&&c>0;){const t=e[l];if(!t)break;if("{"===t)c++;else if("}"===t&&(c--,0===c))break;o.push(t),l++}l++;const u=i.join("").split(",").map((e=>e.trim())).filter(Boolean);for(const e of u){let s=e;if(t)if(s=e.replace(/&/g,t),s.startsWith(t)){const e=s[t.length];void 0!==e&&/[\w-]/.test(e)&&(s=`${t} ${s}`)}else s=`${t} ${s}`;const i=[],l=[];let u=0;for(;u<o.length;){for(;u<o.length;){const e=o[u];if(!e||!/\s/.test(e))break;u++}if(u>=o.length)break;let e=u;for(;e<o.length;){const t=o[e];if(!t||"{"===t||";"===t)break;e++}if(e<o.length&&"{"===o[e]){const t=o.slice(u,e).join("").trim();let s=1;const i=[];for(e++;e<o.length&&s>0;){const t=o[e];if(!t)break;if("{"===t)s++;else if("}"===t&&(s--,0===s))break;i.push(t),e++}l.push(`${t}{${i.join("")}} `),u=e+1}else{let e=!1,t="";for(;u<o.length;){const s=o[u];if(!s||";"===s&&!e)break;'"'!==s&&"'"!==s||"\\"===o[u-1]||(e?s===t&&(e=!1):(e=!0,t=s)),i.push(s),u++}u<o.length&&(i.push(";"),u++)}}let h=r(i.join("")),d=r(l.join(""));h=h.trim(),h&&a.push(`${s}{${h}}`),d&&a.push(n(d,s,c+1))}}return a.join("")}catch(e){return console.error("Sass 解析错误:",e),""}};return n(t)}}const Te=new Map;let Ne=0;class De{static generateScopeId(){if(Te.size>=1e4){const e=Math.floor(1e3);let t=0;for(const s of Te.keys()){if(t>=e)break;Te.delete(s),t++}}return"jiess-scope"+ ++Ne}static escapeCssIdentifier(e){return e.replace(/[^\w-]/g,"-")}static sanitizeCss(e){return"string"!=typeof e?"":e.replace(/[<>"'`]/g,"").replace(/expression\s*\([^)]*\)/gi,"").replace(/javascript\s*:/gi,"").replace(/data\s*:/gi,"").replace(/@import[^;]+;/gi,"").replace(/behavior\s*:[^;]+/gi,"").replace(/-moz-binding\s*:[^;]+/gi,"").replace(/url\s*\(\s*['"]?\s*(javascript|data|vbscript)\s*:[^)]*\)/gi,"url(about:blank)").trim()}static scopeStyleString(e,t){if("string"!=typeof e)throw new Error("styleString 必须是字符串类型");if(""===e.trim())throw new Error("styleString 必须是非空字符串");if("string"!=typeof t)throw new Error("scopeId 必须是字符串类型");if(""===t.trim())throw new Error("scopeId 必须是非空字符串");const s=`${e}__${t}`;if(Te.has(s))return Te.get(s);t=t.trim();try{const i=Oe.parseSassLikeSyntax(e),r=/([^{]+)\{([^}]+)\}/g,n=i.replace(r,((e,s,i)=>{const r=s.trim();if(!r)return r;if(r.includes(t))return r;let[n,...o]=r.split(":global");return n=n.replace(/([.#])([\w-]+)/g,((e,s,i)=>{const r=this.escapeCssIdentifier(i);return`${s}${t}_${r}`})),o&&(n+=o.join(" ")),n=n.replace(/\s+/g," ").trim(),`${n}{${i}}`})),o=Oe.dedupeStyleString(n);return Te.set(s,o),o}catch(e){throw new Error(`处理样式时发生错误:${e instanceof Error?e.message:String(e)}`)}}static clearCache(){Te.clear()}static getCacheSize(){return Te.size}}class Ie{static mountStyle(e,t){if(!e||"object"!=typeof e)throw new Error("jiessEnv 必须是有效的环境对象");if(!Array.isArray(t))throw new Error("styleInfo 必须是数组类型");if("undefined"!=typeof window){if(!e.styleNode)return Array.isArray(e.recordStyleInfo)||(e.recordStyleInfo=[]),e.recordStyleInfo.push(...t),void console.log("StyleInjector.mountStyle: styleNode 不存在,样式信息已缓存");try{if(e.styleNode.sheet){const s=e.styleNode.sheet;t.forEach((({style:t})=>{try{if("string"!=typeof t||""===t.trim())return void console.warn("StyleInjector.mountStyle: 无效的样式字符串");if("function"==typeof s.insertRule)t.split("}").filter((e=>e.trim())).forEach((t=>{if(t.trim())try{s.insertRule(t+"}",s.cssRules.length)}catch(s){console.error("插入 CSS 规则失败:",s),e.styleNode&&(e.styleNode.textContent?e.styleNode.textContent+=t+"}":e.styleNode.textContent=t+"}")}}));else if("function"==typeof s.addRule){const e=t.match(/([^{]+)\{([^}]+)\}/);if(e&&e[1]&&e[2]){const t=e[1].trim(),i=e[2].trim();s.addRule(t,i)}}}catch(s){console.error("CSSStyleSheet API 失败,降级使用 textContent:",s),e.styleNode&&(e.styleNode.textContent?e.styleNode.textContent+=t:e.styleNode.textContent=t)}}))}else t.forEach((({style:t})=>{try{if("string"!=typeof t||""===t.trim())return void console.warn("StyleInjector.mountStyle: 无效的样式字符串");e.styleNode&&(e.styleNode.textContent?e.styleNode.textContent+=t:e.styleNode.textContent=t)}catch(e){console.error("使用 textContent 挂载样式失败:",e)}}))}catch(e){console.error("StyleInjector.mountStyle 执行失败:",e)}}else console.warn("StyleInjector.mountStyle: 非浏览器环境,样式挂载被跳过")}}class Ve extends ce{ctx;debounce1=w();constructor(e,t){super("Attrs"),this.data={},this.config={},this.ctx=e.ctx,this.init(t)}handleAttrs({id:e,cs:t,cn:s,...i}={}){const{env:r}=this.ctx.component.jiessEnv,n=this.ctx.styleScope;"string"==typeof e&&e.trim()&&(n&&(e=`${n}_${e.trim()}`),i.id=e);let o=[];if(t&&(Array.isArray(t)?o=t.map((e=>e?.trim())).filter(Boolean):"string"==typeof t&&(o=t.split(" ").map((e=>e?.trim())).filter(Boolean))),s){let e=[];Array.isArray(s)?e=s.map((e=>e?.trim())).filter(Boolean):"string"==typeof s&&(e=s.split(" ").map((e=>e?.trim())).filter(Boolean)),n&&(e=e.map((e=>`${n}_${e?.trim()}`))),o=[...o,...e]}const a=[...new Set(o)];return a.length&&(i["vue3"===r?"class":"className"]=a.join(" ")),i}initCssValue(e,t){if(e){if(W(e)&&U(e.$proxy)){const s=ve.getDefault().observe(e);s.observe((e=>{c(e,["string","number","array"])&&t&&t(e)})),e=s.result}if(c(e,["string","number","array"]))return e}}debounceUpdate(e,{id:t,cs:s,cn:i}){this.debounce1((()=>{Object.assign(e,this.handleAttrs({id:t,cs:s,cn:i})),this.ctx.forceUpdate()}),0)}initAttrs(e){let t=e.className,s=e.class,i=e.id;delete e.className,delete e.class,delete e.id,t=this.initCssValue(t,(r=>{t=r,this.debounceUpdate(e,{id:i,cs:s,cn:t})})),s=this.initCssValue(s,(r=>{s=r,this.debounceUpdate(e,{id:i,cs:s,cn:t})})),i=this.initCssValue(i,(r=>{i=r,this.debounceUpdate(e,{id:i,cs:s,cn:t})})),Object.assign(e,this.handleAttrs({id:i,cs:s,cn:t}))}init(e){const t=this.ctx.component?.jiessEnv?.env||"vue3",{children:s,...i}=function(e,t){const{$mergeAttrs:s,...i}=t||{};return Object.assign(i,s?.[e])}(t,e);var r,n,o;return r=["$if","$ref","$elseIf","$name","$slots","$mergeAttrs"],n=i,o=this.config,r.forEach((e=>{n.hasOwnProperty(e)&&(o[e]=n[e],delete n[e])})),f(s)&&(i.children=s),this.data=i,this}}const Be=new WeakMap;class Je extends ce{ctx;attrs;constructor(e,t){if(super("Done"),this.ctx=e,this.attrs=t,Be.has(t)){const s=Be.get(t);return s.ctx=e,s}Be.set(t,this)}beginSetup(e){const{ctx:t}=this,s={},{setup:i,props:r,name:n,style:o}=e,{$slots:a}=t.PJR?._resConfig||{},l=n?`【组件-${n}】`:"";let u=this.ctx.inject("jiess_css-scope",1/0);const h={default:()=>{const{default:e,children:s}=t.PJR?._resData||{};return e??s??null}};if(o&&!e.styleInfo){let s=null;s="function"==typeof o?o(this.ctx.jiess):o,G(s,["string","object"],(()=>{let i="",r="";if("string"==typeof s?i=s:"object"==typeof s&&(s.scope&&(r=s.scope),i=s.css),i&&"string"==typeof i){const s=e.styleInfo={styleScope:"",style:""};if(r){const t=De.generateScopeId();s.styleScope=e.styleScope=t,s.style=De.scopeStyleString(i,t),e.styleMode=["public","protected"].includes(r)?r:"private"}else s.style=i;const n=t.jiess.getFrameworkAPI("jiessEnv");Ie.mountStyle(n,[s])}}),"function"==typeof o?`${l}style返回`:`${l}style参数`)}e.styleScope?(this.ctx.styleScope=e.styleScope,"public"===e.styleMode?this.ctx.provide({"jiess_css-scope":e.styleScope}):"protected"===e.styleMode?this.ctx.provide({"jiess_css-scope":null}):e.styleMode):u&&(this.ctx.styleScope=u);for(const e in a)"function"==typeof a[e]?h[e]=(...s)=>a[e].call(t,...s):h[e]=()=>a[e];const d=new Ve(this,this.attrs);s.$param={slots:h,data:d.data},s.$props=function(e,t,s=""){if(t){let i="",r={};return s&&(i=`${s} 组件 `),G(t,"function",(()=>{let s=t();G(s,"object",(()=>{for(let t in s){const n=s[t];let o,a=!1,l=null,u=!1,h=!1;if("string"==typeof n)l=n;else if("object"==typeof n){const e=n;l=e.type,o=e.default,h=!!e.isRef,a=!!e.required,u=!!e.isResponsive}a&&!e.hasOwnProperty(t)&&H(`${i}${t}`,"必须");const d=e=>{if(null!=e)return"string"!=typeof l||c(e,l)||H(`${i}${t}`,`须提供 ${l} 类型`),e},f=e=>e&&"object"==typeof e&&e[V],p=e.hasOwnProperty(t)?e[t]:o;u&&!U(p)&&H(`${i}${t}`,"须提供 Jiess 响应式数据"),f(p)?(d(p.value),r[t]=p):void 0!==p&&h?H(`${i}${t}`,"须提供 JiessRef 响应式数据"):r[t]=d(p)}}),`${i}Props 返回`)}),`${i}Props 定义`),r}return{...e}}(d.data,r,n),t.expose(s),G(i,["function","asyncFunction"],(()=>{i.call(t,s.$props,s.$param)}),"setup函数")}buildRender(e=this.attrs){return this.jsRender&&!this.jsRender.isDestory||(this.jsRender=new Xe(this.ctx,new Ve(this,e))),this.jsRender}}class Fe extends ce{ctx;children;_resourceManager;get disposed(){return this._resourceManager.disposed}constructor(e,t){super("SlotRender"),this.ctx=e,this.children=t,this._resourceManager=new le}dispose(){this._resourceManager.disposed||this._resourceManager.dispose()}initNodes(e){return d(e)?e:[e].flat(1/0).filter((e=>f(e))).map((e=>"function"==typeof e?e:"object"==typeof e?se(e)?e:new Je(this.ctx,e).buildRender():e+""))}toRender(e,t){const{$env:s}=this.ctx.jiess,i=this.ctx.jiess.getFrameworkAPI("$tag","div"),{is:r=i,children:n,...o}=e._resData;e._initKey(o,t);const a=this.getSlots(n,e);return"JiessFragment"===r?"vue3"===s?a.default?.call(this):a:this.$h(r,o,a)}$h(e,t,s){const{jiessEnv:i}=this.ctx.component;return i.createElement(e,t,s)}getSlots(e,t){const{ctx:s}=this,{env:i}=s.component.jiessEnv,r=e=>{const s=this.initNodes(e);return ie(s,(e=>e._injectKey(t))),ae(s)};let{$slots:n}=t._resConfig||{};if("react"===i){if(f(e)){let t=r(e);return t.length>1?t:t[0]}return null}{n={...n};let t={};for(let e in n){const i=n[e],o=c(i,"function");t[e]=e=>r(o?i.call(s,e):i)}return t.hasOwnProperty("default")||f(e)&&(t.default=()=>r(e)),t}}}function ze(e,t=10,s){let i=null;if(s?.ctx){const{_provideData:r,PJR:n}=s?.ctx;c(r,"object")&&r.hasOwnProperty(e)?i=r[e]:n&&t>0&&(i=ze(e,--t,n))}return i}class qe extends ce{component;PJR;_funcToObserve=new WeakMap;_provideData={};_slotRender;_nodes=[];_lifts={beforeRender:[],beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[]};_resourceManager;get disposed(){return this._resourceManager.disposed}static createInitCallback(e){return t=>{if(!e||!e.contextParam)return;const{$page:s,...i}=e.contextParam;return"function"==typeof s&&(i.$page=s.call(t,e)),i}}constructor(e,t,s,i){const{jiess:r}=e.jiessEnv;super("Context",qe.createInitCallback(r)),this.PJR=i,this.jiess=r,this.component=e,this._resourceManager=new le,this._slotRender=new Fe(this,s||[]),new Je(this,t||{}).beginSetup(e.IS)}dropStaticJsRender(e){He.has(e)&&He.delete(e)}forceUpdate(){const{forceUpdate:e}=this.component?.frame||{};"function"==typeof e&&e()}onBeforeRender(e){this._lifts.beforeRender.push({fn:e,once:!1})}onBeforeMount(e){this._lifts.beforeMount.push({fn:e,once:!1})}onMounted(e,t=!1){this._lifts.mounted.push({fn:e,once:t})}onBeforeUpdate(e,t=!1){this._lifts.beforeUpdate.push({fn:e,once:t})}onUpdated(e,t=!1){this._lifts.updated.push({fn:e,once:t})}onBeforeUnmount(e){this._lifts.beforeUnmount.push({fn:e,once:!1})}nextTick(e){const t=Promise.resolve();return e?t.then(this?e.bind(this):e):t}add(...e){const t=this._nodes.length,s=this._slotRender,i=e=>{e=this._toObserve(e,i),re(this._nodes[t]),this._nodes[t]=s.initNodes(e),this.forceUpdate()};return 0===(e=this._toObserve(e,i)).length||this._nodes.push(s.initNodes(e)),this}_toObserve(e,t,s){const i=e=>{if(W(e)){if(U(e.$proxy)){const i=ve.getDefault().observe(e);s&&(s.observeInstance=i);let r=this._funcToObserve.get(t);return r=r?[...r,i]:[i],this._funcToObserve.set(t,r),i.observe(((e,s)=>{const r=this._funcToObserve.get(t),n=r.indexOf(i),o=[];r.forEach(((e,t)=>{n<t?e.destroy():o.push(e)})),this._funcToObserve.set(t,o),t(e,s,i)})),this._toObserve(i.result,t,s)}return this._toObserve(oe(e),t,s)}return e};return Array.isArray(e)?e.flat(1/0).map(i):i(e)}native(...e){return ae(this._slotRender.initNodes(e))}provide(e={}){Object.assign(this._provideData,e)}inject(e,t=10){return c(this._provideData,"object")&&this._provideData.hasOwnProperty(e)?this._provideData[e]:t>0&&this.PJR?ze(e,t-1,this.PJR):null}expose(e){this.PJR&&this.PJR.expose&&Object.assign(this.PJR.expose,e)}_buildVNodeTree(){let e=ae(this._nodes);for(let t=this._lifts.beforeRender.length-1;t>=0;t--){const s=this._lifts.beforeRender[t];s&&"function"==typeof s.fn&&(e=s.fn(e)||e,s.once&&this._lifts.beforeRender.splice(t,1))}return e}dispose(){this._resourceManager.disposed||(this._resourceManager.dispose(),Object.values(this._lifts).forEach((e=>{e.forEach((e=>{e.fn=void 0}))})),this._slotRender&&"function"==typeof this._slotRender.dispose&&this._slotRender.dispose(),this._slotRender=null,this._funcToObserve=new WeakMap,this.component=null,this.PJR=void 0,this._nodes=[])}destroy(){this.dispose()}}class Ue extends ce{IS;jiessEnv;cpn;ctx;frame;frameProps={};constructor(e,t){super("Component"),this.IS=e,this.jiessEnv=t,this[N]=!0}start(e={},t,s){return this.cpn=this.cpn||this.component(e,t,s)}component(e,t,s){return this.jiessEnv.component(this,(()=>(this.ctx=new qe(this,e,t,s),e=>{this.ctx._lifts[e].forEach((e=>{"function"==typeof e.fn&&(e.fn(),e.once&&delete e.fn)}))})))}}let Le=1,We="jiess",Ke="_static_";const He=new Map,Ge=[];function Ze(e){const t=Ge.indexOf(e);t>-1&&Ge.splice(t,1),Ge.push(e)}class Xe extends ce{ctx;expose={};_childrenHistory={};_childrenCurrent={};isDestory=!1;observeInstance;_resourceManager=new le;get disposed(){return this._resourceManager.disposed}constructor(e,t){super("JsRender"),this.ctx=e;let s=null;const{key:i}=t.data;if(i&&`${i}`.startsWith(Ke)){if(s=He.get(i),s)return Ze(i),s.ctx=e,s;!function(e,t){He.size>=1e3&&function(){if(Ge.length>0){const e=Ge.shift();if(e&&He.has(e)){const t=He.get(e);t&&"function"==typeof t.dispose?t.dispose():t&&"function"==typeof t.destroy&&t.destroy(),He.delete(e)}}}(),He.set(e,t),Ze(e)}(i,this)}this.attrs=t,this._buildNode(t)}_buildNode({config:e,data:t}){this[N]=Z(t.is,!0,N),this._resData=this._initData(t),this._resConfig=this._initConfig(e);const{$ref:s}=this._resConfig;"function"==typeof s?this.ctx.nextTick((()=>{a((()=>s(this.expose,this)))})):L(s)&&(s.value=this.expose)}_initData({id:e,class:t,className:s,...i}){const r={id:e,class:t,className:s};this.attrs&&"function"==typeof this.attrs.initAttrs&&this.attrs.initAttrs(r);for(const e in i){const t=i[e];c(t,["object","array"])?this._analyObserve(r,e,t):r[e]=t}return r}_initConfig(e){const t={};for(const s in e){const i=e[s];c(i,["object","array"])?this._analyObserve(t,s,i):t[s]=i}return t}_analyObserve(e,t,s){this._isJiessComponentField(t)?e[t]=s:W(s)?this._handleProxyObject(e,t,s):"children"===t?this._handleChildrenField(e,t,s):e[t]=s}_isJiessComponentField(e){return"$if"!==e&&"$elseIf"!==e&&this[N]}_handleProxyObject(e,t,s){const{$proxy:i,update:r}=s;r&&this._handleTwoWayBinding(e,s),U(i)?this._handleReactiveProxy(e,t,s):e[t]=oe(s)}_handleTwoWayBinding(e,t){let s=null,{$proxy:i,update:r,field:n}=t;if(s="string"==typeof r?r:"vue3"===this.ctx.jiess.$env?"onUpdate:modelValue":"onInput",n&&"string"==typeof n||(n="vue3"===this.ctx.jiess.$env?"modelValue":"value"),"function"==typeof e[s]){const t=e[s];e[s]=e=>{t(e),i[n]=e}}else e[s]=e=>i[n]=e}_handleReactiveProxy(e,t,s){const i=this.ctx._toObserve(s,(s=>{this.isDestory||("children"===t?(re(e[t]),this._handleChildrenField(e,t,s)):e[t]=s,this.ctx.forceUpdate())}),this),r=this.ctx._slotRender;e[t]="children"===t?r.initNodes(i):i}_handleChildrenField(e,t,s){const i=this.ctx._slotRender;if(Array.isArray(s)){const r=s.flat(3);r.forEach(((e,t)=>{this._analyObserve(r,t,e)})),e[t]=i.initNodes(r)}else e[t]=i.initNodes(s)}_initKey(e,t){return c(e,"object")&&d(e.key)&&(e.key=f(t)?`${We}_${t}`:"auto_"+Le++),e}_injectKey({J_uid:e}){let{key:t}=this._resData;if(t){if("string"==typeof t){if(t.startsWith(Ke))return;const s=t.split("_"),i=s[1]?parseInt(s[1],10):NaN;if(s.length>2&&!isNaN(i)&&i===e)return}}else t=this.J_uid;this._resData.key=`${We}_${e}_${t}`}getNative(e){const{ctx:t,_resData:s}=this,{is:i,key:r,slot:n,children:o,...a}=s;if(Z(i,!0,N)){const{jiessEnv:s}=t.component;return this._vnode=this._vnode||s.createVNode(this._initKey({is:i,key:r,slot:n},e),(()=>(this.component=new Ue(i,s),{NativeComponent:this.component.start(a,o,this),component:this.component}))),this._vnode}return t._slotRender.toRender(this,e)}destroy(){this.dispose()}dispose(){this._resourceManager.disposed||this.isDestory||(this.isDestory=!0,this._vnode=void 0,this._resourceManager.dispose(),"function"==typeof this.observeInstance?.dispose?this.observeInstance.dispose():this.observeInstance&&this.observeInstance.destroy(),this[N]&&!this.component||this._resData&&this._resData.children&&re(this._resData.children))}}function Ye(){Ge.forEach((e=>{const t=He.get(e);t&&"function"==typeof t.dispose?t.dispose():t&&"function"==typeof t.destroy&&t.destroy()})),He.clear(),Ge.length=0}function Qe(){return He.size}function et(e,t,s){return new e(Y(t),s).jiess}class tt extends Error{code;timestamp;context;constructor(e,t,s){super(e),this.name="JiessError",this.code=t,this.timestamp=Date.now(),this.context=s,Error.captureStackTrace&&Error.captureStackTrace(this,tt)}toJSON(){return{name:this.name,message:this.message,code:this.code,timestamp:this.timestamp,context:this.context,stack:this.stack}}}class st extends tt{constructor(e,t){super(e,"JIESS_ADAPTER_ERROR",t),this.name="AdapterError"}}class it extends tt{constructor(e,t){super(e,"JIESS_COMPONENT_CREATION_ERROR",t),this.name="ComponentCreationError"}}class rt extends tt{constructor(e,t){super(e,"JIESS_RESOURCE_ERROR",t),this.name="ResourceError"}}var nt;!function(e){e.React="react",e.Vue3="vue3"}(nt||(nt={}));const ot={},at=class extends ce{contextParam;$env="";$name="default";JiessComponent;_frameworkProps={};_envProps={};constructor(e,t={},s={}){const{$name:i="default",...r}=t,n=ot[i];if(n)return n;super("Jiess"),this.contextParam=s,this.$name=i,this._envProps=e,this._frameworkProps=r,ot[i]=this,this.$env=e.$env}createElement(e,t={},s){const i=this._frameworkProps.createElement;if("function"==typeof i)return i(e,t,s)}getFrameworkAPI(e,t){return void 0!==this._frameworkProps[e]?this._frameworkProps[e]:void 0!==this._envProps[e]?this._envProps[e]:t}},lt="vue3",ct=class{env=lt;nativeCtx=null;nativeApp=null;styleNode;recordStyleInfo=[];jiess;_resourceManager;_disposed=!1;constructor(e,t){let s;try{if(s=new at({jiessEnv:this,$env:lt},e,t),this.jiess=s,this._resourceManager=new le,"undefined"!=typeof window&&window.document){const e=document.createElement("style");document.head.appendChild(e),this.styleNode=e,this._resourceManager.add({disposed:!1,dispose:()=>{this.styleNode&&this.styleNode.parentNode&&(this.styleNode.parentNode.removeChild(this.styleNode),this.styleNode=void 0)}})}this.jiess.JiessComponent=({is:e,setup:t,style:s,children:i,...r})=>{try{const n=this.jiess.getFrameworkAPI("getCurrentInstance");if(this.nativeCtx=n?n():null,this.nativeCtx&&"appContext"in this.nativeCtx&&(this.nativeApp=this.nativeCtx.appContext?.app||null),this.recordStyleInfo.length>0&&this.styleNode&&(Ie.mountStyle(this,this.recordStyleInfo),this.recordStyleInfo=[]),Z(e,!0,N));else{if("function"!=typeof t)throw new Error("须提供(组件 is)或(setup 函数)");e={isJiess:!0,name:"JiessComponent",style:s,setup:t}}const o=new Ue(e,this);return this.createElement(o.start(r,i))}catch(s){throw console.error("[Jiess-Vue3 适配器]创建组件失败:",s),new it("创建 Vue3 组件失败",{is:e,setup:t,error:s})}}}catch(e){throw new st("初始化 Vue3 适配器失败",{error:e,jiess:s})}}createElement(e,t,s){const{useDirectives:i,...r}=t||{},n=this.jiess.getFrameworkAPI("h");if(!n)return void console.error("[Jiess Vue3 适配器] h 函数未定义");const o=this.jiess.getFrameworkAPI("withDirectives");return"function"==typeof i&&"function"==typeof o?o(n(e,r,s),i()):n(e,r,s)}createVNode({key:e},t){const{NativeComponent:s}=t(this);return this.createElement(s,{key:e})}component(e,t){let s=o;return{inheritAttrs:!0,props:{style:[Function,Object]},data:()=>({[J]:!1}),created(){e.frame=this,e.frameProps=this.$props,s=t()},beforeMount(){s("beforeMount")},mounted(){s("mounted")},beforeUpdate(){s("beforeUpdate")},up