@fox-js/foxui 4.0.1-61 → 4.0.1-62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@fox-js/validator"),require("@fox-js/icons-vue"),require("@fox-js/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@fox-js/validator","@fox-js/icons-vue","@fox-js/i18n"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N.FoxUI={},N.Vue,N.FoxValidator,N.FoxIconsVue,N.FoxI18n))})(this,function(N,t,tt,oe,ie){"use strict";/*!
2
- * @fox-js/foxui-base v4.0.0 Sat Jun 29 2024 16:19:24 GMT+0800 (中国标准时间)
2
+ * @fox-js/foxui-base v4.0.0 Tue Jul 16 2024 13:55:19 GMT+0800 (中国标准时间)
3
3
  */const en=window,Hs=typeof window<"u";function js(){return typeof en<"u"?en.requestAnimationFrame||en.webkitRequestAnimationFrame||function(e){en.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function Fa(e){Hs?cancelAnimationFrame(e):clearTimeout(e)}const Qe=js();/*!
4
4
  * @fox-js/big-decimal v4.0.1-6 Thu Aug 17 2023 21:31:19 GMT+0800 (中国标准时间)
5
- */function tn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Ae(e),n=Ae(n),[e,n]=lo(Ae(e),Ae(n)),a==1&&(o==1?e=oo(e):n=oo(n));let l=Ra(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(oo(l)):Ae(l)}function oo(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let s=0;s<a;s++)e[s]>="0"&&e[s]<="9"?n+=9-parseInt(e[s]):n+=e[s];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ra(n,r)}function Ae(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function lo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Ra(e,n){[e,n]=lo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var we=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(we||{});function Et(e,n=0,a=we.HALF_EVEN){if(a===we.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],s=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+s,c=Et(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Oa(l[1],r,o,a)?(o?"-":"")+ao(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&Oa(i,s,o,a)&&(s=ao(s),s.length>n)?(o?"-":"")+ao(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function Oa(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===we.DOWN||!a&&o===we.FLOOR||a&&o===we.CEILING)return!1;if(o===we.UP||a&&o===we.FLOOR||!a&&o===we.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case we.HALF_DOWN:return!1;case we.HALF_UP:return!0;case we.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function ao(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function ro(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=Dt(e),n=Dt(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=Dt(e.replace(".","")),n=Dt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let s=n.length,i=0,c=[],f=s-1,p="";for(let d=0;d<s;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let h=0;for(let S=n.length-1;S>=f&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(h+=parseInt(e[c[S]--])*parseInt(n[S]));h+=i,i=Math.floor(h/10),p=h%10+p,f--}return p=Dt(Ws(p,r)),a==1&&(p="-"+p),p}function Ws(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function Dt(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function so(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Ae(n.replace(".","")),l>=0){let f=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(f==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>f)e=e.replace(".",""),e=Ae(e+new Array(l-f+1).join("0"));else if(l<f){e=e.replace(".","");let p=e.length-f+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==f&&(e=Ae(e.replace(".","")))}let r=0,s=n.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let f=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(f+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=f,i="0."+new Array(f).join("0")}for(a=a+2;r<=a;){let f=0;for(;parseInt(c)>=parseInt(n);)c=tn(c,"-"+n),f++;i+=f,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(o==1?"-":"")+Ae(Et(i,a-2))}function io(e,n){return e=e.toString(),n=n.toString(),n=co(n),tn(e,n)}function co(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ka(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ua(e),Ua(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=io(e,ro(n,Et(so(e,n),0,we.FLOOR)));return a+o}function Ua(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ha(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=lo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ce{value;static RoundingModes=we;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Ae(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Ae(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ce.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ce.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var s="",i=r;i>0;)i<a?(a=i,i=0):i-=a,s=n.substring(i,i+a)+(i<r-a&&i>=0?o:"")+s;return(l?"-":"")+s+n.substring(r)}getPrettyValue(n,a){return ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=we.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Et(n,a,o)}round(n=0,a=we.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(Et(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),tn(n,a)}add(n){return new ce(tn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),io(n,a)}subtract(n){return new ce(io(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),ro(n,a)}multiply(n){return new ce(ro(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),so(n,a,o)}divide(n,a){return new ce(so(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),Ka(n,a)}modulus(n){return new ce(Ka(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ha(n,a)}compareTo(n){return Ha(this.value,n.getValue())}static negate(n){return n=ce.validate(n),co(n)}negate(){return new ce(co(this.value))}}function ja(e,n){return ce.multiply(`${e}`,`${n}`)}function uo(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function fo(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function Wa(e){return ce.negate(e)}function nn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",f=r.indexOf(".");f!=-1&&(i=r.substring(0,f),c=r.substring(f+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let d="",h=i.split("").reverse();for(let S=0;S<h.length;S++)d+=h[S]+((S+1)%o==0&&S+1!=h.length?l:"");c.length==0?p=`${s}${d.split("").reverse().join("")}`:p=`${s}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function Ya(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const nt=typeof window<"u",Ke=Qe;function Xa(e){return e==null}const on=Array.isArray,Ys=e=>an(e)==="[object Map]",Xs=e=>an(e)==="[object Set]",Ue=e=>e instanceof Date,ln=e=>typeof e=="function",Qa=e=>typeof e=="string",Qs=e=>typeof e=="symbol",De=e=>e!==null&&typeof e=="object",dt=e=>De(e)&&ln(e.then)&&ln(e.catch),Ga=Object.prototype.toString,an=e=>Ga.call(e),mo=e=>an(e)==="[object Object]",Za=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Gs(e){return e.__esModule||Za&&e[Symbol.toStringTag]==="Module"}const Zs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function ot(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let s in r){let i=n[s],c=r[s];if(i!==c)if(l===!0&&c&&typeof c=="object"){let f;Array.isArray(c)?f=i&&Array.isArray(i)?i:[]:f=i&&typeof i=="object"?i:{},n[s]=ot(l,f,c)}else c!==void 0&&(n[s]=c)}}return n}function po(e,n,a=!1){if(!a)ot(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!mo(s))continue;r=po(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!mo(s))continue;r=po(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const ho=Zs?Promise.resolve():null;function Js(e,...n){ho!==null?n&&n.length>0?ho.then(()=>{e(n)}):ho.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function he(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function me(e){return typeof e=="number"?e:Number(e)}const _s={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function lt(e){let a=Object.prototype.toString.call(e);return e==null?String(e):_s[a]||"object"}function rn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Ja(e){return e&&typeof e=="object"&&"setInterval"in e}function _a(e){let n=!!e&&"length"in e&&e.length,a=lt(e);return a==="function"||Ja(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function er(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function ei(e,n=[]){let a=n;return e!=null&&(_a(Object(e))?er(a,typeof e=="string"?[e]:e):a.push(e)),a}function Me(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=lt(e),o=lt(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let s=0;s<l.length;s++){let i=l[s],c=e[i],f=n[i];if(!Me(c,f))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],s=n[l];if(!Me(r,s))return!1}return!0}return!1}function tr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function nr(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function or(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function lr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function ar(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function go(e,n=!0,a=!0){n?e=ar(e,".",/\./g):e=e.replace(/\./g,""),a?e=ar(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ti(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function ni(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Me(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ke(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function Se(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function ut(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const rr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function yo(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const at=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},He=(e,n,a)=>Math.min(Math.max(e,n),a),Ne=Symbol.for("BroadcastKey");class bo{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):tr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const s=this.callbacks.get(a);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...o]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[a]=="function"){const c=Reflect.apply(i[a],i,[...o]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,l,[...s])}),l}on(n,a){this.callbacks.set(n,a)}}function sn(e,n,a,o){const l=new bo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function oi(e,n,a){const o=a;if(o[Ne])return o[Ne];const l=t.inject(Ne,null),r=new bo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ne]=r,t.provide(Ne,r),t.onUnmounted(()=>{r.destroy(),o[Ne]=void 0}),r}function It(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ne]??t.inject(Ne,null):t.inject(Ne,null)}const rt=e=>e.default??e;class li{error(n,a){const o=a,l=a||t.hasInjectionContext()?It(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?It(o):null,s=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let xt=new li;function ai(e){xt=e}function ri(e){xt?Object.assign(xt,e):xt=e}function si(e,n){rt(tt).setValidator(e,n)}function ii(e){rt(tt).deleteValidator(e)}let sr=["blur","clear"];function ci(e){sr=e}function ir(){return sr}let cr=["focus","change","setValue"];function di(e){cr=e}function dr(){return cr}function ui(e){rt(tt).messages(e)}function qt(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function cn(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Pe=Symbol("ValidateSchemaKey");class ur{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=cn(qt(this.attrRules,this.rules)),o=[];for(let r in n){let s=n[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),o.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};o.push(c)}}this.attrRules=cn(o);const l=qt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=xt;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?rt(tt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?rt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return rt(tt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=qt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=cn(n):this.rules=cn([n]);const o=qt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=qt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),s={[`${o}`]:r},i=rt(tt),c=new i(l),f=this.proxy??s;return c.validate(s,{context:f}).then(d=>{if(d.pass)this.success();else{let h="error";Array.isArray(d.errors)&&d.errors.length>0&&(h=d.errors[0].message??h,d.errors=[d.errors[0]],d.errors[0].ref=f),this.error(h)}return d}).catch(d=>{const h=d.message??`${d}`;return this.error(h),d})}}return Promise.resolve({pass:!0})}}function dn(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new ur(n,a,e)}const un=Symbol.for("EventEmitterKey");class fr{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function ft(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function fn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function fi(e,n){const a=ft((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function mi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function ko(e,n,a,o=0,l=!0){let r=n,s=0;if(l){const c=e();if(s++,c||s>a)return}const i=()=>{const c=e();s++,!(c||s>a)&&(r+=o,setTimeout(i,r))};setTimeout(i,r)}const Ie=Symbol("DomainKey"),mt=Symbol("DataItemsKey");class mn{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const pi=new mn;function pt(){return pi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ie]??t.inject(Ie,null):t.inject(Ie,null)}const So=Symbol("OriginalDateKey");function Co(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(Ie,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new mn(i);c.parent=s;const f=S=>{r[So]||h(S),c?.set("modelValue",S)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[So]??null,h=S=>{const y={};ot(!0,y,t.toRaw(S)),r[So]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,S=>{c?.merge(S,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[Ie]=c,t.provide(Ie,c),l!==null){const S=t.inject(Ne,null),y=sn(r,S,i,o);c.broadcast=y,r[Ne]=y,t.provide(Ne,y),r.broadcast=(u,m,...g)=>Reflect.apply(y.emit,y,[u,m,...g]);const b=t.inject(Pe,null),k=dn(r,b,{componentName:""});c.validateSchema=k,r[Pe]=k,t.provide(Pe,k),r[mt]=new Map,r.validate=(u=!0)=>{const m=[];let g=null;const C={deep:!1};if(u===!0)g={name:"*"};else if(Array.isArray(u)&&u.length>0){const A=u;g={name:w=>w?A.indexOf(w)!==-1:!1}}else if(u!=null&&typeof u=="object"){const A=u;if(Object.assign(C,A),Array.isArray(A.include)&&A.include.length>0){const w=A.include;g={name:B=>B?w.indexOf(B)!==-1:!1}}else if(Array.isArray(A.exclude)&&A.exclude.length>0){const w=A.exclude;g={name:B=>B?w.indexOf(B)===-1:!1}}else g={name:"*"}}if(g){const A=y?.emitToChildren(g,"validate",C);A&&Reflect.apply([].push,m,A)}return m.length==1?m[0]:m.length>1?Promise.all(m).then(A=>{let w=[];return A.forEach(B=>{B.pass===!1&&Array.isArray(B.errors)&&(w=[...w,...B.errors])}),w.length>0?{pass:!1,errors:w}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(u,m=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(u).forEach(A=>{let w=String(A);const B={componentName:"",fieldName:w,pureDataValidate:!0};if(c){const T=hr(c,w,B,y,k);r[mt].set(w,T);const V=u[w];V&&T.validateSchema.setRule(V)}});return}if(m){const C=Reflect.ownKeys(u),A={name:w=>C.includes(w)};y?.emitToChildren(A,"setNameValidateRules",u,!1)}},r.clearValidate=(u=!0)=>{let m=null;if(u===!0)m={name:"*"};else if(Array.isArray(u)&&u.length>0){const g=u;m={name:C=>C?g.indexOf(C)!==-1:!1}}else if(u!=null&&typeof u=="object"){const g=u;if(Array.isArray(g.include)&&g.include.length>0){const C=g.include;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const C=g.exclude;m={name:A=>A?C.indexOf(A)===-1:!1}}else m={name:"*"}}m&&y?.emitToChildren(m,"clearValidate",!1)},r.resetFields=u=>{const m=p();if(!m)return;const g={};if(ot(!0,g,d()??{}),Array.isArray(u))u.forEach(C=>{m[C]=g[C]});else if(u&&Array.isArray(u.include))(u.include??[]).forEach(A=>{m[A]=g[A]});else if(u&&Array.isArray(u.exclude)){let C=u.exclude??[];Reflect.ownKeys(g).forEach(A=>{C.includes(A)||(m[A]=g[A])})}else Object.assign(m,g);r.clearValidate(u)},r.setModelValue=(u,m)=>{!m||m===i?f(u):y?.emitToChildren({name:m},"setModelValue",u)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Pe]=void 0,t.provide(Pe,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ne]=void 0,t.provide(Ne,null)),c?.destroy(),r[Ie]=void 0,t.provide(Ie,null),r[mt]&&(r[mt].clear(),r[mt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,c=null,r=null}),c}function mr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Ie,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new mn(s);return i.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{i?.merge(c,a)},{immediate:!0}):i.merge(n,a),l[Ie]=i,t.provide(Ie,i),t.onUnmounted(()=>{i?.destroy(),l[Ie]=void 0,t.provide(Ie,null),i=null,l=null}),i}function pr(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Te(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ne,null);let i=sn(l,s,r,a);l[Ne]=i,t.provide(Ne,i),l.broadcast=(y,b,...k)=>i?Reflect.apply(i.emit,i,[y,b,...k]):null;const c=t.inject(Pe,null);e.fieldName=e.fieldName??r;let f=dn(l,c,e);l[Pe]=f,t.provide(Pe,f),pr(l,f,r),l.validate=(y=null)=>{if(!f)return Promise.resolve({pass:!0});const b=[];let k=!1,u=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)u=!0,k=!0;else if(y&&typeof y=="object"){const m=y,g=m.ignoreDisabled??!0,C=m.ignoreReadonly??!0,A=m.ignoreHidden??!0;g===!0&&e.disabled===!0||C===!0&&e.readonly===!0||A===!0&&rn(l.$el)?u=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),u=!0),k=m.deep??!1}else typeof y=="boolean"&&(k=y),u=!0;if(u){const m=f?.validate();b.push(m)}if(k){let m=null;const g={deep:!1};if(y===!0)m={name:"*"};else if(Array.isArray(y)&&y.length>0){const C=y;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(y!=null&&typeof y=="object"){const C=y;if(Object.assign(g,C),Array.isArray(C.include)&&C.include.length>0){const A=C.include;m={name:w=>w?A.indexOf(w)!==-1:!1}}else if(Array.isArray(C.exclude)&&C.exclude.length>0){const A=C.exclude;m={name:w=>w?A.indexOf(w)===-1:!1}}else m={name:"*"}}if(m&&i){const C=i.emitToChildren(m,"validate",g);Reflect.apply([].push,b,C)}}return b.length==1?b[0]:b.length>1?Promise.all(b).then(m=>{let g=[];return m.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(g=[...g,...C.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>f?.setRule(y),l.setNameValidateRules=(y,b=!1)=>{const k=y[r];if(k&&f?.setRule(k),b&&i){const u={name:m=>Reflect.ownKeys(y).includes(m)};i.emitToChildren(u,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&f?.clear();let b=null;if(y===!0)b={name:"*"};else if(Array.isArray(y)&&y.length>0){const k=y;b={name:u=>u?k.indexOf(u)!==-1:!1}}else if(y!=null&&typeof y=="object"){const k=y;if(Array.isArray(k.include)&&k.include.length>0){const u=k.include;b={name:m=>m?u.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const u=k.exclude;b={name:m=>m?u.indexOf(m)===-1:!1}}else b={name:"*"}}b&&i&&i.emitToChildren(b,"clearValidate",!1)};let p=new fr(l);l[un]=p;const d=ft((y="validate")=>{f&&(y==="reset"?f.clear():f.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:ir()).forEach(y=>{p&&p.on(y,b=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:dr()).forEach(y=>{p&&p.on(y,b=>{d("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ne]=void 0,t.provide(Ne,null),i=null,f?.destroy(),l[Pe]=void 0,t.provide(Pe,null),f=null,p?.destroy(),l[un]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:i,validateSchema:f,emitEvent:(y,...b)=>{p&&Reflect.apply(p.emit,p,[y,...b])},onEvent:(y,b)=>{p&&Reflect.apply(p.on,p,[b])},offEvent:(y,b)=>{p&&Reflect.apply(p.off,p,[b])}}}function hr(e,n,a,o,l){const r={},s=n??"",i={getValue(){const p=e.getForSelf("modelValue");return p?p[s]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,s):!1}};a.fieldName=s,a.validateHandler={getValue(p){return i.getValue()}};let c=dn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const d=[];let h=!1,S=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)S=!0,h=!0;else if(p&&typeof p=="object"){const y=p;Array.isArray(y.include)&&y.include.indexOf(s)!==-1||Array.isArray(y.exclude)&&y.exclude.indexOf(s),S=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),S=!0;if(S&&c){const y=c.validate();d.push(y)}if(h){let y=null;const b={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const k=p;y={name:u=>u?k.indexOf(u)!==-1:!1}}else if(p!=null&&typeof p=="object"){const k=p;if(Object.assign(b,k),Array.isArray(k.include)&&k.include.length>0){const u=k.include;y={name:m=>m?u.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const u=k.exclude;y={name:m=>m?u.indexOf(m)===-1:!1}}else y={name:"*"}}if(y&&f){const k=f.emitToChildren(y,"validate",b);Reflect.apply([].push,d,k)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(y=>{let b=[];return y.forEach(k=>{k.pass===!1&&Array.isArray(k.errors)&&(b=[...b,...k.errors])}),b.length>0?{pass:!1,errors:b}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[s];d&&c?.setRule(d)};let f=sn(null,o,s,r);return t.onUnmounted(()=>{c=null,f=null}),{broadcast:f,validateSchema:c}}function ht(){let n=t.getCurrentInstance()?.proxy,a=new fr(n);return n[un]=a,t.onUnmounted(()=>{a?.destroy(),n[un]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const ge=e=>e?`${de(e)}px`:"";function de(e,n=-1){if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(nt){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Ge="PageStateKey";function ze(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function wo(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=de(a.footerHeight??n.footerHeight??-1),e.footerPadding=ze(a.footerPadding??n.footerPadding),e.contentPadding=ze(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=de(c,r):e.height=de(r)-de(s,r)-de(i,r),e.width=de(a.width??n.width??0,l)}}function gr(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(l.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,f=e.get("footerBarHeight")??0;wo(o,r,n,!0,s,i,c,f);const p=t.reactive(o),d=e.getForParent(Ge);d&&(o.height=yn(e,d),o.width=bn(e,d),t.watch([()=>yn(e,d),()=>bn(e,d)],([S,y])=>{p.height=S,p.width=y}));const h=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,y,b=-1,k=-1,u=0,m=0])=>{wo(p,y,n,h,b,k,u,m)}),e.set(Ge,p),p}function pn(e){return e.get(Ge)}function hn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function gn(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=hn(e,n),o=gn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function hi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function gi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function No(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let i=r.length-1;i>=0;i--){const c=r[i];if(No(c,o))return c}const s=e.value;return No(s,o)?s:null}):t.computed(()=>{const r=e.value;return No(r,o)?r:l?.get(n)})}function $e(e){return Ve(e,"readonly",0,function(a){return he(a)})}function Ee(e){return Ve(e,"disabled",0,function(a){return he(a)})}function ve(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const s=t.ref(r);return t.watch(l,i=>{if(typeof a=="function"){const c=a(i);c!==s.value&&(s.value=c,o&&o("setValue",c))}else i!==s.value&&(s.value=i,o&&o("setValue",i))}),s}const yr=new Map,Sn=new Map;let Bo=null;function yi(e){Bo=e}function br(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else yr.set(e,n)}function Ze(e,n,a){!a&&Bo&&(a=Bo(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=yr.get(n)),o}function bi(e,n){for(let a in e){const o=e[a];br(a,o,n)}}function ki(e){Sn.delete(e)}function Si(){return{top:0,left:0,bottom:0,right:0}}function Ci(e=0,n=0){if(nt){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-de(e,o)-de(n,o)};return{rootWidth:a,rootHeight:o,pageLayout:l}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}function wi(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ni{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const s=wi(r.name,a);n.component(s,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=pt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=fn(()=>{const i={...a},c=document.documentElement.clientWidth||document.body.clientWidth,f=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=f,this.initPageLayout(i,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=ot({},Si(),n.safeAreaInset),s=Ci(o,l),i=ot({},s.pageLayout,n.pageLayout);a=a??pt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",i),a.set("rootWidth",s.rootWidth),a.set("rootHeight",s.rootHeight)}setScopeGetter(n){yi(n)}setAPI(n,a,o){br(n,a,o)}getAPI(n,a,o){return Ze(n,a,o)}batchSetAPI(n,a){bi(n,a)}clearScopeAPI(n){ki(n)}getRootDomain(){return pt()}}function G(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Bi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Qa(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",s=e.id||new Date().getTime();l.id=r+s;let i={};ln(n.wrapper)?i=n.wrapper(a,l):i=n.wrapper;const c=t.createApp(i,e),f=n.components;return f&&f.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},kr=(e,n)=>e?t.h(e,n):"";function xe(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},textAlign:{type:[String],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},be={prop:{type:String,required:!1},label:{type:String,required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},Sr={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},Cr={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},wr=[];for(const e in Cr)wr.push(e);const Ai=Symbol.for("InnerPageScopeKey"),Ti={name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},Vi=(e,n)=>({inheritAttrs:!0,props:{...pe,...Sr,...Ti},setup(a,{slots:o}){const l=Co(a.name,a),r=t.inject(Ai,!1);if(l){const p=gr(l,a);xe({getPageContentHeight:()=>yn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>hn(l,p),getPageFooterHeight:()=>gn(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),f=(p,d=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[h,S])=>{if(p&&h){const y=t.toRaw(h),b=t.toRaw(p),k=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{k.includes(m)||(b[m]=[])}),f(b)}if(d&&S){const y=t.toRaw(S),b=t.toRaw(d),k=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{k.includes(m)||(b[m]=[])}),f(b,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);f(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);f(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:$i,create:Ei,scope:cA}=G("page"),Ao=Ei(Vi($i));function To(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Cn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),s=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-s}}const Di=Symbol.for("InnerPageScopeKey"),Nr={headerbar:{},radio:{},checkbox:{}};function Ii(e){Object.assign(Nr,e)}function wn(){return Nr}const xi=(e,n,a,o=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(l,r){const s=je(),i=s?pn(s):null,c=t.inject(Di,!1),f=wn(),p=e,d=t.computed(()=>{const x={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(x[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),x}),h=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),S=l.height!==null&&l.height!==void 0?de(l.height):null,y=t.computed(()=>{const x={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const P=ze(l.padding??i.headerPadding);return Object.assign(x,P),S&&(i.headerHeight=S),i.headerHeight>0&&(x.height=i.headerHeight),x.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,x.safeAreaTop>0&&(x.top=x.safeAreaTop+(P.top??0),x.height&&x.height>0&&(x.height=x.height+x.safeAreaTop)),x}if(S&&(x.height=S),l.padding){const P=ze(l.padding);Object.assign(x,P)}return x}),b=t.ref(null),k=()=>{if(i&&b.value&&!rn(b.value)){if(!o){const x=To(b.value);i.headerAllHeight=x.height}return i.headerMounted=!0,!0}return!1};let u=null;t.onMounted(()=>{i&&(ko(k,50,5,50,!0),window.ResizeObserver&&b.value&&(u=new window.ResizeObserver(()=>{k()}),u.observe(b.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,u&&(u.disconnect(),u=null))});const m=t.computed(()=>{const x={};return y.value.height!==null&&y.value.height!==void 0&&(x.height=`${y.value.height}px`),y.value.top!==null&&y.value.top!==void 0&&(x.paddingTop=`${y.value.top}px`),y.value.left!==null&&y.value.left!==void 0&&(x.paddingLeft=`${y.value.left}px`),y.value.right!==null&&y.value.right!==void 0&&(x.paddingRight=`${y.value.right}px`),y.value.bottom!==null&&y.value.bottom!==void 0&&(x.paddingBottom=`${y.value.bottom}px`),x}),g=t.computed(()=>!(y.value.height!==null&&y.value.height!==void 0&&y.value.height<=0));function C(){r.emit("back")}function A(){r.emit("click-title")}function w(){r.emit("click-right")}function B(){r.emit("click-right-text")}const T=()=>{if(!l.leftShow)return null;const x=[];if(r.slots.left)x.push(r.slots.left());else{if(r.slots.leftIcon){const P=t.h("view",{class:"left-icon",onClick:C},[r.slots.leftIcon()]);x.push(P)}else{const P=l.leftIcon??f.headerbar.Left??a,D=t.h("view",{class:"left-icon",onClick:C},[t.h(P)]);x.push(D)}if(l.leftText){const P=t.h("view",{class:"left-text",onClick:C},[l.leftText]);x.push(P)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__left"},x)},V=()=>{if(!l.rightShow)return null;const x=[];if(r.slots.right)x.push(r.slots.right());else{if(l.rightText){const P=t.h("view",{class:"right-text",onClick:B},[l.rightText]);x.push(P)}if(r.slots.rightIcon){const P=t.h("view",{class:"right-icon",onClick:w},[r.slots.rightIcon()]);x.push(P)}else if(l.rightIcon){const P=t.h("view",{class:"right-icon",onClick:w},[t.h(l.rightIcon)]);x.push(P)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__right"},x)},E=()=>{if(!l.titleShow)return null;const x=[],P=r.slots.default?r.slots.default():null;if(P)x.push(P);else{if(l.title){const D=t.h("view",{class:"title-text"},[l.title]);x.push(D)}if(r.slots.titleIcon){const D=t.h("view",{class:"title-icon",onClick:A},[r.slots.titleIcon()]);x.push(D)}else if(l.titleIcon){const D=t.h("view",{class:"title-icon",onClick:A},[t.h(l.titleIcon)]);x.push(D)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__title"},x)},$=()=>{const x=[],P=r.slots.bottom?r.slots.bottom():null;return P&&x.push(P),x.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},x)};return()=>{if(!g.value)return null;const x=[];if(r.slots.all)x.push(r.slots.all());else{const D=[],I=T();I&&D.push(I);const R=E();R&&D.push(R);const v=V();if(v&&D.push(v),D.length>0){const H=t.h("view",{class:h.value},D);x.push(H)}const W=$();W&&x.push(W)}if(x.length===0)return null;const P={class:d.value,style:m.value,ref:b};return t.h("view",P,x)}}}),{componentName:qi,create:vi,scope:Mi}=G("header-bar"),Vo=vi(xi(qi,Mi,oe.Left,!1)),Pi=Symbol.for("InnerPageScopeKey");function Li(e,n,a=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(o,l){const r=je(),s=r?pn(r):null,i=t.inject(Pi,!1),c=e,f=t.computed(()=>{const k={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(k[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),k}),p=o.height!==null&&o.height!==void 0?de(o.height):null,d=t.computed(()=>{const k={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const u=ze(o.padding??s.footerPadding);return Object.assign(k,u),p&&(s.footerHeight=p),s.footerHeight>0&&(k.height=s.footerHeight),k.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,k.safeAreaBottom>0&&(k.bottom=k.safeAreaBottom+(u.bottom??0),k.height&&k.height>0&&(k.height=k.height+k.safeAreaBottom)),k}if(p&&(k.height=p),o.padding){const u=ze(o.padding);Object.assign(k,u)}return k}),h=t.ref(null),S=()=>{if(s&&h.value&&!rn(h.value)){if(!a){const k=To(h.value);s.footerAllHeight=k.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(ko(S,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{S()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const b=t.computed(()=>{const k={};return d.value.height!==null&&d.value.height!==void 0&&(k.height=ge(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(k.paddingTop=ge(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(k.paddingLeft=ge(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(k.paddingRight=ge(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(k.paddingBottom=ge(d.value.bottom)),k});return()=>{const k=l.slots.default?l.slots.default():[],u={ref:h,class:f.value,style:b.value};return t.h("view",u,k)}}}}const{componentName:zi,create:Fi,scope:Ri}=G("footer-bar"),$o=Fi(Li(zi,Ri,!1));function Oi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?pn(o):null,s=t.computed(()=>{const f={};if(o&&r){if(a.padding){const u=ze(a.padding);Object.assign(r.contentPadding,u)}const p=hn(o,r),d=gn(o,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",p),console.debug("[content]footer height:",d),console.debug("[content]padding:",r.contentPadding),f.height=h;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,f.paddingTop=`${p+S}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||d>0)&&(y=y<0?0:y,f.paddingBottom=`${d+y}px`);const b=(r&&r.contentPadding&&r.contentPadding.left)??-1;b>=0&&(f.paddingLeft=`${b}px`);const k=(r&&r.contentPadding&&r.contentPadding.right)??-1;return k>=0&&(f.paddingRight=`${k}px`),f}if(a.padding){const p=ze(a.padding);p.left&&(f.paddingLeft=`${p.left}px`),p.top&&(f.paddingTop=`${p.top}px`),p.right&&(f.paddingRight=`${p.right}px`),p.bottom&&(f.paddingBottom=`${p.bottom}px`)}return f}),i=t.ref(null),c=ft(()=>{if(r&&i.value){const f=Cn(i.value);r.contentInnerHeight=f.height,r.contentInnerWidth=f.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Ki,create:Ui,scope:dA}=G("content"),Hi=Ui(Oi(Ki));function ji(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const te=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Eo=te(Hi,[["render",ji]]),gt="GroupStateKey",Br=Symbol.for("GroupScopeKey");function Nn(){return t.inject(Br,!1)}function Bn(e=!0){t.provide(Br,e)}function Wi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Xa(l)||(e[o]=l)})}function Yi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Wi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(gt,r),r}function Do(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(gt);if(!c)return;const f=e.get("groupLayout")??{};a===-1&&(a=f.column??1),o===-1&&(o=f.gutter??0),r||(r=f.minItemWidth??-1),s||(s=f.maxItemWidth??-1);const p=de(r),d=de(s);i||(i=f.type??"grid");const h=()=>{const S=n===""||n===-1,y=de(n);let b=me(a);const k=de(o);if(!S){let g=(y-(b-1)*k)/b;for(;d!==-1&&g>d;)b++,g=(y-(b-1)*k)/b;for(;p!==-1&&b>1&&g<p;)b--,g=(y-(b-1)*k)/b}let u=!1;const m=c.layout;m.value.width=n,m.value.column!==b&&(m.value.column=b,u=!0),m.value.gutter!==k&&(m.value.gutter=k,u=!0),m.value.type!==i&&(m.value.type=i,u=!0),u&&t.triggerRef(m)};if(l)h();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&h()},50)}}function An(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.layout}function Tn(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.order}function Ar(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Vn(e,n,a=1,o=0,l){const r={};let s=0;l?s=de(l):s=Ar(n.column,a),s>0&&(r.width=`${s}%`);const i=Ar(n.column,o);i>0&&(r["margin-left"]=`${i}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function $n(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,f=c+(n.column-c);return e.index=e.index+(f-c),{"grid-column":`${c+1} / -1`}}let l=me(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=me(o)%n.column;let s=(e.index+r)%n.column,i=s+l;return i>n.column?(s=0,i=s+l,e.index=e.index+(n.column-s)+l):e.index=e.index+r+l,r>0?{"grid-column":`${s+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const Tr=Symbol("RollingStateKey");function Xi(e){t.provide(Tr,e)}function Qi(){return t.inject(Tr,null)}function Io(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function Gi(e){let n=Io(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=Io(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Zi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Ji={...pe,...Sr,...Cr};function _i(e,n,a){return{props:Ji,emits:["update:collapse","header-click"],setup(o,l){const r=Co(o.name,o,wr),s=Yi(r,{type:o.type}),i=Nn();Bn(!0);const c=o.rollingDisplay?Qi():null,f=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>i&&r?An(r,!0).value:null),h=t.getCurrentInstance(),S=(U,j=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(U,!0,j)};t.watch([()=>o.rules,()=>o.pureDataRules],([U,j],[Q,O])=>{if(U&&Q){const Z=t.toRaw(Q),ne=t.toRaw(U),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne)}if(j&&O){const Z=t.toRaw(O),ne=t.toRaw(j),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne,!0)}},{deep:!0});const y=e,b=t.computed(()=>{const U={};if(U.height=I.value,o.width)o.width!=="auto"&&(U.width=ge(o.width));else{const j=i?Tn(r,!0):null;if(d.value&&j){if(d.value.type==="grid"){const Q=$n(j,d.value,o.span,o.offset);Object.assign(U,Q)}else if(d.value.type==="flow"){const Q=Vn(j,d.value,o.span,o.offset,o.width);Object.assign(U,Q)}}}return U}),k=t.computed(()=>{const U=s.layout.value.type;return U==="grid"||U==="flow"?{[`${y}--${U}`]:!0,[`${y}--${U}-justify-${o.justify}`]:!0,[`${y}--${U}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${U}`]:!0,[`${y}--gutter`]:!0}}),u=t.computed(()=>{if(s.layout.value.type==="grid"){let j="";if(o.columnWidth)j=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Zi(T.value,s.layout.value.column,s.layout.value.gutter);j=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":j}}}),m=t.toRef(o,"gutter"),g=t.toRef(o,"column"),C=t.computed(()=>i||p.value?!0:he(o.isWrap)),A=[],w=U=>{A.push(U)},B=()=>{let U=A.length;A.splice(0,U)},T=t.ref(-1),V=U=>{const j=Cn(U).width;j>0&&j!==T.value&&(T.value=j)};Do(r,T.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([T,g,m],([U,j,Q])=>{s.order.index=0,Do(r,U,j,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>R.value?o.expandText??"":o.collapseText??""),$=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),x=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!R.value,"is-collapse":R.value})),P=t.ref(),D=t.ref(),I=t.computed(()=>v.value||ge(o.height)||""),R=t.ref(!1),v=t.ref(""),W=t.ref(!1);let H=-1;const J=(U,j=!0)=>{const Q=P.value;if(Q&&R.value!==U){if(H=H<=0?Gi(Q):H,W.value=!0,j)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",U||(v.value="",W.value=!1)},U){let O=0;o.collapseHeight?O=o.collapseHeight:D.value&&D.value.classList.contains(`${e}__header`)&&(O=D.value.offsetHeight),v.value=`${H}px`,t.nextTick(()=>{v.value=`${O}px`})}else v.value=`${H}px`;else if(U){let O=0;o.collapseHeight?O=o.collapseHeight:D.value&&D.value.classList.contains(`${e}__header`)&&(O=D.value.offsetHeight),v.value=`${O}px`}else W.value=!1,v.value=`${H}px`;R.value=U,l.emit("update:collapse",U)}};t.watch(()=>o.collapse,U=>{J(U)});const ee=U=>{l.emit("header-click",U)},Y=()=>{M()},M=U=>{U=U??!R.value,J(U)};xe({toggleCollapse:M,doLayout:()=>{A[0]&&(V(A[0]),Do(r,T.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let q=null,F=!0;const L=U=>{if(o.rules){const j=t.toRaw(o.rules);S(j)}if(o.pureDataRules){const j=t.toRaw(o.pureDataRules);S(j,!0)}if(nt&&(U&&J(he(o.collapse),!1),o.autoLayout&&Array.isArray(A)&&A.length>0)){const j=A[0];V(j),window.ResizeObserver&&(q=new window.ResizeObserver(()=>{V(j)}),q.observe(j))}},K=()=>{q?.disconnect(),q=null},X=!p.value||c?.acquire();X&&(f.value=p.value?!0:null),t.onMounted(()=>{if(X&&(L(F),F=!1),p.value&&c){let U=null,j=c.initialHeight;c.observe(P.value,Q=>{if(Q!==f.value)if(Q)f.value=!0,R.value||(v.value=""),U=setTimeout(()=>{U=null,f.value!==!1&&(L(F),F=!1)},100);else{if(U!==null&&clearTimeout(U),f.value=!1,!R.value)if(F)v.value=c.initialHeight;else{let O=Io(P.value);O<=0?v.value=j:(v.value=`${O}px`,j=v.value)}F||K()}})}}),t.onUnmounted(()=>{q?.disconnect(),c&&c.unobserve(P.value)});const _=(U="right")=>{const j=[];if(E.value){const ne={class:$.value},re=t.h("span",ne,[E.value]);j.push(re)}const Q={class:x.value},O=o.collapseIcon??a,Z=t.h(O,Q);return j.push(Z),j.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${U}`]:!0},onClick:Y},j):null},le=(U,j,Q,O)=>{const Z={...k.value};return j===0&&(Z[`${y}__first`]=!0),Q>=O-1&&(Z[`${y}__last`]=!0),t.h("div",{ref:w,key:`${j}`,class:Z,style:u.value},U)};return()=>{if(p.value&&f.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:b.value},[])}s.order.index=0;const U=[];let j=0;if(l.slots.header){const Z={key:`${j++}`,ref:D,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},ne=t.h("div",Z,[l.slots.header()]);U.push(ne)}else{const Z=[],ne=o.collapsePosition==="left";if(ne&&o.showCollapse){const re=_("left");re&&Z.push(re)}if(o.title||l.slots.title){if(o.showMark){const re={class:{[`${y}__header-mark`]:!0}};o.markColor&&(re.style={background:o.markColor});const se=t.h("div",re);Z.push(se)}if(l.slots.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Z.push(re)}else if(o.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Z.push(re)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ne&&o.showCollapse){const re=_("right");re&&Z.push(re)}if(Z.length>0){const re={key:`${j++}`,ref:D,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},se=t.h("div",re,Z);U.push(se)}}B();const Q=l.slots.default?l.slots.default():[],O=s.layout.value.type;if(O==="grid"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else if(O==="flow"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else for(let Z=0;Z<Q.length;Z++){const ne=Q[Z],re=le([ne],j++,Z,Q.length);U.push(re)}if(C.value){const Z=o.tag||"div";return t.h(Z,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:b.value},[U])}else return U}}}}const{componentName:ec,create:tc,scope:nc}=G("group"),xo=tc(_i(ec,nc,oe.RectUp));function oc(e){return e===window}const lc=/matrix\((.+)\)/,Vr=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(oc(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,s=0,i=0,c=0;for(l=n;l!==document;){s+=l.scrollTop,r+=l.scrollLeft;const{transform:f}=window.getComputedStyle(l);if(f){const p=lc.exec(f);if(p){let h=p[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}l=l.parentNode}return a-=r,o-=s,a+=i,o+=c,{x:a,y:o}};class ac{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class rc{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new ac,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const $r=new rc,Er={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:sc,create:ic}=G("price"),cc=ic({props:{...Er},setup(e){const n=t.computed(()=>({[sc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":nn(e.price,e.decimalLength,!0,me(e.digits),e.separator)),l=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),dc=["innerHTML"],uc=["innerHTML"];function fc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,dc)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,uc)):t.createCommentVNode("",!0)],2)}const Je=te(cc,[["render",fc]]),{componentName:qo,create:mc}=G("hint-text"),pc=mc({components:{Price:Je},props:{...Er,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),f=($,x,P,D,I,R)=>{const v=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,H=$.split("-");let J=[];H[0]==="top"?J=["top","bottom","right","left"]:H[0]==="bottom"?J=["bottom","top","right","left"]:H[0]==="left"?J=["left","top","bottom","right"]:H[0]==="right"&&(J=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},Y=[];for(let M=0;M<J.length;M++){const z=J[M];if(Y[0]=z,H[1]&&(Y[1]=H[1]),z==="top"){const q=x.y-R-e.arrowSize-e.offset;if(q>=0){ee.top=q;let F=0;H[1]==="start"?F=x.x:H[1]==="end"?F=x.x+P-I:F=x.x+P/2-I/2;const L=v-F-I;L<0?(F+=L,d.value=-L):d.value=0,ee.left=F<0?0:F;break}}else if(z==="bottom"){const q=x.y+D+e.arrowSize+e.offset;if(q+R<=W){ee.top=q;let F=0;H[1]==="start"?F=x.x:H[1]==="end"?F=x.x+P-I:F=x.x+P/2-I/2;const L=v-F-I;L<0?(F+=L,d.value=-L):d.value=0,ee.left=F<0?0:F;break}}else if(z==="left"){const q=x.x-I-e.arrowSize-e.offset;if(q>=0){ee.left=q;let F=0;H[1]==="start"?F=x.y:H[1]==="end"?F=x.y+D-R:F=x.y+D/2-R/2,ee.top=F<0?0:F;break}}else if(z==="right"){const q=x.x+P+e.arrowSize+e.offset;if(q+I<=v){ee.left=q;let F=0;H[1]==="start"?F=x.y:H[1]==="end"?F=x.y+D-R:F=x.y+D/2-R/2,ee.top=F<0?0:F;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:ee}},p=($,x,P=10)=>{if(!nt||x===!1||!$)return;o.value=Vr(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const D=c.value.offsetHeight,I=c.value.offsetWidth,{bestPlacement:R,bestInsetRect:v}=f(e.placement,o.value,l.value,r.value,I,D);s.value=R,a.value=v,i.value=!0},d=t.ref(0),h=ft(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,$=>{S.value=$});const y=t.computed(()=>S.value&&b.value),b=t.ref(!0),k=ft($=>{const x=$[0];x&&(b.value=x.isIntersecting)},10),u=new IntersectionObserver(k);t.watch([()=>e.message,()=>e.visible],([$,x])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),$r.watch(e.reference,h),u.observe(e.reference)}),t.onBeforeMount(()=>{$r.unwatch(e.reference,h),u.unobserve(e.reference),u.disconnect()});const m=t.computed(()=>{const $={[qo]:!0};return s.value.startsWith("top")?$["is-top"]=!0:s.value.startsWith("right")?$["is-right"]=!0:s.value.startsWith("bottom")?$["is-bottom"]=!0:s.value.startsWith("right")&&($["is-right"]=!0),e.size==="small"?$["is-small"]=!0:e.size==="large"&&($["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&($[`${e.customClass}`]=!0),$}),g=t.computed(()=>{const $={};a.value.top!==null&&($.top=`${a.value.top}px`),a.value.right!==null&&($.right=`${a.value.right}px`),a.value.bottom!==null&&($.bottom=`${a.value.bottom}px`),a.value.left!==null&&($.left=`${a.value.left}px`),e.autoFit&&($["min-width"]=`${l.value}px`);const x=document.documentElement.clientWidth||document.body.clientWidth;return $["max-width"]=`${x}px`,i.value&&($.opacity="1"),e.transition||($.transition="none"),e.zIndex&&($["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign($,e.customStyle),$}),C=t.computed(()=>{const $=[`${qo}__content`];return e.customTextClass&&$.push(e.customTextClass),$}),A=t.computed(()=>{const $={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign($,e.customTextStyle),$}),w=t.computed(()=>({[`${qo}__arrow`]:!0})),B=t.computed(()=>{const $={};return e.showArrow?($.width=`${e.arrowSize}px`,$.height=`${e.arrowSize}px`,s.value==="top"?($.left="50%",$.bottom=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):s.value==="top-start"?($.left=`${e.arrowOffset+d.value}px`,$.bottom=`-${e.arrowSize}px`):s.value==="top-end"?($.right=`${e.arrowOffset-d.value}px`,$.bottom=`-${e.arrowSize}px`):s.value==="right"?($.left=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):s.value==="right-start"?($.left=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):s.value==="right-end"?($.left=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?($.left="50%",$.top=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?($.left=`${e.arrowOffset+d.value}px`,$.top=`-${e.arrowSize}px`):s.value==="bottom-end"?($.right=`${e.arrowOffset-d.value}px`,$.top=`-${e.arrowSize}px`):s.value==="left"?($.right=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):s.value==="left-start"?($.right=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):s.value==="left-end"&&($.right=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`),$):{display:"none"}}),T=t.computed(()=>y.value&&e.closeOnClick),V=t.computed(()=>{const $={};return e.zIndex&&($["z-index"]=`${e.zIndex}`),$});return{show:y,tipRef:c,classes:m,styles:g,textClasses:C,textStyles:A,arrowClasses:w,arrowStyles:B,overlayShow:T,overlayStyle:V,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),hc=["innerHTML"];function gc(e,n,a,o,l,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:n[0]||(n[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,hc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Dr=te(pc,[["render",gc]]);class En{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const vo={},yc=new En,yt=new Map,Dn=e=>{if(e){const n=document.getElementById(e);yt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of yt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}yt.clear()}},bc=e=>{e.unmount=Dn;const n=document.getElementById(e.id);if(n){const a=yt.get(e.id);a?e={...vo,...a,...e}:e={...vo,...e},e.transition=!1;const o=t.createVNode(Dr,e);return t.render(o,n),e.id}},kc=e=>{e.unmount=Dn;let n=e.id??`hinttext_${yc.get()}`;e={...vo,...e},e.id=n,yt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(Dr,e);return t.render(o,a),document.body.appendChild(a),n},Sc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},bt={show(e,n,a={},o=!0){Sc(n);const l=a.id;return l&&yt.has(l)?bc({...a,message:n,reference:e}):(o&&Dn(),kc({...a,message:n,reference:e}))},hide(e){Dn(e)},install(e){e.config.globalProperties.$hintText=bt}};function Cc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...be},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Te({componentName:e,validate:!1},s);const i=je(),c=Nn();Bn(!1);const f=t.computed(()=>c&&i?An(i,!1).value:null),p=e,d=t.ref(null),h=t.computed(()=>{const O={[p]:!0,[`${p}__gutter`]:f.value&&f.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(O[l.errorMarkClass]=!!R.value,O[l.warnMarkClass]=!!D.value,O[l.infoMarkClass]=!!x.value,typeof d.value=="function"){const Z=d.value(s);O[Z]=!0}else if(typeof d.value=="string"){const Z=d.value;O[Z]=!0}return O}),S=t.ref(null),y=t.computed(()=>{const O={};if(l.width)l.width!=="auto"&&(O.width=ge(l.width));else{const Z=c&&i?Tn(i,!1):null;if(f.value&&Z){if(f.value.type==="grid"){const ne=$n(Z,f.value,l.span,l.offset);Object.assign(O,ne)}else if(f.value.type==="flow"){const ne=Vn(Z,f.value,l.span,l.offset,l.width);Object.assign(O,ne)}}}if(typeof S.value=="function"){const Z=S.value(s);Z&&Object.assign(O,Z)}else if(S.value&&typeof S.value=="object"){const Z=S.value;Object.assign(O,Z)}return O}),b=t.ref(null),k=t.computed({get:()=>b.value??he(l.isRequired),set:O=>{b.value=O}}),u=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),g=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),A=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),w=Ve(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),B=t.computed(()=>w&&w.value?{width:ge(w.value)}:{}),T=t.computed(()=>({"label--string":!0,"label--required":k.value})),V=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),$=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});xe({setRequired(O){k.value=O},setErrorTip(O){$.errorTip=O},setErrorIcon(O){$.errorIcon=O},setWarnTip(O){$.warnTip=O},setWarnIcon(O){$.warnIcon=O},setInfoTip(O){$.infoTip=O},setInfoIcon(O){$.infoIcon=O},setCustomClassName(O){d.value=O},setCustomStyle(O){S.value=O}});const x=t.computed(()=>l.infoTip||$.infoTip),P=t.computed(()=>l.infoIcon||$.infoIcon),D=t.computed(()=>l.warnTip||$.warnTip),I=t.computed(()=>l.warnIcon||$.warnIcon),R=t.computed(()=>l.errorTip||$.errorTip),v=t.computed(()=>l.errorIcon||$.errorIcon),W=t.computed(()=>R.value?"error":D.value?"warn":x.value?"info":""),H=()=>W.value.length>0,J=t.computed(()=>W.value==="error"?R.value:W.value==="warn"?D.value:W.value==="info"?x.value:""),ee=t.computed(()=>W.value==="error"?v.value:W.value==="warn"?I.value:W.value==="info"?P.value:null),Y=t.computed(()=>{const O={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?O[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?O[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(O[`${l.infoClass}`]=!0),O}),M=t.computed(()=>{const O={};return m&&m.value==="top"||!u()?O["padding-left"]="0px":w&&w.value&&(O["padding-left"]=ge(w.value)),O}),z=t.ref();let q="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([O,Z,ne,re])=>{z.value&&(O&&!ue(Z)?q?a.show(z.value,Z,{...re,id:q,type:ne},!0):q=a.show(z.value,Z,{...re,type:ne},!0):a.hide(q))});let F=null;const L=()=>{F||!z.value||(F=new IntersectionObserver(O=>{let Z=!1;for(let ne of O)if(ne.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ne);break}Z||r.emit("disappear")}),F.observe(z.value))},K=()=>{!F||!z.value||(F.unobserve(z.value),F=null)};t.watch(()=>he(l.appearListen),O=>{O?L():K()}),t.onMounted(()=>{he(l.appearListen)&&L()}),t.onUnmounted(K);const X=()=>{if(!u())return null;const O=[],Z=r.slots?.label?.()??l.label,ne={class:T.value},re=t.h("div",ne,[Z]);if(O.push(re),r.slots.fixedPreTip){const ye=r.slots.fixedPreTip();O.push(ye)}const se={class:A.value,style:B.value};return t.h("div",se,O)},_=()=>{const O=[];if(r.slots.prepend){const ne=r.slots.prepend();O.push(ne)}if(r.slots.default){const ne=r.slots.default();O.push(ne)}if(r.slots.append){const ne=r.slots.append();O.push(ne)}if(r.slots.fixedTip){const ne={class:[`${p}__fixed-tip`]},re=t.h("div",ne,[r.slots.fixedTip()]);O.push(re)}const Z={ref:z,class:V.value,style:E.value};return t.h("div",Z,O)},le=()=>{const O=ee.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=J.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},j=()=>{if(!H())return null;const O=[],Z=le();Z&&O.push(Z);const ne=U();ne&&O.push(ne);const re={class:Y.value,style:M.value};return t.h("div",re,O)},Q=()=>r.slots?.hide?.()??null;return()=>{const O=[],Z=[],ne=X();ne&&Z.push(ne);const re=_();re&&Z.push(re);const se={class:C.value},ye=t.h("div",se,Z);O.push(ye);const Ce=j();Ce&&O.push(Ce);const Xe=Q();Xe&&O.push(Xe);const za={class:h.value,style:y.value,prop:l.prop};return t.h("div",za,O)}}}}const{componentName:wc,create:Nc,scope:Bc}=G("item"),Be=Nc(Cc(wc,Bc,bt,!1));function Ac(e,n){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),s=je(),i=Nn();Bn(!1);const c=t.computed(()=>{const f={};if(a.width)a.width!=="auto"&&(f.width=ge(a.width));else if(i&&s){const p=An(s,!1),d=Tn(s,!1);if(p.value&&d){if(p.value.type==="grid"){const h=$n(d,p.value,a.span,a.offset);Object.assign(f,h)}else if(p.value.type==="flow"){const h=Vn(d,p.value,a.span,a.offset,a.width);Object.assign(f,h)}}}return f});return()=>{const f=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let h=0;h<d.length;h++){if(h>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});f.push(S)}f.push(d[h])}else Reflect.apply([].push,f,d)}const p={class:r.value,style:c.value};return t.h("div",p,f)}}}}const{componentName:Tc,create:Vc,scope:uA}=G("row-item"),Mo=Vc(Ac(Tc));function $c(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=Nn();Bn(!1);const s=t.computed(()=>r&&l?An(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),f=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const d=r&&l?Tn(l,!1):null;if(s.value&&d){if(s.value.type==="grid"){const h=$n(d,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Vn(d,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:f.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Ec,create:Dc,scope:fA}=G("slot-item"),Po=Dc($c(Ec)),Ir={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Ic(e,n,a,o){return{props:{...pe,...be,...Ir},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=ie.useFoxI18n(n),p=f(l,["placeholder"]),d=t.ref(!1),h=ve(l,"modelValue",null,c),S=e,y=t.computed(()=>({[S]:!0,"is-disabled":s.value,"is-readonly":i.value})),b=Ve(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const I={};return b.value&&(I["text-align"]=b.value),I}),u=I=>{let v=I.target.value;l.type==="digit"&&(v=go(v,!0)),l.type==="number"&&(v=go(v,!1)),l.maxLength&&v.length>Number(l.maxLength)&&(v=v.slice(0,Number(l.maxLength))),h.value=v,c("update:modelValue",v,I),c("change",v,I)};let m=ve(l,"hintText"),g=t.ref(!1);const C=I=>{let v=I.target.value;d.value=!0,ue(m.value)||(g.value=!0),c("focus",v,I)},A=I=>{setTimeout(()=>{g.value&&(g.value=!1),d.value=!1},0);let v=I.target.value;l.maxLength&&v.length>Number(l.maxLength)&&(v=v.slice(0,Number(l.maxLength))),c("blur",v,I)},w=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>{const I={};return r.slots.append&&!T.value&&!P.value&&(I.display="none"),I}),T=t.computed(()=>ke(l.unit)>0),V=t.computed(()=>!P.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!V.value})),$=I=>{h.value="",c("update:modelValue","",I),c("change","",I),c("clear","")},x=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),P=t.computed(()=>{let I=ke(h.value)>0;return he(l.clearable)&&I&&d.value}),D=t.computed(()=>({action:!0,hidden:!P.value}));return()=>{const I={class:y.value,style:k.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:u,onFocus:C,onBlur:A},R=[],v=t.h("input",I);R.push(v);const W=[];if(x.value){const q={class:["action-icon"]},F=t.h(o,q),L={class:D.value,onClick:$},K=t.h("view",L,{default:()=>[F]});W.push(K)}if(T.value){const q=t.h("view",{class:E.value},[l.unit]);W.push(q)}const H={class:w.value,style:B.value},J=t.h("view",H,{default:()=>W});R.push(J);const ee={default:()=>R};ee.label=r.slots.default,ee.prepend=r.slots.prepend,ee.append=r.slots.append,ee.fixedPreTip=r.slots.fixedPreTip,ee.fixedTip=r.slots.fixedTip;const M={...ut(l,Ir),hintText:m.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,M,ee)}}}}const{componentName:xc,create:qc,scope:vc}=G("input-item"),Lo=qc(Ic(xc,vc,Be,oe.CircleClose));function xr(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function qr(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=ja(`${e}`,`${n}`);return xr(o)}else{let o=uo(`${e}`,Wa(`${n}`),20);return xr(o)}}function Mc(e,n=-1,a=!1,o=3,l=","){return nn(e,n,a,o,l)}function vr(e,n,a,o,l=!0){if(e==="")return"";if(e=Ya(e),n=me(n),n==1)return e;if(o)e=qr(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=uo(e,1,me(a)));else{let r=-1*n;e=qr(e,r)}return e}function Mr(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=fo(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=he(n.maxInclude),l=fo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Pr={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Pc(e,n,a,o){return{props:{...pe,...be,...Pr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=t.ref(!1),p=ve(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,J,ee])=>{if(ue(H)){d.value="";return}const Y=vr(H,J,ee,!1);d.value!==Y&&(d.value=Y)},{immediate:!0});const h=t.computed(()=>{let H="";return f.value&&(H=d.value),H}),{t:S}=ie.useFoxI18n(n),y=t.computed(()=>{let H=l.placeholder??"";return!f.value&&!ue(d.value)?H=Mc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?S(["placeholder"]):H,H}),b=e,k=t.computed(()=>({[b]:!0,[`${b}__placeholder`]:d.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),u=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const H={};return u.value&&(H["text-align"]=u.value),H}),g=t.ref(""),C=t.computed(()=>{let H=g.value;return ue(H)&&(H=l.errorTip??""),H}),A=t.ref(""),w=t.ref(!1),B=H=>{let ee=H.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",H),c("change","",H),he(l.showTip)&&w.value&&(w.value=!1);return}if(ee.length>=2){let Y=ee;if(Y.charAt(0)=="-"&&(Y=Y.substring(1)),Y.length>=2&&Y.charAt(0)=="0"&&Y.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!nr(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&or(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&lr(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let Y=Mr(ee,l);if(Y.maxValid===!1){g.value=Y.message,t.triggerRef(d);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(d);return}A.value=ee,he(l.showTip)&&(w.value=ee.length>0),d.value=ee,p.value=vr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},T=H=>{if(f.value=!0,he(l.showTip)){let J=d.value;ue(J)&&(J=l.hintText),ue(J)||(A.value=J,w.value=!0)}g.value="",c("focus",p.value,H)},V=H=>{if(setTimeout(()=>{f.value=!1,he(l.showTip)&&w.value===!0&&(w.value=!1)},0),!ue(d.value)){let J=Mr(d.value,l);if(J.minValid===!1||J.maxValid===!1){g.value=J.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},E=t.computed(()=>({[`${b}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),$=t.computed(()=>{const H={};return r.slots.append&&!x.value&&!v.value&&(H.display="none"),H}),x=t.computed(()=>ke(l.unit)>0),P=t.computed(()=>!v.value),D=t.computed(()=>({[`${b}__unit`]:!0,hidden:!P.value})),I=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},R=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),v=t.computed(()=>{let H=ke(p.value)>0;return he(l.clearable)&&H&&f.value}),W=t.computed(()=>({action:!0,hidden:!v.value}));return()=>{let H={class:k.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:y.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:B,onFocus:T,onBlur:V},J=[],ee=t.h("input",H);J.push(ee);let Y=[];if(R.value){const X={class:["action-icon"]},_=t.h(o,X),le={class:W.value,onClick:I},U=t.h("view",le,{default:()=>[_]});Y.push(U)}if(x.value){const X=t.h("view",{class:D.value},[l.unit]);Y.push(X)}const M={class:E.value,style:$.value},z=t.h("view",M,{default:()=>Y});J.push(z);const q={default:()=>J};q.label=r.slots.default,q.prepend=r.slots.prepend,q.append=r.slots.append,q.fixedPreTip=r.slots.fixedPreTip,q.fixedTip=r.slots.fixedTip;let L={...ut(l,Pr),errorTip:C.value,hintText:A.value,hintVisible:w.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,L,q)}}}}const{componentName:Lc,create:zc,scope:Fc}=G("money-item"),zo=zc(Pc(Lc,Fc,Be,oe.CircleClose)),Fo={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:Rc,create:Oc,scope:Kc}=G("textarea"),Uc=Oc({props:{...Fo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Kc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Rc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=l.value;h.style.height="auto";let S=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:b}=e.autosize;y!==void 0&&(S=Math.min(S,y)),b!==void 0&&(S=Math.max(S,b))}S&&(h.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,S)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,S),n("change",h,S)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const S=h.target;c(S.value,h)},focus:h=>{e.disabled||e.readonly||n("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let y=h.target.value;c(y,h),n("blur",{value:y,event:h})}}}}),Hc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],jc={key:0,class:"fox-textarea__limit"};function Wc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[0]||(n[0]=(...s)=>e.change&&e.change(...s)),onBlur:n[1]||(n[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:n[2]||(n[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Hc),e.limitShow?(t.openBlock(),t.createElementBlock("view",jc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const In=te(Uc,[["render",Wc]]);function Yc(e,n,a,o){return{props:{...pe,...be,...Fo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=ve(l,"modelValue",null,c),p=b=>{f.value=b,c("update:modelValue",b,{}),c("change",b,{})};let d=ve(l,"hintText"),h=t.ref(!1);const S=b=>{ue(d.value)||(h.value=!0),c("focus",f.value,b)},y=b=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",f.value,b)};return()=>{const k={...Se(l,Fo),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":p,onFocus:S,onBlur:y},u=[],m=t.h(o,k);u.push(m);const g={default:()=>u};g.label=r.slots.default,g.prepend=r.slots.prepend,g.append=r.slots.append,g.fixedPreTip=r.slots.fixedPreTip,g.fixedTip=r.slots.fixedTip;const C=Se(l,be,pe);return t.h(a,{...C,prop:`${l.prop}_item`},g)}}}}const{componentName:Xc,create:Qc,scope:Gc}=G("textarea-item"),Ro=Qc(Yc(Xc,Gc,Be,In));function Zc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Zc(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};let Jc=2e3;const Lr=()=>Jc++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:[String,Array],default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},_c=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=Lr());const r=t.computed(()=>{const b=e,k=[b,`${b}--${a.position}`];return a.round&&k.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&k.push(`${b}--${a.position}--safebottom`),typeof a.popClass=="string"?k.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(u=>{k.push(u)}),k}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Lr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},f=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=b=>{o("click-pop",b)},d=b=>{b.stopPropagation(),o("click-close-icon",b),o("update:visible",!1)},h=b=>{o("click-overlay",b),a.closeOnClickOverlay&&o("update:visible",!1)},S=b=>{o("opend",b)},y=b=>{o("closed",b)};return t.watch(()=>a.visible,b=>{a.visible?c():f()}),t.watch(()=>a.closeable,b=>{l.closed=b}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:h,onOpened:S,onClosed:y}}});let vt=0;const zr="fox-overflow-hidden",Fr=()=>nt?document.body:{classList:[]},ed=e=>[()=>{if(e())try{!vt&&Fr().classList.add(zr),vt++}catch{}},()=>{if(e()&&vt)try{vt--,!vt&&Fr().classList.remove(zr)}catch{}}],td={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:nd,create:od}=G("overlay"),ld=od({props:{...td},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=ed(()=>e.lockScroll),l=t.computed(()=>({[nd]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?a():o()}),{classes:l,style:r,onClick:i=>{n("click",i),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function ad(e,n,a,o,l,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const st=te(ld,[["render",ad]]),{componentName:rd,create:sd}=G("popup"),id=sd(_c(rd,{FoxOverLay:st,Close:oe.Close}));function cd(e,n,a,o,l,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:n[1]||(n[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:n[0]||(n[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const fe=te(id,[["render",cd]]),Rr=10;function Or(e,n){return e>n&&e>Rr?"horizontal":n>e&&n>Rr?"vertical":""}function Oo(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Ko(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const f=s.touches[0];e.deltaX=f.clientX-e.startX,e.deltaY=f.clientY-e.startY,e.moveX=f.clientX,e.moveY=f.clientY}else{const c=s;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=Or(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const f=s.touches[0];e.startX=f.clientX,e.startY=f.clientY}else{const c=s;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function _e(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),f=t.ref(0),p=t.ref(""),d=()=>p.value==="vertical",h=()=>p.value==="horizontal",S=()=>{s.value=0,i.value=0,c.value=0,f.value=0,p.value="",a.value=0};return{move:k=>{if(k.touches){const g=k.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const m=k;s.value=m.clientX-e.value,i.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(s.value),f.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=Or(c.value,f.value))},start:k=>{if(S(),k.touches){const g=k.touches[0];e.value=g.clientX,n.value=g.clientY}else{const m=k;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:S,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:f,direction:p,isVertical:d,isHorizontal:h}}const Kr={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:360}},Uo={...Fe,...Kr,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:!0}};let Ur=36;function dd(){return Ur}function ud(e){Ur=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ho(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function fd(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function it(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Hr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let md=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function pd(){const e=t.getCurrentInstance();return new md(e.proxy)}function jr(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=it(e,n),s=it(e,a);return r===s}function hd(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=n[s];let f=a[s].findIndex(p=>{if(r==="text")return Re(e,p)===i;if(r==="value"){let d=it(e,p);return d==null&&(d=Re(e,p)),d===i}else if(r==="item")return jr(e,p,i)});if(f==-1)break;l.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let f=s.findIndex(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let h=it(e,d);return h==null&&(h=Re(e,d)),h===c}else if(r==="item")return jr(e,d,c)});if(f==-1)break;l.push(f);const p=Ho(e,s[f]);if(!Array.isArray(p))break;s=p}}return l}function Wr(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=a[s];let c=n[s];c<0&&c>=i.length&&(c=0);const f=i[c],p=Re(e,f);if(l.texts.push(p),l.items.push(f),r==="text")l.values.push(p);else if(r==="value"){let d=it(e,f);d==null&&(d=p),l.values.push(d)}else l.values.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){let c=n[i];c<0&&c>=s.length&&(c=0);const f=s[c],p=Object.assign({},f);p.children=null;const d=Re(e,f);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let h=it(e,f);h==null&&(h=d),l.values.push(h)}else l.values.push(p);if(!Array.isArray(f.children))break;s=f.children}}return l}function Yr(e){return{text:e,value:e}}const gd=15,yd=300,bd=200,{create:kd}=G("picker-column");function Sd(e){e.stopPropagation()}function Cd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&Sd(e)}const wd=kd({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},visible:{type:Boolean,default:!1},...Kr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),l=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=B=>B>=d.currIndex+8||B<=d.currIndex-8,i=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${d.deg})`,top:`${r.value}px`})),c=B=>`transform: rotate3d(1, 0, 0, ${-d.rotation*B}deg) translate3d(0px, 0px, 104px)`,f=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${d.scrollDistance+r.value}px, 0)`})),p=t.ref(null),d=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=B=>Re(e,B),S=B=>it(e,B),y=_e(),b=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},k=(B,T=!1,V=!1)=>{if(d.currIndex=B,T){const E=()=>{d.moving=!1,n("update:modelValue",B),n("change",B)};V?d.transitionEndTrigger=E:E()}},u=(B,T,V)=>{let E=B+d.startDistance;if(T==="end"){const $=-(e.source.length-1)*e.itemHeight;E<$&&(E=$),E>0&&(E=0);let x=Math.abs(Math.round(-E/e.itemHeight));const P=-x*e.itemHeight,D=`${(x+1)*d.rotation}deg`,I=V?V>0:!1;k(x,!0,I),m(P,T,V,D)}else{let $=(-E/e.itemHeight+1)*d.rotation;const x=(e.source.length+1)*d.rotation,P=0;if($=Math.min(Math.max($,P),x),e.threeDimensional&&($<P||$>x))return;m(E,null,void 0,`${$}deg`)}},m=(B=0,T,V=bd,E)=>{T==="end"?d.scrollTime=V:d.scrollTime=0,d.deg=E,d.scrollDistance=B},g=(B,T)=>(B=Math.abs(B/T)/.003*(B<0?-1:1),B),C=B=>{e.readonly||(d.startDistance=d.scrollDistance,y.start(B),d.transitionEndTrigger=null)},A=B=>{e.readonly||(d.moving=!0,y.move(B),y.isVertical()&&(d.moving=!0,Cd(B,!0)),u(y.deltaY.value,"",0))},w=()=>{if(e.readonly)return;const B=y.deltaY.value,T=y.duration.value;if(T<yd&&Math.abs(B)>gd){const E=g(B,T);u(E,"end",e.swipeDuration)}else u(B,"end",0)};return t.watch(()=>e.modelValue,B=>{const T=d.currIndex-B;if(T!==0){d.currIndex=B,d.startDistance=d.scrollDistance;const V=T*e.itemHeight;u(V,"",0)}}),t.watch(()=>e.source,B=>{if(d.currIndex>=B.length){const E=(B.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,u(E,"end",0)}}),t.watch(()=>e.visible,B=>{B===!1&&b()}),t.onMounted(()=>{const B=-e.modelValue*e.itemHeight;u(B)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:C,onTouchMove:A,onTouchEnd:w,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:f,stopMomentum:b}}}),Nd={key:1,class:"fox-picker__item-tile"};function Bd(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:n[2]||(n[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:n[3]||(n[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:n[4]||(n[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",Nd,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Ad=te(wd,[["render",Bd]]),{create:Td,componentName:Vd,scope:$d}=G("picker"),Ed=Td({components:{Column:Ad,Popup:fe},props:{...Uo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n($d),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(dd());t.watch(()=>e.visible,$=>{$&&s.value<=0&&setTimeout(()=>{if(r.value){const x=qe(r.value);s.value=x.height,ud(s.value)}},50)});const i=t.computed(()=>({[Vd]:!0})),c=pd(),f=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([$,x])=>{if($){let P=await c.load("picker",$,x);if(P.length>0){let D=P[0];if(Array.isArray(D)){if(typeof D[0]=="string"){let I=P,R=[];I.forEach(v=>{let W=v.map(H=>Yr(H));R.push(W)}),p.value=R}else p.value=P;f.value="multipleColumn"}else if(typeof D=="string"){let I=P,R=[],v=I.map(W=>Yr(W));R.push(v),p.value=R,f.value="singleColumn"}else{const I=Ho(e,D);Array.isArray(I)?(f.value="cascade",p.value=[P]):(f.value="singleColumn",p.value=[P])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),h=t.ref(e.modelValue),S=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([$,x])=>{let P=hd(e,$,x,f.value);if(!Me(P,y.value)){y.value=P;let D=Wr(e,P,x,f.value);D&&(d.value=D.texts,n("update:text",d.value))}});const b=t.ref(e.visible);t.watch(()=>e.visible,$=>{b.value=$});const k=$=>{let x=Hr(e,$);return De(x)?x.defaultIndex??0:0},u=$=>{if(e.readonly===!0)return!0;let x=Hr(e,$);return De(x)?x.readonly??!1:!1},m=($,x)=>{let P=y.value;P[$]=x;for(let I=0;I<$;I++)P[I]==null&&(P[I]=k(I));if(f.value==="cascade")for(let I=$+1;I<C.value.length;I++){let R=k(I);I<P.length?P[I]=R:P.push(R)}else for(let I=P.length;I<C.value.length;I++){let R=k(I);P.push(R)}y.value=P;let D=Wr(e,P,p.value,f.value);D&&(d.value=D.texts,h.value=D.values,S.value=D.items)},g=$=>$<y.value.length?y.value[$]:k($),C=t.computed(()=>{if(p.value.length==0)return[];if(f.value=="singleColumn"||f.value=="multipleColumn")return p.value;let $=[],x=0,P=p.value[0],D=0;for(;;){let I=P.map(W=>{let H=Object.assign({},W);return fd(e,H,null),H});$.push(I),x>=y.value.length?D=0:D=y.value[x],(D<0||D>=P.length)&&(D=0);let R=P[D];const v=Ho(e,R);if(!Array.isArray(v))break;P=v,x++}return $}),A=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value),w=($=!1)=>{if(e.readonly===!0){$&&n("update:visible",!1);return}let x=p.value.length-1;for(;x>=0&&!(y.value[x]===null||y.value[x]===void 0);x--);if(x>=0&&m(x,0),f.value==="singleColumn"){let P=h.value.length>0?h.value[0]:"",D=S.value.length>0?S.value[0]:null;n("update:modelValue",P),n("update:text",d.value),n("change",P,D),$&&(n("confirm",P),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",d.value),n("change",h.value,S.value),$&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:C,dataType:f,show:b,itemHeight:s,top:A,isReadonly:u,getIndex:g,change:($,x)=>{if(m($,x),e.isAutoBackFill){const P=!b.value;w(P)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{w(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}f.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),Dd={class:"fox-picker__bar"},Id={class:"fox-picker__title"},xd={class:"fox-picker__bar__action"},qd={class:"fox-picker__column"};function vd(e,n,a,o,l,r){const s=t.resolveComponent("Column"),i=t.resolveComponent("Popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",Dd,[t.createElementVNode("view",Id,t.toDisplayString(e.title),1),t.createElementVNode("view",xd,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:n[1]||(n[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",qd,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(f),"column-index":f,modelValue:e.getIndex(f),"onUpdate:modelValue":p=>e.change(f,p),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["visible","source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const kt=te(Ed,[["render",vd]]);function Md(e,n,a,o,l,r,s=!0){return{props:{...pe,...be,...Uo,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",null,d),k=t.ref([]),u=t.computed(()=>Array.isArray(k.value)?k.value.join(i.separator):k.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const z={};return C.value&&(z["text-align"]=C.value),z}),w=t.ref(!1),B=()=>{w.value=!0},T=z=>{w.value=z},V=z=>{b.value=z,d("update:modelValue",z)},E=(z,q)=>{d("change",z,q)},$=z=>{let F=z.target.value;y.value=!0,d("focus",F,z)},x=z=>{setTimeout(()=>{y.value=!1},0);let F=z.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),d("blur",F,z)},P=z=>{k.value=z,Array.isArray(z)&&z.length===0?d("update:text",z[0]):d("update:text",z)},D=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),v=t.computed(()=>({hidden:!R.value})),W=z=>{b.value="",d("update:modelValue","",z),d("change","",z),d("clear","")},H=t.computed(()=>i.clearable&&!f.value&&!p.value),J=t.computed(()=>ke(b.value)>0&&y.value),ee=z=>{J.value?W(z):B()},Y=t.computed(()=>J.value&&H.value?o:l),M=t.computed(()=>({action:!0}));return()=>{const z={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(z.disabled=!0);const q=[],F=t.h("input",z);q.push(F);const L=[],K={class:["action-icon"]},X=t.h(Y.value,K),_={class:M.value,onClick:ee},le=t.h("view",_,{default:()=>[X]});if(L.push(le),I.value){const se=t.h("view",{class:v.value},[i.unit]);L.push(se)}const U={class:D.value},j=t.h("view",U,{default:()=>L});q.push(j);const Q={default:()=>q};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;const O=Se(i,Uo);O.disabled=!1,O.readonly=f.value||p.value,O.visible=w.value,O["onUpdate:visible"]=T,O.modelValue=b.value,O["onUpdate:modelValue"]=V,O.text=k.value,O["onUpdate:text"]=P,O.onChange=E;const Z=t.h(r,O);Q.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,ne,Q)}}}}const{componentName:Pd,create:Ld,scope:zd}=G("picker-item"),jo=Ld(Md(Pd,zd,Be,oe.CircleClose,oe.ArrowRight,kt,!1)),xn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:s="children"}=a??{},{[l]:i,[r]:c,[s]:f,...p}=o,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:f,_parent:n};return d.children&&d.children.length&&(d.children=xn(d.children,d,a)),d}),Xr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Xr(o.children,n)},Fd={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Rd=(e,n)=>{const a={...Fd,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(f=>{f={...f};const{[l]:p,[r]:d}=f,h=c[d]=c[d]||[];!i.length&&d===o&&(i=h),h.push(f),f.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(f=>{c[f].length>1&&c[f].sort((p,d)=>p[s]-d[s])}),c=null,i},Od={modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1},beforeChange:{type:Function}},Qr=(e,n)=>n[e.textKey],Mt=(e,n)=>n[e.valueKey],Kd=(e,n)=>n[e.visibleKey],Gr=(e,n)=>n[e.disabledKey],Ud=(e,n)=>{const a=n[e.doitKey];return he(a)},Hd=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},Zr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function jd(e,n,a,o=!1){return{props:{...Od},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const Y={};return Y[`${e}`]=!0,Y}),c=t.computed(()=>{const Y={};return Y[`${e}__titles`]=!0,Y[`${l.direction}`]=!0,l.align==="left"&&(Y.left=!0),l.scroll===!0&&(Y.scrollable=!0),l.shape&&(Y[`${l.shape}`]=!0),Y}),f=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const Y=de(l.gutter);return Y<=0?0:Y}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,Y=>{d.value!==Y&&(d.value=Y,v(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const Y={};return b.value||(Y.display="none"),Y}),y=t.ref(),b=t.ref(!1),k=()=>{const Y=!b.value;u(Y)},u=Y=>{const M=Y;M?(b.value=M,setTimeout(()=>{h.value["fox-tabs-bar__popup--show"]=!0,h.value["fox-tabs-bar__popup--hide"]=!1},0)):(h.value["fox-tabs-bar__popup--show"]=!1,h.value["fox-tabs-bar__popup--hide"]=!0,y.value?y.value.addEventListener("transitionend",()=>{b.value=!1},{once:!0}):setTimeout(()=>{b.value=!1},0))},m=t.ref(),g=t.ref([]),C=(Y,M)=>{g.value[M]=Y},A=Y=>M=>{C(M,Y)},w=(Y,M)=>{const z=m.value,q=g.value;if(!z||!q||!q[Y])return;const F=q[Y];let L=0;l.direction==="vertical"?L=F.offsetTop-(z.offsetHeight-F.offsetHeight)/2:L=F.offsetLeft-(z.offsetWidth-F.offsetWidth)/2,B(z,L,M?0:.3,l.direction)},B=(Y,M,z,q)=>{let F=0;const L=q==="horizontal"?Y.scrollLeft:Y.scrollTop,K=z===0?1:Math.round(z*1e3/16);function X(){q==="horizontal"?Y.scrollLeft+=(M-L)/K:Y.scrollTop+=(M-L)/K,++F<K&&Ke(X)}X()},T=(Y,M)=>{const z=Mt(l,Y),q={};return q[`${e}__titles-item`]=!0,q.disabled=Gr(l,Y),q.active=z===d.value,l.shape&&(q[`${l.shape}`]=!0),l.ellipsis&&(q.ellipsis=!0),M&&(M.class&&(q[`${M.class}`]=!0),M.disabled===!0&&(q.disabled=M.disabled)),q},V=(Y,M)=>{const z={};if(p.value>0){const q=Math.abs(p.value/2);l.direction==="vertical"?(z["margin-top"]=`${q}px`,z["margin-bottom"]=`${q}px`):(z["margin-left"]=`${q}px`,z["margin-right"]=`${q}px`)}return M&&M.style&&Object.assign(z,M.style),z},E=(Y,M)=>`${Mt(l,Y)??M}`,$=(Y,M)=>{const z=Mt(l,Y),q={};q[`${e}__popup-item`]=!0,q.disabled=Gr(l,Y),q.active=z===d.value,l.shape&&(q[`${l.shape}`]=!0);const F=Zr(l,Y,M);return F&&F.disabled===!0&&(q.disabled=F.disabled),q},x=t.computed(()=>(l.data??[]).filter(M=>Kd(l,M)!==!1)),P=(Y,M)=>{const z=Mt(l,Y);if(s("click",Y,M),d.value==z)return;const q=()=>{d.value=z,l.scroll&&w(M,!1),s("update:modelValue",z),s("change",Y,M)};if(typeof l.beforeChange=="function"){const F=l.beforeChange(Y,M);dt(F)?F.then(L=>{L!==!1&&q()}).catch(()=>{q()}):F!==!1&&q()}else q()},D=(Y,M)=>function(){P(Y,M)},I=(Y,M)=>{P(Y,M),u(!1)},R=(Y,M)=>function(){I(Y,M)},v=Y=>{if(!Array.isArray(l.data)||!l.scroll)return;const M=l.data.findIndex(z=>Mt(l,z)===d.value);M!==-1&&w(M,Y)};t.watch(()=>l.data,()=>{setTimeout(v,0)}),t.onMounted(()=>{v(!0)});const W=(Y,M)=>{if(r.item)return r.item({item:Y,index:M});const z=Zr(l,Y,M),q=[];if(r.text){const X=r.text({item:Y,index:M});q.push(X)}else{const X=[];if(z?.doit===!0||Ud(l,Y)){const j={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",j);X.push(Q)}const _=z?.num??Hd(l,Y);if(_){let j="";const Q=me(_);Q>=100?j="99+":j=`${Q}`;const O={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",O,[j]);X.push(Z)}const le={class:`${e}__titles-item-text`};X.push(Qr(l,Y));const U=t.h("view",le,X);q.push(U)}const F={class:`${e}__titles-item-line`},L=t.h("view",F);q.push(L);const K={ref:A(M),class:T(Y,z),style:V(Y,z),key:E(Y,M),onClick:D(Y,M)};return t.h("view",K,q)},H=()=>{const Y=r.default?r.default():[];if(Y.length===0)for(let z=0;z<x.value.length;z++){const q=x.value[z],F=W(q,z);Y.push(F)}const M={ref:m,class:c.value,style:f.value};return t.h("view",M,Y)},J=()=>{let Y=null;r.navigation?Y=r.navigation():Y=t.h(a);const M={class:`${e}__navigation`,onClick:k};return t.h("view",M,[Y])},ee=()=>{const Y=[];for(let z=0;z<x.value.length;z++){const q=x.value[z];let F=null;r.popupItem?F=r.popupItem({item:q,index:z}):F=Qr(l,q);const L={class:$(q,z),key:E(q,z),onClick:R(q,z)},K=t.h("view",L,[F]);Y.push(K)}const M={class:h.value,style:S.value};return t.h("view",M,Y)};return()=>{const Y=[],M=H();if(Y.push(M),l.showQuickNavigation){const q=J();Y.push(q);const F=ee();Y.push(F)}const z={class:i.value};return t.h("view",z,Y)}}}}const{create:Wd,componentName:Yd,scope:Xd}=G("tabs-bar"),qn=Wd(jd(Yd,Xd,oe.MoreH,!1)),Jr=Symbol("TabsStatesKey"),Qd={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Gd(e,n,a=!1){return{props:{...Qd},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const s=t.shallowRef([]),i={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:b=>{const k={name:b};i.current.value===b&&(k.loaded=!0),s.value.push(k),t.triggerRef(s)},remove:b=>{const k=s.value.findIndex(u=>u.name===b);k!==-1&&s.value.splice(k,1)},isLoaded:b=>{if(!o.lazy)return!0;const k=s.value.findIndex(u=>u.name===b);return k!==-1?i.current.value?s.value[k].loaded??!1:k===0:!1}};t.provide(Jr,i);const c=b=>{const k=s.value.findIndex(u=>u.name===b);k!==-1&&(s.value[k].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([b,k])=>{i.current.value!==b&&(i.current.value=b??"",c(b??"")),i.direction.value!==k&&(i.direction.value=k)});const f=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const S=t.computed(()=>{const b={},k=s.value.length;if(k<=0)return b;const u=s.value.findIndex(m=>m.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(b.height=`${k*i.tabHeight.value}px`,u!==-1&&(b.transform=`translate(0, -${u*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(b.width=`${k*i.tabWidth.value}px`,u!==-1&&(b.transform=`translate(-${u*i.tabWidth.value}px, 0)`)),h&&(h=!1,b.transition="transform 0s ease"),b});let y=null;return t.onMounted(()=>{if(!f.value)return;const b=()=>{const k=Cn(f.value);i.tabWidth.value=k.width,i.tabHeight.value=k.height};window.ResizeObserver&&(y=new window.ResizeObserver(b),y.observe(f.value)),b()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const b={class:`${e}__panes`,style:S.value,ref:p},k=t.h("view",b,[r?.default?.()]),u={class:d.value,ref:f};return t.h("view",u,[k])}}}}const{create:Zd,componentName:Jd,scope:_d}=G("tabs-container"),vn=Zd(Gd(Jd,_d,!1)),eu={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function tu(e,n,a){return{props:{...eu},setup(o,{emit:l,slots:r}){const s=t.inject(Jr);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const f={};return s.direction.value==="vertical"&&s.tabHeight.value>0?f.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(f.width=`${s.tabWidth.value}px`),f}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let f=[];if(c.value)f=r?.default?.()??[];else if(r.empty)f=r.empty();else{const d={class:`${e}__empty-icon`},h=o.emptyIcon??a,S=t.h(h,d),y={class:`${e}__empty-text`},b=o.emptyText??"Loading",k=t.h("view",y,[b]),u={class:`${e}__empty`},m=t.h("view",u,[S,k]);f.push(m)}const p={class:`${e}`,style:i.value};return t.h("view",p,f)}}}}const{create:nu,componentName:ou,scope:lu}=G("tabs-pane"),Mn=nu(tu(ou,lu,oe.Loading));class _r{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=xn(n,null,this.config)}updateChildren(n,a){a?a.children=xn(n,a,this.config):this.nodes=xn(n,null,this.config)}getNodeByValue(n){let a;return Xr(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:au,scope:ru}=G("cascader-pane"),su=au({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:qn,TabsContainer:vn,TabsPane:Mn},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(ru),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),s=t.ref(e.modelValue),i=t.ref(new _r([],{})),c=t.ref([]),f=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,g)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:g}))),d=new Map;let h;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:m}=e;o.value.convertConfig&&(m=Rd(m,o.value.convertConfig)),i.value=new _r(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),f.value&&!i.value.nodes.length&&await b({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!f.value)},y=async(m=!0)=>{const g=s.value;if(g===void 0||!i.value.nodes.length)return;if(g.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let C=g;if(f.value&&Array.isArray(g)&&g.length){C=[];let A=i.value.nodes.find(w=>w.value===g[0]);if(A){C=[A.value],r.value=!0;const w=await g.slice(1).reduce(async(B,T)=>{const V=await B;await b(V);const E=V?.children?.find($=>$.value===T);return E&&C.push(T),Promise.resolve(E)},Promise.resolve(A));await b(w),r.value=!1}}C.length&&g===e.modelValue&&i.value.getPathNodesByValue(C).map((w,B)=>{l.value=B,u.handleNode(w,m)})},b=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(i.value.isLeaf(m,f.value)||i.value.hasChildren(m,f.value))return;m.loading=!0;const g=m.root?null:m;let C=d.get(m);C||(C=new Promise(w=>{o.value.lazyLoad?.(m,w)}),d.set(m,C));const A=await C;Array.isArray(A)&&A.length>0?i.value.updateChildren(A,g):m.leaf=!0,m.loading=!1,d.delete(m)},k=m=>{const g=m.map(C=>C.value);s.value=g,n("change",g,m),n("pathChange",m),n("update:modelValue",g)},u={async handleNode(m,g){const{disabled:C,loading:A}=m;if(!(!g&&C||!c.value[l.value])){if(i.value.isLeaf(m,f.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!g){const w=c.value.map(B=>B.selectedNode);k(w),n("pathChange",w)}return}if(i.value.hasChildren(m,f.value)){const w=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,w),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=w,!g){const B=c.value.map(T=>T.selectedNode);n("pathChange",B)}return}h=m,!A&&(await b(m),h===m&&(c.value[l.value].selectedNode=m,u.handleNode(m,g)))}},handleTabChange(m,g){h=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,g){return m.selectedNode&&m.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Me(m,s.value)||(s.value=m,y())}),t.watch(()=>e.visible,m=>{m&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...u}}}),iu={class:"fox-cascader"},cu={role:"menu",class:"fox-cascader__pane"},du=["aria-checked","aria-disabled","onClick"],uu={class:"fox-cascader__item__title"},fu=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function mu(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),f=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",iu,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=d=>e.tabsCursor=d),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=d=>e.tabsCursor=d)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(d,h)=>(t.openBlock(),t.createBlock(f,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",cu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.nodes,S=>(t.openBlock(),t.createElementBlock("view",{key:S.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(d,S),disabled:S.disabled}]),"aria-checked":e.isSelected(d,S),"aria-disabled":S.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(S,!1)},[t.createElementVNode("view",uu,t.toDisplayString(S.text),1),S.loading?(t.openBlock(),t.createBlock(i,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,du))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(f,{key:1,"pane-key":0},{default:t.withCtx(()=>[fu]),_:1}))]),_:1},8,["modelValue"])])}const pu=te(su,[["render",mu]]),{create:hu}=G("cascader"),gu=hu({components:{FoxCascaderPane:pu,FoxPopup:fe},props:{...Fe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(s){n("update:visible",s)}}),l=(s,i)=>{a.value=s,o.value=!1,n("change",s,i),n("update:modelValue",s)},r=s=>{n("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==a.value&&(a.value=s)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),yu=["innerHTML"];function bu(e,n,a,o,l,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,yu)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Pn=te(gu,[["render",bu]]);function Pt(e,n){const a=e.textKey??"text";return n[a]??""}function Lt(e,n){const a=e.valueKey??"value";return n[a]}function es(e,n){const a=e.childrenKey??"children";return n[a]}function Ln(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Pt(e,l),s=Lt(e,l);a.texts.push(r),a.values.push(s??"")}return a}function ts(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Pt(e,n[s])===r){const c=Lt(e,n[s])??"",f={[e.textKey]:r,[e.valueKey]:c};l.push(f);const p=es(e,n[s]);Array.isArray(p)&&ts(e,p,a,o+1,l);return}}function ns(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Lt(e,n[s])===r){const c=Pt(e,n[s])??"",f={[e.textKey]:c,[e.valueKey]:r};l.push(f);const p=es(e,n[s]);Array.isArray(p)&&ns(e,p,a,o+1,l);return}}function Wo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=Pt(e,n[o]),r=Pt(e,a[o]);if(l!==r)return!1;const s=Lt(e,n[o]),i=Lt(e,a[o]);if(s!==i)return!1}return!0}let ku=class{proxy;constructor(n){this.proxy=n}async load(n,a){const o="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a);const l=Ze(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(De(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function Su(){const e=t.getCurrentInstance();return new ku(e.proxy)}const os={modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function Cu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...os},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=Su(),k=t.ref([]),u=t.ref([]),m=t.computed(()=>{if(Array.isArray(u.value)){if(i.showAllLevels===!1){const F=u.value.length-1;return u.value[F]}return u.value.join(i.separator)}else return u.value}),g=t.ref([]),C=t.ref([]);t.watch([()=>i.modelValue,()=>k.value],async([F,L])=>{if(d("setValue",F),i.lazy===!0){C.value.length==0&&(g.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let K=F;if(!Wo(i,K,C.value)){C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values}}else if(i.valueType==="text"){let K=F,X=[];if(ts(i,L,K,0,X),!Wo(i,X,C.value)){C.value=X;let _=Ln(i,X);K.value=_.texts,g.value=_.values}}else{let K=[];if(ns(i,L,F,0,K),!Wo(i,K,C.value)){C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([F,L])=>{F&&(k.value=await b.load(F,L))},{immediate:!0});const A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":f.value,"is-readonly":p.value})),B=Ve(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const F={};return B.value&&(F["text-align"]=B.value),F}),V=t.ref(!1),E=()=>{f.value===!0||p.value===!0||(V.value=!0)},$=F=>{V.value=F},x=(F,L)=>{let K=L.map(_=>{if(_==null)return _;let le={..._};return Reflect.deleteProperty(le,"text"),le[i.textKey]=_.text??"",Reflect.deleteProperty(le,"value"),le[i.valueKey]=_.value??"",le});C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values,i.valueType==="text"?(d("change",u.value,K),d("update:modelValue",u.value)):i.valueType==="item"?(d("change",K,K),d("update:modelValue",K)):(d("change",g.value,K),d("update:modelValue",g.value)),d("update:pathNodes",K)},P=F=>{let L=F.map(K=>{if(K==null)return K;let X={...K};return Reflect.deleteProperty(X,"text"),X[i.textKey]=K.text??"",Reflect.deleteProperty(X,"value"),X[i.valueKey]=K.value??"",X});d("pathChange",L)},D=F=>{y.value=!0,d("focus",g.value,F)},I=F=>{setTimeout(()=>{y.value=!1},0),d("blur",g.value,F)},R=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),v=t.computed(()=>ke(i.unit)>0),W=t.computed(()=>ke(i.unit)>0&&!y.value),H=t.computed(()=>({hidden:!W.value})),J=F=>{C.value=[],u.value=[],g.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>i.clearable&&!f.value&&!p.value),Y=t.computed(()=>{let F=g.value&&g.value.length>0;return i.clearable&&F&&y.value}),M=F=>{Y.value?J(F):E()},z=t.computed(()=>Y.value&&ee.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const F={class:w.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:E,onFocus:D,onBlur:I};s&&(F.disabled=!0);const L=[],K=t.h("input",F);L.push(K);const X=[],_={class:["action-icon"]},le=t.h(z.value,_),U={class:q.value,onClick:M},j=t.h("view",U,{default:()=>[le]});if(X.push(j),v.value){const Ce=t.h("view",{class:H.value},[i.unit]);X.push(Ce)}const Q={class:R.value},O=t.h("view",Q,{default:()=>X});L.push(O);const Z={default:()=>L};Z.label=c.slots.default,Z.prepend=c.slots.prepend,Z.append=c.slots.append,Z.fixedPreTip=c.slots.fixedPreTip,Z.fixedTip=c.slots.fixedTip;let ne={};ne.visible=V.value,ne["onUpdate:visible"]=$,ne.modelValue=g.value,ne.onChange=x,ne.onPathChange=P,ne.options=k.value,ne.title=i.title,ne.lazy=i.lazy,ne.lazyLoad=i.lazyLoad,ne.valueKey=i.valueKey,ne.textKey=i.textKey,ne.childrenKey=i.childrenKey,ne.convertConfig=i.convertConfig;const re=t.h(r,ne);Z.hide=()=>[re];const se=ut(i,os);return t.h(a,{...se,prop:`${i.prop}_item`},Z)}}}}const{componentName:wu,create:Nu,scope:Bu}=G("cascader-item"),Yo=Nu(Cu(wu,Bu,Be,oe.CircleClose,oe.ArrowRight,Pn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ls={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",s="second",i="minute",c="hour",f="day",p="week",d="month",h="quarter",S="year",y="date",b="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(P,D,I){var R=String(P);return!R||R.length>=D?P:""+Array(D+1-R.length).join(I)+P},C={s:g,z:function(P){var D=-P.utcOffset(),I=Math.abs(D),R=Math.floor(I/60),v=I%60;return(D<=0?"+":"-")+g(R,2,"0")+":"+g(v,2,"0")},m:function P(D,I){if(D.date()<I.date())return-P(I,D);var R=12*(I.year()-D.year())+(I.month()-D.month()),v=D.clone().add(R,d),W=I-v<0,H=D.clone().add(R+(W?-1:1),d);return+(-(R+(I-v)/(W?v-H:H-v))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:S,w:p,d:f,D:y,h:c,m:i,s,ms:r,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},A="en",w={};w[A]=m;var B=function(P){return P instanceof $},T=function P(D,I,R){var v;if(!D)return A;if(typeof D=="string"){var W=D.toLowerCase();w[W]&&(v=W),I&&(w[W]=I,v=W);var H=D.split("-");if(!v&&H.length>1)return P(H[0])}else{var J=D.name;w[J]=D,v=J}return!R&&v&&(A=v),v||!R&&A},V=function(P,D){if(B(P))return P.clone();var I=typeof D=="object"?D:{};return I.date=P,I.args=arguments,new $(I)},E=C;E.l=T,E.i=B,E.w=function(P,D){return V(P,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var $=function(){function P(I){this.$L=T(I.locale,null,!0),this.parse(I)}var D=P.prototype;return D.parse=function(I){this.$d=function(R){var v=R.date,W=R.utc;if(v===null)return new Date(NaN);if(E.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var H=v.match(k);if(H){var J=H[2]-1||0,ee=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)):new Date(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)}}return new Date(v)}(I),this.$x=I.x||{},this.init()},D.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},D.$utils=function(){return E},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function(I,R){var v=V(I);return this.startOf(R)<=v&&v<=this.endOf(R)},D.isAfter=function(I,R){return V(I)<this.startOf(R)},D.isBefore=function(I,R){return this.endOf(R)<V(I)},D.$g=function(I,R,v){return E.u(I)?this[R]:this.set(v,I)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(I,R){var v=this,W=!!E.u(R)||R,H=E.p(I),J=function(K,X){var _=E.w(v.$u?Date.UTC(v.$y,X,K):new Date(v.$y,X,K),v);return W?_:_.endOf(f)},ee=function(K,X){return E.w(v.toDate()[K].apply(v.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(X)),v)},Y=this.$W,M=this.$M,z=this.$D,q="set"+(this.$u?"UTC":"");switch(H){case S:return W?J(1,0):J(31,11);case d:return W?J(1,M):J(0,M+1);case p:var F=this.$locale().weekStart||0,L=(Y<F?Y+7:Y)-F;return J(W?z-L:z+(6-L),M);case f:case y:return ee(q+"Hours",0);case c:return ee(q+"Minutes",1);case i:return ee(q+"Seconds",2);case s:return ee(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(I){return this.startOf(I,!1)},D.$set=function(I,R){var v,W=E.p(I),H="set"+(this.$u?"UTC":""),J=(v={},v[f]=H+"Date",v[y]=H+"Date",v[d]=H+"Month",v[S]=H+"FullYear",v[c]=H+"Hours",v[i]=H+"Minutes",v[s]=H+"Seconds",v[r]=H+"Milliseconds",v)[W],ee=W===f?this.$D+(R-this.$W):R;if(W===d||W===S){var Y=this.clone().set(y,1);Y.$d[J](ee),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else J&&this.$d[J](ee);return this.init(),this},D.set=function(I,R){return this.clone().$set(I,R)},D.get=function(I){return this[E.p(I)]()},D.add=function(I,R){var v,W=this;I=Number(I);var H=E.p(R),J=function(M){var z=V(W);return E.w(z.date(z.date()+Math.round(M*I)),W)};if(H===d)return this.set(d,this.$M+I);if(H===S)return this.set(S,this.$y+I);if(H===f)return J(1);if(H===p)return J(7);var ee=(v={},v[i]=o,v[c]=l,v[s]=a,v)[H]||1,Y=this.$d.getTime()+I*ee;return E.w(Y,this)},D.subtract=function(I,R){return this.add(-1*I,R)},D.format=function(I){var R=this,v=this.$locale();if(!this.isValid())return v.invalidDate||b;var W=I||"YYYY-MM-DDTHH:mm:ssZ",H=E.z(this),J=this.$H,ee=this.$m,Y=this.$M,M=v.weekdays,z=v.months,q=function(X,_,le,U){return X&&(X[_]||X(R,W))||le[_].slice(0,U)},F=function(X){return E.s(J%12||12,X,"0")},L=v.meridiem||function(X,_,le){var U=X<12?"AM":"PM";return le?U.toLowerCase():U},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Y+1,MM:E.s(Y+1,2,"0"),MMM:q(v.monthsShort,Y,z,3),MMMM:q(z,Y),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:q(v.weekdaysMin,this.$W,M,2),ddd:q(v.weekdaysShort,this.$W,M,3),dddd:M[this.$W],H:String(J),HH:E.s(J,2,"0"),h:F(1),hh:F(2),a:L(J,ee,!0),A:L(J,ee,!1),m:String(ee),mm:E.s(ee,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:H};return W.replace(u,function(X,_){return _||K[X]||H.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(I,R,v){var W,H=E.p(R),J=V(I),ee=(J.utcOffset()-this.utcOffset())*o,Y=this-J,M=E.m(this,J);return M=(W={},W[S]=M/12,W[d]=M,W[h]=M/3,W[p]=(Y-ee)/6048e5,W[f]=(Y-ee)/864e5,W[c]=Y/l,W[i]=Y/o,W[s]=Y/a,W)[H]||Y,v?M:E.a(M)},D.daysInMonth=function(){return this.endOf(d).$D},D.$locale=function(){return w[this.$L]},D.locale=function(I,R){if(!I)return this.$L;var v=this.clone(),W=T(I,R,!0);return W&&(v.$L=W),v},D.clone=function(){return E.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},P}(),x=$.prototype;return V.prototype=x,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",f],["$M",d],["$y",S],["$D",y]].forEach(function(P){x[P[1]]=function(D){return this.$g(D,P[0],P[1])}}),V.extend=function(P,D){return P.$i||(P(D,$,V),P.$i=!0),V},V.locale=T,V.isDayjs=B,V.unix=function(P){return V(1e3*P)},V.en=w[A],V.Ls=w,V.p={},V})})(ls);var Au=ls.exports;const Oe=Ye(Au);var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(b){return(b=+b)+(b>68?1900:2e3)},f=function(b){return function(k){this[b]=+k}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(k){if(!k||k==="Z")return 0;var u=k.match(/([+-]|\d\d)/g),m=60*u[1]+(+u[2]||0);return m===0?0:u[0]==="+"?-m:m}(b)}],d=function(b){var k=i[b];return k&&(k.indexOf?k:k.s.concat(k.f))},h=function(b,k){var u,m=i.meridiem;if(m){for(var g=1;g<=24;g+=1)if(b.indexOf(m(g,0,k))>-1){u=g>12;break}}else u=b===(k?"pm":"PM");return u},S={A:[s,function(b){this.afternoon=h(b,!1)}],a:[s,function(b){this.afternoon=h(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[l,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,f("seconds")],ss:[r,f("seconds")],m:[r,f("minutes")],mm:[r,f("minutes")],H:[r,f("hours")],h:[r,f("hours")],HH:[r,f("hours")],hh:[r,f("hours")],D:[r,f("day")],DD:[l,f("day")],Do:[s,function(b){var k=i.ordinal,u=b.match(/\d+/);if(this.day=u[0],k)for(var m=1;m<=31;m+=1)k(m).replace(/\[|\]/g,"")===b&&(this.day=m)}],M:[r,f("month")],MM:[l,f("month")],MMM:[s,function(b){var k=d("months"),u=(d("monthsShort")||k.map(function(m){return m.slice(0,3)})).indexOf(b)+1;if(u<1)throw new Error;this.month=u%12||u}],MMMM:[s,function(b){var k=d("months").indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,f("year")],YY:[l,function(b){this.year=c(b)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function y(b){var k,u;k=b,u=i&&i.formats;for(var m=(b=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,E,$){var x=$&&$.toUpperCase();return E||u[$]||a[$]||u[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,D,I){return D||I.slice(1)})})).match(o),g=m.length,C=0;C<g;C+=1){var A=m[C],w=S[A],B=w&&w[0],T=w&&w[1];m[C]=T?{regex:B,parser:T}:A.replace(/^\[|\]$/g,"")}return function(V){for(var E={},$=0,x=0;$<g;$+=1){var P=m[$];if(typeof P=="string")x+=P.length;else{var D=P.regex,I=P.parser,R=V.slice(x),v=D.exec(R)[0];I.call(E,v),V=V.replace(v,"")}}return function(W){var H=W.afternoon;if(H!==void 0){var J=W.hours;H?J<12&&(W.hours+=12):J===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(b,k,u){u.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var m=k.prototype,g=m.parse;m.parse=function(C){var A=C.date,w=C.utc,B=C.args;this.$u=w;var T=B[1];if(typeof T=="string"){var V=B[2]===!0,E=B[3]===!0,$=V||E,x=B[2];E&&(x=B[2]),i=this.$locale(),!V&&x&&(i=u.Ls[x]),this.$d=function(R,v,W){try{if(["x","X"].indexOf(v)>-1)return new Date((v==="X"?1e3:1)*R);var H=y(v)(R),J=H.year,ee=H.month,Y=H.day,M=H.hours,z=H.minutes,q=H.seconds,F=H.milliseconds,L=H.zone,K=new Date,X=Y||(J||ee?1:K.getDate()),_=J||K.getFullYear(),le=0;J&&!ee||(le=ee>0?ee-1:K.getMonth());var U=M||0,j=z||0,Q=q||0,O=F||0;return L?new Date(Date.UTC(_,le,X,U,j,Q,O+60*L.offset*1e3)):W?new Date(Date.UTC(_,le,X,U,j,Q,O)):new Date(_,le,X,U,j,Q,O)}catch{return new Date("")}}(A,T,w),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),$&&A!=this.format(T)&&(this.$d=new Date("")),i={}}else if(T instanceof Array)for(var P=T.length,D=1;D<=P;D+=1){B[1]=T[D-1];var I=u.apply(this,B);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}D===P&&(this.$d=new Date(""))}else g.call(this,C)}}})})(as);var Tu=as.exports;const Vu=Ye(Tu);var rs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=r.format;l.en.ordinal=function(i){var c=["th","st","nd","rd"],f=i%100;return"["+i+(c[(f-20)%10]||c[f]||c[0])+"]"},r.format=function(i){var c=this,f=this.$locale();if(!this.isValid())return s.bind(this)(i);var p=this.$utils(),d=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return f.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return f.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(d)}}})})(rs);var $u=rs.exports;const Eu=Ye($u);var ss={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},i=function(d,h,S,y,b){var k=d.name?d:d.$locale(),u=s(k[h]),m=s(k[S]),g=u||m.map(function(A){return A.slice(0,y)});if(!b)return g;var C=k.weekStart;return g.map(function(A,w){return g[(w+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},f=function(d,h){return d.formats[h]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,b,k){return b||k.slice(1)})}(d.formats[h.toUpperCase()])},p=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):i(d,"months")},monthsShort:function(h){return h?h.format("MMM"):i(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return f(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return f(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(d){return i(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return i(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return i(c(),"weekdaysMin","weekdays",2,d)}}})})(ss);var Du=ss.exports;const Iu=Ye(Du);var is={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var f=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(f),d=s(this).endOf(a);if(p.isBefore(d))return 1}var h=s(this).startOf(o).date(f).startOf(a).subtract(1,"millisecond"),S=this.diff(h,a,!0);return S<0?s(this).startOf("week").week():Math.ceil(S)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(is);var xu=is.exports;const qu=Ye(xu);var cs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),s=this.year();return r===1&&l===11?s+1:l===0&&r>=52?s-1:s}}})})(cs);var vu=cs.exports;const Mu=Ye(vu);var ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var s=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})(ds);var Pu=ds.exports;const Lu=Ye(Pu);var us={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(us);var zu=us.exports;const Fu=Ye(zu);var fs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(fs);var Ru=fs.exports;const Ou=Ye(Ru);Oe.extend(Iu),Oe.extend(Eu),Oe.extend(Vu),Oe.extend(qu),Oe.extend(Mu),Oe.extend(Lu),Oe.extend(Fu),Oe.extend(Ou);const ae={format(e,n){return Oe(e).format(n)},parser(e,n){return Oe(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n){e=e||0;let a=n??new Date;const o=e*(1e3*60*60*24);return a=new Date(a.getTime()+o),this.date2Str(a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),s=l.getDate(),i=6-r;return o!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),s=Math.round((l.valueOf()-r.valueOf())/864e5);let i=l.getDay(),c=6-i;return o!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let s=l.getDay();if(o===0){const c=r-s*864e5,f=r+(6-s)*864e5,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(f));return[p,d]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,f=r+(7-s)*i,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(f));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s}},ms=new Date().getFullYear(),Xo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},zn=(e,n,a)=>{let o;if(Ue(n)?o=n:typeof n=="string"&&ke(n)>0?o=ae.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Qo=(e,n,a)=>{Ue(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let Go={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(ms-10,0,1),validator:Ue},maxDate:{type:Date,default:()=>new Date(ms+10,11,31),validator:Ue},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Ku,scope:Uu}=G("date-picker"),Hu=Ku({components:{[kt.name]:kt},props:{...Go},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Uu),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,g){return new Date(m,g,0).getDate()}const s=(m,g)=>{const C=e[`${m}Date`],A=C.getFullYear();let w=1,B=1,T=0,V=0;m==="max"&&(w=12,B=r(g.getFullYear(),g.getMonth()+1),T=23,V=59);const E=V;return g.getFullYear()===A&&(w=C.getMonth()+1,g.getMonth()+1===w&&(B=C.getDate(),g.getDate()===B&&(T=C.getHours(),g.getHours()===T&&(V=C.getMinutes())))),{[`${m}Year`]:A,[`${m}Month`]:w,[`${m}Date`]:B,[`${m}Hour`]:T,[`${m}Minute`]:V,[`${m}Seconds`]:E}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:m,maxDate:g,maxMonth:C,maxHour:A,maxMinute:w,maxSeconds:B}=s("max",h.value),{minYear:T,minDate:V,minMonth:E,minHour:$,minMinute:x,minSeconds:P}=s("min",h.value);let D=[{type:"year",range:[T,m]},{type:"month",range:[E,C]},{type:"day",range:[V,g]},{type:"hour",range:[$,A]},{type:"minute",range:[x,w]},{type:"seconds",range:[P,B]}];switch(e.type){case"date":D=D.slice(0,3);break;case"datetime":D=D.slice(0,5);break;case"time":D=D.slice(3,6);break;case"year-month":D=D.slice(0,2);break;case"month-day":D=D.slice(1,3);break;case"datehour":D=D.slice(0,4);break;case"hour-minute":D=D.slice(3,5);break}return D}),c=(m,g,C)=>{if(!(g>m))return null;const A=[];for(;m<=g;)e.isShowChinese?A.push({text:m+o[C],value:m}):A.push({text:`${m}`,value:m}),C==="minute"?m+=e.minuteStep:m++;return A},f=t.computed(()=>{let m=[];return i.value.forEach(g=>{let C=c(g.range[0],g.range[1],g.type);C&&m.push(C)}),m}),p=(m,g)=>m==="year"?g.getFullYear():m==="month"?g.getMonth()+1:m==="day"?g.getDate():m==="hour"?g.getHours():m==="minute"?g.getMinutes():m==="seconds"?g.getSeconds():0,d=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,m=>{let g;if(typeof m=="string"?m.length==0?g=new Date:e.valueFormat?g=zn(e,e.modelValue,e.valueFormat):g=zn(e,m,Xo[e.type]):Ue(m)?g=m:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let C=[];i.value.forEach(A=>{let w=p(A.type,g);C.push(w)}),d.value=C}},{immediate:!0});const S=m=>{if(e.type==="date"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1));A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A)}else if(e.type==="datetime"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1)),w=m[3],B=m[4];A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A,w,B)}else if(e.type==="time"){const g=m[0],C=m[1],A=m[2],w=h.value??new Date,B=new Date(w.getFullYear(),w.getMonth(),w.getDate(),g,C,A);h.value=B}else if(e.type==="year-month"){const g=m[0],C=m[1]-1;h.value=new Date(g,C)}else if(e.type==="month-day"){const C=(h.value??new Date).getFullYear(),A=m[0]-1,w=Math.min(m[1],r(C,A+1));w!==m[1]&&(m[1]=w);const B=new Date(C,A,w);h.value=B}else if(e.type==="datehour"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1)),w=m[3];A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A,w)}else if(e.type==="hour-minute"){const g=m[0],C=m[1],A=h.value??new Date,w=new Date(A.getFullYear(),A.getMonth(),A.getDate(),g,C);h.value=w}d.value=m};return{columns:f,dateIndexs:d,show:l,onChange:m=>{S(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{S(m),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let C=Qo(e,g,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function ju(e,n,a,o,l,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const Fn=te(Hu,[["render",ju]]),Wu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Yu(e){let n=e.format;if(!n){let a=e.type??"date";n=Xo[a]}return n}function Xu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...Go,...Wu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",M=>M==null?null:typeof M=="string"?M.length==0?null:i.valueFormat?zn(i,M,i.valueFormat)??M:zn(i,M,Xo[i.type])??M:Ue(M)?M:null,d),u=t.computed(()=>{if(!k.value)return"";const M=Yu(i);return Qo(i,k.value,M)}),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const M={};return C.value&&(M["text-align"]=C.value),M}),w=t.ref(!1),B=()=>{w.value=!0},T=()=>{w.value=!1};c.expose({showPicker:B,hidePicker:T});const V=M=>{w.value=M},E=M=>{if(k.value=M,i.valueFormat){let z=Qo(i,M,i.valueFormat);d("update:modelValue",z,{}),d("change",z,{})}else d("update:modelValue",M,{}),d("change",M,{})},$=M=>{let q=M.target.value;y.value=!0,d("focus",q,M)},x=M=>{setTimeout(()=>{y.value=!1},0);let q=M.target.value;i.maxLength&&q.length>Number(i.maxLength)&&(q=q.slice(0,Number(i.maxLength))),d("blur",q,M)},P=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),I=t.computed(()=>ke(i.unit)>0&&!y.value),R=t.computed(()=>({hidden:!I.value})),v=M=>{k.value="",d("update:modelValue","",M),d("change","",M),d("clear",""),T()},W=t.computed(()=>i.clearable&&!f.value&&!p.value),H=t.computed(()=>{let M=ke(k.value)>0;return i.clearable&&M&&y.value}),J=M=>{H.value?v(M):B()},ee=t.computed(()=>H.value&&W.value?o:l),Y=t.computed(()=>({action:!0}));return()=>{const M={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(M.disabled=!0);const z=[],q=t.h("input",M);z.push(q);const F=[],L={class:["action-icon"]},K=t.h(ee.value,L),X={class:Y.value,onClick:J},_=t.h("view",X,{default:()=>[K]});if(F.push(_),D.value){const se=t.h("view",{class:R.value},[i.unit]);F.push(se)}const le={class:P.value},U=t.h("view",le,{default:()=>F});z.push(U);const j={default:()=>z};j.label=c.slots.default,j.prepend=c.slots.prepend,j.append=c.slots.append,j.fixedPreTip=c.slots.fixedPreTip,j.fixedTip=c.slots.fixedTip;const Q=Se(i,Go);Q.valueFormat=null,Q.disabled=!1,Q.readonly=f.value||p.value,Q.visible=w.value,Q["onUpdate:visible"]=V,Q.modelValue=k.value,Q["onUpdate:modelValue"]=E,Q.onClear=v;const O={};if(c.slots.top){const se=c.slots.top();O.top=()=>se}if(c.slots.bottom){const se=c.slots.bottom();O.default=()=>se}const Z=t.h(r,Q,O);j.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,{...ne,prop:`${i.prop}_item`},j)}}}}const{create:Qu,componentName:Gu,scope:Zu}=G("date-item"),Zo=Qu(Xu(Gu,Zu,Be,oe.CircleClose,oe.Date,Fn,!1)),Ju=39,_u=64,{create:ef,scope:tf}=G("calendar-pane"),nf=ef({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=ie.useFoxI18n(tf),r=o(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(l("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),f=t.ref(null),p=t.ref(null),d=t.ref(null),h=t.ref(0),S=t.computed(()=>u.monthsData.slice(u.defaultRange[0],u.defaultRange[1])),y=t.computed(()=>a.btn),b=t.computed(()=>a["top-info"]),k=t.computed(()=>a["bottom-info"]),u=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),m=L=>L.split("-"),g=L=>ae.isEqual(u.currDate[0],L),C=L=>ae.isEqual(u.currDate[1],L),A=L=>u.currDate?.length>0?u.currDate?.some(K=>ae.isEqual(K,L)):!1,w=(L,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ae.getNumTwoBit(+L.day),B=(L,K)=>{const X=w(L,K),{type:_}=e;return L.type=="curr"?ae.isEqual(u.currDate,X)||(_=="range"||_=="week")&&(g(X)||C(X))||_=="multiple"&&A(X)?`${u.dayPrefix}--active`:u.propStartDate&&ae.compareDate(X,u.propStartDate)||u.propEndDate&&ae.compareDate(u.propEndDate,X)?`${u.dayPrefix}--disabled`:(_=="range"||_=="week")&&Array.isArray(u.currDate)&&Object.values(u.currDate).length==2&&ae.compareDate(u.currDate[0],X)&&ae.compareDate(X,u.currDate[1])?`${u.dayPrefix}--choose`:null:`${u.dayPrefix}--disabled`},T=()=>{const{type:L}=e;if(L=="range"&&u.chooseData.length==2||L!="range"){let K=u.chooseData.slice(0);L=="week"&&(K={weekDate:[E(u.chooseData[0]),E(u.chooseData[1])]}),n("choose",K),e.poppable&&n("update")}},V=(L,K,X=!1)=>{if(B(L,K)!=`${u.dayPrefix}--disabled`){const{type:_}=e;let[le,U]=K.curData,j=[...K.curData];if(j[2]=ae.getNumTwoBit(Number(L.day)),j[3]=`${j[0]}-${j[1]}-${j[2]}`,j[4]=ae.getWhatDay(+j[0],+j[1],+j[2]),_=="multiple")if(u.currDate?.length>0){let Q;u.currDate?.forEach((O,Z)=>{O==j[3]&&(Q=Z)}),X?u.chooseData.push([...j]):Q!==void 0?(u.currDate.splice(Q,1),u.chooseData.splice(Q,1)):(u.currDate.push(j[3]),u.chooseData.push([...j]))}else u.currDate=[j[3]],u.chooseData=[[...j]];else if(_=="range"){let Q=Object.values(u.currDate).length;Q==2||Q==0?u.currDate=[j[3]]:ae.compareDate(u.currDate[0],j[3])?Array.isArray(u.currDate)&&u.currDate.push(j[3]):Array.isArray(u.currDate)&&u.currDate.unshift(j[3]),u.chooseData.length==2||!u.chooseData.length?u.chooseData=[[...j]]:ae.compareDate(u.chooseData[0][3],j[3])?u.chooseData=[...u.chooseData,[...j]]:u.chooseData=[[...j],...u.chooseData]}else if(_=="week"){let Q=ae.getWeekDate(le,U,L.day,e.firstDayOfWeek);u.propStartDate&&ae.compareDate(Q[0],u.propStartDate)&&Q.splice(0,1,u.propStartDate),u.propEndDate&&ae.compareDate(u.propEndDate,Q[1])&&Q.splice(1,1,u.propEndDate),u.currDate=Q,u.chooseData=[ae.formatResultDate(Q[0]),ae.formatResultDate(Q[1])]}else u.currDate=j[3],u.chooseData=[...j];if(!X){let Q=u.chooseData;_=="week"&&(Q={weekDate:[E(u.chooseData[0]),E(u.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&T()}}},E=L=>{let[K,X,_]=L;return{date:L,monthWeekNum:ae.getMonthWeek(K,X,_,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(K,X,_,e.firstDayOfWeek)}},$=L=>{const K=L=="prev"?u.monthsData[0]:u.monthsData[u.monthsData.length-1];let X=parseInt(K.curData[0]),_=parseInt(K.curData[1].toString().replace(/^0/,""));switch(L){case"prev":_==1&&(X-=1),_=_==1?12:--_;break;case"next":_==12&&(X+=1),_=_==12?1:++_;break}return[X+"",ae.getNumTwoBit(_),ae.getMonthDays(String(X),String(_))+""]},x=(L,K,X)=>{let{year:_,month:le}=X;return K=="prev"&&L>=7&&(L-=7),Array.from(Array(L),(U,j)=>({day:String(j+1),type:K,year:_,month:le}))},P=(L,K,X,_)=>{L=L-e.firstDayOfWeek;let{year:le,month:U}=X;return K=="prev"&&L>=7&&(L-=7),Array.from(Array(_),(Q,O)=>({day:String(O+1),type:K,year:le,month:U})).slice(_-L)},D=(L,K)=>{const X=ae.getMonthPreDay(+L[0],+L[1]);let _=Number(L[1])-1,le=Number(L[0]);_<=0&&(_=12,le+=1);const U=ae.getMonthDays(String(L[0]),String(L[1])),j=ae.getMonthDays(le+"",_+""),Q={year:L[0],month:L[1]},O={curData:L,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...P(X,"prev",{month:String(_),year:String(le)},j),...x(U,"curr",Q)],cssHeight:0,cssScrollHeight:0},Z=O.monthData.length>35?6:5;O.cssHeight=Ju+_u*Z;let ne=0;u.monthsData.length>0&&(ne=u.monthsData[u.monthsData.length-1].cssScrollHeight+u.monthsData[u.monthsData.length-1].cssHeight),O.cssScrollHeight=ne,K=="next"?(!u.endData||!ae.compareDate(`${u.endData[0]}-${u.endData[1]}-${ae.getMonthDays(u.endData[0],u.endData[1])}`,`${L[0]}-${L[1]}-${L[2]}`))&&u.monthsData.push(O):!u.startData||!ae.compareDate(`${L[0]}-${L[1]}-${L[2]}`,`${u.startData[0]}-${u.startData[1]}-01`)?u.monthsData.unshift(O):u.unLoadPrev=!0},I=()=>{let L=e.startDate?e.startDate:ae.getDay(0),K=e.endDate?e.endDate:ae.getDay(365);u.propStartDate=L,u.propEndDate=K,u.startData=m(L),u.endData=m(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(u.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const X={year:Number(u.startData[0]),month:Number(u.startData[1])},_={year:Number(u.endData[0]),month:Number(u.endData[1])};let le=_.month-X.month;_.year-X.year>0&&(le=le+12*(_.year-X.year)),le<=0&&(le=1),D(u.startData,"next");let U=1;do D($("next"),"next");while(U++<le);if(u.monthsNum=le,e.type=="range"&&Array.isArray(u.currDate))u.currDate.length>0&&(L&&ae.compareDate(u.currDate[0],L)&&u.currDate.splice(0,1,L),K&&ae.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...m(u.currDate[0]),...m(u.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let j=[],Q={};u.currDate.forEach(O=>{L&&!ae.compareDate(O,L)&&K&&!ae.compareDate(K,O)&&(Object.hasOwnProperty.call(Q,O)||(j.push(O),Q[O]=O))}),u.currDate=[...j],u.defaultData=[...m(j[0])]}}else if(e.type=="week"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let[j,Q,O]=m(u.currDate[0]),Z=ae.getWeekDate(j,Q,O,e.firstDayOfWeek);u.currDate=Z,L&&ae.compareDate(u.currDate[0],L)&&u.currDate.splice(0,1,L),K&&ae.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...m(u.currDate[0]),...m(u.currDate[1])]}}else u.currDate&&(L&&ae.compareDate(u.currDate,L)?u.currDate=L:K&&!ae.compareDate(u.currDate,K)&&(u.currDate=K),u.defaultData=[...m(u.currDate)])};xe({scrollToDate:L=>{ae.compareDate(L,u.propStartDate)?L=u.propStartDate:ae.compareDate(L,u.propEndDate)||(L=u.propEndDate);let K=m(L);u.monthsData.forEach((X,_)=>{if(X.title==l("monthTitle",{year:K[0],month:K[1]})&&c.value){let le=u.monthsData[_].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let U=0,j=setInterval(()=>{if(U++,c.value){let Q=le/10;c.value.scrollTop=c.value.scrollTop+Q}U>=10&&(clearInterval(j),c.value&&(c.value.scrollTop=u.monthsData[_].cssScrollHeight))},40)}else c.value.scrollTop=u.monthsData[_].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)},doLayout:()=>{let L=0,K=0;u.defaultData.length>0&&u.monthsData.forEach((le,U)=>{le.title==l("monthTitle",{year:u.defaultData[0],month:u.defaultData[1]})&&(L=U),(e.type=="range"||e.type=="week")&&le.title==l("monthTitle",{year:u.defaultData[3],month:u.defaultData[4]})&&(K=U)}),H(u.monthsNum,L),u.currentIndex=L,u.yearMonthTitle=u.monthsData[u.currentIndex].title,u.defaultData.length>0&&(u.isRange?(V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0),V({day:u.defaultData[5],type:"curr"},u.monthsData[K],!0)):e.type=="week"?V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0):e.type=="multiple"?[...u.currDate].forEach(le=>{let U=m(le),j=u.currentIndex;u.monthsData.forEach((Q,O)=>{Q.title==l("monthTitle",{year:U[0],month:U[1]})&&(j=O)}),V({day:U[2],type:"curr"},u.monthsData[j],!0)}):V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0));let X=u.monthsData[u.monthsData.length-1],_=X.cssHeight+X.cssScrollHeight;Qe(()=>{c?.value&&f?.value&&d?.value&&(h.value=c.value.clientHeight,f.value.style.height=`${_}px`,c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)}),u.avgHeight=Math.floor(_/(u.monthsNum+1))}});const H=(L,K)=>{L>=3?K>0&&K<L?u.defaultRange=[K-1,K+3]:K==0?u.defaultRange=[K,K+4]:K==L&&(u.defaultRange=[K-2,K+2]):u.defaultRange=[0,L+2];let X=u.monthsData[u.defaultRange[0]].cssScrollHeight;u.translateY=X},J=(L,K)=>(e.type=="range"||e.type=="week")&&L.type=="curr"&&B(L,K)=="fox-calendar__day--active",ee=(L,K)=>J(L,K)&&g(w(L,K)),Y=(L,K)=>u.currDate.length>=2&&C(w(L,K))?J(L,K):!1,M=()=>{if(u.currDate.length>=2)return ae.isEqual(u.currDate[0],u.currDate[1])},z=L=>{const K=`${L.year}-${L.month}-${Number(L.day)<10?"0"+L.day:L.day}`;return ae.isEqual(K,ae.date2Str(new Date))},q=L=>{if(u.monthsData.length<=1)return;const K=L.target.scrollTop;let X=Math.floor(K/u.avgHeight);if(X==0)K>=u.monthsData[X+1].cssScrollHeight&&(X+=1);else if(X>0&&X<u.monthsNum-1)K>=u.monthsData[X+1].cssScrollHeight&&(X+=1),K<u.monthsData[X].cssScrollHeight&&(X-=1);else{const _=Math.round(K+h.value);_<u.monthsData[X].cssScrollHeight+u.monthsData[X].cssHeight&&K>u.monthsData[X-1].cssScrollHeight&&(X-=1),X+1<=u.monthsNum&&_>=u.monthsData[X+1].cssScrollHeight+u.monthsData[X+1].cssHeight&&(X+=1),X>=1&&K<u.monthsData[X-1].cssScrollHeight&&(X-=1)}u.currentIndex!==X&&(u.currentIndex=X,H(u.monthsNum,X)),u.yearMonthTitle=u.monthsData[X].title},F=()=>{u.chooseData.splice(0),u.monthsData.splice(0),I()};return I(),t.watch(()=>e.defaultValue,L=>{L&&e.poppable&&F()}),{weeks:i,compConthsData:S,showTopBtn:y,topInfo:b,bottomInfo:k,rangeTip:M,mothsViewScroll:q,getClass:B,isStartTip:ee,isEndTip:Y,chooseDay:V,isCurrDay:z,confirm:T,months:c,...t.toRefs(u),...t.toRefs(e),...r,monthsPanel:f,weeksPanel:p,viewArea:d}}}),of={class:"fox-calendar__header"},lf={key:0,class:"fox-calendar__header-title"},af={key:1,class:"fox-calendar__header-slot"},rf={key:2,class:"fox-calendar__header-subtitle"},sf={class:"fox-calendar__weekdays",ref:"weeksPanel"},cf={class:"fox-calendar__panel",ref:"monthsPanel"},df={class:"fox-calendar__month-title"},uf={class:"fox-calendar__days"},ff=["onClick"],mf={class:"fox-calendar__day-value"},pf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},hf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},gf={key:2,class:"fox-calendar__day-tips--curr"},yf={key:4,class:"fox-calendar__day-tip"},bf={key:0,class:"fox-calendar__footer"};function kf(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",of,[e.showTitle?(t.openBlock(),t.createElementBlock("view",lf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",af,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",rf,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",sf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",cf,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",df,t.toDisplayString(s.title),1),t.createElementVNode("view",uf,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",mf,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",pf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",hf,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",gf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",yf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,ff))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",bf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const ps=te(nf,[["render",kf]]),Sf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Rn={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:Cf}=G("calendar"),wf=Cf({components:{[ps.name]:ps,[fe.name]:fe},props:{...Rn},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),s=t.computed(()=>a["bottom-info"]),i=t.ref(null),c=b=>{i.value?.scrollToDate(b)},f=()=>{i.value?.initPosition()};t.watch(()=>e.visible,b=>{b&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),xe({scrollToDate:c,initPosition:f});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:b=>{n("select",b)},choose:b=>{d(),n("choose",b)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Nf(e,n,a,o,l,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const On=te(wf,[["render",Nf]]),hs={modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},Jo=(e,n)=>{let a;return Ue(e)?a=e:typeof e=="string"&&ke(e)>0?a=ae.parser(e,n):a=new Date,a},St=(e,n,a)=>(Ue(n)||(n=new Date),ae.format(n,a)),Ct=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Bf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...pe,...be,...Rn,...hs},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=t.computed(()=>i.type==="range"),k=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),u=()=>{k.startDate!==null&&(k.startDate=null,k.endDate=null,k.startArray=[],k.endArray=[])},m=(q,F="one",L="YYYY-MM-DD")=>{if(Sf(q)){u();return}if(b.value&&Array.isArray(q)&&q.length==2){let K,X;typeof q[0]=="string"?(K=Jo(q[0],L),X=Jo(q[1],L)):(K=q[0],X=q[1]);let _=Ct(K),le=Ct(X);(k.startDate===null||k.startDate.getTime()!==K.getTime()||k.endDate?.getTime()!==X.getTime())&&(k.startDate=K,k.startArray=_,k.endDate=X,k.endArray=le)}else{let K;typeof q=="string"?K=Jo(q,L):K=q;let X=Ct(K);(k.startDate===null||k.startDate.getTime()!==K.getTime())&&(k.startDate=K,k.startArray=X)}};m(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,q=>{m(q,i.type,i.valueFormat),d("setValue",q)});const g=t.computed(()=>{if(k.startDate===null)return"";if(b.value){let q=St(i,k.startDate,i.format),F=St(i,k.endDate,i.format);return`${q} ${i.rangeSeparator} ${F}`}else{let q=St(i,k.startDate,i.format);return i.showWeek&&(q=`${q} ${k.startArray[4]}`),q}}),C=t.computed(()=>{if(k.startDate===null)return null;if(b.value){let q=ae.date2Str(k.startDate),F=ae.date2Str(k.endDate??new Date);return[q,F]}else return ae.date2Str(k.startDate)}),A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":f.value,"is-readonly":p.value})),B=Ve(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const q={};return B.value&&(q["text-align"]=B.value),q}),V=t.ref(!1),E=()=>{p.value||f.value||(V.value=!0)},$=q=>{V.value=q},x=q=>{if(q){if(b.value&&Array.isArray(q)){let F=q[0],L=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(L,K-1,X),le=q[1];L=me(le[0]),K=me(le[1]),X=me(le[2]);let U=new Date(L,K-1,X);if(k.startDate=_,k.startArray=Ct(_),k.endDate=U,k.endArray=Ct(U),i.valueFormat){let j=St(i,_,i.valueFormat),Q=St(i,U,i.valueFormat);d("update:modelValue",[j,Q],{})}else d("update:modelValue",[_,U],{})}else{let F=q,L=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(L,K-1,X);if(k.startDate=_,k.startArray=Ct(_),i.valueFormat){let le=St(i,_,i.valueFormat);d("update:modelValue",le,{})}else d("update:modelValue",_,{})}d("change",q,{})}},P=q=>{let L=q.target.value;y.value=!0,d("focus",L,q)},D=q=>{setTimeout(()=>{y.value=!1},0);let L=q.target.value;i.maxLength&&L.length>Number(i.maxLength)&&(L=L.slice(0,Number(i.maxLength))),d("blur",L,q)},I=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),R=t.computed(()=>ke(i.unit)>0),v=t.computed(()=>ke(i.unit)>0&&!y.value),W=t.computed(()=>({hidden:!v.value})),H=q=>{u(),d("update:modelValue",null,q),d("change","",q),d("clear","")},J=t.computed(()=>i.clearable&&!f.value&&!p.value),ee=t.computed(()=>{let q=ke(g.value)>0;return i.clearable&&q&&y.value}),Y=q=>{ee.value?H(q):E()},M=t.computed(()=>ee.value&&J.value?l:r),z=t.computed(()=>({action:!0}));return()=>{const q={class:w.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:E,onFocus:P,onBlur:D};s&&(q.disabled=!0);const F=[],L=t.h("input",q);F.push(L);const K=[],X={class:["action-icon"]},_=t.h(M.value,X),le={class:z.value,onClick:Y},U=t.h("view",le,{default:()=>[_]});if(K.push(U),R.value){const Ce=t.h("view",{class:W.value},[i.unit]);K.push(Ce)}const j={class:I.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Rn);Z.visible=V.value,Z["onUpdate:visible"]=$,Z["default-value"]=C.value,Z.onChoose=x;const ne={};if(c.slots.btn){const Ce=c.slots.btn();ne.btn=()=>Ce}c.slots.day&&(ne.day=c.slots.day),c.slots.topInfo&&(ne.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ne.bottomInfo=c.slots.bottomInfo);const re=t.h(a,Z,ne);O.hide=()=>[re];const se=ut(i,Rn,hs);return t.h(o,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:Af,create:Tf,scope:Vf}=G("calendar-item"),_o=Tf(Bf(Af,Vf,On,Be,{CloseIcon:oe.CircleClose,MarkIcon:oe.Date},!1)),$f={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function Ef(e,{CheckNormal:n,Checked:a}){return{props:{...$f},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=wn(),c=t.computed(()=>s.label.value===o.label),f=t.computed(()=>s.position),p=()=>{const b=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const k=de(o.iconSize),u=o.checkedIcon??i.radio.Checked??a;return b.push("fox-radio__icon"),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h(u,{width:k,height:k,class:b})}}else{if(r.icon)return r.icon();{const k=de(o.iconSize),u=o.icon??i.radio.CheckNormal??n;return b.push("fox-radio__icon--unchecked"),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h(u,{width:k,height:k,class:b})}}},d=()=>{const b=[`${e}__label`];return o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h("view",{class:b},r.default?.())},h=()=>{const b=[`${e}__button`];return c.value&&b.push(`${e}__button--active`),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h("view",{class:b},r.default?.())},S=()=>{c.value||o.disabled||o.readonly||s.updateValue(o.label)},y=f.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${y?`${e}--reverse`:""}`,onClick:S},[o.shape=="button"?h():y?[d(),p()]:[p(),d()]])}}}const{componentName:Df,create:If}=G("radio"),Kn=If(Ef(Df,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:gs,create:xf}=G("radio-group"),Un=xf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=ht(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${gs} ${gs}--${e.direction}`,style:l},n.default?.())}}});function ys(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Hn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(zt(e,r)===a)return l}return-1}function Hn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function qf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function vf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Mf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Pf(){const e=t.getCurrentInstance();return new Mf(e.proxy)}function Lf(e){return{text:e,value:e}}const bs={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},zf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Ff={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Object],default:""}};function Rf(e,n,a,o,l){return{props:{...pe,...be,...bs,...zf,...Ff},emits:["change","update:modelValue","setValue"],setup(r,s){const i=$e(t.computed(()=>r.readonly)),c=Ee(t.computed(()=>r.disabled)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),d=Pf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,m])=>{if(u){const g=await d.load("radio",u,m);if(g.length>0)if(typeof g[0]=="string"){const w=g.map(B=>Lf(B));h.value=w}else h.value=g;else h.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([u,m])=>{S.value=ys(r,m,u,r.valueType),p("setValue",u)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const u=h.value[S.value];return zt(r,u)}),b=u=>{let m=null,g=null;if(h.value.length>0){let C=ys(r,h.value,u,"value");S.value=C,C>=0&&(g=h.value[C],r.valueType==="text"?m=Hn(r,g):r.valueType==="item"?m=g:m=zt(r,g))}else m=u;p("update:modelValue",m),p("change",m,g)},k=()=>{let u=null,m=null;if(h.value.length>0&&S.value!==-1){let g=h.value[S.value];r.valueType==="text"?u=Hn(r,g):r.valueType==="item"?u=g:u=zt(r,g)}p("update:modelValue",u),p("change",u,m)};if(xe({clear(){S.value!==-1&&(S.value=-1,k())}}),r.source){const u=()=>{const m=[],g=Se(r,bs);return h.value.forEach((C,A)=>{const w=zt(r,C),B=qf(r,C);let T={...g,label:w,disabled:B};const V=vf(r,C,A);T={...T,...V},c.value&&(T.disabled=!0),i.value&&(T.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const x=s.slots.text(C);E.default=()=>[x]}else{const x=Hn(r,C);E.default=()=>x}let $=t.h(l,T,E);m.push($)}),m};return()=>{const m=u(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>m}),A={default:()=>C};A.label=s.slots.default,A.prepend=s.slots.prepend,A.append=s.slots.append,A.fixedPreTip=s.slots.fixedPreTip,A.fixedTip=s.slots.fixedTip;const w=Se(r,be,pe);return t.h(a,{...w,prop:`${r.prop}_item`},A)}}else return()=>{const u=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"update:modelValue":b},{default:()=>u})}}}}const{componentName:Of,create:Kf,scope:Uf}=G("radio-item"),el=Kf(Rf(Of,Uf,Be,Un,Kn)),Hf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(l,{slots:r}){const{emitEvent:s}=ht(),i=wn(),c=t.inject("parent",null),f=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,g=>{f.partialSelect=g});const p=t.computed(()=>!!c),d=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),h=t.computed(()=>p.value?c.position:l.textPosition);let S="";const y=(g,C)=>{S="click",s("update:modelValue",g),s("change",g,C)};t.watch(()=>l.modelValue,g=>{S=="click"?S="":s("change",g)});const b=()=>{const g=[];if(f.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const C=de(l.iconSize),A=l.indeterminateIcon??i.checkbox.Indeterminate??o;return g.push("fox-checkbox__icon--indeterminate"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}else if(d.value){if(r.checkedIcon)return r.checkedIcon();{const C=de(l.iconSize),A=l.checkedIcon??i.checkbox.Checked??a;return g.push("fox-checkbox__icon"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}else{if(r.icon)return r.icon();{const C=de(l.iconSize),A=l.icon??i.checkbox.CheckNormal??n;return g.push("fox-checkbox__icon--unchecked"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}},k=()=>{const g=[`${e}__label`];return l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},u=()=>{const g=[`${e}__button`];return d.value&&g.push(`${e}__button--active`),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},m=g=>{if(!(l.disabled||l.readonly)){if(d.value&&f.partialSelect){f.partialSelect=!1,y(d.value,r.default?.()[0].children);return}if(y(!d.value,r.default?.()[0].children),p.value){const C=c.value.value,A=c.max.value,{label:w}=l,B=C.indexOf(w);B>-1?C.splice(B,1):B<=-1&&(C.length<A||!A)&&C.push(w),c.updateValue(C)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${h.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?u():[b(),k()]])}}),{componentName:jf,create:Wf}=G("checkbox"),jn=Wf(Hf(jf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Yf,componentName:ks}=G("checkbox-group"),Wn=Yf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=ht(),o=t.reactive({children:[]}),l=f=>{f.proxy&&o.children.push(f.proxy)},r=f=>{f.proxy&&(o.children=o.children.filter(p=>p!==f.proxy))},s=f=>{a("update:modelValue",f),a("change",f)},i=f=>{const p=[];f&&o.children.forEach(d=>{d?.disabled||p.push(d?.label)}),a("update:modelValue",p)},c=()=>{const f=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",f)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:l,unlink:r}),t.watch(()=>e.modelValue,f=>{a("change",f)}),xe({toggleAll:i,toggleReverse:c}),()=>{const f={};return e.textAlign&&(f["text-align"]=e.textAlign),t.h("view",{class:`${ks} ${ks}--${e.direction}`,style:f},n.default?.())}}});function Ss(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(tl(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Yn(e,r)===a)return l}return-1}function tl(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Yn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Xf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Qf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Gf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Zf(){const e=t.getCurrentInstance();return new Gf(e.proxy)}function Jf(e){return{text:e,value:e}}const _f={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},Cs={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},em={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}};function tm(e,n,a,o,l){return{props:{...pe,...be,..._f,...Cs,...em},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ee(t.computed(()=>r.disabled)),c=$e(t.computed(()=>r.readonly)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),d=Zf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,m])=>{if(u){const g=await d.load("checkbox",u,m);if(g.length>0)if(typeof g[0]=="string"){const w=g.map(B=>Jf(B));h.value=w}else h.value=g;else h.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([u,m])=>{const g=[];Array.isArray(u)&&u.forEach(C=>{let A=Ss(r,m,C,r.valueType);A!==-1&&g.push(A)}),!Me(g,S.value)&&(S.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let u=[];return S.value.forEach(m=>{let g=h.value[m];u.push(Yn(r,g))}),u}),b=u=>{let m=[],g=[];if(h.value.length>0){const C=[];Array.isArray(u)&&u.forEach(A=>{let w=Ss(r,h.value,A,"value");w!==-1&&C.push(w);const B=h.value[w];g.push(B),r.valueType==="text"?m.push(tl(r,B)):r.valueType==="item"?m.push(B):m.push(Yn(r,B))}),S.value=C}else m=u;p("update:modelValue",m),p("change",m,g)},k=t.ref();if(xe({toggleAll:u=>{k.value.toggleAll(u)},toggleReverse:()=>{k.value.toggleReverse()}}),r.source){const u=()=>{const m=[],g=Se(r,Cs);return h.value.forEach((C,A)=>{const w=Yn(r,C),B=Xf(r,C);let T={...g,label:w,disabled:B};const V=Qf(r,C,A);T={...T,...V},i.value&&(T.disabled=!0),c.value&&(T.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(E.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const x=s.slots.text(C);E.default=()=>[x]}else{const x=tl(r,C);E.default=()=>x}let $=t.h(l,T,E);m.push($)}),m};return()=>{const m=u(),g={class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>m}),A={default:()=>C};A.label=s.slots.default,A.prepend=s.slots.prepend,A.append=s.slots.append,A.fixedPreTip=s.slots.fixedPreTip,A.fixedTip=s.slots.fixedTip;const w=Se(r,be,pe);return t.h(a,{...w,prop:`${r.prop}_item`},A)}}else return()=>{const u=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":b},{default:()=>u})}}}}const{componentName:nm,create:om,scope:lm}=G("checkbox-item"),nl=om(tm(nm,lm,Be,Wn,jn)),ol={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:am,create:rm}=G("switch"),sm=rm({components:{Loading1:oe.Loading1},props:{...ol},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=am;return{[i]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":n("change",i)}),{classes:o,style:l,isActive:a,onClick:s}}}),im={class:"fox-switch-button"};function cm(e,n,a,o,l,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",im,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Xn=te(sm,[["render",cm]]);function dm(e,n,a,o){return{props:{...pe,...be,...ol},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,ol),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":d},y=[],b=t.h(o,S);y.push(b);const k={default:()=>y};k.label=r.slots.default,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const u=Se(l,be,pe);return u["content-class"]=f,t.h(a,{...u,prop:`${l.prop}_item`},k)}}}}const{componentName:um,create:fm,scope:mm}=G("switch-item"),ll=fm(dm(um,mm,Be,Xn));function pm(e,n,a,o){return{props:{...pe,...be,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur","change"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=ie.useFoxI18n(n),p=f(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,x=>{d.value=x,c("change",x)});const h=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(d.value),"is-disabled":s.value,"is-readonly":i.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),k=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),u=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),A=()=>{c("focus",d.value)},w=()=>{c("blur",d.value)},B=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),T=t.computed(()=>ke(l.unit)>0),V=x=>{s.value==!0||i.value==!0||c("click")},E=t.computed(()=>l.icon??a),$=t.computed(()=>({action:!0}));return()=>{const x=[];if(typeof r.slots.content=="function"){const M=r.slots.content();x.push(M)}else{const M=[];if(k.value){const F={tabIndex:0,class:S.value,style:b.value,onFocus:A,onBlur:w};let L=null;r.slots.main?L=t.h("view",F,[r.slots.main(u.value)]):L=t.h("view",F,[u.value]),M.push(L)}if(m.value){const F={tabIndex:0,class:g.value,style:C.value,onFocus:A,onBlur:w};let L=null;r.slots.sub?L=t.h("view",F,[r.slots.sub(l.desc)]):L=t.h("view",F,[l.desc]),M.push(L)}const z={class:h.value,onClick:V},q=t.h("view",z,M);x.push(q)}const P=[],D=de(l.iconSize);let I=r.slots.icon;if(!I){const M={width:D,height:D,class:["action-icon"]};I=t.h(E.value,M)}const R={class:$.value,onClick:V},v=t.h("view",R,{default:()=>[I]});if(P.push(v),T.value){const M=t.h("view",{},[l.unit]);P.push(M)}const W={class:B.value},H=t.h("view",W,{default:()=>P});x.push(H);const J={default:()=>x};J.label=r.slots.default,J.prepend=r.slots.prepend,J.append=r.slots.append,J.fixedPreTip=r.slots.fixedPreTip,J.fixedTip=r.slots.fixedTip;const ee=Se(l,be,pe);return t.h(o,{...ee,prop:`${l.prop}_item`},J)}}}}const{componentName:hm,create:gm,scope:ym}=G("link-item"),al=gm(pm(hm,ym,oe.ArrowRight,Be)),rl={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:bm,componentName:km}=G("rate"),Sm=bm({props:{...rl},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[km]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},s=(S,y)=>{if(e.disabled||e.readonly)return;let b=0;y===1&&e.modelValue===y||(b=y,e.allowHalf&&S==2&&(b-=.5)),r(b)},i=(S,y,b)=>{let k=0;for(let u=y.value.length-1;u>=0;u--){const m=y.value[u];if(S>m.offsetLeft){b?k=u+(S>m.offsetLeft+m.clientWidth/2?1:.5):k=u+1;break}}return k},c=_e(),f={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...f,onClick:s,toPxDesc:ge,renderIcon:(S,y)=>t.h(S,y),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),Cm=["id"],wm={class:"fox-rate-item__icon--full"},Nm={key:0,class:"fox-rate-item__icon--half"},Bm={key:1,class:"fox-rate-item__icon--half"};function Am(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",wm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Nm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Bm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Cm))),128))],34)}const wt=te(Sm,[["render",Am]]);function Tm(e,n,a,o){return{props:{...pe,...be,...rl},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,rl),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d},y=[],b=t.h(o,S);y.push(b);const k={default:()=>y};if(r.slots.default){const g=r.slots.default();k.label=()=>g}const u=Se(l,be,pe);return u["content-class"]=f,t.h(a,u,k)}}}}const{componentName:Vm,create:$m,scope:Em}=G("rate-item"),sl=$m(Tm(Vm,Em,Be,wt)),Dm=/scroll|auto|overlay/i,ws=window;function Im(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function il(e,n=ws){let a=e;for(;a&&a!==n&&Im(a);){const{overflowY:o}=window.getComputedStyle(a);if(Dm.test(o))return a;a=a.parentNode}return n}function Ns(e,n=ws){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=il(e.value,n))}),a}const Bs=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,xm={modelValue:{type:[Boolean],default:!1},hasMore:{type:[Boolean],default:!0},threshold:{type:[Number],default:200},loadText:{type:[String]},loadMoreText:{type:[String]},useCapture:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1}};function qm(e,n,a){return{props:{...xm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),f=Ns(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),h=m=>m?m.offsetTop+h(m.offsetParent):0,S=()=>{let m=0,g=0,C="down";if(f.value==window){const A=Bs();c.value&&(m=h(c.value)+c.value.offsetHeight-A-window.innerHeight),g=A}else{const{scrollHeight:A,clientHeight:w,scrollTop:B}=f.value;m=A-w-B,g=B}return p.beforeScrollTop>g?C="up":C="down",p.beforeScrollTop=g,l("scroll-change",g),m<=o.threshold&&C=="down"},y=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},b=()=>{f.value&&f.value.addEventListener("scroll",y,o.useCapture)},k=()=>{f.value&&f.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{b(),o.immediate&&y()}),t.onUnmounted(()=>{k()});const u=t.ref(!1);return t.onActivated(()=>{u.value&&(u.value=!1,b())}),t.onDeactivated(()=>{u.value=!0,k()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},g=t.h("view",m,[r?.default?.()]),C=[];if(p.isInfiniting){let T=r?.loading?.()??null;if(!T){let $=r?.loadingIcon?.()??null;if(!$){const D={class:["fox-infinite__bottom-box__img"]};$=t.h(a,D)}const x={class:"fox-infinite__bottom-box__text"},P=t.h("view",x,[i.loadText.value]);T=[$,P]}const V={class:"fox-infinite__bottom-box"},E=t.h("view",V,T);C.push(E)}else if(!o.hasMore){let T=r?.finished?.()??null;if(!T){const V={class:"fox-infinite__bottom-tips"};T=t.h("view",V,[i.loadMoreText.value]),C.push(T)}}const A={class:"fox-infinite__bottom"},w=t.h("view",A,C),B={class:d.value,ref:c};return t.h("view",B,[g,w])}}}}const{componentName:vm,create:Mm,scope:Pm}=G("infinite-loading"),Qn=Mm(qm(vm,Pm,oe.Loading)),{componentName:Lm,create:zm}=G("button"),Fm=zm({components:{Loading:oe.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:n,slots:a}){const{type:o,size:l,shape:r,disabled:s,loading:i,color:c,plain:f,block:p}=t.toRefs(e),d=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Lm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:f.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),S=t.computed(()=>{const y={};return c?.value&&(f.value?(y.color=c.value,y.background="#fff",c.value?.includes("gradient")||(y.borderColor=c.value)):(y.color="#fff",y.background=c.value)),y});return{handleClick:d,classes:h,getStyle:S}}}),Rm={class:"fox-button__wrap"};function Om(e,n,a,o,l,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Rm,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Le=te(Fm,[["render",Om]]),Km={modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},Um=(e,n,a)=>({props:{...Km},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=ht(),{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),f=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=V=>{let $=V.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),r("update:modelValue",$,V),r("change",$,V)},h=t.ref({}),S=V=>{let $=V.target.value;c.active=!0,h.value=o.focusStyle,r("focus",$,V)},y=V=>{setTimeout(()=>{c.active=!1},0);let $=V.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),h.value={},r("blur",$,V)},b=V=>{r("update:modelValue","",V),r("change","",V),r("clear","")},k=t.computed(()=>String(o.modelValue).length>0),u=t.computed(()=>{const V={};return k.value||(V.display="none"),V}),m=V=>{o.autoblur&&B.value?.blur(),(typeof V.cancelable!="boolean"||V.cancelable)&&V.preventDefault(),r("search",o.modelValue)},g=V=>{r("keyup-input",V)},C=V=>{r("click-input",V)},A=V=>{r("click-left-icon",o.modelValue,V)},w=t.computed(()=>({textAlign:o.inputAlign})),B=t.ref(null);t.onMounted(()=>{o.autofocus&&B.value.focus()});const T=()=>{const V=[];if(l.leftin){const R={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:A},v=t.h("view",R,[l.leftin()]);V.push(v)}const E={class:`${e}__input-inner-input`,ref:B,style:w.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:d,onFocus:S,onBlur:y,onkeyup:g},$=t.h("input",E),x={class:[`${e}__input-inner`],action:"#",onSubmit:m},P=t.h("form",x,[$]);V.push(P);const D=[];if(o.clearable){const R={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:u.value,onClick:b},v=l?.clear?.()??o.clearIcon??a,W=t.h("view",R,[t.h(v)]);D.push(W)}if(l.rightin){const R={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},v=t.h("view",R,[l.rightin()]);D.push(v)}if(D.length>0){const R={class:`${e}__input-inner-right`},v=t.h("view",R,D);V.push(v)}const I={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",I,V)};return()=>{const V=[];if(o.label){const x={class:`${e}__search-label`},P=t.h("span",x,[o.label]);V.push(P)}if(l.leftout){const x={class:[`${e}__search-icon`,`${e}__left-search-icon`]},P=t.h("view",x,[l.leftout()]);V.push(P)}const E=T();if(V.push(E),l.rightout){const x={class:[`${e}__search-icon`,`${e}__right-search-icon`]},P=t.h("view",x,[l.rightout()]);V.push(P)}const $={class:`${e}`,style:f.value};return t.h("view",$,V)}}}),{componentName:Hm,create:jm,scope:Wm}=G("searchbar"),Gn=jm(Um(Hm,Wm,oe.CircleClose)),Zn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Ym(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Jn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Ts(e,r)===a)return l}return-1}function Jn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function As(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ts(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Xm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Qm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Gm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let f=a;typeof i=="function"&&(f=f.filter(i));let p=(o-1)*l,d=p+l;d>f.length&&(d=f.length);const h=f.slice(p,d);return{totalSize:f.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Ze(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(De(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Zm(){const e=t.getCurrentInstance();return new Gm(e.proxy)}function Jm(e,n,a,o,l,r,s,i,c,f,p){return{props:{...Zn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:h}){const{emitEvent:S}=ht(),{toLocaleRefs:y}=ie.useFoxI18n(n),b=y(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),k=Zm(),u=t.ref([]),m=t.ref(0),g=t.ref(""),C=t.shallowRef(null),A=t.computed(()=>{const U={};return d.params&&Object.assign(U,d.params),ue(g.value)||(U[`${d.searchKey}`]=g.value),C.value&&Object.assign(U,C.value),U});let w=!0;const B=async(U,j,Q)=>{try{if(V.value===!1)return;let O=null;ue(g.value)||(O=ne=>{const re=Jn(d,ne);if(typeof re=="string"&&re.includes(g.value))return!0;const se=As(d,ne);return!!(typeof se=="string"&&se.includes(g.value))});const Z=await k.load("actionsheet",U,j,Q,A.value,w,O??void 0);w=!1,Array.isArray(Z)?(u.value=Z,m.value=1,V.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),V.value=!1):(Reflect.apply([].push,u.value,Z.page),m.value=Math.ceil(u.value.length/d.pageSize),(Z.totalSize&&u.value.length>=Z.totalSize||Q<Z.page.length)&&(V.value=!1)),T.value=!1}catch(O){console.error("[FoxUI] ActionSheet load more data fail",O),V.value=!0,m.value=0,u.value=[]}setTimeout(()=>{S("loaded-data")},250)},T=t.ref(!1),V=t.ref(!0),E=async()=>{if(!d.source){T.value=!1;return}await B(d.source,m.value+1,d.pageSize)};let $=null;t.watch(g,(U,j)=>{$&&(clearTimeout($),$=null),ue(U)&&!ue(j)&&($=setTimeout(()=>{P()},d.searchDelayTriggerClear))});const x=()=>{V.value=!0,m.value=0,u.value=[],d.source&&E()},P=()=>{x()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([U,j,Q])=>{d.source&&x()},{immediate:!0});const D=t.computed(()=>!d.multiple&&d.isAutoBackFill),I=t.ref([]);let R=null;const v=t.ref(d.visible);t.watch(()=>d.visible,U=>{v.value!==U&&(v.value=U),U?R=[...I.value]:R=null});const W=(U,j)=>{const Q=[];return Array.isArray(U)||(U=[U]),U.forEach(O=>{let Z=Ym(d,j,O,d.valueType);Z!==-1&&Q.push(Z)}),Me(Q,I.value)?!1:(I.value=Q,!0)};t.watch([()=>d.modelValue,()=>u.value],([U,j],[Q,O])=>{if(W(U,j)){const ne=H();J(ne)}},{deep:!0});const H=()=>{const U=[],j=[],Q=[];for(let re of I.value){const se=u.value[re];j.push(se);const ye=Jn(d,se);if(Q.push(ye),d.valueType==="item")U.push(se);else if(d.valueType==="text")U.push(ye);else{const Ce=Ts(d,se);U.push(Ce)}}let O=null,Z=null,ne=null;return d.multiple?(O=U,Z=Q,ne=j):(O=U[0]??null,Z=Q[0]??null,ne=j[0]??null),{value:O,text:Z,item:ne}},J=U=>{S("update:modelValue",U.value),S("update:text",U.text),S("change",U.value,U.item,U.text)},ee=()=>{R&&(I.value=R)},Y=U=>{const j=I.value.indexOf(U);d.multiple?j===-1?I.value.push(U):I.value.splice(j,1):j===-1?I.value=[U]:I.value=[],(D.value||!d.poppable&&!d.showFooter)&&q()},M=U=>{v.value=U,S("update:visible",U)},z=()=>{const U=()=>{ee(),M(!1)},j=d.beforeMethod??d.beforeClose;if(typeof j=="function"){const Q=j("close");dt(Q)?Q.then(O=>{O!==!1&&U()}).catch(()=>{U()}):Q!==!1&&U()}else U()},q=()=>{const U=H(),j=()=>{J(U),M(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const O=Q("confirm",U.value,U.item,U.text);dt(O)?O.then(Z=>{Z!==!1&&j()}).catch(()=>{j()}):O!==!1&&j()}else j()},F=()=>{let U=b.title.value??"";h.title&&(U=h.title());const j=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:z});return t.h("view",{class:["fox-actionsheet__header"]},[j,Q])},L=()=>{let U=null;if(h.search)U=h.search();else{const j={onSearch:x,placeholder:b.seachPlaceholder.value,disabled:d.disabled,modelValue:g.value,"onUpdate:modelValue":Q=>{g.value=Q}};U=t.h(r,j,{leftin:()=>t.h(f)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},K=(U,j,Q,O,Z)=>{if(h.optionLabel)return h.optionLabel({text:U,checked:j,disabled:Q,subText:O,item:Z});const ne=[],re=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(ne.push(re),O){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[O]);ne.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ne)},X=(U,j,Q,O)=>{if(h.optionIcon)return h.optionIcon({checked:U,disabled:j,iconSize:Q,item:O});if(U){if(h.checkedIcon)return h.checkedIcon({disabled:j,item:O});{const Z=d.checkedIcon??i;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:j,item:O});{const Z=d.icon??s;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},_=()=>{const U=[];for(let j=0;j<u.value.length;j++){const Q=u.value[j],O=Jn(d,Q),Z=As(d,Q),ne=["fox-actionsheet__list-item"],re={};let se=Xm(d,Q),ye=d.iconSize?de(d.iconSize):null;const Ce=Qm(d,Q,j);Ce&&(se=se||Ce.disabled,Ce.class&&ne.push(Ce.class),Ce.style&&Object.assign(re,Ce.style)),se=!!(d.disabled||se);const Xe=I.value.includes(j);se&&ne.push("is-disabled"),Xe&&ne.push("is-checked");const za={class:ne,style:re,key:`${j}`,onClick:()=>{se||Y(j)}};let _t=[];if(h.option)_t.push(h.option({item:Q,checked:Xe,disabled:se}));else{const sA=K(O,Xe,se,Z,Q);_t.push(sA);const iA=X(Xe,se,ye,Q);_t.push(iA),d.textPosition==="right"&&_t.reverse()}const rA=t.h("view",za,_t);U.push(rA)}return U},le=()=>{let U=[];if(h.buttons)U=h.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:q,disabled:d.disabled},{default:()=>b.confirmText.value});U.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return xe({search:async(U=null,j=!0)=>{C.value=U&&t.toRaw(U),t.triggerRef(C),j&&(V.value=!0,m.value=0,u.value=[]),t.nextTick(()=>{E()})},clear:()=>{V.value=!0,m.value=0,u.value=[]},confirm:()=>{q()},cancel:()=>{z()}}),()=>{const U=[];if(d.showHeader){const ye=F();U.push(ye)}if(d.showSearchbar){const ye=L();U.push(ye)}let j=null;if(h.content)j=h.content();else{const ye=_(),Ce={hasMore:V.value,loadText:b.loadText.value,loadMoreText:b.loadMoreText.value,modelValue:T.value,"onUpdate:modelValue":Xe=>{T.value=Xe},onLoadMore:E};j=t.h(o,Ce,{default:()=>ye})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const O={"fox-actionsheet__list":!0};d.poppable||(O["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:O,style:Q},[j]);if(U.push(Z),d.showFooter&&!D.value){const ye=le();U.push(ye)}const ne=t.h("view",{class:"fox-actionsheet"},U);if(!d.poppable)return ne;const re=["fox-actionsheet__popup"];d.popClass&&re.push(d.popClass);const se={popClass:re.join(" "),visible:v.value,closeable:!1,"onUpdate:visible":M,position:d.position,round:"round",onClickOverlay:z,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>ne})}}}}const{componentName:_m,create:ep,scope:tp}=G("actionsheet-pane"),_n=ep(Jm(_m,tp,fe,Qn,Le,Gn,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),Vs={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function np(e,n,a,o,l,r,s){return{props:{...pe,...be,...Vs,...Zn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",null,d),k=t.ref(""),u=t.computed(()=>Array.isArray(k.value)?k.value.join(i.separator):k.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const q={};return C.value&&(q["text-align"]=C.value),q}),w=t.ref(!1),B=()=>{w.value=!0},T=q=>{w.value=q},V=q=>{b.value=q,d("update:modelValue",q)},E=(q,F)=>{d("change",q,F)},$=q=>{let L=q.target.value;y.value=!0,d("focus",L,q)},x=q=>{setTimeout(()=>{y.value=!1},0);let L=q.target.value;i.maxLength&&L.length>Number(i.maxLength)&&(L=L.slice(0,Number(i.maxLength))),d("blur",L,q)},P=q=>{k.value=q,d("update:text",q)},D=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),v=t.computed(()=>({hidden:!R.value})),W=q=>{b.value="",d("update:modelValue","",q),d("change","",q),d("clear","")},H=t.computed(()=>i.clearable&&!f.value&&!p.value),J=t.computed(()=>ke(b.value)>0&&y.value),ee=q=>{J.value?W(q):B()},Y=t.computed(()=>J.value&&H.value?o:l),M=t.computed(()=>({action:!0})),z=t.ref(null);return xe({search:q=>{z.value&&z.value.search(q)},clear:()=>{z.value&&z.value.clear},confirm:q=>{z.value&&z.value.confirm()},cancel:()=>{z.value&&z.value.cancel()}}),()=>{const q={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(q.disabled=!0);const F=[],L=t.h("input",q);F.push(L);const K=[],X={class:["action-icon"]},_=t.h(Y.value,X),le={class:M.value,onClick:ee},U=t.h("view",le,{default:()=>[_]});if(K.push(U),I.value){const Ce=t.h("view",{class:v.value},[i.unit]);K.push(Ce)}const j={class:D.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Zn);Z.ref=z,Z.class=i.actionsheetProps,Z.disabled=f.value||p.value,Z.visible=w.value,Z["onUpdate:visible"]=T,Z.modelValue=b.value,Z["onUpdate:modelValue"]=V,Z.text=k.value,Z["onUpdate:text"]=P,Z.onChange=E,Z.poppable=!0,Z["text-position"]=i.textPosition;const ne={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},re=t.h(r,Z,ne);O.hide=()=>[re];const se=ut(i,Vs,Zn);return t.h(a,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:op,create:lp,scope:ap}=G("actionsheet-item"),cl=lp(np(op,ap,Be,oe.CircleClose,oe.ArrowRight,_n)),dl={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:rp,create:sp}=G("input-number"),ip=sp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...dl},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=rp;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const y=S.target;n("update:modelValue",y.valueAsNumber,S)},r=(S,y)=>{let b=o(S);n("update:modelValue",b,y),n("change",b,y)},s=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,i=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),i()){let y=Number(e.modelValue)-Number(e.step);r(y,S)}else n("overlimit",S,"reduce")},f=S=>{if(n("add",S),s()){let y=Number(e.modelValue)+Number(e.step);r(y,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let b=S.target.valueAsNumber;b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),r(b,S),n("blur",S)},h=S=>{let y=Number(S);return y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),y};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const S=h(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:f,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),cp=["min","max","disabled","readonly","value"];function dp(e,n,a,o,l,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,cp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const et=te(ip,[["render",dp]]);function up(e,n,a,o){return{props:{...pe,...be,...dl},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},S=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},b=Se(l,dl),u={...r.attrs,...b,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d,onAdd:h,onReduce:S},m=t.h(o,u,y),g=[];g.push(m);const C={default:()=>g};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const A=Se(l,be,pe);return A["content-class"]=f,t.h(a,{...A,prop:`${l.prop}_item`},C)}}}}const{componentName:fp,create:mp,scope:pp}=G("inputnumber-item"),ul=mp(up(fp,pp,Be,et)),hp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function gp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function $s(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Es(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function yp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function fl(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Ds(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Is(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function ml(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let bp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function kp(){const e=t.getCurrentInstance();return new bp(e.proxy)}function Sp(e,n,a,o){return{props:{...hp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=kp(),f=t.ref([]),p=t.computed(()=>f.value.filter(M=>yp(l,M)!==!1)),d=t.ref(-1),h=()=>{const M=l.modelValue,z=p.value.findIndex(q=>$s(l,q)===M);d.value!==z&&(d.value=z,l.scroll&&ee(z,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const S=M=>d.value===M,y=M=>{if(M<0&&M>=p.value.length)return!1;const z=p.value[M],F=(ml(l,z,M)??{}).status??fl(l,z);return S(M)||F},b=t.computed(()=>{const M={[i]:!0};return l.mode?M[`is-${l.mode}`]=!0:l.direction&&(M[`is-${l.direction}`]=!0),l.scroll&&(M["is-scroll"]=!0),M}),k=t.computed(()=>({})),u=(M,z,q,F,L)=>{const K={[`${i}__step`]:!0};return L&&(K[`${L}`]=!0),K[`${m.value}`]=!0,F&&(K["is-doit"]=!0),M===d.value?K["is-active"]=!0:z==="done"?K["is-done"]=!0:z==="error"?K["is-error"]=!0:z==="half"?K["is-half"]=!0:q?K["is-disabled"]=!0:K["is-normal"]=!0,K},m=t.computed(()=>{if(l.mode==="simple")return"start";let M=l.align;return M||(l.direction==="vertical"?M="start":M="center"),M}),g=(M,z={})=>{const q={...z};return m.value==="start"&&M===p.value.length-1?q.flex="0 0 auto":l.step?l.direction==="vertical"?q.height=l.step:q.width=l.step:q.flex="1 1 100%",q},C=(M,z)=>{let q={};if(z<p.value.length-1){const F=z+1;y(z)&&y(F)?l.direction==="vertical"?q.height="100%":q.width="100%":q.opacity="0"}return q},A=M=>p.value.length-1===M,w=(M,z)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&z>d.value||d.value===z)return;const q=d.value,F=z;d.value=z,l.scroll&&ee(z,!1);const L=$s(l,M);s("update:modelValue",L);const K={fromIndex:q,currentIndex:F,item:M,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",L,K)},B=t.ref(!0),T=async(M,z)=>{try{const q=await c.load("stesbar",M,z);Array.isArray(q)&&(f.value=q),B.value=!1}catch(q){console.error("[FoxUI] Load StepsBar Data Fail",q),f.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([M,z])=>{M&&T(M,z)},{immediate:!0});const V=(M,z,q,F,L)=>{let K=null;if(r.icon)K=r.icon({item:M,index:z,status:F});else if(F==="done"){const _={};l.iconSize&&(_.width=l.iconSize,_.height=l.iconSize);const le=l.icon??a;K=t.h(le,_)}else{const _=q??`${z+1}`;K=t.h("span",{},[_])}const X={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:M,index:z}),!L&&w(M,z)}};return t.h("view",X,[K])},E=(M,z,q)=>{const F=t.h("i",{class:"fox-steps-bar__line-inner",style:C(M,z)});return t.h("view",{class:"fox-steps-bar__line"},[F])},$=()=>{let M=null;if(r.markIcon)M=r.markIcon();else{const q={};l.iconSize&&(q.width=l.markIconSize,q.height=l.markIconSize);const F=l.markIcon??o;M=t.h(F,q)}return t.h("view",{class:"fox-steps-bar__mark"},[M])},x=(M,z,q,F,L)=>{const K=[];if(!A(z)){const le=E(M,z);K.push(le)}const X=V(M,z,q,F,L);K.push(X);const _={class:"fox-steps-bar__head"};return t.h("view",_,K)},P=(M,z,q,F)=>{let L=null;r.main?L=r.main({item:M,index:z,status:q}):L=gp(l,M);const K={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:M,index:z}),!F&&w(M,z)}};return t.h("view",K,[L])},D=(M,z,q)=>{let F=null;if(r.sub){F=r.sub({item:M,index:z,status:q});const L={class:"fox-steps-bar__sub"};return t.h("view",L,[F])}return null},I=(M,z)=>{const q=ml(l,M,z)??{},F=q.status??fl(l,M);let L=Es(l,M);q.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const K=q.label??Is(l,M),X=[],_=V(M,z,K,F,L);_&&X.push(_);const le=P(M,z,F,L);if(le&&X.push(le),!A(z)){const ne=E(M,z);ne&&X.push(ne)}const U=t.h("view",{class:"fox-steps-bar__head"},X),j=q.class,Q=q.style??{};let O=Ds(l,M);q.doit===!0&&(O=!0);const Z={ref:J(z),class:u(z,F,L,O,j),style:g(z,Q)};return t.h("view",Z,[U])},R=(M,z)=>{const q=ml(l,M,z)??{},F=q.status??fl(l,M);let L=Es(l,M);q.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const K=q.label??Is(l,M),X=[],_=l.layout;for(let O of _)if(O==="head"){const Z=x(M,z,K,F,L);X.push(Z)}else if(O==="main"){const Z=P(M,z,F,L);X.push(Z)}else if(O==="sub"){const Z=D(M,z,F);X.push(Z)}else if(O==="mark"){const Z=$();X.push(Z)}const le=q.class,U=q.style??{};let j=Ds(l,M);q.doit===!0&&(j=!0);const Q={ref:J(z),class:u(z,F,L,j,le),style:g(z,U)};return t.h("view",Q,X)},v=t.ref(),W=t.ref([]),H=(M,z)=>{W.value[z]=M},J=M=>z=>{H(z,M)},ee=(M,z)=>{const q=v.value,F=W.value;if(!q||!F||!F[M])return;const L=F[M];let K=0;l.direction==="vertical"?K=L.offsetTop-(q.offsetHeight-L.offsetHeight)/2:K=L.offsetLeft-(q.offsetWidth-L.offsetWidth)/2,Y(q,K,z?0:.3,l.direction)},Y=(M,z,q,F)=>{let L=0;const K=F==="horizontal"?M.scrollLeft:M.scrollTop,X=q===0?1:Math.round(q*1e3/16);function _(){F==="horizontal"?M.scrollLeft+=(z-K)/X:M.scrollTop+=(z-K)/X,++L<X&&Ke(_)}_()};return()=>{const M=[];if(l.mode==="simple")for(let q=0;q<p.value.length;q++){const F=p.value[q],L=I(F,q);M.push(L)}else for(let q=0;q<p.value.length;q++){const F=p.value[q],L=R(F,q);M.push(L)}const z={ref:v,class:b.value,style:k.value};return t.h("view",z,M)}}}}const{componentName:Cp,create:wp,scope:Np}=G("steps-bar"),pl=wp(Sp(Cp,Np,oe.Checklist,oe.ArrowRight));function Bp(e){e.stopPropagation()}class Ap{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=Oo()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=Ko(),o=(l,r,s,i)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),Bp(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Tp(e,n){return new Ap(e,n)}const Vp={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},$p=(e,n,a,o=!1)=>({props:{...Vp},emits:["click"],setup(l,{slots:r,emit:s}){const i=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),f=t.computed(()=>{const m={};return ue(i.top)||(m.top=i.top),ue(i.right)||(m.right=i.right),ue(i.bottom)||(m.bottom=i.bottom),ue(i.left)||(m.left=i.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),d=()=>{s("click")},h=t.ref(null),S=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},u=Tp(m=>{if(!h.value)return;const g=h.value;S(),i.left=g.offsetLeft,i.top=g.offsetTop,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`,g.style.right=null,g.style.bottom=null,y.x=i.left,y.y=i.top},m=>{if(!h.value)return;const g=h.value;S(),i.left=y.x+m.x,i.top=y.y+m.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const m=[h.value];u.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&u.close()}),()=>{let m=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)m=g;else{const A=t.h(a,{class:p.value});m.push(A)}const C={ref:A=>{h.value=A},class:c.value,style:f.value,onClick:d};return t.h("view",C,m)}}}),{componentName:Ep,create:Dp,scope:Ip}=G("floating-button"),hl=Dp($p(Ep,Ip,oe.Uploader,!1)),xp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function qp(e,n,a){return{props:{...xp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const d={[`${e}`]:!0};return o.disabled?d[`${e}--disabled`]=!0:d[`${e}--${o.type}`]=!0,d}),s=ve(o,"modelValue"),i=t.computed(()=>s.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),f=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!s.value,"is-collapse":s.value})),p=()=>{l("update:modelValue",!s.value)};return()=>{const d=[];if(i.value){const k={class:c.value},u=t.h("span",k,[i.value]);d.push(u)}const h={class:f.value},S=o.icon??a,y=t.h(S,h);return d.push(y),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:vp,create:Mp,scope:Pp}=G("more-button"),gl=Mp(qp(vp,Pp,oe.RectUp)),Lp={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},zp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Fp(e,n,a){return{props:{...Lp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,f=t.ref(!0),p=C=>{f.value=C},d=C=>{if(typeof o.unmount=="function")try{o.unmount()}catch(A){console.error(A)}if(typeof o.callback=="function")try{o.callback(C)}catch(A){console.error(A)}},h=()=>{d("confirm")},S=()=>{d("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&d("close")},b=(C,A)=>zp(C)?(A.src=C,t.h("img",A)):typeof C=="string"?(Array.isArray(A.class)?A.class.push(C):A.class&&typeof A.class=="object"?A[`${C}`]=!0:typeof A.class=="string"?A.class=`${A.class}, ${C}`:A.class=C,t.h(o.tag,A)):t.h(C,A),k=()=>{const C=[];if(o.icon){const w={class:[`${c}__header-icon`]},B=b(o.icon,w);C.push(B)}if(o.title){const w=t.h("view",{class:`${c}__header-title`},[o.title]);C.push(w)}if(o.showClose&&o.closeIcon){const w={class:[`${c}__header-close-icon`],onClick:y},B=b(o.closeIcon,w);C.push(B)}const A={class:[`${c}__header`]};return t.h("view",A,C)},u=(C,A)=>{const w=[];if(A){const T={class:`${c}__group-title`},V=t.h("view",T,[A]);w.push(V)}if(C){const T=[];Array.isArray(C)||(C=[C]);for(let V of C){const E={class:`${c}__group-row`,innerHTML:V},$=t.h("view",E);T.push($)}if(T.length>0){const V={class:`${c}__group-rows`},E=t.h("view",V,T);w.push(E)}}if(w.length===0)return null;const B={class:`${c}__group`};return t.h("view",B,w)},m=()=>{const C=[];if(typeof o.message=="string")C.push(o.message);else if(Array.isArray(o.message))for(let w of o.message)if(typeof w=="string"){const B=u(w);C.push(B)}else{const B=u(w.content,w.title);C.push(B)}else if(typeof o.message=="function"){const w=o.message();C.push(w)}else{const w=o.message;C.push(w)}const A={class:`${c}__body`};return t.h("view",A,C)},g=()=>{const C=[];if(o.showCancelButton){const w={class:[`${c}__footer-button`],style:{},onClick:S};o.cancelButtonClass&&w.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(w.style,o.cancleButtonStyle);const B=t.h("button",w,[o.cancelButtonText??i.cancelText.value]);C.push(B)}if(o.showConfirmButton){const w={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&w.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(w.style,o.confirmButtonStyle);const B=t.h("button",w,[o.confirmButtonText??i.confirmText.value]);C.push(B)}if(C.length===0)return null;const A={class:`${c}__footer`};return t.h("view",A,C)};return()=>{const C=[],A=k();A&&C.push(A);const w=m();w&&C.push(w);const B=g();B&&C.push(B);const T={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},V=t.h("view",T,C),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const $={};o.width&&($.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&($.height=typeof o.height=="number"?`${o.height}px`:o.height);const x={popClass:E.join(" "),style:$,visible:f.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,x,{default:()=>V})}}}}const{componentName:Rp,create:Op,scope:Kp}=G("messagebox"),Up=Op(Fp(Rp,Kp,fe)),Hp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",jp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Wp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Yp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Xp=new En,Qp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Gp=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${Xp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const s=document.querySelector(`#${l}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(Up,e);n.appendChild(o),t.render(r,o)},ct={show:(e,n,a,o)=>{const l={...Qp};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Wp:r==="warning"?l.icon=Yp:r==="error"?l.icon=Hp:l.icon=jp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.Close),new Promise((s,i)=>{const c=l.callback;l.callback=f=>{if(typeof c=="function")try{c(f)}catch(p){console.error(p)}s({action:f})},Gp(l)})},alert:(e,n,a)=>ct.show("alert",e,n,a),confirm:(e,n,a)=>ct.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ct.alert,e.config.globalProperties.$confirm=ct.confirm}},Zp=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let i in n)i==="bubbles"?l=!!n[i]:i==="cancelable"?r=!!n[i]:o[i]=n[i];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},Jp=new En,_p=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),eh=e=>`${e}-${Jp.get()}`,th=Symbol.for("InnerPageScopeKey"),nh=Symbol.for("PageWrapperKey"),oh="FoxLeave",lh="FoxLeaveEnd",ah={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function rh(e,n,a,o){return{props:{...Fe,...ah},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(th,!0);const c={};t.provide(nh,c);const f=w=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{f()},d=e,h=w=>{S.value=w,i("update:visible",w)},S=t.ref(!1),y=(w,B)=>_p(w)?(B.src=w,t.h("img",B)):typeof w=="string"?(Array.isArray(B.class)?B.class.push(w):B.class&&typeof B.class=="object"?B[`${w}`]=!0:typeof B.class=="string"?B.class=`${B.class}, ${w}`:B.class=w,t.h(l.tag,B)):t.h(w,B),b=()=>{if(!l.showHeader)return null;const w=[];if(s.header){const T=s.header();w.push(T)}else if(l.title){const T=t.h("view",{class:`${d}__header-title`},[l.title]);w.push(T)}if(w.length===0)return null;const B={class:[`${d}__header`]};return t.h("view",B,w)},k=()=>{if(!l.showClose)return null;const w={class:[`${d}__close-icon`],onClick:p},B=l.closeIcon??o;return y(B,w)};let u=null;const m=w=>{Zp(lh,{},u)},g=eh(e),C=()=>{h(!0)},A=()=>{if(!u)return;const w=u.querySelector(".fox-overlay");w&&(w.classList.add("overlay-fade-leave-active"),w.classList.add("overlay-fade-leave-to"));const B=u.querySelector(".fox-popup");B&&(B.classList.add(`fox-popup-slide-${l.position}-leave-active`),B.classList.add(`fox-popup-slide-${l.position}-leave-to`),B.addEventListener("animationend",m,{once:!0}),B.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{u=document.querySelector(`.${g}`),u?.addEventListener(oh,A,{once:!0}),C()}),()=>{const w=[],B=b();B&&w.push(B);const T=k();T&&w.push(T);const V=s.default?s.default():[];Reflect.apply([].push,w,V);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const $={class:E},x=t.h("view",$,w),P=[`${d}__popup`,g];l.popClass&&P.push(l.popClass),l.position&&P.push(`${d}__popup--${l.position}`);const D={};l.width&&(D.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(D.height=typeof l.height=="number"?`${l.height}px`:l.height);const R={...Se(l,Fe),popClass:P.join(" "),style:D,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},v=t.h(a,R,{default:()=>x});return t.h("div",{class:[`${d}__root`,g]},[v])}}}}const{componentName:sh,create:ih,scope:ch}=G("popup-wrapper"),yl=ih(rh(sh,ch,fe,oe.Close)),dh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function uh(e,n,a,o){return{props:{...dh},emits:["update:visible"],setup(l,{emit:r,slots:s}){const i=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const f={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":i},p=t.h(a,f,s),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:fh,create:mh,scope:ph}=G("dropdown"),bl=mh(uh(fh,ph,fe));function hh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const gh={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],required:!1,default:0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function yh(e,n,a,o=!1){return{props:{...gh},emits:["click"],setup(l,r){const s=t.ref(null),i=t.computed(()=>{const g={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(g[`${e}--${l.type??"default"}`]=!0),l.size&&(g[`${e}--${l.size}`]=!0),g}),c=t.computed(()=>{const g={},C=l.textColor??l.color;return C&&(g.color=C),g}),f=(g,C)=>{let A=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const w=l.highlightFilter;if(g.indexOf(w)!==-1){const T=g.replace(new RegExp(w,"g"),`<span>${w}</span>`);C.innerHTML=T,C.class["is-highlight"]=!0,A=t.h(l.tag,C)}}else if(typeof l.highlightFilter=="function"){const w=l.highlightFilter(g);w&&(C.innerHTML=w,C.class["is-highlight"]=!0,A=t.h(l.tag,C))}return A},p=g=>{r.emit("click",g)};let d="";const h=()=>{const g=s.value;if(!g)return;const C=g.clientWidth;hh(g,A=>{const w=g.innerHTML??"";ue(w)||A<C||(d?a?.show(g,w,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(g,w,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let y=null;const b=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},k=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{S()},l.hideAfter??0)},u=()=>{const g=s.value;g&&(g.addEventListener("mouseover",b),g.addEventListener("mouseleave",k))},m=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",b),g.removeEventListener("mouseleave",k))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||u()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||m()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let C=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const V=T[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const E=me(l.digits),$=me(l.decimalLength),x=he(l.autoPadding);let P=`${T[0].children}`,D=P.split("").reverse().join("");D=nn(D,$,x,E,l.separator),P=D.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=f(P,g)),C||(g.innerHTML=P,C=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const V=T[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const E=`${T[0].children}`;C=f(E,g),C||(g.innerHTML=E,C=t.h(l.tag,g))}}}C||(C=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return C;let w=null;if(l.icon){const T={[`${e}__mark-wrap`]:!0};l.type&&(T[`${e}__mark-wrap--${l.type}`]=!0);const V={},E=l.color;E&&(V.color=E);const $={class:T,style:V};w=t.h("view",$,t.h(l.icon))}else if(r.slots.mark){const T={[`${e}__mark-wrap`]:!0};l.type&&(T[`${e}__mark-wrap--${l.type}`]=!0);const V={},E=l.color;E&&(V.color=E);const $={class:T,style:V};w=t.h("view",$,{default:r.slots.mark})}else{const T={[`${e}__mark`]:!0};l.type&&(T[`${e}__mark--${l.type??"default"}`]=!0);const V={},E=l.color;E&&(V["background-color"]=E);const $={class:T,style:V};w=t.h("view",$)}const B={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",B,[w,C])}}}}const{componentName:bh,create:kh,scope:Sh}=G("text"),kl=kh(yh(bh,Sh,bt,!1));function Ch(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=n[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[l]){let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a])}return s}if(Array.isArray(i))for(let c=0;c<n.length&&c<r.length;c++){let f=n[c],p=r[c];const d=f.find(h=>h[o]===p);if(!d)break;s.push(d[a])}else{let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a]),c=d[l]}}return s}class wh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Nh(){const e=t.getCurrentInstance();return new wh(e.proxy)}const Bh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function Ah(e,n,a=!1){return{props:{...Bh},setup(o,{attrs:l,slots:r}){const s=Nh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{i.value=await s.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=Ch(o.modelValue,i.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),f=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(f,p,{default:()=>c.value}):t.h(f,p,c.value)}}}}const{componentName:Th,create:Vh,scope:$h}=G("mapping"),Sl=Vh(Ah(Th,$h,!1));function Eh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return mr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:mA,create:Dh,scope:pA}=G("domain-provider"),Cl=Dh(Eh()),Ih={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function xh(e,n){return{inheritAttrs:!1,props:Ih,setup(a,{slots:o}){if(nt&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,S)=>{if(p===null){r.set(h,{visible:null,callback:S});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:S}),p.observe(h)},i=h=>{if(p===null){r.delete(h);return}l.has(h)&&(l.delete(h),p.unobserve(h))};let c=a.initialVisibleObserverSize;Xi({acquire:()=>{const h=c>0;return c--,h},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:s,unobserve:i});let p=null;const d=(h,S,y)=>{p=new IntersectionObserver(b=>{for(let k of b){let u=!1;k.intersectionRatio>0&&(u=!0);const m=l.get(k.target);if(m)try{if(a.loadPolicy==="lazy"&&!u&&m.visible!==null)return;m.visible=u,m.callback(u)}catch(g){console.error(g)}}},{root:h,rootMargin:S,threshold:y}),r.forEach((b,k)=>{l.set(k,b),p?.observe(k)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,S])=>{if(S||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&d(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:hA,create:qh,scope:gA}=G("rolling-provider"),wl=qh(xh()),{componentName:vh,create:Mh}=G("cell"),Ph=Mh({components:{Right:oe.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:n}){const a=t.computed(()=>{const r=vh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:ge(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Lh={key:0,class:"fox-cell__icon"},zh={key:1,class:"fox-cell__title"},Fh={class:"title"},Rh={class:"fox-cell__title-desc"};function Oh(e,n,a,o,l,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Lh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",zh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Fh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Rh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const Nl=te(Ph,[["render",Oh]]),{componentName:Kh,create:Uh}=G("cell-group"),Hh=Uh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Kh]:!0}))}}}),jh={key:1,class:"fox-cell-group__title"},Wh={key:3,class:"fox-cell-group__desc"},Yh={class:"fox-cell-group__wrap"};function Xh(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",jh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Wh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Yh,[t.renderSlot(e.$slots,"default")])],2)}const Bl=te(Hh,[["render",Xh]]),{componentName:Qh,create:Gh}=G("image"),Zh=Gh({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:oe.Image,ImageError:oe.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const S=Qh;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(b=>{b.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let S={};return e.width&&(S.width=ge(e.width)),e.height&&(S.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(S.overflow="hidden",S.borderRadius=ge(e.radius)),S}),f=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,S=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},d=()=>{a.isError=!0,a.loading=!1,n("error")},h=S=>{n("click",S)};return{...t.toRefs(a),imageClick:h,classes:o,styles:f,stylebox:c,error:d,load:p,show:r,imgRef:s}}}),Jh=["src","date-src","alt"],_h={key:0,class:"fox-img-loading"},eg={key:1,class:"fox-img-error"};function tg(e,n,a,o,l,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,Jh),e.loading?(t.openBlock(),t.createElementBlock("div",_h,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",eg,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const Al=te(Zh,[["render",tg]]),{create:ng}=G("layout"),Tl=ng({}),{componentName:og,create:lg}=G("col"),ag=lg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=og,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function rg(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const Vl=te(ag,[["render",rg]]),{componentName:sg,create:ig}=G("row"),cg=ig({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const n=sg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
5
+ */function tn(e,n="0"){let a=0,o=-1;e[0]=="-"&&(a++,o=1,e=e.substring(1),e.length),n[0]=="-"&&(a++,o=2,n=n.substring(1),n.length),e=Ae(e),n=Ae(n),[e,n]=lo(Ae(e),Ae(n)),a==1&&(o==1?e=oo(e):n=oo(n));let l=Ra(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(oo(l)):Ae(l)}function oo(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let s=0;s<a;s++)e[s]>="0"&&e[s]<="9"?n+=9-parseInt(e[s]):n+=e[s];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ra(n,r)}function Ae(e){let n=e.split(".");for(n[0]||(n[0]="0");n[0][0]=="0"&&n[0].length>1;)n[0]=n[0].substring(1);return n[0]+(n[1]?"."+n[1]:"")}function lo(e,n){let a=e.split("."),o=n.split("."),l=a[0].length,r=o[0].length;return l>r?o[0]=new Array(Math.abs(l-r)+1).join("0")+(o[0]?o[0]:""):a[0]=new Array(Math.abs(l-r)+1).join("0")+(a[0]?a[0]:""),l=a[1]?a[1].length:0,r=o[1]?o[1].length:0,(l||r)&&(l>r?o[1]=(o[1]?o[1]:"")+new Array(Math.abs(l-r)+1).join("0"):a[1]=(a[1]?a[1]:"")+new Array(Math.abs(l-r)+1).join("0")),e=a[0]+(a[1]?"."+a[1]:""),n=o[0]+(o[1]?"."+o[1]:""),[e,n]}function Ra(e,n){[e,n]=lo(e,n);let a="",o=0;for(let l=e.length-1;l>=0;l--){if(e[l]==="."){a="."+a;continue}let r=parseInt(e[l])+parseInt(n[l])+o;a=r%10+a,o=Math.floor(r/10)}return o?o.toString()+a:a}var we=(e=>(e[e.CEILING=0]="CEILING",e[e.DOWN=1]="DOWN",e[e.FLOOR=2]="FLOOR",e[e.HALF_DOWN=3]="HALF_DOWN",e[e.HALF_EVEN=4]="HALF_EVEN",e[e.HALF_UP=5]="HALF_UP",e[e.UNNECESSARY=6]="UNNECESSARY",e[e.UP=7]="UP",e))(we||{});function Et(e,n=0,a=we.HALF_EVEN){if(a===we.UNNECESSARY)throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");typeof e=="number"&&(e=e.toString());let o=!1;e[0]==="-"&&(o=!0,e=e.substring(1));let l=e.split("."),r=l[0],s=l[1];if(n<0){if(n=-n,r.length<=n)return"0";{let c=r.substr(0,r.length-n);return e=c+"."+r.substr(r.length-n)+s,c=Et(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Oa(l[1],r,o,a)?(o?"-":"")+ao(r):(o?"-":"")+r;if(l[1]){if(l[1].length<n)return(o?"-":"")+r+"."+l[1]+new Array(n-l[1].length+1).join("0")}else return(o?"-":"")+r+"."+new Array(n+1).join("0");s=l[1].substring(0,n);let i=l[1].substring(n);return i&&Oa(i,s,o,a)&&(s=ao(s),s.length>n)?(o?"-":"")+ao(r,parseInt(s[0]))+"."+s.substring(1):(o?"-":"")+r+"."+s}function Oa(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===we.DOWN||!a&&o===we.FLOOR||a&&o===we.CEILING)return!1;if(o===we.UP||a&&o===we.FLOOR||!a&&o===we.CEILING)return!0;let l="5"+new Array(e.length).join("0");if(e>l)return!0;if(e<l)return!1;switch(o){case we.HALF_DOWN:return!1;case we.HALF_UP:return!0;case we.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function ao(e,n=0){n||(n=1),typeof e=="number"&&e.toString();let a=e.length-1,o="";for(let l=a;l>=0;l--){let r=parseInt(e[l])+n;r==10?(n=1,r=0):n=0,o+=r}return n&&(o+=n),o.split("").reverse().join("")}function ro(e,n){e=e.toString(),n=n.toString();let a=0;e[0]=="-"&&(a++,e=e.substr(1)),n[0]=="-"&&(a++,n=n.substr(1)),e=Dt(e),n=Dt(n);let o=0,l=0;e.indexOf(".")!=-1&&(o=e.length-e.indexOf(".")-1),n.indexOf(".")!=-1&&(l=n.length-n.indexOf(".")-1);let r=o+l;if(e=Dt(e.replace(".","")),n=Dt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let s=n.length,i=0,c=[],f=s-1,p="";for(let d=0;d<s;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let h=0;for(let S=n.length-1;S>=f&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(h+=parseInt(e[c[S]--])*parseInt(n[S]));h+=i,i=Math.floor(h/10),p=h%10+p,f--}return p=Dt(Ws(p,r)),a==1&&(p="-"+p),p}function Ws(e,n){return n==0?e:(e=n>=e.length?new Array(n-e.length+1).join("0")+e:e,e.substr(0,e.length-n)+"."+e.substr(e.length-n,n))}function Dt(e){for(;e[0]=="0";)e=e.substr(1);if(e.indexOf(".")!=-1)for(;e[e.length-1]=="0";)e=e.substr(0,e.length-1);return e==""||e=="."?e="0":e[e.length-1]=="."&&(e=e.substr(0,e.length-1)),e[0]=="."&&(e="0"+e),e}function so(e,n,a=8){if(n==0)throw new Error("Cannot divide by 0");if(e=e.toString(),n=n.toString(),e=e.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),n=n.replace(/(\.\d*?[1-9])0+$/g,"$1").replace(/\.0+$/,""),e==0)return"0";let o=0;n[0]=="-"&&(n=n.substring(1),o++),e[0]=="-"&&(e=e.substring(1),o++);var l=n.indexOf(".")>0?n.length-n.indexOf(".")-1:-1;if(n=Ae(n.replace(".","")),l>=0){let f=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(f==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>f)e=e.replace(".",""),e=Ae(e+new Array(l-f+1).join("0"));else if(l<f){e=e.replace(".","");let p=e.length-f+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==f&&(e=Ae(e.replace(".","")))}let r=0,s=n.length,i="",c=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(0,s+1):e.substring(0,s);if(e=e.indexOf(".")>-1&&e.indexOf(".")<s?e.substring(s+1):e.substring(s),c.indexOf(".")>-1){let f=c.length-c.indexOf(".")-1;c=c.replace(".",""),s>c.length&&(f+=s-c.length,c=c+new Array(s-c.length+1).join("0")),r=f,i="0."+new Array(f).join("0")}for(a=a+2;r<=a;){let f=0;for(;parseInt(c)>=parseInt(n);)c=tn(c,"-"+n),f++;i+=f,e?(e[0]=="."&&(i+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(i+="."),r++,c=c+"0")}return(o==1?"-":"")+Ae(Et(i,a-2))}function io(e,n){return e=e.toString(),n=n.toString(),n=co(n),tn(e,n)}function co(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function Ka(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Ua(e),Ua(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=io(e,ro(n,Et(so(e,n),0,we.FLOOR)));return a+o}function Ua(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ha(e,n){let a=!1;if(e[0]=="-"&&n[0]!="-")return-1;if(e[0]!="-"&&n[0]=="-")return 1;if(e[0]=="-"&&n[0]=="-"&&(e=e.substr(1),n=n.substr(1),a=!0),[e,n]=lo(e,n),e.localeCompare(n)==0)return 0;for(let o=0;o<e.length;o++)if(e[o]!=n[o])return e[o]>n[o]?a?-1:1:a?1:-1;return 0}class ce{value;static RoundingModes=we;static validate(n){if(n){if(n=n.toString(),isNaN(n))throw Error("Parameter is not a number: "+n);n[0]=="+"&&(n=n.substring(1))}else n="0";if(n.startsWith(".")?n="0"+n:n.startsWith("-.")&&(n="-0"+n.substr(1)),/e/i.test(n)){let[a,o]=n.split(/[eE]/);a=Ae(a);let l="";a[0]=="-"&&(l="-",a=a.substring(1)),a.indexOf(".")>=0?(o=parseInt(o)+a.indexOf("."),a=a.replace(".","")):o=parseInt(o)+a.length,a.length<o?n=l+a+new Array(o-a.length+1).join("0"):a.length>=o&&o>0?n=l+Ae(a.substring(0,o))+(a.length>o?"."+a.substring(o):""):n=l+"0."+new Array(-o+1).join("0")+a}return n}constructor(n="0"){this.value=ce.validate(n)}getValue(){return this.value}static getPrettyValue(n,a,o){if(!(a||o))a=3,o=",";else if(!(a&&o))throw Error("Illegal Arguments. Should pass both digits and separator or pass none");n=ce.validate(n);let l=n.charAt(0)=="-";l&&(n=n.substring(1));var r=n.indexOf(".");r=r>0?r:n.length;for(var s="",i=r;i>0;)i<a?(a=i,i=0):i-=a,s=n.substring(i,i+a)+(i<r-a&&i>=0?o:"")+s;return(l?"-":"")+s+n.substring(r)}getPrettyValue(n,a){return ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=we.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return Et(n,a,o)}round(n=0,a=we.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(Et(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,we.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,we.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),tn(n,a)}add(n){return new ce(tn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),io(n,a)}subtract(n){return new ce(io(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),ro(n,a)}multiply(n){return new ce(ro(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),so(n,a,o)}divide(n,a){return new ce(so(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),Ka(n,a)}modulus(n){return new ce(Ka(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ha(n,a)}compareTo(n){return Ha(this.value,n.getValue())}static negate(n){return n=ce.validate(n),co(n)}negate(){return new ce(co(this.value))}}function ja(e,n){return ce.multiply(`${e}`,`${n}`)}function uo(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function fo(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function Wa(e){return ce.negate(e)}function nn(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let s=r.charAt(0);s=="-"?r=r.substring(1):s="";let i=r,c="",f=r.indexOf(".");f!=-1&&(i=r.substring(0,f),c=r.substring(f+1)),n!=-1&&(n<c.length?c=c.substring(0,n):a&&n>c.length&&(c=c.padEnd(n,"0")));let p;if(o>0){let d="",h=i.split("").reverse();for(let S=0;S<h.length;S++)d+=h[S]+((S+1)%o==0&&S+1!=h.length?l:"");c.length==0?p=`${s}${d.split("").reverse().join("")}`:p=`${s}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${s}${i}`:p=`${s}${i}.${c}`;return p}function Ya(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const nt=typeof window<"u",Ke=Qe;function Xa(e){return e==null}const on=Array.isArray,Ys=e=>an(e)==="[object Map]",Xs=e=>an(e)==="[object Set]",Ue=e=>e instanceof Date,ln=e=>typeof e=="function",Qa=e=>typeof e=="string",Qs=e=>typeof e=="symbol",De=e=>e!==null&&typeof e=="object",dt=e=>De(e)&&ln(e.then)&&ln(e.catch),Ga=Object.prototype.toString,an=e=>Ga.call(e),mo=e=>an(e)==="[object Object]",Za=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Gs(e){return e.__esModule||Za&&e[Symbol.toStringTag]==="Module"}const Zs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function ot(...e){let n=e[0]!==void 0&&e[0]!==null?e[0]:{},a=1,o=e.length,l=!1;for(typeof n=="boolean"&&(l=n,n=e[a]??{},a++),typeof n!="object"&&(n={});a<o;a++)if(e[a]!==null&&e[a]!==void 0){let r=e[a];for(let s in r){let i=n[s],c=r[s];if(i!==c)if(l===!0&&c&&typeof c=="object"){let f;Array.isArray(c)?f=i&&Array.isArray(i)?i:[]:f=i&&typeof i=="object"?i:{},n[s]=ot(l,f,c)}else c!==void 0&&(n[s]=c)}}return n}function po(e,n,a=!1){if(!a)ot(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!mo(s))continue;r=po(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],s=n[l];if(r!==s)if(typeof s=="object"){if(!Array.isArray(s)&&!mo(s))continue;r=po(r,s,a),e[l]=r}else{if(typeof s=="function")continue;e[l]=s}}}return e}const ho=Zs?Promise.resolve():null;function Js(e,...n){ho!==null?n&&n.length>0?ho.then(()=>{e(n)}):ho.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function he(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function me(e){return typeof e=="number"?e:Number(e)}const _s={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function lt(e){let a=Object.prototype.toString.call(e);return e==null?String(e):_s[a]||"object"}function rn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function Ja(e){return e&&typeof e=="object"&&"setInterval"in e}function _a(e){let n=!!e&&"length"in e&&e.length,a=lt(e);return a==="function"||Ja(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function er(e,n){let a=+n.length,o=0,l=e.length;for(;o<a;o++)e[l++]=n[o];return e.length=l,e}function ei(e,n=[]){let a=n;return e!=null&&(_a(Object(e))?er(a,typeof e=="string"?[e]:e):a.push(e)),a}function Me(e,n){if(e==n)return!0;if(e===void 0||n===void 0)return!1;let a=lt(e),o=lt(n);if(a!==o)return!1;if(a==="object"){let l=Object.keys(e),r=Object.keys(n);if(l.length!==r.length)return!1;for(let s=0;s<l.length;s++){let i=l[s],c=e[i],f=n[i];if(!Me(c,f))return!1}return!0}else if(a==="array"){if(e.length!==n.length)return!1;for(let l=0;l<e.length;l++){let r=e[l],s=n[l];if(!Me(r,s))return!1}return!0}return!1}function tr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function nr(e){return ue(e)?!0:(e.charAt(0)=="-"&&(e=e.substring(1)),ue(e)||/^(([1-9][0-9]*\.[0-9]*)|([0]\.[0-9]*)|([0-9]*)|([0]{1}))$/.test(e))}function or(e){if(e==null)return 0;let n=`${e}`;if(n.length==0)return 0;n.charAt(0)=="-"&&(n=n.substring(1)),n=n.replace(/[^\d\.-]/g,"");const a=n.indexOf(".");return a==-1?n.length:a}function lr(e){if(e==null)return 0;const n=`${e}`;if(n.length==0)return 0;const a=n.indexOf(".");return a==-1?0:n.length-(a+1)}function ar(e,n,a){const o=e.indexOf(n);return o===-1?e:n==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(a,"")}function go(e,n=!0,a=!0){n?e=ar(e,".",/\./g):e=e.replace(/\./g,""),a?e=ar(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ti(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function ni(e,n){if(typeof e=="object"||Array.isArray(e)){let a=n.reverse().findIndex(o=>{if(Me(e,o))return!0});return a!==-1&&(a=n.length-1-a),a}return n.lastIndexOf(e)}function ke(e){return e==null||e==null?0:typeof e=="string"?e.length:`${e}`.length}function Se(e,...n){const a={};return n.forEach(o=>{for(const l in o)a[l]=e[l]}),a}function ut(e,...n){const a=[];n.forEach(l=>{Reflect.apply([].push,a,Reflect.ownKeys(l))});const o={};for(const l in e)a.includes(l)||(o[l]=e[l]);return o}const rr=(e,n,a)=>{const o=Object.assign({},e),l=Object.assign({},a);return Object.keys(n).length>0?(Object.keys(o).forEach(r=>{l.hasOwnProperty(r)?typeof l[r]=="string"&&(o[r]=n[l[r]]):n[r]&&(o[r]=n[r])}),o):e};function yo(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const at=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},He=(e,n,a)=>Math.min(Math.max(e,n),a),Ne=Symbol.for("BroadcastKey");class bo{parent;children=[];callbacks=new Map;proxy=null;name;constructor(n,a,o){this.parent=n,this.proxy=a,this.name=o,n!==null&&n.addChild(this)}addChild(n){this.children.push(n)}removeChild(n){const a=this.children.findIndex(o=>n===o);a!==-1&&this.children.splice(a,1)}destroy(){this.parent!==null&&this.parent.removeChild(this),this.parent=null,this.proxy=null}emit(n,a,...o){if(n.maxLevel!==void 0&&n.maxLevel!==null&&n.maxLevel>0){if(n.level=n.level??0,n.level>n.maxLevel)return[];n.level++}let l=!1;!n.name||n.name==="*"?l=!0:!n.name||n.name==="+"?(l=!1,n.name="*"):tr(n.name)&&this.name&&n.name.test(this.name)?l=!0:typeof n.name=="function"?l=Reflect.apply(n.name,null,[this.name]):n.name===this.name&&(l=!0);const r=[];if(l){const s=this.callbacks.get(a);if(typeof s=="function"){const c=Reflect.apply(s,this.proxy,[...o]);c!=null&&r.push(c)}const i=this.proxy??{};if(typeof i[a]=="function"){const c=Reflect.apply(i[a],i,[...o]);c!=null&&r.push(c)}}return this.children.forEach(s=>{const i=Reflect.apply(s.emit,s,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,r,[...i])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const s=Reflect.apply(r.emit,r,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,l,[...s])}),l}on(n,a){this.callbacks.set(n,a)}}function sn(e,n,a,o){const l=new bo(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function oi(e,n,a){const o=a;if(o[Ne])return o[Ne];const l=t.inject(Ne,null),r=new bo(l,a,e);if(n&&typeof n=="object")for(const s in n)r.on(s,n[s]);return o[Ne]=r,t.provide(Ne,r),t.onUnmounted(()=>{r.destroy(),o[Ne]=void 0}),r}function It(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ne]??t.inject(Ne,null):t.inject(Ne,null)}const rt=e=>e.default??e;class li{error(n,a){const o=a,l=a||t.hasInjectionContext()?It(a):null;l?l.emit({name:"*",maxLevel:1},"setErrorTip",n):typeof o.setErrorTip=="function"&&o.setErrorTip(n)}reset(n){const a=n,o=n||t.hasInjectionContext()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?It(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}decorate(n,a,o){Array.isArray(n)||(n=[n]);const l=o,r=o||t.hasInjectionContext()?It(o):null,s=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),i=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!s&&i?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):s&&!i&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let xt=new li;function ai(e){xt=e}function ri(e){xt?Object.assign(xt,e):xt=e}function si(e,n){rt(tt).setValidator(e,n)}function ii(e){rt(tt).deleteValidator(e)}let sr=["blur","clear"];function ci(e){sr=e}function ir(){return sr}let cr=["focus","change","setValue"];function di(e){cr=e}function dr(){return cr}function ui(e){rt(tt).messages(e)}function qt(...e){const n=[];return e.forEach(a=>{a.forEach(o=>{const l=n.findIndex(r=>r.type===o.type);l!==-1&&n.splice(l,1),n.push(o)})}),n}function cn(e){return e.forEach(n=>{n.type==="required"&&(n.required===null||n.required===void 0)&&(n.required=!0),!n.type&&(n.required===!0||n.required===!1)&&(n.type="required")}),e}const Pe=Symbol("ValidateSchemaKey");class ur{parent=null;validators={};attrRules=[];rules=[];descriptor;proxy;scope=null;constructor(n,a,o){this.parent=n,this.descriptor=a,this.proxy=o,(this.descriptor.validate??!0)&&this.init()}init(){if(this.descriptor.pureDataValidate===!0||!this.descriptor.valueName||!this.proxy)return;let n=this.proxy.$attrs;n&&(this.scope=t.effectScope(!0),this.scope.run(()=>{t.watchEffect(()=>{const a=cn(qt(this.attrRules,this.rules)),o=[];for(let r in n){let s=n[r];if(this.hasValidator(r,!0)){if(s===!1)continue;let c={type:r};s!==null&&typeof s=="object"&&Object.assign(c,s),o.push(c);continue}let i=this.getValidator(r);if(i!==null){let c={type:r,validator:i};o.push(c)}}this.attrRules=cn(o);const l=qt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(l,a)})})}))}destroy(){this.scope&&(this.scope.stop(),this.scope=null),this.parent=null,this.proxy=null}execHandler(n,...a){const o=this.descriptor.validateHandler;if(o&&typeof o[n]=="function")return Reflect.apply(o[n],o,[...a]);const l=xt;return l&&typeof l[n]=="function"?Reflect.apply(l[n],l,[...a]):null}decorate(n,a){this.descriptor.pureDataValidate!==!0&&this.execHandler("decorate",n,a,this.proxy)}success(){this.descriptor.pureDataValidate!==!0&&this.execHandler("success",this.proxy)}error(n){this.descriptor.pureDataValidate!==!0&&this.execHandler("error",n,this.proxy)}getValue(){return this.proxy===null?null:this.execHandler("getValue",this.proxy)}setValidator(n,a,o=!1){o?rt(tt).setValidator(n,a):this.validators[n]=a}getValidator(n){let a=this.validators[n]??null;return a||(a=this.parent?.getValidator(n)??null),a}deleteValidator(n,a=!1){a?rt(tt).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return rt(tt).hasValidator(n);{let o=Reflect.has(this.validators,n);return!o&&this.parent!==null&&(o=this.parent.hasValidator(n,!1)),o}}setRule(n){const a=qt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=cn(n):this.rules=cn([n]);const o=qt(this.attrRules,this.rules);t.nextTick(()=>{this.decorate(o,a)})}clear(){this.proxy===null||this.descriptor.pureDataValidate===!0||this.execHandler("reset",this.proxy)}validate(){if(this.descriptor.validate??!0){let a=qt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),s={[`${o}`]:r},i=rt(tt),c=new i(l),f=this.proxy??s;return c.validate(s,{context:f}).then(d=>{if(d.pass)this.success();else{let h="error";Array.isArray(d.errors)&&d.errors.length>0&&(h=d.errors[0].message??h,d.errors=[d.errors[0]],d.errors[0].ref=f),this.error(h)}return d}).catch(d=>{const h=d.message??`${d}`;return this.error(h),d})}}return Promise.resolve({pass:!0})}}function dn(e,n,a){if(a.valueName=a.valueName??"modelValue",a.valueType=a.valueType??"string",!a.validateHandler&&a.valueName!=="modelValue"){const l=a.valueName;a.validateHandler={getValue(r){return r[l]}}}return new ur(n,a,e)}const un=Symbol.for("EventEmitterKey");class fr{register=new Map;proxy;constructor(n){this.proxy=n}destroy(){this.proxy=null,this.register.clear()}off(n,a){let o=this.register.get(n);if(o&&Array.isArray(o)){let l=o.findIndex(r=>r===a);l!==-1&&o.splice(l,1)}}on(n,a){let o=this.register.get(n);o||(o=new Array,this.register.set(n,o)),o.push(a)}emit(n,...a){const o=this.register.get(n);o&&o.forEach(l=>{try{Reflect.apply(l,null,[n,...a])}catch(r){console.error(r.message,r)}}),this.proxy&&Reflect.apply(this.proxy.$emit,this.proxy,[n,...a])}}function ft(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function fn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function fi(e,n){const a=ft((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function mi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function ko(e,n,a,o=0,l=!0){let r=n,s=0;if(l){const c=e();if(s++,c||s>a)return}const i=()=>{const c=e();s++,!(c||s>a)&&(r+=o,setTimeout(i,r))};setTimeout(i,r)}const Ie=Symbol("DomainKey"),mt=Symbol("DataItemsKey");class mn{_parent=null;get parent(){return this._parent}set parent(n){this._parent=n}_name=null;get name(){return this._name}_broadcast=null;get broadcast(){return this._broadcast}set broadcast(n){this._broadcast=n}_validateSchema=null;get validateSchema(){return this._validateSchema}set validateSchema(n){this._validateSchema=n}_props=t.reactive({});constructor(n=null){this._name=n}destroy(){this._parent=null,this._broadcast=null,this._validateSchema=null,this._props={}}merge(n,a=[]){for(const o in n){const l=n[o];a.length>0&&a.indexOf(l)!==-1||(this._props[o]=l)}}has(n){if(Reflect.has(this._props,n)){const a=this._props[n];if(a!=null)return!0}return this.parent==null?!1:this.parent.has(n)}delete(n){Reflect.deleteProperty(this._props,n)}set(n,a){this._props[n]=a}get(n,a){if(Reflect.has(this._props,n)){const o=this._props[n];if(o!=null)return o}return this.parent==null?a:this.parent.get(n,a)}getForParent(n,a){return this.parent==null?a:this.parent.get(n,a)}getForSelf(n){return this._props[n]}getAll(n){const a=[];let o=this;for(;o!=null;){if(Reflect.has(o._props,n)){const l=o._props[n];a.push(l)}o=o._parent}return a}}const pi=new mn;function pt(){return pi}function je(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[Ie]??t.inject(Ie,null):t.inject(Ie,null)}const So=Symbol("OriginalDateKey");function Co(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,s=t.inject(Ie,null);s===null&&(s=pt());const i=e||n.prop||n.name;let c=new mn(i);c.parent=s;const f=S=>{r[So]||h(S),c?.set("modelValue",S)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[So]??null,h=S=>{const y={};ot(!0,y,t.toRaw(S)),r[So]=y};if(t.isReactive(n)||typeof n=="function"?t.watch(n,S=>{c?.merge(S,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&h(n.modelValue),r[Ie]=c,t.provide(Ie,c),l!==null){const S=t.inject(Ne,null),y=sn(r,S,i,o);c.broadcast=y,r[Ne]=y,t.provide(Ne,y),r.broadcast=(u,m,...g)=>Reflect.apply(y.emit,y,[u,m,...g]);const b=t.inject(Pe,null),k=dn(r,b,{componentName:""});c.validateSchema=k,r[Pe]=k,t.provide(Pe,k),r[mt]=new Map,r.validate=(u=!0)=>{const m=[];let g=null;const C={deep:!1};if(u===!0)g={name:"*"};else if(Array.isArray(u)&&u.length>0){const A=u;g={name:w=>w?A.indexOf(w)!==-1:!1}}else if(u!=null&&typeof u=="object"){const A=u;if(Object.assign(C,A),Array.isArray(A.include)&&A.include.length>0){const w=A.include;g={name:B=>B?w.indexOf(B)!==-1:!1}}else if(Array.isArray(A.exclude)&&A.exclude.length>0){const w=A.exclude;g={name:B=>B?w.indexOf(B)===-1:!1}}else g={name:"*"}}if(g){const A=y?.emitToChildren(g,"validate",C);A&&Reflect.apply([].push,m,A)}return m.length==1?m[0]:m.length>1?Promise.all(m).then(A=>{let w=[];return A.forEach(B=>{B.pass===!1&&Array.isArray(B.errors)&&(w=[...w,...B.errors])}),w.length>0?{pass:!1,errors:w}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(u,m=!0,g=!1)=>{if(g===!0){Reflect.ownKeys(u).forEach(A=>{let w=String(A);const B={componentName:"",fieldName:w,pureDataValidate:!0};if(c){const T=hr(c,w,B,y,k);r[mt].set(w,T);const V=u[w];V&&T.validateSchema.setRule(V)}});return}if(m){const C=Reflect.ownKeys(u),A={name:w=>C.includes(w)};y?.emitToChildren(A,"setNameValidateRules",u,!1)}},r.clearValidate=(u=!0)=>{let m=null;if(u===!0)m={name:"*"};else if(Array.isArray(u)&&u.length>0){const g=u;m={name:C=>C?g.indexOf(C)!==-1:!1}}else if(u!=null&&typeof u=="object"){const g=u;if(Array.isArray(g.include)&&g.include.length>0){const C=g.include;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(Array.isArray(g.exclude)&&g.exclude.length>0){const C=g.exclude;m={name:A=>A?C.indexOf(A)===-1:!1}}else m={name:"*"}}m&&y?.emitToChildren(m,"clearValidate",!1)},r.resetFields=u=>{const m=p();if(!m)return;const g={};if(ot(!0,g,d()??{}),Array.isArray(u))u.forEach(C=>{m[C]=g[C]});else if(u&&Array.isArray(u.include))(u.include??[]).forEach(A=>{m[A]=g[A]});else if(u&&Array.isArray(u.exclude)){let C=u.exclude??[];Reflect.ownKeys(g).forEach(A=>{C.includes(A)||(m[A]=g[A])})}else Object.assign(m,g);r.clearValidate(u)},r.setModelValue=(u,m)=>{!m||m===i?f(u):y?.emitToChildren({name:m},"setModelValue",u)},r.getModelValue=()=>p()}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Pe]=void 0,t.provide(Pe,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[Ne]=void 0,t.provide(Ne,null)),c?.destroy(),r[Ie]=void 0,t.provide(Ie,null),r[mt]&&(r[mt].clear(),r[mt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,c=null,r=null}),c}function mr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(Ie,null);r===null&&(r=pt());const s=e||n.prop||n.name;let i=new mn(s);return i.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{i?.merge(c,a)},{immediate:!0}):i.merge(n,a),l[Ie]=i,t.provide(Ie,i),t.onUnmounted(()=>{i?.destroy(),l[Ie]=void 0,t.provide(Ie,null),i=null,l=null}),i}function pr(e,n,a){const l=je(e)?.get("rules");if(!l)return;let r=l[a];r&&(Array.isArray(r)||(r=[r]),n.setRule(r))}function Te(e,n,a){const l=t.getCurrentInstance()?.proxy,r=n??"",s=t.inject(Ne,null);let i=sn(l,s,r,a);l[Ne]=i,t.provide(Ne,i),l.broadcast=(y,b,...k)=>i?Reflect.apply(i.emit,i,[y,b,...k]):null;const c=t.inject(Pe,null);e.fieldName=e.fieldName??r;let f=dn(l,c,e);l[Pe]=f,t.provide(Pe,f),pr(l,f,r),l.validate=(y=null)=>{if(!f)return Promise.resolve({pass:!0});const b=[];let k=!1,u=!1;if(Array.isArray(y)&&y.indexOf(r)!==-1)u=!0,k=!0;else if(y&&typeof y=="object"){const m=y,g=m.ignoreDisabled??!0,C=m.ignoreReadonly??!0,A=m.ignoreHidden??!0;g===!0&&e.disabled===!0||C===!0&&e.readonly===!0||A===!0&&rn(l.$el)?u=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),u=!0),k=m.deep??!1}else typeof y=="boolean"&&(k=y),u=!0;if(u){const m=f?.validate();b.push(m)}if(k){let m=null;const g={deep:!1};if(y===!0)m={name:"*"};else if(Array.isArray(y)&&y.length>0){const C=y;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(y!=null&&typeof y=="object"){const C=y;if(Object.assign(g,C),Array.isArray(C.include)&&C.include.length>0){const A=C.include;m={name:w=>w?A.indexOf(w)!==-1:!1}}else if(Array.isArray(C.exclude)&&C.exclude.length>0){const A=C.exclude;m={name:w=>w?A.indexOf(w)===-1:!1}}else m={name:"*"}}if(m&&i){const C=i.emitToChildren(m,"validate",g);Reflect.apply([].push,b,C)}}return b.length==1?b[0]:b.length>1?Promise.all(b).then(m=>{let g=[];return m.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(g=[...g,...C.errors])}),g.length>0?{pass:!1,errors:g}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=y=>f?.setRule(y),l.setNameValidateRules=(y,b=!1)=>{const k=y[r];if(k&&f?.setRule(k),b&&i){const u={name:m=>Reflect.ownKeys(y).includes(m)};i.emitToChildren(u,"setNameValidateRules",y,!1)}},l.clearValidate=(y=null)=>{(!Array.isArray(y)||y.indexOf(n??"")!==-1)&&f?.clear();let b=null;if(y===!0)b={name:"*"};else if(Array.isArray(y)&&y.length>0){const k=y;b={name:u=>u?k.indexOf(u)!==-1:!1}}else if(y!=null&&typeof y=="object"){const k=y;if(Array.isArray(k.include)&&k.include.length>0){const u=k.include;b={name:m=>m?u.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const u=k.exclude;b={name:m=>m?u.indexOf(m)===-1:!1}}else b={name:"*"}}b&&i&&i.emitToChildren(b,"clearValidate",!1)};let p=new fr(l);l[un]=p;const d=ft((y="validate")=>{f&&(y==="reset"?f.clear():f.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:ir()).forEach(y=>{p&&p.on(y,b=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:dr()).forEach(y=>{p&&p.on(y,b=>{d("reset")})}),t.onUnmounted(()=>{i?.destroy(),l[Ne]=void 0,t.provide(Ne,null),i=null,f?.destroy(),l[Pe]=void 0,t.provide(Pe,null),f=null,p?.destroy(),l[un]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:i,validateSchema:f,emitEvent:(y,...b)=>{p&&Reflect.apply(p.emit,p,[y,...b])},onEvent:(y,b)=>{p&&Reflect.apply(p.on,p,[b])},offEvent:(y,b)=>{p&&Reflect.apply(p.off,p,[b])}}}function hr(e,n,a,o,l){const r={},s=n??"",i={getValue(){const p=e.getForSelf("modelValue");return p?p[s]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,s):!1}};a.fieldName=s,a.validateHandler={getValue(p){return i.getValue()}};let c=dn({},l,a);r.validate=(p=null)=>{if(!i.isExist())return console.warn(`validate error: field [${s}] not exist`),Promise.resolve({pass:!0});const d=[];let h=!1,S=!1;if(Array.isArray(p)&&p.indexOf(s)!==-1)S=!0,h=!0;else if(p&&typeof p=="object"){const y=p;Array.isArray(y.include)&&y.include.indexOf(s)!==-1||Array.isArray(y.exclude)&&y.exclude.indexOf(s),S=!0,h=y.deep??!1}else typeof p=="boolean"&&(h=p),S=!0;if(S&&c){const y=c.validate();d.push(y)}if(h){let y=null;const b={deep:!1};if(p===!0)y={name:"*"};else if(Array.isArray(p)&&p.length>0){const k=p;y={name:u=>u?k.indexOf(u)!==-1:!1}}else if(p!=null&&typeof p=="object"){const k=p;if(Object.assign(b,k),Array.isArray(k.include)&&k.include.length>0){const u=k.include;y={name:m=>m?u.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const u=k.exclude;y={name:m=>m?u.indexOf(m)===-1:!1}}else y={name:"*"}}if(y&&f){const k=f.emitToChildren(y,"validate",b);Reflect.apply([].push,d,k)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(y=>{let b=[];return y.forEach(k=>{k.pass===!1&&Array.isArray(k.errors)&&(b=[...b,...k.errors])}),b.length>0?{pass:!1,errors:b}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[s];d&&c?.setRule(d)};let f=sn(null,o,s,r);return t.onUnmounted(()=>{c=null,f=null}),{broadcast:f,validateSchema:c}}function ht(){let n=t.getCurrentInstance()?.proxy,a=new fr(n);return n[un]=a,t.onUnmounted(()=>{a?.destroy(),n[un]=void 0,a=null,n=null}),{emitEvent:(o,...l)=>{a&&Reflect.apply(a.emit,a,[o,...l])},onEvent:(o,l)=>{a&&Reflect.apply(a.on,a,[l])},offEvent:(o,l)=>{a&&Reflect.apply(a.off,a,[l])}}}const ge=e=>e?`${de(e)}px`:"";function de(e,n=-1){if(e==null)return 0;if(typeof e=="number")return e>0&&e<1&&n>0?e*n:e;if(e=e.trim().toLocaleLowerCase(),e.length===0)return 0;let a=e.indexOf("px");if(a!==-1)return Number(e.substring(0,a));if(a=e.indexOf("rem"),a!==-1){let l=Number(e.substring(0,a)),r=1;if(nt){const{fontSize:s}=window.getComputedStyle(document.documentElement,null),i=s.indexOf("px");i>0&&(r=Number(s.substring(0,i)))}return l*=r,l}if(a=e.indexOf("%"),a!==-1)return Number(e.substring(0,a))*n;const o=Number(e);return isNaN(o)?0:o}const Ge="PageStateKey";function ze(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=de(e.top)),e.left!==null&&e.left!==void 0&&(n.left=de(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=de(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=de(e.right))),n}function wo(e,n,a={},o=!0,l=-1,r=-1,s=0,i=0){if(e.headerHeight=de(a.headerHeight??n.headerHeight??-1),e.headerPadding=ze(a.headerPadding??n.headerPadding),e.footerHeight=de(a.footerHeight??n.footerHeight??-1),e.footerPadding=ze(a.footerPadding??n.footerPadding),e.contentPadding=ze(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=de(c,r):e.height=de(r)-de(s,r)-de(i,r),e.width=de(a.width??n.width??0,l)}}function gr(e,n={}){const a={top:null,left:null,bottom:null,right:null},o={width:0,height:0,headerHeight:0,headerPadding:{...a},footerHeight:0,footerPadding:{...a},contentPadding:{...a},contentHeight:null,safeAreaTop:0,safeAreaBottom:0,safeAreaLeft:0,safeAreaRight:0,headerMounted:!1,footerMounted:!1},l=Object.assign(e.get("safeAreaInset")??{},n.safeAreaInset??{});l&&(o.safeAreaTop=de(l.top),o.safeAreaBottom=de(l.bottom),o.safeAreaLeft=de(l.left),o.safeAreaRight=de(l.right));const r=e.get("pageLayout");if(!r)return null;const s=e.get("rootWidth")??-1,i=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,f=e.get("footerBarHeight")??0;wo(o,r,n,!0,s,i,c,f);const p=t.reactive(o),d=e.getForParent(Ge);d&&(o.height=yn(e,d),o.width=bn(e,d),t.watch([()=>yn(e,d),()=>bn(e,d)],([S,y])=>{p.height=S,p.width=y}));const h=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,y,b=-1,k=-1,u=0,m=0])=>{wo(p,y,n,h,b,k,u,m)}),e.set(Ge,p),p}function pn(e){return e.get(Ge)}function hn(e,n){if(n=n??e.get(Ge),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function gn(e,n){if(n=n??e.get(Ge),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Ge),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=hn(e,n),o=gn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function bn(e,n){return n=n??e.get(Ge),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function hi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function gi(e){return!!e.getForParent(Ge)}var kn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(kn||{});function No(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=je();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let i=r.length-1;i>=0;i--){const c=r[i];if(No(c,o))return c}const s=e.value;return No(s,o)?s:null}):t.computed(()=>{const r=e.value;return No(r,o)?r:l?.get(n)})}function $e(e){return Ve(e,"readonly",0,function(a){return he(a)})}function Ee(e){return Ve(e,"disabled",0,function(a){return he(a)})}function ve(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const s=t.ref(r);return t.watch(l,i=>{if(typeof a=="function"){const c=a(i);c!==s.value&&(s.value=c,o&&o("setValue",c))}else i!==s.value&&(s.value=i,o&&o("setValue",i))}),s}const yr=new Map,Sn=new Map;let Bo=null;function yi(e){Bo=e}function br(e,n,a){if(a){let o=Sn.get(a);o||(o=new Map,Sn.set(a,o)),o.set(e,n)}else yr.set(e,n)}function Ze(e,n,a){!a&&Bo&&(a=Bo(e)??void 0);let o=null;if(a){let l=Sn.get(a);l&&(o=l.get(n))}return o||(o=yr.get(n)),o}function bi(e,n){for(let a in e){const o=e[a];br(a,o,n)}}function ki(e){Sn.delete(e)}function Si(){return{top:0,left:0,bottom:0,right:0}}function Ci(e=0,n=0){if(nt){const a=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l={width:a,height:o-de(e,o)-de(n,o)};return{rootWidth:a,rootHeight:o,pageLayout:l}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{width:"100%",height:"100%",headerHeight:-1,footerHeight:-1}}}function wi(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Ni{packages;_version;get version(){return this._version}constructor(n,a){this.packages=n,this._version=a}install(n,a){a?.install!==!1&&this.packages.forEach(r=>{if(r.install)n.use(r);else if(r.name){const s=wi(r.name,a);n.component(s,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=pt();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=fn(()=>{const i={...a},c=document.documentElement.clientWidth||document.body.clientWidth,f=document.documentElement.clientHeight||document.body.clientHeight;i.width=c,i.height=f,this.initPageLayout(i,l)},150);new window.ResizeObserver(r).observe(window.document.body)}for(const r in a)o.indexOf(r)===-1&&l.set(r,a[r])}initPageLayout(n,a){const o=n.headerBarHeight??0,l=n.footerBarHeight??0,r=ot({},Si(),n.safeAreaInset),s=Ci(o,l),i=ot({},s.pageLayout,n.pageLayout);a=a??pt(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",i),a.set("rootWidth",s.rootWidth),a.set("rootHeight",s.rootHeight)}setScopeGetter(n){yi(n)}setAPI(n,a,o){br(n,a,o)}getAPI(n,a,o){return Ze(n,a,o)}batchSetAPI(n,a){bi(n,a)}clearScopeAPI(n){ki(n)}getRootDomain(){return pt()}}function G(e){const n="fox-"+e;return{componentName:n,scope:e.replace("-",""),create(a){return a.baseName=e,a.name=n,a.install=o=>{o.component(a.name,a)},t.defineComponent(a)},createDemo(a){return a.baseName=e,a.name="demo-"+e,t.defineComponent(a)}}}const Bi=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Qa(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",s=e.id||new Date().getTime();l.id=r+s;let i={};ln(n.wrapper)?i=n.wrapper(a,l):i=n.wrapper;const c=t.createApp(i,e),f=n.components;return f&&f.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},kr=(e,n)=>e?t.h(e,n):"";function xe(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const pe={disabled:{type:[Boolean,String],required:!1},readonly:{type:[Boolean,String],required:!1},labelPosition:{type:String,required:!1},labelWidth:{type:[String,Number],required:!1},textAlign:{type:[String],required:!1},hasBorder:{type:Boolean,required:!1,default:!0}},be={prop:{type:String,required:!1},label:{type:String,required:!1},isRequired:{type:[String,Boolean],required:!1,default:!1},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1},infoMarkClass:{type:String,required:!1,default:"is-info"},warnMarkClass:{type:String,required:!1,default:"is-warn"},errorMarkClass:{type:String,required:!1,default:"is-error"},errorTip:{type:String,required:!1},errorIcon:{type:Object,required:!1},errorClass:{type:String,required:!1},warnTip:{type:String,required:!1},warnIcon:{type:Object,required:!1},warnClass:{type:String,required:!1},infoTip:{type:String,required:!1},infoIcon:{type:Object,required:!1},infoClass:{type:String,required:!1},contentClass:{type:String,required:!1,default:"content--default"},contentStyle:{type:Object,required:!1,default:{}},hintType:{type:String,required:!1,default:"text"},hintText:{type:[String,Number],required:!1},hintVisible:{type:[Boolean,String],required:!1,default:!0},hintProps:{type:Object,required:!1,default:{}},appearListen:{type:[Boolean,String],required:!1,default:!1}},Sr={column:{type:[String,Number],required:!1},columnWidth:{type:[String,Number],required:!1},gutter:{type:[String,Number],required:!1},minItemWidth:{type:[String,Number],required:!1},maxItemWidth:{type:[String,Number],required:!1}},Cr={name:{type:String,required:!1},tag:{type:String,required:!1,default:"div"},modelValue:{type:String,required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1},type:{type:[String],required:!1},justify:{type:[String],required:!1,default:"stretch"},align:{type:[String],required:!1,default:"start"},span:{type:[Number,String],required:!1,default:1},offset:{type:[Number],default:0},autoLayout:{type:[Boolean],required:!1,default:!0},isWrap:{type:[Boolean,String],required:!1,default:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},showMark:{type:[String,Boolean],required:!1,default:!1},markColor:{type:[String],required:!1},title:{type:String,default:""},titleColor:{type:[String],required:!1},collapse:{type:[String,Boolean],requried:!1},showCollapse:{type:[String,Boolean],required:!1,default:!1},collapsePosition:{type:[String],requried:!1,default:"right"},collapseText:{type:[String],requried:!1},expandText:{type:[String],requried:!1},collapseIcon:{type:[Object],requried:!1},collapseHeight:{type:[String,Number],requried:!1},rollingDisplay:{type:[Boolean],requried:!1,default:!0}},wr=[];for(const e in Cr)wr.push(e);const Ai=Symbol.for("InnerPageScopeKey"),Ti={name:{type:String,required:!1,default:""},modelValue:{type:Object,required:!1},width:{type:[Number,String],required:!1},height:{type:[Number,String],required:!1},safeAreaInset:{type:Object,required:!1},contentPadding:{type:Object,required:!1},headerPadding:{type:Object,required:!1},footerPadding:{type:Object,required:!1},headerHeight:{type:[Number,String],required:!1},footerHeight:{type:[Number,String],required:!1},rules:{type:[Object],required:!1},pureDataRules:{type:[Object],required:!1}},Vi=(e,n)=>({inheritAttrs:!0,props:{...pe,...Sr,...Ti},setup(a,{slots:o}){const l=Co(a.name,a),r=t.inject(Ai,!1);if(l){const p=gr(l,a);xe({getPageContentHeight:()=>yn(l,p),getPageContentWidth:()=>bn(l,p),getPageHeaderHeight:()=>hn(l,p),getPageFooterHeight:()=>gn(l,p)}),p&&r&&(p.contentHeight="100%")}const s=t.computed(()=>({[e]:!0})),i=t.computed(()=>({})),c=t.getCurrentInstance(),f=(p,d=!1)=>{const h=c?.proxy;h&&typeof h.setNameValidateRules=="function"&&h.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[h,S])=>{if(p&&h){const y=t.toRaw(h),b=t.toRaw(p),k=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{k.includes(m)||(b[m]=[])}),f(b)}if(d&&S){const y=t.toRaw(S),b=t.toRaw(d),k=b?Reflect.ownKeys(b):[];(y?Reflect.ownKeys(y):[]).forEach(m=>{k.includes(m)||(b[m]=[])}),f(b,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);f(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);f(p,!0)}}),()=>{const p={class:s.value,style:i.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:$i,create:Ei,scope:cA}=G("page"),Ao=Ei(Vi($i));function To(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Cn(e){const n=t.unref(e),a=window.getComputedStyle(n,null),o=parseFloat(a.getPropertyValue("padding-left")),l=parseFloat(a.getPropertyValue("padding-right")),r=parseFloat(a.getPropertyValue("padding-top")),s=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-s}}const Di=Symbol.for("InnerPageScopeKey"),Nr={headerbar:{},radio:{},checkbox:{}};function Ii(e){Object.assign(Nr,e)}function wn(){return Nr}const xi=(e,n,a,o=!1)=>({props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetTop:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},align:{type:[String],default:"center"},padding:{type:[Object],required:!1},leftShow:{type:[Boolean,String],required:!1,default:!0},leftIcon:{type:[Object],required:!1},leftText:{type:String,required:!1},titleShow:{type:Boolean,required:!1,default:!0},title:{type:String,required:!1,default:""},titleIcon:{type:[Object],required:!1},rightShow:{type:[String,Boolean],required:!1,default:!0},rightIcon:{type:[Object],required:!1},rightText:{type:String,required:!1,default:""}},emits:["back","click-title","click-right","click-right-text"],setup(l,r){const s=je(),i=s?pn(s):null,c=t.inject(Di,!1),f=wn(),p=e,d=t.computed(()=>{const x={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(x[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),x}),h=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),S=l.height!==null&&l.height!==void 0?de(l.height):null,y=t.computed(()=>{const x={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(s&&i){const P=ze(l.padding??i.headerPadding);return Object.assign(x,P),S&&(i.headerHeight=S),i.headerHeight>0&&(x.height=i.headerHeight),x.safeAreaTop=i.safeAreaTop===-1?0:i.safeAreaTop,x.safeAreaTop>0&&(x.top=x.safeAreaTop+(P.top??0),x.height&&x.height>0&&(x.height=x.height+x.safeAreaTop)),x}if(S&&(x.height=S),l.padding){const P=ze(l.padding);Object.assign(x,P)}return x}),b=t.ref(null),k=()=>{if(i&&b.value&&!rn(b.value)){if(!o){const x=To(b.value);i.headerAllHeight=x.height}return i.headerMounted=!0,!0}return!1};let u=null;t.onMounted(()=>{i&&(ko(k,50,5,50,!0),window.ResizeObserver&&b.value&&(u=new window.ResizeObserver(()=>{k()}),u.observe(b.value)))}),t.onUnmounted(()=>{i&&(i.headerMounted=!1,u&&(u.disconnect(),u=null))});const m=t.computed(()=>{const x={};return y.value.height!==null&&y.value.height!==void 0&&(x.height=`${y.value.height}px`),y.value.top!==null&&y.value.top!==void 0&&(x.paddingTop=`${y.value.top}px`),y.value.left!==null&&y.value.left!==void 0&&(x.paddingLeft=`${y.value.left}px`),y.value.right!==null&&y.value.right!==void 0&&(x.paddingRight=`${y.value.right}px`),y.value.bottom!==null&&y.value.bottom!==void 0&&(x.paddingBottom=`${y.value.bottom}px`),x}),g=t.computed(()=>!(y.value.height!==null&&y.value.height!==void 0&&y.value.height<=0));function C(){r.emit("back")}function A(){r.emit("click-title")}function w(){r.emit("click-right")}function B(){r.emit("click-right-text")}const T=()=>{if(!l.leftShow)return null;const x=[];if(r.slots.left)x.push(r.slots.left());else{if(r.slots.leftIcon){const P=t.h("view",{class:"left-icon",onClick:C},[r.slots.leftIcon()]);x.push(P)}else{const P=l.leftIcon??f.headerbar.Left??a,D=t.h("view",{class:"left-icon",onClick:C},[t.h(P)]);x.push(D)}if(l.leftText){const P=t.h("view",{class:"left-text",onClick:C},[l.leftText]);x.push(P)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__left"},x)},V=()=>{if(!l.rightShow)return null;const x=[];if(r.slots.right)x.push(r.slots.right());else{if(l.rightText){const P=t.h("view",{class:"right-text",onClick:B},[l.rightText]);x.push(P)}if(r.slots.rightIcon){const P=t.h("view",{class:"right-icon",onClick:w},[r.slots.rightIcon()]);x.push(P)}else if(l.rightIcon){const P=t.h("view",{class:"right-icon",onClick:w},[t.h(l.rightIcon)]);x.push(P)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__right"},x)},E=()=>{if(!l.titleShow)return null;const x=[],P=r.slots.default?r.slots.default():null;if(P)x.push(P);else{if(l.title){const D=t.h("view",{class:"title-text"},[l.title]);x.push(D)}if(r.slots.titleIcon){const D=t.h("view",{class:"title-icon",onClick:A},[r.slots.titleIcon()]);x.push(D)}else if(l.titleIcon){const D=t.h("view",{class:"title-icon",onClick:A},[t.h(l.titleIcon)]);x.push(D)}}return x.length===0?null:t.h("view",{class:"fox-header-bar__title"},x)},$=()=>{const x=[],P=r.slots.bottom?r.slots.bottom():null;return P&&x.push(P),x.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},x)};return()=>{if(!g.value)return null;const x=[];if(r.slots.all)x.push(r.slots.all());else{const D=[],I=T();I&&D.push(I);const R=E();R&&D.push(R);const v=V();if(v&&D.push(v),D.length>0){const H=t.h("view",{class:h.value},D);x.push(H)}const W=$();W&&x.push(W)}if(x.length===0)return null;const P={class:d.value,style:m.value,ref:b};return t.h("view",P,x)}}}),{componentName:qi,create:vi,scope:Mi}=G("header-bar"),Vo=vi(xi(qi,Mi,oe.Left,!1)),Pi=Symbol.for("InnerPageScopeKey");function Li(e,n,a=!1){return{props:{fixed:{type:Boolean,required:!1,default:!0},safeAreaInsetBottom:{type:Boolean,required:!1,default:!0},border:{type:Boolean,required:!1,default:!1},height:{type:[String,Number],required:!1},padding:{type:[Object],required:!1},align:{type:String,required:!1,default:"center"}},setup(o,l){const r=je(),s=r?pn(r):null,i=t.inject(Pi,!1),c=e,f=t.computed(()=>{const k={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return i||(k[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),k}),p=o.height!==null&&o.height!==void 0?de(o.height):null,d=t.computed(()=>{const k={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&s){const u=ze(o.padding??s.footerPadding);return Object.assign(k,u),p&&(s.footerHeight=p),s.footerHeight>0&&(k.height=s.footerHeight),k.safeAreaBottom=s.safeAreaBottom===-1?0:s.safeAreaBottom,k.safeAreaBottom>0&&(k.bottom=k.safeAreaBottom+(u.bottom??0),k.height&&k.height>0&&(k.height=k.height+k.safeAreaBottom)),k}if(p&&(k.height=p),o.padding){const u=ze(o.padding);Object.assign(k,u)}return k}),h=t.ref(null),S=()=>{if(s&&h.value&&!rn(h.value)){if(!a){const k=To(h.value);s.footerAllHeight=k.height}return s.footerMounted=!0,!0}return!1};let y=null;t.onMounted(()=>{s&&(ko(S,50,5,50,!0),window.ResizeObserver&&(y=new window.ResizeObserver(()=>{S()}),y.observe(h.value)))}),t.onUnmounted(()=>{s&&(s.footerMounted=!1,y&&(y.disconnect(),y=null))});const b=t.computed(()=>{const k={};return d.value.height!==null&&d.value.height!==void 0&&(k.height=ge(d.value.height)),d.value.top!==null&&d.value.top!==void 0&&(k.paddingTop=ge(d.value.top)),d.value.left!==null&&d.value.left!==void 0&&(k.paddingLeft=ge(d.value.left)),d.value.right!==null&&d.value.right!==void 0&&(k.paddingRight=ge(d.value.right)),d.value.bottom!==null&&d.value.bottom!==void 0&&(k.paddingBottom=ge(d.value.bottom)),k});return()=>{const k=l.slots.default?l.slots.default():[],u={ref:h,class:f.value,style:b.value};return t.h("view",u,k)}}}}const{componentName:zi,create:Fi,scope:Ri}=G("footer-bar"),$o=Fi(Li(zi,Ri,!1));function Oi(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=je(),l=t.computed(()=>({[e]:!0})),r=o?pn(o):null,s=t.computed(()=>{const f={};if(o&&r){if(a.padding){const u=ze(a.padding);Object.assign(r.contentPadding,u)}const p=hn(o,r),d=gn(o,r);let h="";r.contentHeight?h=`${r.contentHeight}`:h=`${r.height}px`,console.debug("[content]page height:",h),console.debug("[content]header height:",p),console.debug("[content]footer height:",d),console.debug("[content]padding:",r.contentPadding),f.height=h;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,f.paddingTop=`${p+S}px`);let y=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(y>=0||d>0)&&(y=y<0?0:y,f.paddingBottom=`${d+y}px`);const b=(r&&r.contentPadding&&r.contentPadding.left)??-1;b>=0&&(f.paddingLeft=`${b}px`);const k=(r&&r.contentPadding&&r.contentPadding.right)??-1;return k>=0&&(f.paddingRight=`${k}px`),f}if(a.padding){const p=ze(a.padding);p.left&&(f.paddingLeft=`${p.left}px`),p.top&&(f.paddingTop=`${p.top}px`),p.right&&(f.paddingRight=`${p.right}px`),p.bottom&&(f.paddingBottom=`${p.bottom}px`)}return f}),i=t.ref(null),c=ft(()=>{if(r&&i.value){const f=Cn(i.value);r.contentInnerHeight=f.height,r.contentInnerWidth=f.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>s.value,()=>l.value],([])=>{c()}),{contentRef:i,classes:l,styles:s}}}}const{componentName:Ki,create:Ui,scope:dA}=G("content"),Hi=Ui(Oi(Ki));function ji(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{ref:"contentRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.renderSlot(e.$slots,"default")],6)}const te=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Eo=te(Hi,[["render",ji]]),gt="GroupStateKey",Br=Symbol.for("GroupScopeKey");function Nn(){return t.inject(Br,!1)}function Bn(e=!0){t.provide(Br,e)}function Wi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Xa(l)||(e[o]=l)})}function Yi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Wi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(gt,r),r}function Do(e,n,a=-1,o=-1,l=!1,r,s,i){const c=e.get(gt);if(!c)return;const f=e.get("groupLayout")??{};a===-1&&(a=f.column??1),o===-1&&(o=f.gutter??0),r||(r=f.minItemWidth??-1),s||(s=f.maxItemWidth??-1);const p=de(r),d=de(s);i||(i=f.type??"grid");const h=()=>{const S=n===""||n===-1,y=de(n);let b=me(a);const k=de(o);if(!S){let g=(y-(b-1)*k)/b;for(;d!==-1&&g>d;)b++,g=(y-(b-1)*k)/b;for(;p!==-1&&b>1&&g<p;)b--,g=(y-(b-1)*k)/b}let u=!1;const m=c.layout;m.value.width=n,m.value.column!==b&&(m.value.column=b,u=!0),m.value.gutter!==k&&(m.value.gutter=k,u=!0),m.value.type!==i&&(m.value.type=i,u=!0),u&&t.triggerRef(m)};if(l)h();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&h()},50)}}function An(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.layout}function Tn(e,n=!1){let a;return n?a=e.getForParent(gt):a=e.get(gt),a.order}function Ar(e,n=1){if(n==="stretch")return-1;const a=me(n);return a===-1?100:100*a/e}function Vn(e,n,a=1,o=0,l){const r={};let s=0;l?s=de(l):s=Ar(n.column,a),s>0&&(r.width=`${s}%`);const i=Ar(n.column,o);i>0&&(r["margin-left"]=`${i}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function $n(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,f=c+(n.column-c);return e.index=e.index+(f-c),{"grid-column":`${c+1} / -1`}}let l=me(a);if(l===-1){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}if(l>n.column){const c=e.index%n.column;return n.column,c==0?e.index=e.index+n.column:e.index=e.index+(n.column-c)+n.column,{"grid-column":"1 / -1"}}const r=me(o)%n.column;let s=(e.index+r)%n.column,i=s+l;return i>n.column?(s=0,i=s+l,e.index=e.index+(n.column-s)+l):e.index=e.index+r+l,r>0?{"grid-column":`${s+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const Tr=Symbol("RollingStateKey");function Xi(e){t.provide(Tr,e)}function Qi(){return t.inject(Tr,null)}function Io(e){let n=0;const a=window.getComputedStyle(e,null);if(a.getPropertyValue("box-sizing")==="content-box"){const l=parseFloat(a.getPropertyValue("padding-top")),r=parseFloat(a.getPropertyValue("padding-bottom"));n=e.clientHeight-l-r}else n=e.offsetHeight;return n}function Gi(e){let n=Io(e);if(n<=0){const a=e.cloneNode(!0),o=e.offsetWidth;a.style=`width: ${o}px; height: initial; overflow: initial; visibility: hidden;`,document.body.appendChild(a),n=Io(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Zi(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const Ji={...pe,...Sr,...Cr};function _i(e,n,a){return{props:Ji,emits:["update:collapse","header-click"],setup(o,l){const r=Co(o.name,o,wr),s=Yi(r,{type:o.type}),i=Nn();Bn(!0);const c=o.rollingDisplay?Qi():null,f=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>i&&r?An(r,!0).value:null),h=t.getCurrentInstance(),S=(U,j=!1)=>{const Q=h?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(U,!0,j)};t.watch([()=>o.rules,()=>o.pureDataRules],([U,j],[Q,O])=>{if(U&&Q){const Z=t.toRaw(Q),ne=t.toRaw(U),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne)}if(j&&O){const Z=t.toRaw(O),ne=t.toRaw(j),re=ne?Reflect.ownKeys(ne):[];(Z?Reflect.ownKeys(Z):[]).forEach(ye=>{re.includes(ye)||(ne[ye]=[])}),S(ne,!0)}},{deep:!0});const y=e,b=t.computed(()=>{const U={};if(U.height=I.value,o.width)o.width!=="auto"&&(U.width=ge(o.width));else{const j=i?Tn(r,!0):null;if(d.value&&j){if(d.value.type==="grid"){const Q=$n(j,d.value,o.span,o.offset);Object.assign(U,Q)}else if(d.value.type==="flow"){const Q=Vn(j,d.value,o.span,o.offset,o.width);Object.assign(U,Q)}}}return U}),k=t.computed(()=>{const U=s.layout.value.type;return U==="grid"||U==="flow"?{[`${y}--${U}`]:!0,[`${y}--${U}-justify-${o.justify}`]:!0,[`${y}--${U}-align-${o.align}`]:!0,[`${y}--gutter`]:!0}:{[`${y}--${U}`]:!0,[`${y}--gutter`]:!0}}),u=t.computed(()=>{if(s.layout.value.type==="grid"){let j="";if(o.columnWidth)j=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Zi(T.value,s.layout.value.column,s.layout.value.gutter);j=`repeat(${s.layout.value.column}, ${Q})`}return{"column-gap":`${s.layout.value.gutter}px`,"grid-template-columns":j}}}),m=t.toRef(o,"gutter"),g=t.toRef(o,"column"),C=t.computed(()=>i||p.value?!0:he(o.isWrap)),A=[],w=U=>{A.push(U)},B=()=>{let U=A.length;A.splice(0,U)},T=t.ref(-1),V=U=>{const j=Cn(U).width;j>0&&j!==T.value&&(T.value=j)};Do(r,T.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([T,g,m],([U,j,Q])=>{s.order.index=0,Do(r,U,j,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>R.value?o.expandText??"":o.collapseText??""),$=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),x=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!R.value,"is-collapse":R.value})),P=t.ref(),D=t.ref(),I=t.computed(()=>v.value||ge(o.height)||""),R=t.ref(!1),v=t.ref(""),W=t.ref(!1);let H=-1;const J=(U,j=!0)=>{const Q=P.value;if(Q&&R.value!==U){if(H=H<=0?Gi(Q):H,W.value=!0,j)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",U||(v.value="",W.value=!1)},U){let O=0;o.collapseHeight?O=o.collapseHeight:D.value&&D.value.classList.contains(`${e}__header`)&&(O=D.value.offsetHeight),v.value=`${H}px`,t.nextTick(()=>{v.value=`${O}px`})}else v.value=`${H}px`;else if(U){let O=0;o.collapseHeight?O=o.collapseHeight:D.value&&D.value.classList.contains(`${e}__header`)&&(O=D.value.offsetHeight),v.value=`${O}px`}else W.value=!1,v.value=`${H}px`;R.value=U,l.emit("update:collapse",U)}};t.watch(()=>o.collapse,U=>{J(U)});const ee=U=>{l.emit("header-click",U)},Y=()=>{M()},M=U=>{U=U??!R.value,J(U)};xe({toggleCollapse:M,doLayout:()=>{A[0]&&(V(A[0]),Do(r,T.value,g.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let q=null,F=!0;const L=U=>{if(o.rules){const j=t.toRaw(o.rules);S(j)}if(o.pureDataRules){const j=t.toRaw(o.pureDataRules);S(j,!0)}if(nt&&(U&&J(he(o.collapse),!1),o.autoLayout&&Array.isArray(A)&&A.length>0)){const j=A[0];V(j),window.ResizeObserver&&(q=new window.ResizeObserver(()=>{V(j)}),q.observe(j))}},K=()=>{q?.disconnect(),q=null},X=!p.value||c?.acquire();X&&(f.value=p.value?!0:null),t.onMounted(()=>{if(X&&(L(F),F=!1),p.value&&c){let U=null,j=c.initialHeight;c.observe(P.value,Q=>{if(Q!==f.value)if(Q)f.value=!0,R.value||(v.value=""),U=setTimeout(()=>{U=null,f.value!==!1&&(L(F),F=!1)},100);else{if(U!==null&&clearTimeout(U),f.value=!1,!R.value)if(F)v.value=c.initialHeight;else{let O=Io(P.value);O<=0?v.value=j:(v.value=`${O}px`,j=v.value)}F||K()}})}}),t.onUnmounted(()=>{q?.disconnect(),c&&c.unobserve(P.value)});const _=(U="right")=>{const j=[];if(E.value){const ne={class:$.value},re=t.h("span",ne,[E.value]);j.push(re)}const Q={class:x.value},O=o.collapseIcon??a,Z=t.h(O,Q);return j.push(Z),j.length>0?t.h("div",{class:{[`${y}__header-collapse`]:!0,[`is-${U}`]:!0},onClick:Y},j):null},le=(U,j,Q,O)=>{const Z={...k.value};return j===0&&(Z[`${y}__first`]=!0),Q>=O-1&&(Z[`${y}__last`]=!0),t.h("div",{ref:w,key:`${j}`,class:Z,style:u.value},U)};return()=>{if(p.value&&f.value!==!0){const Z=o.tag||"div";return t.h(Z,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:b.value},[])}s.order.index=0;const U=[];let j=0;if(l.slots.header){const Z={key:`${j++}`,ref:D,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},ne=t.h("div",Z,[l.slots.header()]);U.push(ne)}else{const Z=[],ne=o.collapsePosition==="left";if(ne&&o.showCollapse){const re=_("left");re&&Z.push(re)}if(o.title||l.slots.title){if(o.showMark){const re={class:{[`${y}__header-mark`]:!0}};o.markColor&&(re.style={background:o.markColor});const se=t.h("div",re);Z.push(se)}if(l.slots.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[l.slots.title()]);Z.push(re)}else if(o.title){const re=t.h("div",{class:{[`${y}__header-title`]:!0}},[o.title]);Z.push(re)}}if(l.slots.toolbar&&Z.push(l.slots.toolbar()),!ne&&o.showCollapse){const re=_("right");re&&Z.push(re)}if(Z.length>0){const re={key:`${j++}`,ref:D,class:{[`${y}__header`]:!0,[`${y}__first`]:!0},onClick:ee},se=t.h("div",re,Z);U.push(se)}}B();const Q=l.slots.default?l.slots.default():[],O=s.layout.value.type;if(O==="grid"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else if(O==="flow"){const Z=le(Q,j++,0,Q.length);U.push(Z)}else for(let Z=0;Z<Q.length;Z++){const ne=Q[Z],re=le([ne],j++,Z,Q.length);U.push(re)}if(C.value){const Z=o.tag||"div";return t.h(Z,{ref:P,prop:o.name,class:{[`${y}`]:!0,"is-collapse":W.value},style:b.value},[U])}else return U}}}}const{componentName:ec,create:tc,scope:nc}=G("group"),xo=tc(_i(ec,nc,oe.RectUp));function oc(e){return e===window}const lc=/matrix\((.+)\)/,Vr=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(oc(n))return{x:0,y:0};let a=0,o=0,l=n;for(;l!==null;)a+=l.offsetLeft,o+=l.offsetTop,l=l.offsetParent;let r=0,s=0,i=0,c=0;for(l=n;l!==document;){s+=l.scrollTop,r+=l.scrollLeft;const{transform:f}=window.getComputedStyle(l);if(f){const p=lc.exec(f);if(p){let h=p[1].split(/\s*,\s*/);h.length==6&&(i+=Number(h[4]),c+=Number(h[5]))}}l=l.parentNode}return a-=r,o-=s,a+=i,o+=c,{x:a,y:o}};class ac{watchedListeners=[];add(n){this.watchedListeners.push(n)}remove(n){const a=this.watchedListeners.indexOf(n);a!==-1&&this.watchedListeners.splice(a,1)}size(){return this.watchedListeners.length}listen=()=>{this.watchedListeners.forEach(n=>{try{n()}catch{}})}}class rc{monitorRegister=new WeakMap;watch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r||(r=new ac,o.addEventListener("scroll",r.listen),o===document.body&&o.addEventListener("resize",r.listen),this.monitorRegister.set(o,r)),r.add(a),o=o.parentNode}}unwatch(n,a){let o=n.parentNode;const l=document.body.parentNode;for(;o&&o!==l;){let r=this.monitorRegister.get(o);r&&(r.remove(a),r.size()===0&&(this.monitorRegister.delete(o),o.removeEventListener("scroll",r.listen),o===document.body&&o.removeEventListener("resize",r.listen))),o=o.parentNode}}}const $r=new rc,Er={price:{type:[Number,String],default:0},needSymbol:{type:Boolean,default:!0},symbol:{type:String,default:"&yen;"},decimalLength:{type:[Number,String],required:!1,default:2},digits:{type:[Number,String],required:!1,default:3},separator:{type:String,required:!1,default:","},position:{type:String,default:"before"},size:{type:String,default:"large"}},{componentName:sc,create:ic}=G("price"),cc=ic({props:{...Er},setup(e){const n=t.computed(()=>({[sc]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":nn(e.price,e.decimalLength,!0,me(e.digits),e.separator)),l=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(0,i)}),r=t.computed(()=>{let s=o.value;if(s.length==0)return"";let i=s.indexOf(".");return s.substring(i+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),dc=["innerHTML"],uc=["innerHTML"];function fc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.needSymbol&&e.position=="before"?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,dc)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--${e.size}`)},t.toDisplayString(e.intText),3),e.decimalText.length!=0?(t.openBlock(),t.createElementBlock("view",{key:1,class:t.normalizeClass(`fox-price--decimal-${e.size}`)},".",2)):t.createCommentVNode("",!0),t.createElementVNode("view",{class:t.normalizeClass(`fox-price--decimal-${e.size}`)},t.toDisplayString(e.decimalText),3),e.needSymbol&&e.position=="after"?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-price--symbol",`fox-price--symbol-${e.size}`]),innerHTML:e.showSymbol},null,10,uc)):t.createCommentVNode("",!0)],2)}const Je=te(cc,[["render",fc]]),{componentName:qo,create:mc}=G("hint-text"),pc=mc({components:{Price:Je},props:{...Er,type:{type:String,default:"number"},placement:{type:String,default:"top-start"},transition:{type:Boolean,default:!0},size:{type:String,default:"default"},arrowSize:{type:Number,default:6},showArrow:{type:Boolean,default:!0},arrowOffset:{type:Number,default:20},offset:{type:Number,default:12},id:{type:String},reference:{type:Object},autoFit:{type:Boolean,default:!0},message:{type:String,default:""},visible:{type:Boolean,default:!0},unmount:{type:Function},customClass:{type:String},customStyle:{type:Object},customTextClass:{type:String},customTextStyle:{type:Object},closeOnClick:{type:Boolean},zIndex:{type:[String,Number]}},emits:["update:visible"],setup(e,n){const a=t.ref({top:null,right:null,bottom:null,left:null}),o=t.ref({x:0,y:0}),l=t.ref(0),r=t.ref(0),s=t.ref(e.placement),i=t.ref(!1),c=t.ref(null),f=($,x,P,D,I,R)=>{const v=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,H=$.split("-");let J=[];H[0]==="top"?J=["top","bottom","right","left"]:H[0]==="bottom"?J=["bottom","top","right","left"]:H[0]==="left"?J=["left","top","bottom","right"]:H[0]==="right"&&(J=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},Y=[];for(let M=0;M<J.length;M++){const z=J[M];if(Y[0]=z,H[1]&&(Y[1]=H[1]),z==="top"){const q=x.y-R-e.arrowSize-e.offset;if(q>=0){ee.top=q;let F=0;H[1]==="start"?F=x.x:H[1]==="end"?F=x.x+P-I:F=x.x+P/2-I/2;const L=v-F-I;L<0?(F+=L,d.value=-L):d.value=0,ee.left=F<0?0:F;break}}else if(z==="bottom"){const q=x.y+D+e.arrowSize+e.offset;if(q+R<=W){ee.top=q;let F=0;H[1]==="start"?F=x.x:H[1]==="end"?F=x.x+P-I:F=x.x+P/2-I/2;const L=v-F-I;L<0?(F+=L,d.value=-L):d.value=0,ee.left=F<0?0:F;break}}else if(z==="left"){const q=x.x-I-e.arrowSize-e.offset;if(q>=0){ee.left=q;let F=0;H[1]==="start"?F=x.y:H[1]==="end"?F=x.y+D-R:F=x.y+D/2-R/2,ee.top=F<0?0:F;break}}else if(z==="right"){const q=x.x+P+e.arrowSize+e.offset;if(q+I<=v){ee.left=q;let F=0;H[1]==="start"?F=x.y:H[1]==="end"?F=x.y+D-R:F=x.y+D/2-R/2,ee.top=F<0?0:F;break}}}return{bestPlacement:Y.join("-"),bestInsetRect:ee}},p=($,x,P=10)=>{if(!nt||x===!1||!$)return;o.value=Vr(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const D=c.value.offsetHeight,I=c.value.offsetWidth,{bestPlacement:R,bestInsetRect:v}=f(e.placement,o.value,l.value,r.value,I,D);s.value=R,a.value=v,i.value=!0},d=t.ref(0),h=ft(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,$=>{S.value=$});const y=t.computed(()=>S.value&&b.value),b=t.ref(!0),k=ft($=>{const x=$[0];x&&(b.value=x.isIntersecting)},10),u=new IntersectionObserver(k);t.watch([()=>e.message,()=>e.visible],([$,x])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),$r.watch(e.reference,h),u.observe(e.reference)}),t.onBeforeMount(()=>{$r.unwatch(e.reference,h),u.unobserve(e.reference),u.disconnect()});const m=t.computed(()=>{const $={[qo]:!0};return s.value.startsWith("top")?$["is-top"]=!0:s.value.startsWith("right")?$["is-right"]=!0:s.value.startsWith("bottom")?$["is-bottom"]=!0:s.value.startsWith("right")&&($["is-right"]=!0),e.size==="small"?$["is-small"]=!0:e.size==="large"&&($["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&($[`${e.customClass}`]=!0),$}),g=t.computed(()=>{const $={};a.value.top!==null&&($.top=`${a.value.top}px`),a.value.right!==null&&($.right=`${a.value.right}px`),a.value.bottom!==null&&($.bottom=`${a.value.bottom}px`),a.value.left!==null&&($.left=`${a.value.left}px`),e.autoFit&&($["min-width"]=`${l.value}px`);const x=document.documentElement.clientWidth||document.body.clientWidth;return $["max-width"]=`${x}px`,i.value&&($.opacity="1"),e.transition||($.transition="none"),e.zIndex&&($["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign($,e.customStyle),$}),C=t.computed(()=>{const $=[`${qo}__content`];return e.customTextClass&&$.push(e.customTextClass),$}),A=t.computed(()=>{const $={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign($,e.customTextStyle),$}),w=t.computed(()=>({[`${qo}__arrow`]:!0})),B=t.computed(()=>{const $={};return e.showArrow?($.width=`${e.arrowSize}px`,$.height=`${e.arrowSize}px`,s.value==="top"?($.left="50%",$.bottom=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):s.value==="top-start"?($.left=`${e.arrowOffset+d.value}px`,$.bottom=`-${e.arrowSize}px`):s.value==="top-end"?($.right=`${e.arrowOffset-d.value}px`,$.bottom=`-${e.arrowSize}px`):s.value==="right"?($.left=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):s.value==="right-start"?($.left=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):s.value==="right-end"?($.left=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`):s.value==="bottom"?($.left="50%",$.top=`-${e.arrowSize}px`,$.transform=" translate(-50%, 0%)"):s.value==="bottom-start"?($.left=`${e.arrowOffset+d.value}px`,$.top=`-${e.arrowSize}px`):s.value==="bottom-end"?($.right=`${e.arrowOffset-d.value}px`,$.top=`-${e.arrowSize}px`):s.value==="left"?($.right=`-${e.arrowSize}px`,$.top="50%",$.transform=" translate(0%, -50%)"):s.value==="left-start"?($.right=`-${e.arrowSize}px`,$.top=`${e.arrowOffset}px`):s.value==="left-end"&&($.right=`-${e.arrowSize}px`,$.bottom=`-${e.arrowOffset}px`),$):{display:"none"}}),T=t.computed(()=>y.value&&e.closeOnClick),V=t.computed(()=>{const $={};return e.zIndex&&($["z-index"]=`${e.zIndex}`),$});return{show:y,tipRef:c,classes:m,styles:g,textClasses:C,textStyles:A,arrowClasses:w,arrowStyles:B,overlayShow:T,overlayStyle:V,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),hc=["innerHTML"];function gc(e,n,a,o,l,r){const s=t.resolveComponent("Price");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.overlayShow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fox-hint-text__overlay",style:t.normalizeStyle(e.overlayStyle),onClick:n[0]||(n[0]=(...i)=>e.onClickOverlay&&e.onClickOverlay(...i))},null,4)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{ref:"tipRef",class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles)},[t.createElementVNode("div",{class:t.normalizeClass(e.textClasses),style:t.normalizeStyle(e.textStyles)},[e.type=="number"?(t.openBlock(),t.createBlock(s,{key:0,price:e.message,position:"before",size:e.size},null,8,["price","size"])):(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:e.message},null,8,hc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Dr=te(pc,[["render",gc]]);class En{seed=new Date().getTime();constructor(n){this.seed=n??new Date().getTime()}get(){let n=this.seed++;return this.seed<0&&(this.seed=0),n}}const vo={},yc=new En,yt=new Map,Dn=e=>{if(e){const n=document.getElementById(e);yt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of yt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}yt.clear()}},bc=e=>{e.unmount=Dn;const n=document.getElementById(e.id);if(n){const a=yt.get(e.id);a?e={...vo,...a,...e}:e={...vo,...e},e.transition=!1;const o=t.createVNode(Dr,e);return t.render(o,n),e.id}},kc=e=>{e.unmount=Dn;let n=e.id??`hinttext_${yc.get()}`;e={...vo,...e},e.id=n,yt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(Dr,e);return t.render(o,a),document.body.appendChild(a),n},Sc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},bt={show(e,n,a={},o=!0){Sc(n);const l=a.id;return l&&yt.has(l)?bc({...a,message:n,reference:e}):(o&&Dn(),kc({...a,message:n,reference:e}))},hide(e){Dn(e)},install(e){e.config.globalProperties.$hintText=bt}};function Cc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...pe,...be},emits:["appear","disappear"],setup(l,r){const s=l.prop??r.attrs.name;Te({componentName:e,validate:!1},s);const i=je(),c=Nn();Bn(!1);const f=t.computed(()=>c&&i?An(i,!1).value:null),p=e,d=t.ref(null),h=t.computed(()=>{const O={[p]:!0,[`${p}__gutter`]:f.value&&f.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:he(l.hasBorder)};if(O[l.errorMarkClass]=!!R.value,O[l.warnMarkClass]=!!D.value,O[l.infoMarkClass]=!!x.value,typeof d.value=="function"){const Z=d.value(s);O[Z]=!0}else if(typeof d.value=="string"){const Z=d.value;O[Z]=!0}return O}),S=t.ref(null),y=t.computed(()=>{const O={};if(l.width)l.width!=="auto"&&(O.width=ge(l.width));else{const Z=c&&i?Tn(i,!1):null;if(f.value&&Z){if(f.value.type==="grid"){const ne=$n(Z,f.value,l.span,l.offset);Object.assign(O,ne)}else if(f.value.type==="flow"){const ne=Vn(Z,f.value,l.span,l.offset,l.width);Object.assign(O,ne)}}}if(typeof S.value=="function"){const Z=S.value(s);Z&&Object.assign(O,Z)}else if(S.value&&typeof S.value=="object"){const Z=S.value;Object.assign(O,Z)}return O}),b=t.ref(null),k=t.computed({get:()=>b.value??he(l.isRequired),set:O=>{b.value=O}}),u=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",kn.Near),g=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${g.value}`]:!0})),A=t.computed(()=>({label:!0,[`label--${g.value}`]:!0})),w=Ve(t.toRef(l,"labelWidth"),"labelWidth",kn.Near),B=t.computed(()=>w&&w.value?{width:ge(w.value)}:{}),T=t.computed(()=>({"label--string":!0,"label--required":k.value})),V=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),$=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});xe({setRequired(O){k.value=O},setErrorTip(O){$.errorTip=O},setErrorIcon(O){$.errorIcon=O},setWarnTip(O){$.warnTip=O},setWarnIcon(O){$.warnIcon=O},setInfoTip(O){$.infoTip=O},setInfoIcon(O){$.infoIcon=O},setCustomClassName(O){d.value=O},setCustomStyle(O){S.value=O}});const x=t.computed(()=>l.infoTip||$.infoTip),P=t.computed(()=>l.infoIcon||$.infoIcon),D=t.computed(()=>l.warnTip||$.warnTip),I=t.computed(()=>l.warnIcon||$.warnIcon),R=t.computed(()=>l.errorTip||$.errorTip),v=t.computed(()=>l.errorIcon||$.errorIcon),W=t.computed(()=>R.value?"error":D.value?"warn":x.value?"info":""),H=()=>W.value.length>0,J=t.computed(()=>W.value==="error"?R.value:W.value==="warn"?D.value:W.value==="info"?x.value:""),ee=t.computed(()=>W.value==="error"?v.value:W.value==="warn"?I.value:W.value==="info"?P.value:null),Y=t.computed(()=>{const O={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?O[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?O[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(O[`${l.infoClass}`]=!0),O}),M=t.computed(()=>{const O={};return m&&m.value==="top"||!u()?O["padding-left"]="0px":w&&w.value&&(O["padding-left"]=ge(w.value)),O}),z=t.ref();let q="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([O,Z,ne,re])=>{z.value&&(O&&!ue(Z)?q?a.show(z.value,Z,{...re,id:q,type:ne},!0):q=a.show(z.value,Z,{...re,type:ne},!0):a.hide(q))});let F=null;const L=()=>{F||!z.value||(F=new IntersectionObserver(O=>{let Z=!1;for(let ne of O)if(ne.intersectionRatio>0){Z=!0,Z&&r.emit("appear",ne);break}Z||r.emit("disappear")}),F.observe(z.value))},K=()=>{!F||!z.value||(F.unobserve(z.value),F=null)};t.watch(()=>he(l.appearListen),O=>{O?L():K()}),t.onMounted(()=>{he(l.appearListen)&&L()}),t.onUnmounted(K);const X=()=>{if(!u())return null;const O=[],Z=r.slots?.label?.()??l.label,ne={class:T.value},re=t.h("div",ne,[Z]);if(O.push(re),r.slots.fixedPreTip){const ye=r.slots.fixedPreTip();O.push(ye)}const se={class:A.value,style:B.value};return t.h("div",se,O)},_=()=>{const O=[];if(r.slots.prepend){const ne=r.slots.prepend();O.push(ne)}if(r.slots.default){const ne=r.slots.default();O.push(ne)}if(r.slots.append){const ne=r.slots.append();O.push(ne)}if(r.slots.fixedTip){const ne={class:[`${p}__fixed-tip`]},re=t.h("div",ne,[r.slots.fixedTip()]);O.push(re)}const Z={ref:z,class:V.value,style:E.value};return t.h("div",Z,O)},le=()=>{const O=ee.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--icon"},[O()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(O)]):null},U=()=>{const O=J.value;return O?typeof O=="function"?t.h("div",{class:"fox-item__tip--text"},[O()]):t.h("div",{class:"fox-item__tip--text"},[O]):null},j=()=>{if(!H())return null;const O=[],Z=le();Z&&O.push(Z);const ne=U();ne&&O.push(ne);const re={class:Y.value,style:M.value};return t.h("div",re,O)},Q=()=>r.slots?.hide?.()??null;return()=>{const O=[],Z=[],ne=X();ne&&Z.push(ne);const re=_();re&&Z.push(re);const se={class:C.value},ye=t.h("div",se,Z);O.push(ye);const Ce=j();Ce&&O.push(Ce);const Xe=Q();Xe&&O.push(Xe);const za={class:h.value,style:y.value,prop:l.prop};return t.h("div",za,O)}}}}const{componentName:wc,create:Nc,scope:Bc}=G("item"),Be=Nc(Cc(wc,Bc,bt,!1));function Ac(e,n){return{props:{span:{type:[Number,String],required:!1,default:-1},offset:{type:[Number],default:0},width:{type:[String,Number],required:!1},align:{type:[String],required:!1,default:"center"},contentClass:{type:[String],required:!1},contentStyle:{type:[Object]},divide:{type:[Boolean,String],required:!1,default:!1}},setup(a,o){const l=e,r=t.computed(()=>({[l]:!0,[`${l}__stretch`]:a.span==="stretch",[`${l}__${a.align}`]:!0})),s=je(),i=Nn();Bn(!1);const c=t.computed(()=>{const f={};if(a.width)a.width!=="auto"&&(f.width=ge(a.width));else if(i&&s){const p=An(s,!1),d=Tn(s,!1);if(p.value&&d){if(p.value.type==="grid"){const h=$n(d,p.value,a.span,a.offset);Object.assign(f,h)}else if(p.value.type==="flow"){const h=Vn(d,p.value,a.span,a.offset,a.width);Object.assign(f,h)}}}return f});return()=>{const f=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let h=0;h<d.length;h++){if(h>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});f.push(S)}f.push(d[h])}else Reflect.apply([].push,f,d)}const p={class:r.value,style:c.value};return t.h("div",p,f)}}}}const{componentName:Tc,create:Vc,scope:uA}=G("row-item"),Mo=Vc(Ac(Tc));function $c(e,n){return{props:{span:{type:[Number,String],required:!1,default:1},offset:{type:[Number,String],default:0},width:{type:[String,Number],required:!1}},setup(a,o){const l=je(),r=Nn();Bn(!1);const s=t.computed(()=>r&&l?An(l,!1).value:null),i=e,c=t.computed(()=>({[i]:!0,[`${i}__gutter`]:s.value&&s.value.type!=="flow",[`${i}__stretch`]:a.span==="stretch"})),f=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const d=r&&l?Tn(l,!1):null;if(s.value&&d){if(s.value.type==="grid"){const h=$n(d,s.value,a.span,a.offset);Object.assign(p,h)}else if(s.value.type==="flow"){const h=Vn(d,s.value,a.span,a.offset,a.width);Object.assign(p,h)}}}return p});return()=>{const p={class:c.value,style:f.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Ec,create:Dc,scope:fA}=G("slot-item"),Po=Dc($c(Ec)),Ir={type:{type:String,default:"text"},modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Ic(e,n,a,o){return{props:{...pe,...be,...Ir},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=ie.useFoxI18n(n),p=f(l,["placeholder"]),d=t.ref(!1),h=ve(l,"modelValue",null,c),S=e,y=t.computed(()=>({[S]:!0,"is-disabled":s.value,"is-readonly":i.value})),b=Ve(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const I={};return b.value&&(I["text-align"]=b.value),I}),u=I=>{let v=I.target.value;l.type==="digit"&&(v=go(v,!0)),l.type==="number"&&(v=go(v,!1)),l.maxLength&&v.length>Number(l.maxLength)&&(v=v.slice(0,Number(l.maxLength))),h.value=v,c("update:modelValue",v,I),c("change",v,I)};let m=ve(l,"hintText"),g=t.ref(!1);const C=I=>{let v=I.target.value;d.value=!0,ue(m.value)||(g.value=!0),c("focus",v,I)},A=I=>{setTimeout(()=>{g.value&&(g.value=!1),d.value=!1},0);let v=I.target.value;l.maxLength&&v.length>Number(l.maxLength)&&(v=v.slice(0,Number(l.maxLength))),c("blur",v,I)},w=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),B=t.computed(()=>{const I={};return r.slots.append&&!T.value&&!P.value&&(I.display="none"),I}),T=t.computed(()=>ke(l.unit)>0),V=t.computed(()=>!P.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!V.value})),$=I=>{h.value="",c("update:modelValue","",I),c("change","",I),c("clear","")},x=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),P=t.computed(()=>{let I=ke(h.value)>0;return he(l.clearable)&&I&&d.value}),D=t.computed(()=>({action:!0,hidden:!P.value}));return()=>{const I={class:y.value,style:k.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:u,onFocus:C,onBlur:A},R=[],v=t.h("input",I);R.push(v);const W=[];if(x.value){const q={class:["action-icon"]},F=t.h(o,q),L={class:D.value,onClick:$},K=t.h("view",L,{default:()=>[F]});W.push(K)}if(T.value){const q=t.h("view",{class:E.value},[l.unit]);W.push(q)}const H={class:w.value,style:B.value},J=t.h("view",H,{default:()=>W});R.push(J);const ee={default:()=>R};ee.label=r.slots.default,ee.prepend=r.slots.prepend,ee.append=r.slots.append,ee.fixedPreTip=r.slots.fixedPreTip,ee.fixedTip=r.slots.fixedTip;const M={...ut(l,Ir),hintText:m.value,hintVisible:g.value,prop:`${l.prop}_item`};return t.h(a,M,ee)}}}}const{componentName:xc,create:qc,scope:vc}=G("input-item"),Lo=qc(Ic(xc,vc,Be,oe.CircleClose));function xr(e,n=0){let a=`${e}`,o=a.indexOf(".");if(o==-1)return a;let l=o;for(let r=a.length-1;r>=o;r--)if(a.charAt(r)!="0"){l=r;break}return l-o<n?l=o+n+1:l!=o&&(l+=1),l>a.length?a=a.padEnd(l,"0"):a=a.substring(0,l),a}function qr(e,n,a=20){if(typeof n=="string"&&(n=me(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=ja(`${e}`,`${n}`);return xr(o)}else{let o=uo(`${e}`,Wa(`${n}`),20);return xr(o)}}function Mc(e,n=-1,a=!1,o=3,l=","){return nn(e,n,a,o,l)}function vr(e,n,a,o,l=!0){if(e==="")return"";if(e=Ya(e),n=me(n),n==1)return e;if(o)e=qr(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(me(a)+2,"0"):e=uo(e,1,me(a)));else{let r=-1*n;e=qr(e,r)}return e}function Mr(e,n){let a={maxValid:!0,minValid:!0,message:""};if(n.min!==void 0){let o=he(n.minInclude),l=fo(e,n.min);if(o&&l==-1||!o&&(l==0||l==-1)){let r="请输入不小于 {0} 的数值";a.message=r.replace("{0}",n.min),a.minValid=!1}}if(n.max!=null){let o=he(n.maxInclude),l=fo(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Pr={clearable:{type:Boolean,default:!0},modelValue:{type:[String,Number],default:""},showTip:{type:[Boolean,String],required:!1,default:!0},min:{type:[Number,String],required:!1},minInclude:{type:[Boolean,String],required:!1,default:!0},max:{type:[Number,String],required:!1},maxInclude:{type:[Boolean,String],required:!1,default:!0},unit:{type:String,required:!1},rates:{type:[Number,String],required:!1,default:1},precision:{type:[Number,String],required:!1},integerLength:{type:[Number,String],required:!1,default:-1},decimalLength:{type:[Number,String],required:!1,default:2},autoPadding:{type:Boolean,required:!1,default:!0},digits:{type:Number,required:!1,default:3},separator:{type:String,required:!1,default:","},placeholder:{type:String,required:!1},textAlign:{type:String,required:!1},adjustPosition:{type:Boolean,default:!0},alwaysSystem:{type:Boolean,default:!1}};function Pc(e,n,a,o){return{props:{...pe,...be,...Pr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=t.ref(!1),p=ve(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([H,J,ee])=>{if(ue(H)){d.value="";return}const Y=vr(H,J,ee,!1);d.value!==Y&&(d.value=Y)},{immediate:!0});const h=t.computed(()=>{let H="";return f.value&&(H=d.value),H}),{t:S}=ie.useFoxI18n(n),y=t.computed(()=>{let H=l.placeholder??"";return!f.value&&!ue(d.value)?H=Mc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):H=ue(H)?S(["placeholder"]):H,H}),b=e,k=t.computed(()=>({[b]:!0,[`${b}__placeholder`]:d.value.length>0,"is-disabled":s.value,"is-readonly":i.value})),u=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const H={};return u.value&&(H["text-align"]=u.value),H}),g=t.ref(""),C=t.computed(()=>{let H=g.value;return ue(H)&&(H=l.errorTip??""),H}),A=t.ref(""),w=t.ref(!1),B=H=>{let ee=H.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",H),c("change","",H),he(l.showTip)&&w.value&&(w.value=!1);return}if(ee.length>=2){let Y=ee;if(Y.charAt(0)=="-"&&(Y=Y.substring(1)),Y.length>=2&&Y.charAt(0)=="0"&&Y.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!nr(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&or(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&lr(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let Y=Mr(ee,l);if(Y.maxValid===!1){g.value=Y.message,t.triggerRef(d);return}}else if(l.min!=null&&me(l.min)>=0){t.triggerRef(d);return}A.value=ee,he(l.showTip)&&(w.value=ee.length>0),d.value=ee,p.value=vr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,H),c("change",p.value,H)},T=H=>{if(f.value=!0,he(l.showTip)){let J=d.value;ue(J)&&(J=l.hintText),ue(J)||(A.value=J,w.value=!0)}g.value="",c("focus",p.value,H)},V=H=>{if(setTimeout(()=>{f.value=!1,he(l.showTip)&&w.value===!0&&(w.value=!1)},0),!ue(d.value)){let J=Mr(d.value,l);if(J.minValid===!1||J.maxValid===!1){g.value=J.message;return}}c("update:modelValue",p.value,H),c("blur",p.value,H)},E=t.computed(()=>({[`${b}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),$=t.computed(()=>{const H={};return r.slots.append&&!x.value&&!v.value&&(H.display="none"),H}),x=t.computed(()=>ke(l.unit)>0),P=t.computed(()=>!v.value),D=t.computed(()=>({[`${b}__unit`]:!0,hidden:!P.value})),I=H=>{p.value="",c("update:modelValue","",H),c("change","",H),c("clear","")},R=t.computed(()=>he(l.clearable)&&!s.value&&!i.value),v=t.computed(()=>{let H=ke(p.value)>0;return he(l.clearable)&&H&&f.value}),W=t.computed(()=>({action:!0,hidden:!v.value}));return()=>{let H={class:k.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:y.value,disabled:s.value,readonly:i.value,value:h.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:B,onFocus:T,onBlur:V},J=[],ee=t.h("input",H);J.push(ee);let Y=[];if(R.value){const X={class:["action-icon"]},_=t.h(o,X),le={class:W.value,onClick:I},U=t.h("view",le,{default:()=>[_]});Y.push(U)}if(x.value){const X=t.h("view",{class:D.value},[l.unit]);Y.push(X)}const M={class:E.value,style:$.value},z=t.h("view",M,{default:()=>Y});J.push(z);const q={default:()=>J};q.label=r.slots.default,q.prepend=r.slots.prepend,q.append=r.slots.append,q.fixedPreTip=r.slots.fixedPreTip,q.fixedTip=r.slots.fixedTip;let L={...ut(l,Pr),errorTip:C.value,hintText:A.value,hintVisible:w.value,hintType:"number",prop:`${l.prop}_item`};return t.h(a,L,q)}}}}const{componentName:Lc,create:zc,scope:Fc}=G("money-item"),zo=zc(Pc(Lc,Fc,Be,oe.CircleClose)),Fo={modelValue:{type:[String,Number],default:""},textAlign:{type:String,default:""},limitShow:{type:Boolean,default:!1},maxLength:{type:[String,Number],default:""},rows:{type:[String,Number],default:"2"},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autosize:{type:[Boolean,Object],default:!1},autofocus:{type:Boolean,default:!1}},{componentName:Rc,create:Oc,scope:Kc}=G("textarea"),Uc=Oc({props:{...Fo},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Kc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const h=Rc;return{[h]:!0,[`${h}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(i)});const s=t.computed(()=>({textAlign:e.textAlign})),i=()=>{let h=l.value;h.style.height="auto";let S=h.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:y,minHeight:b}=e.autosize;y!==void 0&&(S=Math.min(S,y)),b!==void 0&&(S=Math.max(S,b))}S&&(h.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(i)});const c=(h,S)=>{e.maxLength&&h.length>Number(e.maxLength)&&(h=h.substring(0,Number(e.maxLength))),n("update:modelValue",h,S),n("change",h,S)};return{...o,textareaRef:l,classes:r,styles:s,change:h=>{const S=h.target;c(S.value,h)},focus:h=>{e.disabled||e.readonly||n("focus",h)},blur:h=>{if(e.disabled||e.readonly)return;let y=h.target.value;c(y,h),n("blur",{value:y,event:h})}}}}),Hc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],jc={key:0,class:"fox-textarea__limit"};function Wc(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("textarea",{ref:"textareaRef",class:"fox-textarea__textarea",style:t.normalizeStyle(e.styles),rows:e.rows,disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[0]||(n[0]=(...s)=>e.change&&e.change(...s)),onBlur:n[1]||(n[1]=(...s)=>e.blur&&e.blur(...s)),onFocus:n[2]||(n[2]=(...s)=>e.focus&&e.focus(...s)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,Hc),e.limitShow?(t.openBlock(),t.createElementBlock("view",jc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const In=te(Uc,[["render",Wc]]);function Yc(e,n,a,o){return{props:{...pe,...be,...Fo},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=ve(l,"modelValue",null,c),p=b=>{f.value=b,c("update:modelValue",b,{}),c("change",b,{})};let d=ve(l,"hintText"),h=t.ref(!1);const S=b=>{ue(d.value)||(h.value=!0),c("focus",f.value,b)},y=b=>{setTimeout(()=>{h.value&&(h.value=!1)},0),c("blur",f.value,b)};return()=>{const k={...Se(l,Fo),disabled:s.value,readonly:i.value,value:f.value,"onUpdate:modelValue":p,onFocus:S,onBlur:y},u=[],m=t.h(o,k);u.push(m);const g={default:()=>u};g.label=r.slots.default,g.prepend=r.slots.prepend,g.append=r.slots.append,g.fixedPreTip=r.slots.fixedPreTip,g.fixedTip=r.slots.fixedTip;const C=Se(l,be,pe);return t.h(a,{...C,prop:`${l.prop}_item`},g)}}}}const{componentName:Xc,create:Qc,scope:Gc}=G("textarea-item"),Ro=Qc(Yc(Xc,Gc,Be,In));function Zc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Zc(n)){const a=n.innerWidth,o=n.innerHeight;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}return n&&n.getBoundingClientRect?n.getBoundingClientRect():{top:0,left:0,right:0,bottom:0,width:0,height:0}};let Jc=2e3;const Lr=()=>Jc++,Fe={visible:{type:Boolean,default:!1},zIndex:{type:[String,Number]},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},position:{type:String,default:"center"},transition:{type:String,default:""},style:{type:Object,default:{}},popClass:{type:[String,Array],default:""},closeable:{type:Boolean,default:!1},closeIconPosition:{type:String,default:"top-right"},destroyOnClose:{type:Boolean,default:!0},teleport:{type:[String,Element],default:"body"},overlay:{type:Boolean,default:!0},round:{type:Boolean,default:!1},teleportDisable:{type:Boolean,default:!1},safeAreaInsetBottom:{type:Boolean,default:!1},overlayClass:{type:String,default:""},overlayStyle:{type:Object,default:{}}},_c=(e,n)=>({components:n,props:{...Fe},emits:["click-pop","click-close-icon","open","close","opend","closed","click-overlay","update:visible"],setup(a,{emit:o}){const l=t.reactive({zIndex:0,showSlot:!0,closed:a.closeable});a.visible&&(l.zIndex=Lr());const r=t.computed(()=>{const b=e,k=[b,`${b}--${a.position}`];return a.round&&k.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&k.push(`${b}--${a.position}--safebottom`),typeof a.popClass=="string"?k.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(u=>{k.push(u)}),k}),s=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),i=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Lr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},f=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=b=>{o("click-pop",b)},d=b=>{b.stopPropagation(),o("click-close-icon",b),o("update:visible",!1)},h=b=>{o("click-overlay",b),a.closeOnClickOverlay&&o("update:visible",!1)},S=b=>{o("opend",b)},y=b=>{o("closed",b)};return t.watch(()=>a.visible,b=>{a.visible?c():f()}),t.watch(()=>a.closeable,b=>{l.closed=b}),{...t.toRefs(l),popStyle:s,transitionName:i,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:h,onOpened:S,onClosed:y}}});let vt=0;const zr="fox-overflow-hidden",Fr=()=>nt?document.body:{classList:[]},ed=e=>[()=>{if(e())try{!vt&&Fr().classList.add(zr),vt++}catch{}},()=>{if(e()&&vt)try{vt--,!vt&&Fr().classList.remove(zr)}catch{}}],td={visible:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:2e3},duration:{type:[Number,String],default:.3},lockScroll:{type:Boolean,default:!0},overlayClass:{type:String,default:""},overlayStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}},{componentName:nd,create:od}=G("overlay"),ld=od({props:{...td},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=ed(()=>e.lockScroll),l=t.computed(()=>({[nd]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,i=>{i?a():o()}),{classes:l,style:r,onClick:i=>{n("click",i),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function ad(e,n,a,o,l,r){return t.openBlock(),t.createBlock(t.Transition,{name:"overlay-fade"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=t.withModifiers((...s)=>e.onClick&&e.onClick(...s),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const st=te(ld,[["render",ad]]),{componentName:rd,create:sd}=G("popup"),id=sd(_c(rd,{FoxOverLay:st,Close:oe.Close}));function cd(e,n,a,o,l,r){const s=t.resolveComponent("FoxOverLay"),i=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(s,t.mergeProps({key:0,visible:e.visible,"close-on-click-overlay":e.closeOnClickOverlay,"z-index":e.zIndex,"lock-scroll":e.lockScroll,duration:e.duration,"overlay-class":e.overlayClass,"overlay-style":e.overlayStyle,onClick:e.onClickOverlay},e.$attrs),null,16,["visible","close-on-click-overlay","z-index","lock-scroll","duration","overlay-class","overlay-style","onClick"])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{name:e.transitionName,onAfterEnter:e.onOpened,onAfterLeave:e.onClosed},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.popStyle),onClick:n[1]||(n[1]=(...c)=>e.onClick&&e.onClick(...c))},[e.showSlot?t.renderSlot(e.$slots,"default",{key:0}):t.createCommentVNode("",!0),e.closed?(t.openBlock(),t.createElementBlock("view",{key:1,onClick:n[0]||(n[0]=(...c)=>e.onClickCloseIcon&&e.onClickCloseIcon(...c)),class:t.normalizeClass(["fox-popup__close-icon","fox-popup__close-icon--"+e.closeIconPosition])},[t.renderSlot(e.$slots,"close-icon",{},()=>[t.createVNode(i)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const fe=te(id,[["render",cd]]),Rr=10;function Or(e,n){return e>n&&e>Rr?"horizontal":n>e&&n>Rr?"vertical":""}function Oo(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function Ko(){const e={startX:0,startY:0,startTime:0,duration:0,moveX:0,moveY:0,deltaX:0,deltaY:0,offsetX:0,offsetY:0,direction:""},n=()=>e.direction==="vertical",a=()=>e.direction==="horizontal",o=()=>{e.deltaX=0,e.deltaY=0,e.offsetX=0,e.offsetY=0,e.direction="",e.startTime=0};return{move:s=>{if(s.touches){const f=s.touches[0];e.deltaX=f.clientX-e.startX,e.deltaY=f.clientY-e.startY,e.moveX=f.clientX,e.moveY=f.clientY}else{const c=s;e.deltaX=c.clientX-e.startX,e.deltaY=c.clientY-e.startY,e.moveX=c.clientX,e.moveY=c.clientY}e.offsetX=Math.abs(e.deltaX),e.offsetY=Math.abs(e.deltaY),e.duration=Date.now()-e.startTime,e.direction||(e.direction=Or(e.offsetX,e.offsetY))},start:s=>{if(o(),s.touches){const f=s.touches[0];e.startX=f.clientX,e.startY=f.clientY}else{const c=s;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function _e(){const e=t.ref(0),n=t.ref(0),a=t.ref(0),o=t.ref(0),l=t.ref(0),r=t.ref(0),s=t.ref(0),i=t.ref(0),c=t.ref(0),f=t.ref(0),p=t.ref(""),d=()=>p.value==="vertical",h=()=>p.value==="horizontal",S=()=>{s.value=0,i.value=0,c.value=0,f.value=0,p.value="",a.value=0};return{move:k=>{if(k.touches){const g=k.touches[0];s.value=g.clientX-e.value,i.value=g.clientY-n.value,l.value=g.clientX,r.value=g.clientY}else{const m=k;s.value=m.clientX-e.value,i.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(s.value),f.value=Math.abs(i.value),o.value=Date.now()-a.value,p.value||(p.value=Or(c.value,f.value))},start:k=>{if(S(),k.touches){const g=k.touches[0];e.value=g.clientX,n.value=g.clientY}else{const m=k;e.value=m.clientX,n.value=m.clientY}a.value=Date.now()},reset:S,startX:e,startY:n,startTime:a,duration:o,moveX:l,moveY:r,deltaX:s,deltaY:i,offsetX:c,offsetY:f,direction:p,isVertical:d,isHorizontal:h}}const Kr={readonly:{type:Boolean,default:!1},visibleItemCount:{type:[Number,String],default:7},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},childrenKey:{type:String,required:!1,default:"children"},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:360}},Uo={...Fe,...Kr,modelValue:{type:[String,Number,Boolean,Object,Array],default:""},text:{type:[Array],default:[]},columnOptions:{type:[Object,Function]},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},title:{type:String},cancelText:{type:String},clearText:{type:String},confirmText:{type:String},isAutoBackFill:{type:[Boolean],default:!0}};let Ur=36;function dd(){return Ur}function ud(e){Ur=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ho(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function fd(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function it(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Hr(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let md=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function pd(){const e=t.getCurrentInstance();return new md(e.proxy)}function jr(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=it(e,n),s=it(e,a);return r===s}function hd(e,n,a,o){if(a.length==0)return[];Array.isArray(n)||(n=[n]);const l=[],r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=n[s];let f=a[s].findIndex(p=>{if(r==="text")return Re(e,p)===i;if(r==="value"){let d=it(e,p);return d==null&&(d=Re(e,p)),d===i}else if(r==="item")return jr(e,p,i)});if(f==-1)break;l.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){const c=n[i];let f=s.findIndex(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let h=it(e,d);return h==null&&(h=Re(e,d)),h===c}else if(r==="item")return jr(e,d,c)});if(f==-1)break;l.push(f);const p=Ho(e,s[f]);if(!Array.isArray(p))break;s=p}}return l}function Wr(e,n,a,o){if(a.length==0)return null;const l={texts:[],values:[],items:[]},r=e.valueType??"value";if(o==="singleColumn"||o==="multipleColumn")for(let s=0;s<n.length&&s<a.length;s++){const i=a[s];let c=n[s];c<0&&c>=i.length&&(c=0);const f=i[c],p=Re(e,f);if(l.texts.push(p),l.items.push(f),r==="text")l.values.push(p);else if(r==="value"){let d=it(e,f);d==null&&(d=p),l.values.push(d)}else l.values.push(f)}else{let s=a[0];for(let i=0;i<n.length;i++){let c=n[i];c<0&&c>=s.length&&(c=0);const f=s[c],p=Object.assign({},f);p.children=null;const d=Re(e,f);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let h=it(e,f);h==null&&(h=d),l.values.push(h)}else l.values.push(p);if(!Array.isArray(f.children))break;s=f.children}}return l}function Yr(e){return{text:e,value:e}}const gd=15,yd=300,bd=200,{create:kd}=G("picker-column");function Sd(e){e.stopPropagation()}function Cd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&Sd(e)}const wd=kd({props:{source:{type:Array,default:[]},columnIndex:{type:Number,required:!0,default:0},modelValue:{type:Number,required:!0,default:0},itemHeight:{type:Number,required:!0,default:35},visible:{type:Boolean,default:!1},...Kr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${me(e.visibleItemCount)*+e.itemHeight}px`})),l=t.computed(()=>({"fox-picker__content":!0,"fox-picker__content-tile":!e.threeDimensional,"fox-picker__content-roller":e.threeDimensional})),r=t.computed(()=>e.itemHeight*Math.floor(+e.visibleItemCount/2)),s=B=>B>=d.currIndex+8||B<=d.currIndex-8,i=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`rotate3d(1, 0, 0, ${d.deg})`,top:`${r.value}px`})),c=B=>`transform: rotate3d(1, 0, 0, ${-d.rotation*B}deg) translate3d(0px, 0px, 104px)`,f=t.computed(()=>({transition:`transform ${d.scrollTime}ms cubic-bezier(0.17, 0.89, 0.45, 1)`,transform:`translate3d(0, ${d.scrollDistance+r.value}px, 0)`})),p=t.ref(null),d=t.reactive({currIndex:e.modelValue,startDistance:0,scrollDistance:0,scrollTime:0,moving:!1,rotation:20,deg:0,transitionEndTrigger:null}),h=B=>Re(e,B),S=B=>it(e,B),y=_e(),b=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},k=(B,T=!1,V=!1)=>{if(d.currIndex=B,T){const E=()=>{d.moving=!1,n("update:modelValue",B),n("change",B)};V?d.transitionEndTrigger=E:E()}},u=(B,T,V)=>{let E=B+d.startDistance;if(T==="end"){const $=-(e.source.length-1)*e.itemHeight;E<$&&(E=$),E>0&&(E=0);let x=Math.abs(Math.round(-E/e.itemHeight));const P=-x*e.itemHeight,D=`${(x+1)*d.rotation}deg`,I=V?V>0:!1;k(x,!0,I),m(P,T,V,D)}else{let $=(-E/e.itemHeight+1)*d.rotation;const x=(e.source.length+1)*d.rotation,P=0;if($=Math.min(Math.max($,P),x),e.threeDimensional&&($<P||$>x))return;m(E,null,void 0,`${$}deg`)}},m=(B=0,T,V=bd,E)=>{T==="end"?d.scrollTime=V:d.scrollTime=0,d.deg=E,d.scrollDistance=B},g=(B,T)=>(B=Math.abs(B/T)/.003*(B<0?-1:1),B),C=B=>{e.readonly||(d.startDistance=d.scrollDistance,y.start(B),d.transitionEndTrigger=null)},A=B=>{e.readonly||(d.moving=!0,y.move(B),y.isVertical()&&(d.moving=!0,Cd(B,!0)),u(y.deltaY.value,"",0))},w=()=>{if(e.readonly)return;const B=y.deltaY.value,T=y.duration.value;if(T<yd&&Math.abs(B)>gd){const E=g(B,T);u(E,"end",e.swipeDuration)}else u(B,"end",0)};return t.watch(()=>e.modelValue,B=>{const T=d.currIndex-B;if(T!==0){d.currIndex=B,d.startDistance=d.scrollDistance;const V=T*e.itemHeight;u(V,"",0)}}),t.watch(()=>e.source,B=>{if(d.currIndex>=B.length){const E=(B.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,u(E,"end",0)}}),t.watch(()=>e.visible,B=>{B===!1&&b()}),t.onMounted(()=>{const B=-e.modelValue*e.itemHeight;u(B)}),{classes:a,styles:o,contentClasses:l,itemText:h,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:C,onTouchMove:A,onTouchEnd:w,isHidden:s,setRollerStyle:c,touchRollerStyle:i,touchTileStyle:f,stopMomentum:b}}}),Nd={key:1,class:"fox-picker__item-tile"};function Bd(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.styles),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s)),onTouchend:n[2]||(n[2]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTouchcancel:n[3]||(n[3]=(...s)=>e.onTouchEnd&&e.onTouchEnd(...s)),onTransitionend:n[4]||(n[4]=(...s)=>e.stopMomentum&&e.stopMomentum(...s))},[t.createElementVNode("view",{ref:"roller",class:t.normalizeClass(e.contentClasses),style:t.normalizeStyle(e.threeDimensional?e.touchRollerStyle:e.touchTileStyle)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.source,(s,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${i}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(i+1)}]),style:t.normalizeStyle(e.setRollerStyle(i+1))},t.toDisplayString(e.itemText(s)),7)):(t.openBlock(),t.createElementBlock("view",Nd,t.toDisplayString(e.itemText(s)),1))],64))),128))],6)],38)}const Ad=te(wd,[["render",Bd]]),{create:Td,componentName:Vd,scope:$d}=G("picker"),Ed=Td({components:{Column:Ad,Popup:fe},props:{...Uo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n($d),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),s=t.ref(dd());t.watch(()=>e.visible,$=>{$&&s.value<=0&&setTimeout(()=>{if(r.value){const x=qe(r.value);s.value=x.height,ud(s.value)}},50)});const i=t.computed(()=>({[Vd]:!0})),c=pd(),f=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([$,x])=>{if($){let P=await c.load("picker",$,x);if(P.length>0){let D=P[0];if(Array.isArray(D)){if(typeof D[0]=="string"){let I=P,R=[];I.forEach(v=>{let W=v.map(H=>Yr(H));R.push(W)}),p.value=R}else p.value=P;f.value="multipleColumn"}else if(typeof D=="string"){let I=P,R=[],v=I.map(W=>Yr(W));R.push(v),p.value=R,f.value="singleColumn"}else{const I=Ho(e,D);Array.isArray(I)?(f.value="cascade",p.value=[P]):(f.value="singleColumn",p.value=[P])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),h=t.ref(e.modelValue),S=t.ref([]),y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([$,x])=>{let P=hd(e,$,x,f.value);if(!Me(P,y.value)){y.value=P;let D=Wr(e,P,x,f.value);D&&(d.value=D.texts,n("update:text",d.value))}});const b=t.ref(e.visible);t.watch(()=>e.visible,$=>{b.value=$});const k=$=>{let x=Hr(e,$);return De(x)?x.defaultIndex??0:0},u=$=>{if(e.readonly===!0)return!0;let x=Hr(e,$);return De(x)?x.readonly??!1:!1},m=($,x)=>{let P=y.value;P[$]=x;for(let I=0;I<$;I++)P[I]==null&&(P[I]=k(I));if(f.value==="cascade")for(let I=$+1;I<C.value.length;I++){let R=k(I);I<P.length?P[I]=R:P.push(R)}else for(let I=P.length;I<C.value.length;I++){let R=k(I);P.push(R)}y.value=P;let D=Wr(e,P,p.value,f.value);D&&(d.value=D.texts,h.value=D.values,S.value=D.items)},g=$=>$<y.value.length?y.value[$]:k($),C=t.computed(()=>{if(p.value.length==0)return[];if(f.value=="singleColumn"||f.value=="multipleColumn")return p.value;let $=[],x=0,P=p.value[0],D=0;for(;;){let I=P.map(W=>{let H=Object.assign({},W);return fd(e,H,null),H});$.push(I),x>=y.value.length?D=0:D=y.value[x],(D<0||D>=P.length)&&(D=0);let R=P[D];const v=Ho(e,R);if(!Array.isArray(v))break;P=v,x++}return $}),A=t.computed(()=>me(+e.visibleItemCount-1)/2*s.value),w=($=!1)=>{if(e.readonly===!0){$&&n("update:visible",!1);return}let x=p.value.length-1;for(;x>=0&&!(y.value[x]===null||y.value[x]===void 0);x--);if(x>=0&&m(x,0),f.value==="singleColumn"){let P=h.value.length>0?h.value[0]:"",D=S.value.length>0?S.value[0]:null;n("update:modelValue",P),n("update:text",d.value),n("change",P,D),$&&(n("confirm",P),n("update:visible",!1))}else n("update:modelValue",h.value),n("update:text",d.value),n("change",h.value,S.value),$&&(n("confirm",h.value),n("update:visible",!1))};return{...l,pickerLineRef:r,classes:i,columns:C,dataType:f,show:b,itemHeight:s,top:A,isReadonly:u,getIndex:g,change:($,x)=>{if(m($,x),e.isAutoBackFill){const P=!b.value;w(P)}},close:()=>{n("close"),n("update:visible",!1)},confirm:()=>{w(!0)},clear:()=>{if(e.readonly===!0){n("update:visible",!1);return}f.value==="singleColumn"?(n("update:modelValue",""),n("change","")):(n("update:modelValue",[]),n("change",[])),n("clear",""),n("update:visible",!1)}}}}),Dd={class:"fox-picker__bar"},Id={class:"fox-picker__title"},xd={class:"fox-picker__bar__action"},qd={class:"fox-picker__column"};function vd(e,n,a,o,l,r){const s=t.resolveComponent("Column"),i=t.resolveComponent("Popup");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(i,{position:"bottom",visible:e.show,"onUpdate:visible":n[3]||(n[3]=c=>e.show=c),teleport:e.teleport,"lock-scroll":e.lockScroll,"close-on-click-overlay":e.closeOnClickOverlay,onClose:e.close,round:!0,"teleport-disable":e.teleportDisable},{default:t.withCtx(()=>[t.createElementVNode("view",Dd,[t.createElementVNode("view",Id,t.toDisplayString(e.title),1),t.createElementVNode("view",xd,[t.createElementVNode("view",{class:"fox-picker__left fox-picker__cancel fox-picker__button",onClick:n[0]||(n[0]=(...c)=>e.close&&e.close(...c))},t.toDisplayString(e.cancelText),1),t.createElementVNode("view",{class:"fox-picker__right fox-picker__confirm fox-picker__button",onClick:n[1]||(n[1]=(...c)=>e.confirm&&e.confirm(...c))},t.toDisplayString(e.confirmText),1),e.clearText?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-picker__right fox-picker__clear fox-picker__button",onClick:n[2]||(n[2]=(...c)=>e.clear&&e.clear(...c))},t.toDisplayString(e.clearText),1)):t.createCommentVNode("",!0)])]),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",qd,[t.createElementVNode("view",{class:"fox-picker__mask",style:t.normalizeStyle({backgroundSize:`100% ${e.top}px`})},null,4),t.createElementVNode("view",{ref:"pickerLineRef",class:"fox-picker__hairline",style:t.normalizeStyle({top:` ${e.top}px`})},null,4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:"fox-picker__columnitem"},[t.createVNode(s,{visible:e.show,source:c,readonly:e.isReadonly(f),"column-index":f,modelValue:e.getIndex(f),"onUpdate:modelValue":p=>e.change(f,p),"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"item-height":e.itemHeight,"text-key":e.textKey,"value-key":e.valueKey},null,8,["visible","source","readonly","column-index","modelValue","onUpdate:modelValue","visible-item-count","three-dimensional","swipe-duration","item-height","text-key","value-key"])]))),128))]),t.renderSlot(e.$slots,"default")]),_:3},8,["visible","teleport","lock-scroll","close-on-click-overlay","onClose","teleport-disable"])],2)}const kt=te(Ed,[["render",vd]]);function Md(e,n,a,o,l,r,s=!0){return{props:{...pe,...be,...Uo,type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},separator:{type:[String],required:!1,defualt:" "}},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",null,d),k=t.ref([]),u=t.computed(()=>Array.isArray(k.value)?k.value.join(i.separator):k.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const z={};return C.value&&(z["text-align"]=C.value),z}),w=t.ref(!1),B=()=>{w.value=!0},T=z=>{w.value=z},V=z=>{b.value=z,d("update:modelValue",z)},E=(z,q)=>{d("change",z,q)},$=z=>{let F=z.target.value;y.value=!0,d("focus",F,z)},x=z=>{setTimeout(()=>{y.value=!1},0);let F=z.target.value;i.maxLength&&F.length>Number(i.maxLength)&&(F=F.slice(0,Number(i.maxLength))),d("blur",F,z)},P=z=>{k.value=z,Array.isArray(z)&&z.length===0?d("update:text",z[0]):d("update:text",z)},D=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),v=t.computed(()=>({hidden:!R.value})),W=z=>{b.value="",d("update:modelValue","",z),d("change","",z),d("clear","")},H=t.computed(()=>i.clearable&&!f.value&&!p.value),J=t.computed(()=>ke(b.value)>0&&y.value),ee=z=>{J.value?W(z):B()},Y=t.computed(()=>J.value&&H.value?o:l),M=t.computed(()=>({action:!0}));return()=>{const z={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(z.disabled=!0);const q=[],F=t.h("input",z);q.push(F);const L=[],K={class:["action-icon"]},X=t.h(Y.value,K),_={class:M.value,onClick:ee},le=t.h("view",_,{default:()=>[X]});if(L.push(le),I.value){const se=t.h("view",{class:v.value},[i.unit]);L.push(se)}const U={class:D.value},j=t.h("view",U,{default:()=>L});q.push(j);const Q={default:()=>q};Q.label=c.slots.default,Q.prepend=c.slots.prepend,Q.append=c.slots.append,Q.fixedPreTip=c.slots.fixedPreTip,Q.fixedTip=c.slots.fixedTip;const O=Se(i,Uo);O.disabled=!1,O.readonly=f.value||p.value,O.visible=w.value,O["onUpdate:visible"]=T,O.modelValue=b.value,O["onUpdate:modelValue"]=V,O.text=k.value,O["onUpdate:text"]=P,O.onChange=E;const Z=t.h(r,O);Q.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,ne,Q)}}}}const{componentName:Pd,create:Ld,scope:zd}=G("picker-item"),jo=Ld(Md(Pd,zd,Be,oe.CircleClose,oe.ArrowRight,kt,!1)),xn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:s="children"}=a??{},{[l]:i,[r]:c,[s]:f,...p}=o,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:i,text:c,children:f,_parent:n};return d.children&&d.children.length&&(d.children=xn(d.children,d,a)),d}),Xr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Xr(o.children,n)},Fd={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Rd=(e,n)=>{const a={...Fd,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:s}=a;let i=[],c={};return e.forEach(f=>{f={...f};const{[l]:p,[r]:d}=f,h=c[d]=c[d]||[];!i.length&&d===o&&(i=h),h.push(f),f.children=c[p]||(c[p]=[])}),s&&Object.keys(c).forEach(f=>{c[f].length>1&&c[f].sort((p,d)=>p[s]-d[s])}),c=null,i},Od={modelValue:{type:[String,Number],default:0},data:{type:[Array]},textKey:{type:String,default:"text"},valueKey:{type:String,default:"value"},visibleKey:{type:String,default:"visibile"},disabledKey:{type:String,default:"disabled"},doitKey:{type:String,default:"doit"},numKey:{type:String,default:"num"},direction:{type:String,default:"horizontal"},size:{type:String,default:"normal"},shape:{type:String},align:{type:String},markShape:{type:String,default:"line"},scroll:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0},animatedTime:{type:[Number,String],default:300},gutter:{type:[Number,String],default:0},itemOptions:{type:Object},showQuickNavigation:{type:Boolean,default:!1},beforeChange:{type:Function}},Qr=(e,n)=>n[e.textKey],Mt=(e,n)=>n[e.valueKey],Kd=(e,n)=>n[e.visibleKey],Gr=(e,n)=>n[e.disabledKey],Ud=(e,n)=>{const a=n[e.doitKey];return he(a)},Hd=(e,n)=>{const a=n[e.numKey];return a==null?null:me(n[a])},Zr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function jd(e,n,a,o=!1){return{props:{...Od},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:s}){const i=t.computed(()=>{const Y={};return Y[`${e}`]=!0,Y}),c=t.computed(()=>{const Y={};return Y[`${e}__titles`]=!0,Y[`${l.direction}`]=!0,l.align==="left"&&(Y.left=!0),l.scroll===!0&&(Y.scrollable=!0),l.shape&&(Y[`${l.shape}`]=!0),Y}),f=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const Y=de(l.gutter);return Y<=0?0:Y}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,Y=>{d.value!==Y&&(d.value=Y,v(!1))});const h=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const Y={};return b.value||(Y.display="none"),Y}),y=t.ref(),b=t.ref(!1),k=()=>{const Y=!b.value;u(Y)},u=Y=>{const M=Y;M?(b.value=M,setTimeout(()=>{h.value["fox-tabs-bar__popup--show"]=!0,h.value["fox-tabs-bar__popup--hide"]=!1},0)):(h.value["fox-tabs-bar__popup--show"]=!1,h.value["fox-tabs-bar__popup--hide"]=!0,y.value?y.value.addEventListener("transitionend",()=>{b.value=!1},{once:!0}):setTimeout(()=>{b.value=!1},0))},m=t.ref(),g=t.ref([]),C=(Y,M)=>{g.value[M]=Y},A=Y=>M=>{C(M,Y)},w=(Y,M)=>{const z=m.value,q=g.value;if(!z||!q||!q[Y])return;const F=q[Y];let L=0;l.direction==="vertical"?L=F.offsetTop-(z.offsetHeight-F.offsetHeight)/2:L=F.offsetLeft-(z.offsetWidth-F.offsetWidth)/2,B(z,L,M?0:.3,l.direction)},B=(Y,M,z,q)=>{let F=0;const L=q==="horizontal"?Y.scrollLeft:Y.scrollTop,K=z===0?1:Math.round(z*1e3/16);function X(){q==="horizontal"?Y.scrollLeft+=(M-L)/K:Y.scrollTop+=(M-L)/K,++F<K&&Ke(X)}X()},T=(Y,M)=>{const z=Mt(l,Y),q={};return q[`${e}__titles-item`]=!0,q.disabled=Gr(l,Y),q.active=z===d.value,l.shape&&(q[`${l.shape}`]=!0),l.ellipsis&&(q.ellipsis=!0),M&&(M.class&&(q[`${M.class}`]=!0),M.disabled===!0&&(q.disabled=M.disabled)),q},V=(Y,M)=>{const z={};if(p.value>0){const q=Math.abs(p.value/2);l.direction==="vertical"?(z["margin-top"]=`${q}px`,z["margin-bottom"]=`${q}px`):(z["margin-left"]=`${q}px`,z["margin-right"]=`${q}px`)}return M&&M.style&&Object.assign(z,M.style),z},E=(Y,M)=>`${Mt(l,Y)??M}`,$=(Y,M)=>{const z=Mt(l,Y),q={};q[`${e}__popup-item`]=!0,q.disabled=Gr(l,Y),q.active=z===d.value,l.shape&&(q[`${l.shape}`]=!0);const F=Zr(l,Y,M);return F&&F.disabled===!0&&(q.disabled=F.disabled),q},x=t.computed(()=>(l.data??[]).filter(M=>Kd(l,M)!==!1)),P=(Y,M)=>{const z=Mt(l,Y);if(s("click",Y,M),d.value==z)return;const q=()=>{d.value=z,l.scroll&&w(M,!1),s("update:modelValue",z),s("change",Y,M)};if(typeof l.beforeChange=="function"){const F=l.beforeChange(Y,M);dt(F)?F.then(L=>{L!==!1&&q()}).catch(()=>{q()}):F!==!1&&q()}else q()},D=(Y,M)=>function(){P(Y,M)},I=(Y,M)=>{P(Y,M),u(!1)},R=(Y,M)=>function(){I(Y,M)},v=Y=>{if(!Array.isArray(l.data)||!l.scroll)return;const M=l.data.findIndex(z=>Mt(l,z)===d.value);M!==-1&&w(M,Y)};t.watch(()=>l.data,()=>{setTimeout(v,0)}),t.onMounted(()=>{v(!0)});const W=(Y,M)=>{if(r.item)return r.item({item:Y,index:M});const z=Zr(l,Y,M),q=[];if(r.text){const X=r.text({item:Y,index:M});q.push(X)}else{const X=[];if(z?.doit===!0||Ud(l,Y)){const j={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",j);X.push(Q)}const _=z?.num??Hd(l,Y);if(_){let j="";const Q=me(_);Q>=100?j="99+":j=`${Q}`;const O={class:[`${e}__titles-item-tip`,"num"]},Z=t.h("view",O,[j]);X.push(Z)}const le={class:`${e}__titles-item-text`};X.push(Qr(l,Y));const U=t.h("view",le,X);q.push(U)}const F={class:`${e}__titles-item-line`},L=t.h("view",F);q.push(L);const K={ref:A(M),class:T(Y,z),style:V(Y,z),key:E(Y,M),onClick:D(Y,M)};return t.h("view",K,q)},H=()=>{const Y=r.default?r.default():[];if(Y.length===0)for(let z=0;z<x.value.length;z++){const q=x.value[z],F=W(q,z);Y.push(F)}const M={ref:m,class:c.value,style:f.value};return t.h("view",M,Y)},J=()=>{let Y=null;r.navigation?Y=r.navigation():Y=t.h(a);const M={class:`${e}__navigation`,onClick:k};return t.h("view",M,[Y])},ee=()=>{const Y=[];for(let z=0;z<x.value.length;z++){const q=x.value[z];let F=null;r.popupItem?F=r.popupItem({item:q,index:z}):F=Qr(l,q);const L={class:$(q,z),key:E(q,z),onClick:R(q,z)},K=t.h("view",L,[F]);Y.push(K)}const M={class:h.value,style:S.value};return t.h("view",M,Y)};return()=>{const Y=[],M=H();if(Y.push(M),l.showQuickNavigation){const q=J();Y.push(q);const F=ee();Y.push(F)}const z={class:i.value};return t.h("view",z,Y)}}}}const{create:Wd,componentName:Yd,scope:Xd}=G("tabs-bar"),qn=Wd(jd(Yd,Xd,oe.MoreH,!1)),Jr=Symbol("TabsStatesKey"),Qd={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function Gd(e,n,a=!1){return{props:{...Qd},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const s=t.shallowRef([]),i={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:b=>{const k={name:b};i.current.value===b&&(k.loaded=!0),s.value.push(k),t.triggerRef(s)},remove:b=>{const k=s.value.findIndex(u=>u.name===b);k!==-1&&s.value.splice(k,1)},isLoaded:b=>{if(!o.lazy)return!0;const k=s.value.findIndex(u=>u.name===b);return k!==-1?i.current.value?s.value[k].loaded??!1:k===0:!1}};t.provide(Jr,i);const c=b=>{const k=s.value.findIndex(u=>u.name===b);k!==-1&&(s.value[k].loaded=!0,t.triggerRef(s))};t.watch([()=>o.modelValue,()=>o.direction],([b,k])=>{i.current.value!==b&&(i.current.value=b??"",c(b??"")),i.direction.value!==k&&(i.direction.value=k)});const f=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let h=!0;const S=t.computed(()=>{const b={},k=s.value.length;if(k<=0)return b;const u=s.value.findIndex(m=>m.name===i.current.value);return i.direction.value==="vertical"?i.tabHeight.value>0&&(b.height=`${k*i.tabHeight.value}px`,u!==-1&&(b.transform=`translate(0, -${u*i.tabHeight.value}px)`)):i.tabWidth.value>0&&(b.width=`${k*i.tabWidth.value}px`,u!==-1&&(b.transform=`translate(-${u*i.tabWidth.value}px, 0)`)),h&&(h=!1,b.transition="transform 0s ease"),b});let y=null;return t.onMounted(()=>{if(!f.value)return;const b=()=>{const k=Cn(f.value);i.tabWidth.value=k.width,i.tabHeight.value=k.height};window.ResizeObserver&&(y=new window.ResizeObserver(b),y.observe(f.value)),b()}),t.onBeforeUnmount(()=>{y&&(y.disconnect(),y=null)}),()=>{const b={class:`${e}__panes`,style:S.value,ref:p},k=t.h("view",b,[r?.default?.()]),u={class:d.value,ref:f};return t.h("view",u,[k])}}}}const{create:Zd,componentName:Jd,scope:_d}=G("tabs-container"),vn=Zd(Gd(Jd,_d,!1)),eu={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function tu(e,n,a){return{props:{...eu},setup(o,{emit:l,slots:r}){const s=t.inject(Jr);t.onMounted(()=>{s.add(o.paneKey)}),t.onBeforeUnmount(()=>{s.remove(o.paneKey)});const i=t.computed(()=>{const f={};return s.direction.value==="vertical"&&s.tabHeight.value>0?f.height=`${s.tabHeight.value}px`:s.tabWidth.value>0&&(f.width=`${s.tabWidth.value}px`),f}),c=t.computed(()=>o.loaded!=null?he(o.loaded):s.isLoaded(o.paneKey));return()=>{let f=[];if(c.value)f=r?.default?.()??[];else if(r.empty)f=r.empty();else{const d={class:`${e}__empty-icon`},h=o.emptyIcon??a,S=t.h(h,d),y={class:`${e}__empty-text`},b=o.emptyText??"Loading",k=t.h("view",y,[b]),u={class:`${e}__empty`},m=t.h("view",u,[S,k]);f.push(m)}const p={class:`${e}`,style:i.value};return t.h("view",p,f)}}}}const{create:nu,componentName:ou,scope:lu}=G("tabs-pane"),Mn=nu(tu(ou,lu,oe.Loading));class _r{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=xn(n,null,this.config)}updateChildren(n,a){a?a.children=xn(n,a,this.config):this.nodes=xn(n,null,this.config)}getNodeByValue(n){let a;return Xr(this.nodes,o=>{if(o.value===n)return a=o,!0}),a}getPathNodesByValue(n){if(!n.length)return[];const a=[];let o=this.nodes;for(;o&&o.length;){const l=o.find(r=>r.value===n[r.level]);if(!l)break;a.push(l),o=l.children}return a}isLeaf(n,a){const{leaf:o,children:l}=n,r=Array.isArray(l)&&!!l.length;return o||!r&&!a}hasChildren(n,a){if(this.isLeaf(n,a))return!1;const{children:l}=n;return Array.isArray(l)&&!!l.length}}const{create:au,scope:ru}=G("cascader-pane"),su=au({components:{Loading:oe.Loading,Checklist:oe.Checklist,TabsBar:qn,TabsContainer:vn,TabsPane:Mn},props:{visible:{type:Boolean,required:!0},modelValue:{type:Array,required:!0},options:{type:Array,default:()=>[]},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object,required:!1}},emits:["update:modelValue","change","pathChange"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(ru),o=t.computed(()=>({lazy:e.lazy,lazyLoad:e.lazyLoad,valueKey:e.valueKey,textKey:e.textKey,childrenKey:e.childrenKey,convertConfig:e.convertConfig})),l=t.ref(0),r=t.ref(!1),s=t.ref(e.modelValue),i=t.ref(new _r([],{})),c=t.ref([]),f=t.computed(()=>o.value.lazy&&!!o.value.lazyLoad),p=t.computed(()=>r.value==!0||c.value.length==0?[{text:"Loading",value:0}]:c.value.map((m,g)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:g}))),d=new Map;let h;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,h=null;let{options:m}=e;o.value.convertConfig&&(m=Rd(m,o.value.convertConfig)),i.value=new _r(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),f.value&&!i.value.nodes.length&&await b({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:i.value.nodes,selectedNode:null}],y(!f.value)},y=async(m=!0)=>{const g=s.value;if(g===void 0||!i.value.nodes.length)return;if(g.length===0){l.value=0,c.value=[{nodes:i.value.nodes,selectedNode:null}];return}let C=g;if(f.value&&Array.isArray(g)&&g.length){C=[];let A=i.value.nodes.find(w=>w.value===g[0]);if(A){C=[A.value],r.value=!0;const w=await g.slice(1).reduce(async(B,T)=>{const V=await B;await b(V);const E=V?.children?.find($=>$.value===T);return E&&C.push(T),Promise.resolve(E)},Promise.resolve(A));await b(w),r.value=!1}}C.length&&g===e.modelValue&&i.value.getPathNodesByValue(C).map((w,B)=>{l.value=B,u.handleNode(w,m)})},b=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(i.value.isLeaf(m,f.value)||i.value.hasChildren(m,f.value))return;m.loading=!0;const g=m.root?null:m;let C=d.get(m);C||(C=new Promise(w=>{o.value.lazyLoad?.(m,w)}),d.set(m,C));const A=await C;Array.isArray(A)&&A.length>0?i.value.updateChildren(A,g):m.leaf=!0,m.loading=!1,d.delete(m)},k=m=>{const g=m.map(C=>C.value);s.value=g,n("change",g,m),n("pathChange",m),n("update:modelValue",g)},u={async handleNode(m,g){const{disabled:C,loading:A}=m;if(!(!g&&C||!c.value[l.value])){if(i.value.isLeaf(m,f.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!g){const w=c.value.map(B=>B.selectedNode);k(w),n("pathChange",w)}return}if(i.value.hasChildren(m,f.value)){const w=m.level+1;if(c.value[l.value].selectedNode=m,c.value=c.value.slice(0,w),c.value.push({nodes:m.children||[],selectedNode:null}),l.value=w,!g){const B=c.value.map(T=>T.selectedNode);n("pathChange",B)}return}h=m,!A&&(await b(m),h===m&&(c.value[l.value].selectedNode=m,u.handleNode(m,g)))}},handleTabChange(m,g){h=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,g){return m.selectedNode&&m.selectedNode.value===g.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Me(m,s.value)||(s.value=m,y())}),t.watch(()=>e.visible,m=>{m&&Array.isArray(s.value)&&s.value.length>0&&y()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...u}}}),iu={class:"fox-cascader"},cu={role:"menu",class:"fox-cascader__pane"},du=["aria-checked","aria-disabled","onClick"],uu={class:"fox-cascader__item__title"},fu=t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1);function mu(e,n,a,o,l,r){const s=t.resolveComponent("TabsBar"),i=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),f=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",iu,[t.createVNode(s,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[0]||(n[0]=d=>e.tabsCursor=d),data:e.panesTitles,onChange:e.handleTabChange,scroll:!0,align:"left"},null,8,["modelValue","data","onChange"]),t.createVNode(p,{modelValue:e.tabsCursor,"onUpdate:modelValue":n[1]||(n[1]=d=>e.tabsCursor=d)},{default:t.withCtx(()=>[!e.initLoading&&e.panes.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.panes,(d,h)=>(t.openBlock(),t.createBlock(f,{"pane-key":h,key:h},{default:t.withCtx(()=>[t.createElementVNode("view",cu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.nodes,S=>(t.openBlock(),t.createElementBlock("view",{key:S.value,class:t.normalizeClass(["fox-cascader__item",{active:e.isSelected(d,S),disabled:S.disabled}]),"aria-checked":e.isSelected(d,S),"aria-disabled":S.disabled||void 0,role:"menuitemradio",onClick:y=>e.handleNode(S,!1)},[t.createElementVNode("view",uu,t.toDisplayString(S.text),1),S.loading?(t.openBlock(),t.createBlock(i,{key:0,class:"fox-cascader__item__icon-loading",name:"loading"})):(t.openBlock(),t.createBlock(c,{key:1,class:"fox-cascader__item__icon-check",name:"checklist"}))],10,du))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(f,{key:1,"pane-key":0},{default:t.withCtx(()=>[fu]),_:1}))]),_:1},8,["modelValue"])])}const pu=te(su,[["render",mu]]),{create:hu}=G("cascader"),gu=hu({components:{FoxCascaderPane:pu,FoxPopup:fe},props:{...Fe,modelValue:Array,visible:Boolean,title:String,options:{type:Array,default:()=>[]},lazy:Boolean,lazyLoad:Function,valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},poppable:{type:Boolean,default:!0},convertConfig:Object},emits:["update:modelValue","change","pathChange","update:visible"],setup(e,{emit:n}){const a=t.ref(e.modelValue),o=t.computed({get(){return e.visible},set(s){n("update:visible",s)}}),l=(s,i)=>{a.value=s,o.value=!1,n("change",s,i),n("update:modelValue",s)},r=s=>{n("pathChange",s)};return t.watch(()=>e.modelValue,s=>{s!==a.value&&(a.value=s)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),yu=["innerHTML"];function bu(e,n,a,o,l,r){const s=t.resolveComponent("FoxCascaderPane"),i=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(i,{key:0,visible:e.innerVisible,"onUpdate:visible":n[0]||(n[0]=c=>e.innerVisible=c),position:"bottom","pop-class":"fox-cascader__popup",round:"",closeable:e.closeable,"destroy-on-close":!1,"close-icon-position":e.closeIconPosition},{default:t.withCtx(()=>[e.title?(t.openBlock(),t.createElementBlock("view",{key:0,class:"fox-cascader__bar",innerHTML:e.title},null,8,yu)):t.createCommentVNode("",!0),t.createVNode(s,{onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"])]),_:1},8,["visible","closeable","close-icon-position"])):(t.openBlock(),t.createBlock(s,{key:1,onChange:e.onChange,onPathChange:e.onPathChange,modelValue:e.innerValue,options:e.options,lazy:e.lazy,"lazy-load":e.lazyLoad,"value-key":e.valueKey,"text-key":e.textKey,"children-key":e.childrenKey,"convert-config":e.convertConfig,visible:e.innerVisible},null,8,["onChange","onPathChange","modelValue","options","lazy","lazy-load","value-key","text-key","children-key","convert-config","visible"]))}const Pn=te(gu,[["render",bu]]);function Pt(e,n){const a=e.textKey??"text";return n[a]??""}function Lt(e,n){const a=e.valueKey??"value";return n[a]}function es(e,n){const a=e.childrenKey??"children";return n[a]}function Ln(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=Pt(e,l),s=Lt(e,l);a.texts.push(r),a.values.push(s??"")}return a}function ts(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Pt(e,n[s])===r){const c=Lt(e,n[s])??"",f={[e.textKey]:r,[e.valueKey]:c};l.push(f);const p=es(e,n[s]);Array.isArray(p)&&ts(e,p,a,o+1,l);return}}function ns(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let s=0;s<n.length;s++)if(Lt(e,n[s])===r){const c=Pt(e,n[s])??"",f={[e.textKey]:c,[e.valueKey]:r};l.push(f);const p=es(e,n[s]);Array.isArray(p)&&ns(e,p,a,o+1,l);return}}function Wo(e,n,a){if(n===a)return!0;if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++){const l=Pt(e,n[o]),r=Pt(e,a[o]);if(l!==r)return!1;const s=Lt(e,n[o]),i=Lt(e,a[o]);if(s!==i)return!1}return!0}let ku=class{proxy;constructor(n){this.proxy=n}async load(n,a){const o="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a);const l=Ze(this.proxy,o);return l===null?(console.error(`${o} component not found api function`),[]):(De(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await l(n,a))}};function Su(){const e=t.getCurrentInstance();return new ku(e.proxy)}const os={modelValue:{type:[Array,String]},pathNodes:{type:[Array]},title:{type:String,required:!1},placeholder:{type:String,required:!1,default:""},source:{type:[Array,Function,String],default:[]},params:{type:Object},valueType:{type:String,required:!1,default:"value"},lazy:{type:Boolean,required:!1},lazyLoad:{type:Function,required:!1},valueKey:{type:String,default:"value"},textKey:{type:String,default:"text"},childrenKey:{type:String,default:"children"},convertConfig:{type:Object},showAllLevels:{type:[Boolean],default:!0},separator:{type:[String],default:"/"}};function Cu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...os},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=Su(),k=t.ref([]),u=t.ref([]),m=t.computed(()=>{if(Array.isArray(u.value)){if(i.showAllLevels===!1){const F=u.value.length-1;return u.value[F]}return u.value.join(i.separator)}else return u.value}),g=t.ref([]),C=t.ref([]);t.watch([()=>i.modelValue,()=>k.value],async([F,L])=>{if(d("setValue",F),i.lazy===!0){C.value.length==0&&(g.value=Array.isArray(F)?F:[]);return}if(i.valueType==="item"){let K=F;if(!Wo(i,K,C.value)){C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values}}else if(i.valueType==="text"){let K=F,X=[];if(ts(i,L,K,0,X),!Wo(i,X,C.value)){C.value=X;let _=Ln(i,X);K.value=_.texts,g.value=_.values}}else{let K=[];if(ns(i,L,F,0,K),!Wo(i,K,C.value)){C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values}}}),i.lazy===!0&&(g.value=Array.isArray(i.modelValue)?i.modelValue:[]),t.watch([()=>i.source,()=>i.params],async([F,L])=>{F&&(k.value=await b.load(F,L))},{immediate:!0});const A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":f.value,"is-readonly":p.value})),B=Ve(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const F={};return B.value&&(F["text-align"]=B.value),F}),V=t.ref(!1),E=()=>{f.value===!0||p.value===!0||(V.value=!0)},$=F=>{V.value=F},x=(F,L)=>{let K=L.map(_=>{if(_==null)return _;let le={..._};return Reflect.deleteProperty(le,"text"),le[i.textKey]=_.text??"",Reflect.deleteProperty(le,"value"),le[i.valueKey]=_.value??"",le});C.value=K;let X=Ln(i,K);u.value=X.texts,g.value=X.values,i.valueType==="text"?(d("change",u.value,K),d("update:modelValue",u.value)):i.valueType==="item"?(d("change",K,K),d("update:modelValue",K)):(d("change",g.value,K),d("update:modelValue",g.value)),d("update:pathNodes",K)},P=F=>{let L=F.map(K=>{if(K==null)return K;let X={...K};return Reflect.deleteProperty(X,"text"),X[i.textKey]=K.text??"",Reflect.deleteProperty(X,"value"),X[i.valueKey]=K.value??"",X});d("pathChange",L)},D=F=>{y.value=!0,d("focus",g.value,F)},I=F=>{setTimeout(()=>{y.value=!1},0),d("blur",g.value,F)},R=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),v=t.computed(()=>ke(i.unit)>0),W=t.computed(()=>ke(i.unit)>0&&!y.value),H=t.computed(()=>({hidden:!W.value})),J=F=>{C.value=[],u.value=[],g.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>i.clearable&&!f.value&&!p.value),Y=t.computed(()=>{let F=g.value&&g.value.length>0;return i.clearable&&F&&y.value}),M=F=>{Y.value?J(F):E()},z=t.computed(()=>Y.value&&ee.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const F={class:w.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:E,onFocus:D,onBlur:I};s&&(F.disabled=!0);const L=[],K=t.h("input",F);L.push(K);const X=[],_={class:["action-icon"]},le=t.h(z.value,_),U={class:q.value,onClick:M},j=t.h("view",U,{default:()=>[le]});if(X.push(j),v.value){const Ce=t.h("view",{class:H.value},[i.unit]);X.push(Ce)}const Q={class:R.value},O=t.h("view",Q,{default:()=>X});L.push(O);const Z={default:()=>L};Z.label=c.slots.default,Z.prepend=c.slots.prepend,Z.append=c.slots.append,Z.fixedPreTip=c.slots.fixedPreTip,Z.fixedTip=c.slots.fixedTip;let ne={};ne.visible=V.value,ne["onUpdate:visible"]=$,ne.modelValue=g.value,ne.onChange=x,ne.onPathChange=P,ne.options=k.value,ne.title=i.title,ne.lazy=i.lazy,ne.lazyLoad=i.lazyLoad,ne.valueKey=i.valueKey,ne.textKey=i.textKey,ne.childrenKey=i.childrenKey,ne.convertConfig=i.convertConfig;const re=t.h(r,ne);Z.hide=()=>[re];const se=ut(i,os);return t.h(a,{...se,prop:`${i.prop}_item`},Z)}}}}const{componentName:wu,create:Nu,scope:Bu}=G("cascader-item"),Yo=Nu(Cu(wu,Bu,Be,oe.CircleClose,oe.ArrowRight,Pn,!1));var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ls={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",s="second",i="minute",c="hour",f="day",p="week",d="month",h="quarter",S="year",y="date",b="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(P,D,I){var R=String(P);return!R||R.length>=D?P:""+Array(D+1-R.length).join(I)+P},C={s:g,z:function(P){var D=-P.utcOffset(),I=Math.abs(D),R=Math.floor(I/60),v=I%60;return(D<=0?"+":"-")+g(R,2,"0")+":"+g(v,2,"0")},m:function P(D,I){if(D.date()<I.date())return-P(I,D);var R=12*(I.year()-D.year())+(I.month()-D.month()),v=D.clone().add(R,d),W=I-v<0,H=D.clone().add(R+(W?-1:1),d);return+(-(R+(I-v)/(W?v-H:H-v))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:S,w:p,d:f,D:y,h:c,m:i,s,ms:r,Q:h}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},A="en",w={};w[A]=m;var B=function(P){return P instanceof $},T=function P(D,I,R){var v;if(!D)return A;if(typeof D=="string"){var W=D.toLowerCase();w[W]&&(v=W),I&&(w[W]=I,v=W);var H=D.split("-");if(!v&&H.length>1)return P(H[0])}else{var J=D.name;w[J]=D,v=J}return!R&&v&&(A=v),v||!R&&A},V=function(P,D){if(B(P))return P.clone();var I=typeof D=="object"?D:{};return I.date=P,I.args=arguments,new $(I)},E=C;E.l=T,E.i=B,E.w=function(P,D){return V(P,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var $=function(){function P(I){this.$L=T(I.locale,null,!0),this.parse(I)}var D=P.prototype;return D.parse=function(I){this.$d=function(R){var v=R.date,W=R.utc;if(v===null)return new Date(NaN);if(E.u(v))return new Date;if(v instanceof Date)return new Date(v);if(typeof v=="string"&&!/Z$/i.test(v)){var H=v.match(k);if(H){var J=H[2]-1||0,ee=(H[7]||"0").substring(0,3);return W?new Date(Date.UTC(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)):new Date(H[1],J,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ee)}}return new Date(v)}(I),this.$x=I.x||{},this.init()},D.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},D.$utils=function(){return E},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function(I,R){var v=V(I);return this.startOf(R)<=v&&v<=this.endOf(R)},D.isAfter=function(I,R){return V(I)<this.startOf(R)},D.isBefore=function(I,R){return this.endOf(R)<V(I)},D.$g=function(I,R,v){return E.u(I)?this[R]:this.set(v,I)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(I,R){var v=this,W=!!E.u(R)||R,H=E.p(I),J=function(K,X){var _=E.w(v.$u?Date.UTC(v.$y,X,K):new Date(v.$y,X,K),v);return W?_:_.endOf(f)},ee=function(K,X){return E.w(v.toDate()[K].apply(v.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(X)),v)},Y=this.$W,M=this.$M,z=this.$D,q="set"+(this.$u?"UTC":"");switch(H){case S:return W?J(1,0):J(31,11);case d:return W?J(1,M):J(0,M+1);case p:var F=this.$locale().weekStart||0,L=(Y<F?Y+7:Y)-F;return J(W?z-L:z+(6-L),M);case f:case y:return ee(q+"Hours",0);case c:return ee(q+"Minutes",1);case i:return ee(q+"Seconds",2);case s:return ee(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(I){return this.startOf(I,!1)},D.$set=function(I,R){var v,W=E.p(I),H="set"+(this.$u?"UTC":""),J=(v={},v[f]=H+"Date",v[y]=H+"Date",v[d]=H+"Month",v[S]=H+"FullYear",v[c]=H+"Hours",v[i]=H+"Minutes",v[s]=H+"Seconds",v[r]=H+"Milliseconds",v)[W],ee=W===f?this.$D+(R-this.$W):R;if(W===d||W===S){var Y=this.clone().set(y,1);Y.$d[J](ee),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else J&&this.$d[J](ee);return this.init(),this},D.set=function(I,R){return this.clone().$set(I,R)},D.get=function(I){return this[E.p(I)]()},D.add=function(I,R){var v,W=this;I=Number(I);var H=E.p(R),J=function(M){var z=V(W);return E.w(z.date(z.date()+Math.round(M*I)),W)};if(H===d)return this.set(d,this.$M+I);if(H===S)return this.set(S,this.$y+I);if(H===f)return J(1);if(H===p)return J(7);var ee=(v={},v[i]=o,v[c]=l,v[s]=a,v)[H]||1,Y=this.$d.getTime()+I*ee;return E.w(Y,this)},D.subtract=function(I,R){return this.add(-1*I,R)},D.format=function(I){var R=this,v=this.$locale();if(!this.isValid())return v.invalidDate||b;var W=I||"YYYY-MM-DDTHH:mm:ssZ",H=E.z(this),J=this.$H,ee=this.$m,Y=this.$M,M=v.weekdays,z=v.months,q=function(X,_,le,U){return X&&(X[_]||X(R,W))||le[_].slice(0,U)},F=function(X){return E.s(J%12||12,X,"0")},L=v.meridiem||function(X,_,le){var U=X<12?"AM":"PM";return le?U.toLowerCase():U},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Y+1,MM:E.s(Y+1,2,"0"),MMM:q(v.monthsShort,Y,z,3),MMMM:q(z,Y),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:q(v.weekdaysMin,this.$W,M,2),ddd:q(v.weekdaysShort,this.$W,M,3),dddd:M[this.$W],H:String(J),HH:E.s(J,2,"0"),h:F(1),hh:F(2),a:L(J,ee,!0),A:L(J,ee,!1),m:String(ee),mm:E.s(ee,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:H};return W.replace(u,function(X,_){return _||K[X]||H.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(I,R,v){var W,H=E.p(R),J=V(I),ee=(J.utcOffset()-this.utcOffset())*o,Y=this-J,M=E.m(this,J);return M=(W={},W[S]=M/12,W[d]=M,W[h]=M/3,W[p]=(Y-ee)/6048e5,W[f]=(Y-ee)/864e5,W[c]=Y/l,W[i]=Y/o,W[s]=Y/a,W)[H]||Y,v?M:E.a(M)},D.daysInMonth=function(){return this.endOf(d).$D},D.$locale=function(){return w[this.$L]},D.locale=function(I,R){if(!I)return this.$L;var v=this.clone(),W=T(I,R,!0);return W&&(v.$L=W),v},D.clone=function(){return E.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},P}(),x=$.prototype;return V.prototype=x,[["$ms",r],["$s",s],["$m",i],["$H",c],["$W",f],["$M",d],["$y",S],["$D",y]].forEach(function(P){x[P[1]]=function(D){return this.$g(D,P[0],P[1])}}),V.extend=function(P,D){return P.$i||(P(D,$,V),P.$i=!0),V},V.locale=T,V.isDayjs=B,V.unix=function(P){return V(1e3*P)},V.en=w[A],V.Ls=w,V.p={},V})})(ls);var Au=ls.exports;const Oe=Ye(Au);var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d\d/,r=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},c=function(b){return(b=+b)+(b>68?1900:2e3)},f=function(b){return function(k){this[b]=+k}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(k){if(!k||k==="Z")return 0;var u=k.match(/([+-]|\d\d)/g),m=60*u[1]+(+u[2]||0);return m===0?0:u[0]==="+"?-m:m}(b)}],d=function(b){var k=i[b];return k&&(k.indexOf?k:k.s.concat(k.f))},h=function(b,k){var u,m=i.meridiem;if(m){for(var g=1;g<=24;g+=1)if(b.indexOf(m(g,0,k))>-1){u=g>12;break}}else u=b===(k?"pm":"PM");return u},S={A:[s,function(b){this.afternoon=h(b,!1)}],a:[s,function(b){this.afternoon=h(b,!0)}],S:[/\d/,function(b){this.milliseconds=100*+b}],SS:[l,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[r,f("seconds")],ss:[r,f("seconds")],m:[r,f("minutes")],mm:[r,f("minutes")],H:[r,f("hours")],h:[r,f("hours")],HH:[r,f("hours")],hh:[r,f("hours")],D:[r,f("day")],DD:[l,f("day")],Do:[s,function(b){var k=i.ordinal,u=b.match(/\d+/);if(this.day=u[0],k)for(var m=1;m<=31;m+=1)k(m).replace(/\[|\]/g,"")===b&&(this.day=m)}],M:[r,f("month")],MM:[l,f("month")],MMM:[s,function(b){var k=d("months"),u=(d("monthsShort")||k.map(function(m){return m.slice(0,3)})).indexOf(b)+1;if(u<1)throw new Error;this.month=u%12||u}],MMMM:[s,function(b){var k=d("months").indexOf(b)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,f("year")],YY:[l,function(b){this.year=c(b)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function y(b){var k,u;k=b,u=i&&i.formats;for(var m=(b=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(V,E,$){var x=$&&$.toUpperCase();return E||u[$]||a[$]||u[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,D,I){return D||I.slice(1)})})).match(o),g=m.length,C=0;C<g;C+=1){var A=m[C],w=S[A],B=w&&w[0],T=w&&w[1];m[C]=T?{regex:B,parser:T}:A.replace(/^\[|\]$/g,"")}return function(V){for(var E={},$=0,x=0;$<g;$+=1){var P=m[$];if(typeof P=="string")x+=P.length;else{var D=P.regex,I=P.parser,R=V.slice(x),v=D.exec(R)[0];I.call(E,v),V=V.replace(v,"")}}return function(W){var H=W.afternoon;if(H!==void 0){var J=W.hours;H?J<12&&(W.hours+=12):J===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(b,k,u){u.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var m=k.prototype,g=m.parse;m.parse=function(C){var A=C.date,w=C.utc,B=C.args;this.$u=w;var T=B[1];if(typeof T=="string"){var V=B[2]===!0,E=B[3]===!0,$=V||E,x=B[2];E&&(x=B[2]),i=this.$locale(),!V&&x&&(i=u.Ls[x]),this.$d=function(R,v,W){try{if(["x","X"].indexOf(v)>-1)return new Date((v==="X"?1e3:1)*R);var H=y(v)(R),J=H.year,ee=H.month,Y=H.day,M=H.hours,z=H.minutes,q=H.seconds,F=H.milliseconds,L=H.zone,K=new Date,X=Y||(J||ee?1:K.getDate()),_=J||K.getFullYear(),le=0;J&&!ee||(le=ee>0?ee-1:K.getMonth());var U=M||0,j=z||0,Q=q||0,O=F||0;return L?new Date(Date.UTC(_,le,X,U,j,Q,O+60*L.offset*1e3)):W?new Date(Date.UTC(_,le,X,U,j,Q,O)):new Date(_,le,X,U,j,Q,O)}catch{return new Date("")}}(A,T,w),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),$&&A!=this.format(T)&&(this.$d=new Date("")),i={}}else if(T instanceof Array)for(var P=T.length,D=1;D<=P;D+=1){B[1]=T[D-1];var I=u.apply(this,B);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}D===P&&(this.$d=new Date(""))}else g.call(this,C)}}})})(as);var Tu=as.exports;const Vu=Ye(Tu);var rs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=r.format;l.en.ordinal=function(i){var c=["th","st","nd","rd"],f=i%100;return"["+i+(c[(f-20)%10]||c[f]||c[0])+"]"},r.format=function(i){var c=this,f=this.$locale();if(!this.isValid())return s.bind(this)(i);var p=this.$utils(),d=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return f.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return f.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),h==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),h==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return h}});return s.bind(this)(d)}}})})(rs);var $u=rs.exports;const Eu=Ye($u);var ss={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){var r=o.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},i=function(d,h,S,y,b){var k=d.name?d:d.$locale(),u=s(k[h]),m=s(k[S]),g=u||m.map(function(A){return A.slice(0,y)});if(!b)return g;var C=k.weekStart;return g.map(function(A,w){return g[(w+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},f=function(d,h){return d.formats[h]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,b,k){return b||k.slice(1)})}(d.formats[h.toUpperCase()])},p=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):i(d,"months")},monthsShort:function(h){return h?h.format("MMM"):i(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return f(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return p.bind(this)()},l.localeData=function(){var d=c();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return l.weekdays()},weekdaysShort:function(){return l.weekdaysShort()},weekdaysMin:function(){return l.weekdaysMin()},months:function(){return l.months()},monthsShort:function(){return l.monthsShort()},longDateFormat:function(h){return f(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return i(c(),"months")},l.monthsShort=function(){return i(c(),"monthsShort","months",3)},l.weekdays=function(d){return i(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return i(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return i(c(),"weekdaysMin","weekdays",2,d)}}})})(ss);var Du=ss.exports;const Iu=Ye(Du);var is={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){var a="week",o="year";return function(l,r,s){var i=r.prototype;i.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var f=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=s(this).startOf(o).add(1,o).date(f),d=s(this).endOf(a);if(p.isBefore(d))return 1}var h=s(this).startOf(o).date(f).startOf(a).subtract(1,"millisecond"),S=this.diff(h,a,!0);return S<0?s(this).startOf("week").week():Math.ceil(S)},i.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(is);var xu=is.exports;const qu=Ye(xu);var cs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),s=this.year();return r===1&&l===11?s+1:l===0&&r>=52?s-1:s}}})})(cs);var vu=cs.exports;const Mu=Ye(vu);var ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var s=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?s:this.add(r-s,"day")}}})})(ds);var Pu=ds.exports;const Lu=Ye(Pu);var us={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(us);var zu=us.exports;const Fu=Ye(zu);var fs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(We,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(fs);var Ru=fs.exports;const Ou=Ye(Ru);Oe.extend(Iu),Oe.extend(Eu),Oe.extend(Vu),Oe.extend(qu),Oe.extend(Mu),Oe.extend(Lu),Oe.extend(Fu),Oe.extend(Ou);const ae={format(e,n){return Oe(e).format(n)},parser(e,n){return Oe(e,n).toDate()},isLeapYear(e){return e%4==0&&e%100!=0||e%400==0},getWhatDay(e,n,a){const l=new Date(e+"/"+n+"/"+a).getDay();return["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l]},getMonthPreDay(e,n){let o=new Date(e+"/"+n+"/01").getDay();return o==0&&(o=7),o},getMonthDays(e,n){return/^0/.test(n)&&(n=n.split("")[1]),[0,31,this.isLeapYear(Number(e))?29:28,31,30,31,30,31,31,30,31,30,31][n]},getNumTwoBit(e){return e=Number(e),(e>9?"":"0")+e},date2Str:function(e,n){n=n||"-";const a=e.getFullYear(),o=this.getNumTwoBit(e.getMonth()+1),l=this.getNumTwoBit(e.getDate());return[a,o,l].join(n)},getDay(e,n){e=e||0;let a=n??new Date;const o=e*(1e3*60*60*24);return a=new Date(a.getTime()+o),this.date2Str(a)},compareDate(e,n){let a;typeof e=="string"?a=new Date(e.replace("-","/").replace("-","/")):a=e;let o;return typeof n=="string"?o=new Date(n.replace("-","/").replace("-","/")):o=n,!(a>=o)},isEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;let a;typeof e=="string"?a=new Date(e).getTime():a=e;let o;return typeof n=="string"?o=new Date(n).getTime():o=n,a==o},getMonthWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a));let r=l.getDay(),s=l.getDate(),i=6-r;return o!==0&&(r=r==0?7:r,i=7-r),Math.ceil((s+i)/7)},getYearWeek:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=new Date(Number(e),0,1),s=Math.round((l.valueOf()-r.valueOf())/864e5);let i=l.getDay(),c=6-i;return o!==0&&(i=i==0?7:i,c=7-i),Math.ceil((s+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let s=l.getDay();if(o===0){const c=r-s*864e5,f=r+(6-s)*864e5,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(f));return[p,d]}else{s=s==0?7:s;const i=24*60*60*1e3,c=r-(s-1)*i,f=r+(7-s)*i,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(f));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=ae.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=ae.getWhatDay(+n[0],+n[1],+n[2]),n},inScope4Day(e,n,a){const o=new Date(new Date(n).setDate(n.getDate()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),s=n.getTime();return r>s?l>=s&&l<=r:l>=r&&l<=s}},ms=new Date().getFullYear(),Xo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",time:"HH:mm:ss","year-month":"YYYY-MM","month-day":"MM-DD",datehour:"YYYY-MM-DD HH","hour-minute":"HH:mm"},zn=(e,n,a)=>{let o;if(Ue(n)?o=n:typeof n=="string"&&ke(n)>0?o=ae.parser(n,a):o=new Date,o.toString()==="Invalid Date")return null;let l=Math.max(o.getTime(),e.minDate.getTime());return l=Math.min(l,e.maxDate.getTime()),new Date(l)},Qo=(e,n,a)=>{Ue(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),ae.format(new Date(o),a)};let Go={modelValue:{type:[String,Date]},confirmText:{type:String},cancelText:{type:String},type:{type:String,default:"date"},valueFormat:{type:String},visible:{type:Boolean,default:!1},title:{type:String,default:""},isShowChinese:{type:Boolean,default:!0},minuteStep:{type:Number,default:1},minDate:{type:Date,default:()=>new Date(ms-10,0,1),validator:Ue},maxDate:{type:Date,default:()=>new Date(ms+10,11,31),validator:Ue},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:Ku,scope:Uu}=G("date-picker"),Hu=Ku({components:{[kt.name]:kt},props:{...Go},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Uu),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,g){return new Date(m,g,0).getDate()}const s=(m,g)=>{const C=e[`${m}Date`],A=C.getFullYear();let w=1,B=1,T=0,V=0;m==="max"&&(w=12,B=r(g.getFullYear(),g.getMonth()+1),T=23,V=59);const E=V;return g.getFullYear()===A&&(w=C.getMonth()+1,g.getMonth()+1===w&&(B=C.getDate(),g.getDate()===B&&(T=C.getHours(),g.getHours()===T&&(V=C.getMinutes())))),{[`${m}Year`]:A,[`${m}Month`]:w,[`${m}Date`]:B,[`${m}Hour`]:T,[`${m}Minute`]:V,[`${m}Seconds`]:E}},i=t.computed(()=>{if(!h.value)return[];const{maxYear:m,maxDate:g,maxMonth:C,maxHour:A,maxMinute:w,maxSeconds:B}=s("max",h.value),{minYear:T,minDate:V,minMonth:E,minHour:$,minMinute:x,minSeconds:P}=s("min",h.value);let D=[{type:"year",range:[T,m]},{type:"month",range:[E,C]},{type:"day",range:[V,g]},{type:"hour",range:[$,A]},{type:"minute",range:[x,w]},{type:"seconds",range:[P,B]}];switch(e.type){case"date":D=D.slice(0,3);break;case"datetime":D=D.slice(0,5);break;case"time":D=D.slice(3,6);break;case"year-month":D=D.slice(0,2);break;case"month-day":D=D.slice(1,3);break;case"datehour":D=D.slice(0,4);break;case"hour-minute":D=D.slice(3,5);break}return D}),c=(m,g,C)=>{if(!(g>m))return null;const A=[];for(;m<=g;)e.isShowChinese?A.push({text:m+o[C],value:m}):A.push({text:`${m}`,value:m}),C==="minute"?m+=e.minuteStep:m++;return A},f=t.computed(()=>{let m=[];return i.value.forEach(g=>{let C=c(g.range[0],g.range[1],g.type);C&&m.push(C)}),m}),p=(m,g)=>m==="year"?g.getFullYear():m==="month"?g.getMonth()+1:m==="day"?g.getDate():m==="hour"?g.getHours():m==="minute"?g.getMinutes():m==="seconds"?g.getSeconds():0,d=t.ref(),h=t.ref(null);t.watch(()=>e.modelValue,m=>{let g;if(typeof m=="string"?m.length==0?g=new Date:e.valueFormat?g=zn(e,e.modelValue,e.valueFormat):g=zn(e,m,Xo[e.type]):Ue(m)?g=m:g=new Date,!!g&&(!h.value||g.getTime()!==h.value.getTime())){h.value=g;let C=[];i.value.forEach(A=>{let w=p(A.type,g);C.push(w)}),d.value=C}},{immediate:!0});const S=m=>{if(e.type==="date"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1));A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A)}else if(e.type==="datetime"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1)),w=m[3],B=m[4];A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A,w,B)}else if(e.type==="time"){const g=m[0],C=m[1],A=m[2],w=h.value??new Date,B=new Date(w.getFullYear(),w.getMonth(),w.getDate(),g,C,A);h.value=B}else if(e.type==="year-month"){const g=m[0],C=m[1]-1;h.value=new Date(g,C)}else if(e.type==="month-day"){const C=(h.value??new Date).getFullYear(),A=m[0]-1,w=Math.min(m[1],r(C,A+1));w!==m[1]&&(m[1]=w);const B=new Date(C,A,w);h.value=B}else if(e.type==="datehour"){const g=m[0],C=m[1]-1,A=Math.min(m[2],r(g,C+1)),w=m[3];A!==m[2]&&(m[2]=A),h.value=new Date(g,C,A,w)}else if(e.type==="hour-minute"){const g=m[0],C=m[1],A=h.value??new Date,w=new Date(A.getFullYear(),A.getMonth(),A.getDate(),g,C);h.value=w}d.value=m};return{columns:f,dateIndexs:d,show:l,onChange:m=>{S(m)},onClose:()=>{l.value=!1,n("update:visible",!1),n("update:close",!1)},onConfirm:m=>{S(m),l.value=!1;let g=h.value??new Date;if(e.valueFormat){let C=Qo(e,g,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",g);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function ju(e,n,a,o,l,r){const s=t.resolveComponent("fox-picker");return t.openBlock(),t.createBlock(s,{visible:e.show,"model-value":e.dateIndexs,source:e.columns,"value-type":"value","confirm-text":e.confirmText,"cancel-text":e.cancelText,title:e.title,onChange:e.onChange,onConfirm:e.onConfirm,onClose:e.onClose,onClear:e.onClear,"visible-item-count":e.visibleItemCount,"three-dimensional":e.threeDimensional,"swipe-duration":e.swipeDuration,"teleport-disable":e.teleportDisable},{top:t.withCtx(()=>[t.renderSlot(e.$slots,"top")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["visible","model-value","source","confirm-text","cancel-text","title","onChange","onConfirm","onClose","onClear","visible-item-count","three-dimensional","swipe-duration","teleport-disable"])}const Fn=te(Hu,[["render",ju]]),Wu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Yu(e){let n=e.format;if(!n){let a=e.type??"date";n=Xo[a]}return n}function Xu(e,n,a,o,l,r,s=!1){return{props:{...pe,...be,...Go,...Wu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),k=ve(i,"modelValue",M=>M==null?null:typeof M=="string"?M.length==0?null:i.valueFormat?zn(i,M,i.valueFormat)??M:zn(i,M,Xo[i.type])??M:Ue(M)?M:null,d),u=t.computed(()=>{if(!k.value)return"";const M=Yu(i);return Qo(i,k.value,M)}),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const M={};return C.value&&(M["text-align"]=C.value),M}),w=t.ref(!1),B=()=>{w.value=!0},T=()=>{w.value=!1};c.expose({showPicker:B,hidePicker:T});const V=M=>{w.value=M},E=M=>{if(k.value=M,i.valueFormat){let z=Qo(i,M,i.valueFormat);d("update:modelValue",z,{}),d("change",z,{})}else d("update:modelValue",M,{}),d("change",M,{})},$=M=>{let q=M.target.value;y.value=!0,d("focus",q,M)},x=M=>{setTimeout(()=>{y.value=!1},0);let q=M.target.value;i.maxLength&&q.length>Number(i.maxLength)&&(q=q.slice(0,Number(i.maxLength))),d("blur",q,M)},P=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),D=t.computed(()=>ke(i.unit)>0),I=t.computed(()=>ke(i.unit)>0&&!y.value),R=t.computed(()=>({hidden:!I.value})),v=M=>{k.value="",d("update:modelValue","",M),d("change","",M),d("clear",""),T()},W=t.computed(()=>i.clearable&&!f.value&&!p.value),H=t.computed(()=>{let M=ke(k.value)>0;return i.clearable&&M&&y.value}),J=M=>{H.value?v(M):B()},ee=t.computed(()=>H.value&&W.value?o:l),Y=t.computed(()=>({action:!0}));return()=>{const M={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(M.disabled=!0);const z=[],q=t.h("input",M);z.push(q);const F=[],L={class:["action-icon"]},K=t.h(ee.value,L),X={class:Y.value,onClick:J},_=t.h("view",X,{default:()=>[K]});if(F.push(_),D.value){const se=t.h("view",{class:R.value},[i.unit]);F.push(se)}const le={class:P.value},U=t.h("view",le,{default:()=>F});z.push(U);const j={default:()=>z};j.label=c.slots.default,j.prepend=c.slots.prepend,j.append=c.slots.append,j.fixedPreTip=c.slots.fixedPreTip,j.fixedTip=c.slots.fixedTip;const Q=Se(i,Go);Q.valueFormat=null,Q.disabled=!1,Q.readonly=f.value||p.value,Q.visible=w.value,Q["onUpdate:visible"]=V,Q.modelValue=k.value,Q["onUpdate:modelValue"]=E,Q.onClear=v;const O={};if(c.slots.top){const se=c.slots.top();O.top=()=>se}if(c.slots.bottom){const se=c.slots.bottom();O.default=()=>se}const Z=t.h(r,Q,O);j.hide=()=>[Z];const ne=Se(i,be,pe);return t.h(a,{...ne,prop:`${i.prop}_item`},j)}}}}const{create:Qu,componentName:Gu,scope:Zu}=G("date-item"),Zo=Qu(Xu(Gu,Zu,Be,oe.CircleClose,oe.Date,Fn,!1)),Ju=39,_u=64,{create:ef,scope:tf}=G("calendar-pane"),nf=ef({props:{type:{type:String,default:"one"},valueFormat:{type:String,default:"YYYY-MM-DD"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array],default:""},startDate:{type:String,default:ae.getDay(0)},endDate:{type:String,default:ae.getDay(365)},firstDayOfWeek:{type:Number,default:0}},emits:["choose","update","close","select"],setup(e,{emit:n,slots:a}){const{toLocaleRefs:o,t:l}=ie.useFoxI18n(tf),r=o(e,["title","confirmText","startText","endText","today"]),s=JSON.parse(l("weekdays")),i=t.ref([...s.slice(e.firstDayOfWeek,7),...s.slice(0,e.firstDayOfWeek)]),c=t.ref(null),f=t.ref(null),p=t.ref(null),d=t.ref(null),h=t.ref(0),S=t.computed(()=>u.monthsData.slice(u.defaultRange[0],u.defaultRange[1])),y=t.computed(()=>a.btn),b=t.computed(()=>a["top-info"]),k=t.computed(()=>a["bottom-info"]),u=t.reactive({yearMonthTitle:"",defaultRange:[],currDate:"",propStartDate:"",propEndDate:"",unLoadPrev:!1,touchParams:{startY:0,endY:0,startTime:0,endTime:0,lastY:0,lastTime:0},transformY:0,translateY:0,scrollDistance:0,defaultData:[],chooseData:[],monthsData:[],dayPrefix:"fox-calendar__day",startData:"",endData:"",isRange:e.type==="range",timer:0,currentIndex:0,containerHeight:0,avgHeight:0,monthsNum:0}),m=L=>L.split("-"),g=L=>ae.isEqual(u.currDate[0],L),C=L=>ae.isEqual(u.currDate[1],L),A=L=>u.currDate?.length>0?u.currDate?.some(K=>ae.isEqual(K,L)):!1,w=(L,K)=>K.curData[0]+"-"+K.curData[1]+"-"+ae.getNumTwoBit(+L.day),B=(L,K)=>{const X=w(L,K),{type:_}=e;return L.type=="curr"?ae.isEqual(u.currDate,X)||(_=="range"||_=="week")&&(g(X)||C(X))||_=="multiple"&&A(X)?`${u.dayPrefix}--active`:u.propStartDate&&ae.compareDate(X,u.propStartDate)||u.propEndDate&&ae.compareDate(u.propEndDate,X)?`${u.dayPrefix}--disabled`:(_=="range"||_=="week")&&Array.isArray(u.currDate)&&Object.values(u.currDate).length==2&&ae.compareDate(u.currDate[0],X)&&ae.compareDate(X,u.currDate[1])?`${u.dayPrefix}--choose`:null:`${u.dayPrefix}--disabled`},T=()=>{const{type:L}=e;if(L=="range"&&u.chooseData.length==2||L!="range"){let K=u.chooseData.slice(0);L=="week"&&(K={weekDate:[E(u.chooseData[0]),E(u.chooseData[1])]}),n("choose",K),e.poppable&&n("update")}},V=(L,K,X=!1)=>{if(B(L,K)!=`${u.dayPrefix}--disabled`){const{type:_}=e;let[le,U]=K.curData,j=[...K.curData];if(j[2]=ae.getNumTwoBit(Number(L.day)),j[3]=`${j[0]}-${j[1]}-${j[2]}`,j[4]=ae.getWhatDay(+j[0],+j[1],+j[2]),_=="multiple")if(u.currDate?.length>0){let Q;u.currDate?.forEach((O,Z)=>{O==j[3]&&(Q=Z)}),X?u.chooseData.push([...j]):Q!==void 0?(u.currDate.splice(Q,1),u.chooseData.splice(Q,1)):(u.currDate.push(j[3]),u.chooseData.push([...j]))}else u.currDate=[j[3]],u.chooseData=[[...j]];else if(_=="range"){let Q=Object.values(u.currDate).length;Q==2||Q==0?u.currDate=[j[3]]:ae.compareDate(u.currDate[0],j[3])?Array.isArray(u.currDate)&&u.currDate.push(j[3]):Array.isArray(u.currDate)&&u.currDate.unshift(j[3]),u.chooseData.length==2||!u.chooseData.length?u.chooseData=[[...j]]:ae.compareDate(u.chooseData[0][3],j[3])?u.chooseData=[...u.chooseData,[...j]]:u.chooseData=[[...j],...u.chooseData]}else if(_=="week"){let Q=ae.getWeekDate(le,U,L.day,e.firstDayOfWeek);u.propStartDate&&ae.compareDate(Q[0],u.propStartDate)&&Q.splice(0,1,u.propStartDate),u.propEndDate&&ae.compareDate(u.propEndDate,Q[1])&&Q.splice(1,1,u.propEndDate),u.currDate=Q,u.chooseData=[ae.formatResultDate(Q[0]),ae.formatResultDate(Q[1])]}else u.currDate=j[3],u.chooseData=[...j];if(!X){let Q=u.chooseData;_=="week"&&(Q={weekDate:[E(u.chooseData[0]),E(u.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&T()}}},E=L=>{let[K,X,_]=L;return{date:L,monthWeekNum:ae.getMonthWeek(K,X,_,e.firstDayOfWeek),yearWeekNum:ae.getYearWeek(K,X,_,e.firstDayOfWeek)}},$=L=>{const K=L=="prev"?u.monthsData[0]:u.monthsData[u.monthsData.length-1];let X=parseInt(K.curData[0]),_=parseInt(K.curData[1].toString().replace(/^0/,""));switch(L){case"prev":_==1&&(X-=1),_=_==1?12:--_;break;case"next":_==12&&(X+=1),_=_==12?1:++_;break}return[X+"",ae.getNumTwoBit(_),ae.getMonthDays(String(X),String(_))+""]},x=(L,K,X)=>{let{year:_,month:le}=X;return K=="prev"&&L>=7&&(L-=7),Array.from(Array(L),(U,j)=>({day:String(j+1),type:K,year:_,month:le}))},P=(L,K,X,_)=>{L=L-e.firstDayOfWeek;let{year:le,month:U}=X;return K=="prev"&&L>=7&&(L-=7),Array.from(Array(_),(Q,O)=>({day:String(O+1),type:K,year:le,month:U})).slice(_-L)},D=(L,K)=>{const X=ae.getMonthPreDay(+L[0],+L[1]);let _=Number(L[1])-1,le=Number(L[0]);_<=0&&(_=12,le+=1);const U=ae.getMonthDays(String(L[0]),String(L[1])),j=ae.getMonthDays(le+"",_+""),Q={year:L[0],month:L[1]},O={curData:L,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...P(X,"prev",{month:String(_),year:String(le)},j),...x(U,"curr",Q)],cssHeight:0,cssScrollHeight:0},Z=O.monthData.length>35?6:5;O.cssHeight=Ju+_u*Z;let ne=0;u.monthsData.length>0&&(ne=u.monthsData[u.monthsData.length-1].cssScrollHeight+u.monthsData[u.monthsData.length-1].cssHeight),O.cssScrollHeight=ne,K=="next"?(!u.endData||!ae.compareDate(`${u.endData[0]}-${u.endData[1]}-${ae.getMonthDays(u.endData[0],u.endData[1])}`,`${L[0]}-${L[1]}-${L[2]}`))&&u.monthsData.push(O):!u.startData||!ae.compareDate(`${L[0]}-${L[1]}-${L[2]}`,`${u.startData[0]}-${u.startData[1]}-01`)?u.monthsData.unshift(O):u.unLoadPrev=!0},I=()=>{let L=e.startDate?e.startDate:ae.getDay(0),K=e.endDate?e.endDate:ae.getDay(365);u.propStartDate=L,u.propEndDate=K,u.startData=m(L),u.endData=m(K),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(u.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const X={year:Number(u.startData[0]),month:Number(u.startData[1])},_={year:Number(u.endData[0]),month:Number(u.endData[1])};let le=_.month-X.month;_.year-X.year>0&&(le=le+12*(_.year-X.year)),le<=0&&(le=1),D(u.startData,"next");let U=1;do D($("next"),"next");while(U++<le);if(u.monthsNum=le,e.type=="range"&&Array.isArray(u.currDate))u.currDate.length>0&&(L&&ae.compareDate(u.currDate[0],L)&&u.currDate.splice(0,1,L),K&&ae.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...m(u.currDate[0]),...m(u.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let j=[],Q={};u.currDate.forEach(O=>{L&&!ae.compareDate(O,L)&&K&&!ae.compareDate(K,O)&&(Object.hasOwnProperty.call(Q,O)||(j.push(O),Q[O]=O))}),u.currDate=[...j],u.defaultData=[...m(j[0])]}}else if(e.type=="week"&&Array.isArray(u.currDate)){if(u.currDate.length>0){let[j,Q,O]=m(u.currDate[0]),Z=ae.getWeekDate(j,Q,O,e.firstDayOfWeek);u.currDate=Z,L&&ae.compareDate(u.currDate[0],L)&&u.currDate.splice(0,1,L),K&&ae.compareDate(K,u.currDate[1])&&u.currDate.splice(1,1,K),u.defaultData=[...m(u.currDate[0]),...m(u.currDate[1])]}}else u.currDate&&(L&&ae.compareDate(u.currDate,L)?u.currDate=L:K&&!ae.compareDate(u.currDate,K)&&(u.currDate=K),u.defaultData=[...m(u.currDate)])};xe({scrollToDate:L=>{ae.compareDate(L,u.propStartDate)?L=u.propStartDate:ae.compareDate(L,u.propEndDate)||(L=u.propEndDate);let K=m(L);u.monthsData.forEach((X,_)=>{if(X.title==l("monthTitle",{year:K[0],month:K[1]})&&c.value){let le=u.monthsData[_].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let U=0,j=setInterval(()=>{if(U++,c.value){let Q=le/10;c.value.scrollTop=c.value.scrollTop+Q}U>=10&&(clearInterval(j),c.value&&(c.value.scrollTop=u.monthsData[_].cssScrollHeight))},40)}else c.value.scrollTop=u.monthsData[_].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)},doLayout:()=>{let L=0,K=0;u.defaultData.length>0&&u.monthsData.forEach((le,U)=>{le.title==l("monthTitle",{year:u.defaultData[0],month:u.defaultData[1]})&&(L=U),(e.type=="range"||e.type=="week")&&le.title==l("monthTitle",{year:u.defaultData[3],month:u.defaultData[4]})&&(K=U)}),H(u.monthsNum,L),u.currentIndex=L,u.yearMonthTitle=u.monthsData[u.currentIndex].title,u.defaultData.length>0&&(u.isRange?(V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0),V({day:u.defaultData[5],type:"curr"},u.monthsData[K],!0)):e.type=="week"?V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0):e.type=="multiple"?[...u.currDate].forEach(le=>{let U=m(le),j=u.currentIndex;u.monthsData.forEach((Q,O)=>{Q.title==l("monthTitle",{year:U[0],month:U[1]})&&(j=O)}),V({day:U[2],type:"curr"},u.monthsData[j],!0)}):V({day:u.defaultData[2],type:"curr"},u.monthsData[u.currentIndex],!0));let X=u.monthsData[u.monthsData.length-1],_=X.cssHeight+X.cssScrollHeight;Qe(()=>{c?.value&&f?.value&&d?.value&&(h.value=c.value.clientHeight,f.value.style.height=`${_}px`,c.value.scrollTop=u.monthsData[u.currentIndex].cssScrollHeight)}),u.avgHeight=Math.floor(_/(u.monthsNum+1))}});const H=(L,K)=>{L>=3?K>0&&K<L?u.defaultRange=[K-1,K+3]:K==0?u.defaultRange=[K,K+4]:K==L&&(u.defaultRange=[K-2,K+2]):u.defaultRange=[0,L+2];let X=u.monthsData[u.defaultRange[0]].cssScrollHeight;u.translateY=X},J=(L,K)=>(e.type=="range"||e.type=="week")&&L.type=="curr"&&B(L,K)=="fox-calendar__day--active",ee=(L,K)=>J(L,K)&&g(w(L,K)),Y=(L,K)=>u.currDate.length>=2&&C(w(L,K))?J(L,K):!1,M=()=>{if(u.currDate.length>=2)return ae.isEqual(u.currDate[0],u.currDate[1])},z=L=>{const K=`${L.year}-${L.month}-${Number(L.day)<10?"0"+L.day:L.day}`;return ae.isEqual(K,ae.date2Str(new Date))},q=L=>{if(u.monthsData.length<=1)return;const K=L.target.scrollTop;let X=Math.floor(K/u.avgHeight);if(X==0)K>=u.monthsData[X+1].cssScrollHeight&&(X+=1);else if(X>0&&X<u.monthsNum-1)K>=u.monthsData[X+1].cssScrollHeight&&(X+=1),K<u.monthsData[X].cssScrollHeight&&(X-=1);else{const _=Math.round(K+h.value);_<u.monthsData[X].cssScrollHeight+u.monthsData[X].cssHeight&&K>u.monthsData[X-1].cssScrollHeight&&(X-=1),X+1<=u.monthsNum&&_>=u.monthsData[X+1].cssScrollHeight+u.monthsData[X+1].cssHeight&&(X+=1),X>=1&&K<u.monthsData[X-1].cssScrollHeight&&(X-=1)}u.currentIndex!==X&&(u.currentIndex=X,H(u.monthsNum,X)),u.yearMonthTitle=u.monthsData[X].title},F=()=>{u.chooseData.splice(0),u.monthsData.splice(0),I()};return I(),t.watch(()=>e.defaultValue,L=>{L&&e.poppable&&F()}),{weeks:i,compConthsData:S,showTopBtn:y,topInfo:b,bottomInfo:k,rangeTip:M,mothsViewScroll:q,getClass:B,isStartTip:ee,isEndTip:Y,chooseDay:V,isCurrDay:z,confirm:T,months:c,...t.toRefs(u),...t.toRefs(e),...r,monthsPanel:f,weeksPanel:p,viewArea:d}}}),of={class:"fox-calendar__header"},lf={key:0,class:"fox-calendar__header-title"},af={key:1,class:"fox-calendar__header-slot"},rf={key:2,class:"fox-calendar__header-subtitle"},sf={class:"fox-calendar__weekdays",ref:"weeksPanel"},cf={class:"fox-calendar__panel",ref:"monthsPanel"},df={class:"fox-calendar__month-title"},uf={class:"fox-calendar__days"},ff=["onClick"],mf={class:"fox-calendar__day-value"},pf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},hf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},gf={key:2,class:"fox-calendar__day-tips--curr"},yf={key:4,class:"fox-calendar__day-tip"},bf={key:0,class:"fox-calendar__footer"};function kf(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(["fox-calendar",{"fox-calendar--nopop":!e.poppable,"fox-calendar--nofooter":e.isAutoBackFill}])},[t.createElementVNode("view",of,[e.showTitle?(t.openBlock(),t.createElementBlock("view",lf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",af,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",rf,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",sf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:i},t.toDisplayString(s),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...s)=>e.mothsViewScroll&&e.mothsViewScroll(...s))},[t.createElementVNode("view",cf,[t.createElementVNode("view",{class:"fox-calendar__body",ref:"viewArea",style:t.normalizeStyle({transform:`translateY(${e.translateY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.compConthsData,(s,i)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:i},[t.createElementVNode("view",df,t.toDisplayString(s.title),1),t.createElementVNode("view",uf,[t.createElementVNode("view",{class:t.normalizeClass(["fox-calendar__days-item",e.type==="range"?"fox-calendar__days-item--range":""])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.monthData,(c,f)=>(t.openBlock(),t.createElementBlock("view",{key:f,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,s)]),onClick:p=>e.chooseDay(c,s)},[t.createElementVNode("view",mf,[t.renderSlot(e.$slots,"day",{date:c.type=="curr"?c:""},()=>[t.createTextVNode(t.toDisplayString(c.type=="curr"?c.day:""),1)])]),e.topInfo?(t.openBlock(),t.createElementBlock("view",pf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",hf,[t.renderSlot(e.$slots,"bottom-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),!e.bottomInfo&&e.showToday&&e.isCurrDay(c)?(t.openBlock(),t.createElementBlock("view",gf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,s)?(t.openBlock(),t.createElementBlock("view",{key:3,class:t.normalizeClass(["fox-calendar__day-tip",{"fox-calendar__day-tips--top":e.rangeTip()}])},t.toDisplayString(e.startText),3)):t.createCommentVNode("",!0),e.isEndTip(c,s)?(t.openBlock(),t.createElementBlock("view",yf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,ff))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",bf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...s)=>e.confirm&&e.confirm(...s))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const ps=te(nf,[["render",kf]]),Sf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Rn={type:{type:String,default:"one"},isAutoBackFill:{type:Boolean,default:!1},toDateAnimation:{type:Boolean,default:!0},poppable:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showSubTitle:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},showToday:{type:Boolean,default:!0},title:{type:String,default:""},confirmText:{type:String,default:""},startText:{type:String,default:""},endText:{type:String,default:""},defaultValue:{type:[String,Array]},startDate:{type:String},endDate:{type:String},firstDayOfWeek:{type:Number,default:0,validator:e=>e>=0&&e<=6}},{create:Cf}=G("calendar"),wf=Cf({components:{[ps.name]:ps,[fe.name]:fe},props:{...Rn},emits:["choose","close","update:visible","select"],setup(e,{emit:n,slots:a}){const o=t.computed(()=>a.btn),l=t.computed(()=>a["top-info"]),r=t.computed(()=>a.day),s=t.computed(()=>a["bottom-info"]),i=t.ref(null),c=b=>{i.value?.scrollToDate(b)},f=()=>{i.value?.initPosition()};t.watch(()=>e.visible,b=>{b&&t.nextTick(()=>{i.value?i.value.doLayout():setTimeout(()=>{i.value&&i.value.doLayout()},250)})}),xe({scrollToDate:c,initPosition:f});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:b=>{n("select",b)},choose:b=>{d(),n("choose",b)},calendarRef:i,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:s}}});function Nf(e,n,a,o,l,r){const s=t.resolveComponent("fox-calendar-pane"),i=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(i,t.mergeProps({key:0,visible:e.visible,position:"bottom",round:"",closeable:""},e.$attrs,{onClickOverlay:e.closePopup,onClickCloseIcon:e.closePopup,style:{height:"85vh"}}),{default:t.withCtx(()=>[t.createVNode(s,{ref:"calendarRef",type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"show-today":e.showToday,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","confirm-text","start-text","end-text","show-today","show-title","show-sub-title","to-date-animation","first-day-of-week"])]),_:3},16,["visible","onClickOverlay","onClickCloseIcon"])):(t.openBlock(),t.createBlock(s,{key:1,type:e.type,"is-auto-back-fill":e.isAutoBackFill,poppable:e.poppable,title:e.title,ref:"calendarRef","confirm-text":e.confirmText,"start-text":e.startText,"end-text":e.endText,"default-value":e.defaultValue,"start-date":e.startDate,"end-date":e.endDate,onUpdate:e.update,onClose:e.close,onChoose:e.choose,onSelect:e.select,"show-title":e.showTitle,"show-sub-title":e.showSubTitle,"to-date-animation":e.toDateAnimation,"show-today":e.showToday,"first-day-of-week":e.firstDayOfWeek},t.createSlots({_:2},[e.showTopBtn?{name:"btn",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"btn")]),key:"0"}:void 0,e.dayInfo?{name:"day",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"day",{date:c.date})]),key:"1"}:void 0,e.topInfo?{name:"top-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"top-info",{date:c.date})]),key:"2"}:void 0,e.bottomInfo?{name:"bottom-info",fn:t.withCtx(c=>[t.renderSlot(e.$slots,"bottom-info",{date:c.date})]),key:"3"}:void 0]),1032,["type","is-auto-back-fill","poppable","title","confirm-text","start-text","end-text","default-value","start-date","end-date","onUpdate","onClose","onChoose","onSelect","show-title","show-sub-title","to-date-animation","show-today","first-day-of-week"]))}const On=te(wf,[["render",Nf]]),hs={modelValue:{type:[String,Date,Array],default:null},rangeSeparator:{type:String,default:"-"},valueFormat:{type:String,default:"YYYY-MM-DD"},format:{type:String,default:"YYYY-MM-DD"},showWeek:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},textAlign:{type:String},clearable:{type:Boolean,default:!0}},Jo=(e,n)=>{let a;return Ue(e)?a=e:typeof e=="string"&&ke(e)>0?a=ae.parser(e,n):a=new Date,a},St=(e,n,a)=>(Ue(n)||(n=new Date),ae.format(n,a)),Ct=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=ae.date2Str(e),r=ae.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function Bf(e,n,a,o,{CloseIcon:l,MarkIcon:r},s=!1){return{props:{...pe,...be,...Rn,...hs},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=t.computed(()=>i.type==="range"),k=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),u=()=>{k.startDate!==null&&(k.startDate=null,k.endDate=null,k.startArray=[],k.endArray=[])},m=(q,F="one",L="YYYY-MM-DD")=>{if(Sf(q)){u();return}if(b.value&&Array.isArray(q)&&q.length==2){let K,X;typeof q[0]=="string"?(K=Jo(q[0],L),X=Jo(q[1],L)):(K=q[0],X=q[1]);let _=Ct(K),le=Ct(X);(k.startDate===null||k.startDate.getTime()!==K.getTime()||k.endDate?.getTime()!==X.getTime())&&(k.startDate=K,k.startArray=_,k.endDate=X,k.endArray=le)}else{let K;typeof q=="string"?K=Jo(q,L):K=q;let X=Ct(K);(k.startDate===null||k.startDate.getTime()!==K.getTime())&&(k.startDate=K,k.startArray=X)}};m(i.modelValue,i.type,i.valueFormat),t.watch(()=>i.modelValue,q=>{m(q,i.type,i.valueFormat),d("setValue",q)});const g=t.computed(()=>{if(k.startDate===null)return"";if(b.value){let q=St(i,k.startDate,i.format),F=St(i,k.endDate,i.format);return`${q} ${i.rangeSeparator} ${F}`}else{let q=St(i,k.startDate,i.format);return i.showWeek&&(q=`${q} ${k.startArray[4]}`),q}}),C=t.computed(()=>{if(k.startDate===null)return null;if(b.value){let q=ae.date2Str(k.startDate),F=ae.date2Str(k.endDate??new Date);return[q,F]}else return ae.date2Str(k.startDate)}),A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":f.value,"is-readonly":p.value})),B=Ve(t.computed(()=>i.textAlign),"textAlign"),T=t.computed(()=>{const q={};return B.value&&(q["text-align"]=B.value),q}),V=t.ref(!1),E=()=>{p.value||f.value||(V.value=!0)},$=q=>{V.value=q},x=q=>{if(q){if(b.value&&Array.isArray(q)){let F=q[0],L=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(L,K-1,X),le=q[1];L=me(le[0]),K=me(le[1]),X=me(le[2]);let U=new Date(L,K-1,X);if(k.startDate=_,k.startArray=Ct(_),k.endDate=U,k.endArray=Ct(U),i.valueFormat){let j=St(i,_,i.valueFormat),Q=St(i,U,i.valueFormat);d("update:modelValue",[j,Q],{})}else d("update:modelValue",[_,U],{})}else{let F=q,L=me(F[0]),K=me(F[1]),X=me(F[2]),_=new Date(L,K-1,X);if(k.startDate=_,k.startArray=Ct(_),i.valueFormat){let le=St(i,_,i.valueFormat);d("update:modelValue",le,{})}else d("update:modelValue",_,{})}d("change",q,{})}},P=q=>{let L=q.target.value;y.value=!0,d("focus",L,q)},D=q=>{setTimeout(()=>{y.value=!1},0);let L=q.target.value;i.maxLength&&L.length>Number(i.maxLength)&&(L=L.slice(0,Number(i.maxLength))),d("blur",L,q)},I=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),R=t.computed(()=>ke(i.unit)>0),v=t.computed(()=>ke(i.unit)>0&&!y.value),W=t.computed(()=>({hidden:!v.value})),H=q=>{u(),d("update:modelValue",null,q),d("change","",q),d("clear","")},J=t.computed(()=>i.clearable&&!f.value&&!p.value),ee=t.computed(()=>{let q=ke(g.value)>0;return i.clearable&&q&&y.value}),Y=q=>{ee.value?H(q):E()},M=t.computed(()=>ee.value&&J.value?l:r),z=t.computed(()=>({action:!0}));return()=>{const q={class:w.value,style:T.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:g.value,onClick:E,onFocus:P,onBlur:D};s&&(q.disabled=!0);const F=[],L=t.h("input",q);F.push(L);const K=[],X={class:["action-icon"]},_=t.h(M.value,X),le={class:z.value,onClick:Y},U=t.h("view",le,{default:()=>[_]});if(K.push(U),R.value){const Ce=t.h("view",{class:W.value},[i.unit]);K.push(Ce)}const j={class:I.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Rn);Z.visible=V.value,Z["onUpdate:visible"]=$,Z["default-value"]=C.value,Z.onChoose=x;const ne={};if(c.slots.btn){const Ce=c.slots.btn();ne.btn=()=>Ce}c.slots.day&&(ne.day=c.slots.day),c.slots.topInfo&&(ne.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(ne.bottomInfo=c.slots.bottomInfo);const re=t.h(a,Z,ne);O.hide=()=>[re];const se=ut(i,Rn,hs);return t.h(o,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:Af,create:Tf,scope:Vf}=G("calendar-item"),_o=Tf(Bf(Af,Vf,On,Be,{CloseIcon:oe.CircleClose,MarkIcon:oe.Date},!1)),$f={readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shape:{type:String,default:"round"},label:{type:[String,Number,Boolean],default:""},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}};function Ef(e,{CheckNormal:n,Checked:a}){return{props:{...$f},setup(o,{emit:l,slots:r}){const s=t.inject("parent",null),i=wn(),c=t.computed(()=>s.label.value===o.label),f=t.computed(()=>s.position),p=()=>{const b=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const k=de(o.iconSize),u=o.checkedIcon??i.radio.Checked??a;return b.push("fox-radio__icon"),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h(u,{width:k,height:k,class:b})}}else{if(r.icon)return r.icon();{const k=de(o.iconSize),u=o.icon??i.radio.CheckNormal??n;return b.push("fox-radio__icon--unchecked"),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h(u,{width:k,height:k,class:b})}}},d=()=>{const b=[`${e}__label`];return o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h("view",{class:b},r.default?.())},h=()=>{const b=[`${e}__button`];return c.value&&b.push(`${e}__button--active`),o.disabled&&b.push("is-disabled"),o.readonly&&b.push("is-readonly"),t.h("view",{class:b},r.default?.())},S=()=>{c.value||o.disabled||o.readonly||s.updateValue(o.label)},y=f.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${y?`${e}--reverse`:""}`,onClick:S},[o.shape=="button"?h():y?[d(),p()]:[p(),d()]])}}}const{componentName:Df,create:If}=G("radio"),Kn=If(Ef(Df,{CheckNormal:oe.CheckNormal,Checked:oe.CheckChecked})),{componentName:gs,create:xf}=G("radio-group"),Un=xf({props:{modelValue:{type:[Object],default:""},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=ht(),o=l=>a("update:modelValue",l);return t.provide("parent",{label:t.readonly(t.computed(()=>e.modelValue)),position:e.textPosition,updateValue:o}),t.watch(()=>e.modelValue,l=>a("change",l)),()=>{const l={};return e.textAlign&&(l["text-align"]=e.textAlign),t.h("view",{class:`${gs} ${gs}--${e.direction}`,style:l},n.default?.())}}});function ys(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Hn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(zt(e,r)===a)return l}return-1}function Hn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function zt(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function qf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function vf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Mf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Pf(){const e=t.getCurrentInstance();return new Mf(e.proxy)}function Lf(e){return{text:e,value:e}}const bs={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},zf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Ff={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Number,String,Object],default:""}};function Rf(e,n,a,o,l){return{props:{...pe,...be,...bs,...zf,...Ff},emits:["change","update:modelValue","setValue"],setup(r,s){const i=$e(t.computed(()=>r.readonly)),c=Ee(t.computed(()=>r.disabled)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return c.value}},r.prop??s.attrs.name),d=Pf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,m])=>{if(u){const g=await d.load("radio",u,m);if(g.length>0)if(typeof g[0]=="string"){const w=g.map(B=>Lf(B));h.value=w}else h.value=g;else h.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>h.value],async([u,m])=>{S.value=ys(r,m,u,r.valueType),p("setValue",u)},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const u=h.value[S.value];return zt(r,u)}),b=u=>{let m=null,g=null;if(h.value.length>0){let C=ys(r,h.value,u,"value");S.value=C,C>=0&&(g=h.value[C],r.valueType==="text"?m=Hn(r,g):r.valueType==="item"?m=g:m=zt(r,g))}else m=u;p("update:modelValue",m),p("change",m,g)},k=()=>{let u=null,m=null;if(h.value.length>0&&S.value!==-1){let g=h.value[S.value];r.valueType==="text"?u=Hn(r,g):r.valueType==="item"?u=g:u=zt(r,g)}p("update:modelValue",u),p("change",u,m)};if(xe({clear(){S.value!==-1&&(S.value=-1,k())}}),r.source){const u=()=>{const m=[],g=Se(r,bs);return h.value.forEach((C,A)=>{const w=zt(r,C),B=qf(r,C);let T={...g,label:w,disabled:B};const V=vf(r,C,A);T={...T,...V},c.value&&(T.disabled=!0),i.value&&(T.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),typeof s.slots.text=="function"){const x=s.slots.text(C);E.default=()=>[x]}else{const x=Hn(r,C);E.default=()=>x}let $=t.h(l,T,E);m.push($)}),m};return()=>{const m=u(),g={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>m}),A={default:()=>C};A.label=s.slots.default,A.prepend=s.slots.prepend,A.append=s.slots.append,A.fixedPreTip=s.slots.fixedPreTip,A.fixedTip=s.slots.fixedTip;const w=Se(r,be,pe);return t.h(a,{...w,prop:`${r.prop}_item`},A)}}else return()=>{const u=s.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"update:modelValue":b},{default:()=>u})}}}}const{componentName:Of,create:Kf,scope:Uf}=G("radio-item"),el=Kf(Rf(Of,Uf,Be,Un,Kn)),Hf=(e,{CheckNormal:n,Checked:a,Indeterminate:o})=>({props:{modelValue:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},textPosition:{type:String,default:"right"},icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},label:{type:[String,Number,Boolean],default:""},indeterminate:{type:Boolean,default:!1},shape:{type:String,default:"round"}},emits:["change","update:modelValue"],setup(l,{slots:r}){const{emitEvent:s}=ht(),i=wn(),c=t.inject("parent",null),f=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,g=>{f.partialSelect=g});const p=t.computed(()=>!!c),d=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),h=t.computed(()=>p.value?c.position:l.textPosition);let S="";const y=(g,C)=>{S="click",s("update:modelValue",g),s("change",g,C)};t.watch(()=>l.modelValue,g=>{S=="click"?S="":s("change",g)});const b=()=>{const g=[];if(f.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const C=de(l.iconSize),A=l.indeterminateIcon??i.checkbox.Indeterminate??o;return g.push("fox-checkbox__icon--indeterminate"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}else if(d.value){if(r.checkedIcon)return r.checkedIcon();{const C=de(l.iconSize),A=l.checkedIcon??i.checkbox.Checked??a;return g.push("fox-checkbox__icon"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}else{if(r.icon)return r.icon();{const C=de(l.iconSize),A=l.icon??i.checkbox.CheckNormal??n;return g.push("fox-checkbox__icon--unchecked"),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h(A,{width:C,height:C,class:g})}}},k=()=>{const g=[`${e}__label`];return l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},u=()=>{const g=[`${e}__button`];return d.value&&g.push(`${e}__button--active`),l.disabled&&g.push("is-disabled"),l.readonly&&g.push("is-readonly"),t.h("view",{class:g},r.default?.())},m=g=>{if(!(l.disabled||l.readonly)){if(d.value&&f.partialSelect){f.partialSelect=!1,y(d.value,r.default?.()[0].children);return}if(y(!d.value,r.default?.()[0].children),p.value){const C=c.value.value,A=c.max.value,{label:w}=l,B=C.indexOf(w);B>-1?C.splice(B,1):B<=-1&&(C.length<A||!A)&&C.push(w),c.updateValue(C)}}};return t.onMounted(()=>{p.value&&c.link(t.getCurrentInstance())}),t.onBeforeUnmount(()=>{p.value&&c.unlink(t.getCurrentInstance())}),()=>t.h("view",{class:`${e} ${e}--${l.shape} ${h.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?u():[b(),k()]])}}),{componentName:jf,create:Wf}=G("checkbox"),jn=Wf(Hf(jf,{CheckNormal:oe.CheckNormal,Checked:oe.Checked,Indeterminate:oe.CheckDisabled})),{create:Yf,componentName:ks}=G("checkbox-group"),Wn=Yf({props:{modelValue:{type:Array,default:()=>[]},direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},emits:["change","update:modelValue"],setup(e,{slots:n}){const{emitEvent:a}=ht(),o=t.reactive({children:[]}),l=f=>{f.proxy&&o.children.push(f.proxy)},r=f=>{f.proxy&&(o.children=o.children.filter(p=>p!==f.proxy))},s=f=>{a("update:modelValue",f),a("change",f)},i=f=>{const p=[];f&&o.children.forEach(d=>{d?.disabled||p.push(d?.label)}),a("update:modelValue",p)},c=()=>{const f=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",f)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:s,link:l,unlink:r}),t.watch(()=>e.modelValue,f=>{a("change",f)}),xe({toggleAll:i,toggleReverse:c}),()=>{const f={};return e.textAlign&&(f["text-align"]=e.textAlign),t.h("view",{class:`${ks} ${ks}--${e.direction}`,style:f},n.default?.())}}});function Ss(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(tl(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Yn(e,r)===a)return l}return-1}function tl(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Yn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Xf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Qf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Gf=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);let l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Zf(){const e=t.getCurrentInstance();return new Gf(e.proxy)}function Jf(e){return{text:e,value:e}}const _f={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},Cs={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},em={source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},modelValue:{type:[Array,String],default:[]}};function tm(e,n,a,o,l){return{props:{...pe,...be,..._f,...Cs,...em},emits:["change","update:modelValue","setValue"],setup(r,s){const i=Ee(t.computed(()=>r.disabled)),c=$e(t.computed(()=>r.readonly)),f=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return c.value},get disabled(){return i.value}},r.prop??s.attrs.name),d=Zf(),h=t.ref([]);t.watch([()=>r.source,()=>r.params],async([u,m])=>{if(u){const g=await d.load("checkbox",u,m);if(g.length>0)if(typeof g[0]=="string"){const w=g.map(B=>Jf(B));h.value=w}else h.value=g;else h.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>h.value],async([u,m])=>{const g=[];Array.isArray(u)&&u.forEach(C=>{let A=Ss(r,m,C,r.valueType);A!==-1&&g.push(A)}),!Me(g,S.value)&&(S.value=g,p("setValue",g))},{deep:!0});const y=t.computed(()=>{if(!r.source)return r.modelValue;let u=[];return S.value.forEach(m=>{let g=h.value[m];u.push(Yn(r,g))}),u}),b=u=>{let m=[],g=[];if(h.value.length>0){const C=[];Array.isArray(u)&&u.forEach(A=>{let w=Ss(r,h.value,A,"value");w!==-1&&C.push(w);const B=h.value[w];g.push(B),r.valueType==="text"?m.push(tl(r,B)):r.valueType==="item"?m.push(B):m.push(Yn(r,B))}),S.value=C}else m=u;p("update:modelValue",m),p("change",m,g)},k=t.ref();if(xe({toggleAll:u=>{k.value.toggleAll(u)},toggleReverse:()=>{k.value.toggleReverse()}}),r.source){const u=()=>{const m=[],g=Se(r,Cs);return h.value.forEach((C,A)=>{const w=Yn(r,C),B=Xf(r,C);let T={...g,label:w,disabled:B};const V=Qf(r,C,A);T={...T,...V},i.value&&(T.disabled=!0),c.value&&(T.readonly=!0);const E={};if(s.slots.icon&&(E.icon=s.slots.icon),s.slots.checkedIcon&&(E.checkedIcon=s.slots.checkedIcon),s.slots.indeterminateIcon&&(E.indeterminateIcon=s.slots.indeterminateIcon),typeof s.slots.text=="function"){const x=s.slots.text(C);E.default=()=>[x]}else{const x=tl(r,C);E.default=()=>x}let $=t.h(l,T,E);m.push($)}),m};return()=>{const m=u(),g={class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:y.value,"onUpdate:modelValue":b},C=t.h(o,g,{default:()=>m}),A={default:()=>C};A.label=s.slots.default,A.prepend=s.slots.prepend,A.append=s.slots.append,A.fixedPreTip=s.slots.fixedPreTip,A.fixedTip=s.slots.fixedTip;const w=Se(r,be,pe);return t.h(a,{...w,prop:`${r.prop}_item`},A)}}else return()=>{const u=s.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:f.value,modelValue:y,"onUpdate:modelValue":b},{default:()=>u})}}}}const{componentName:nm,create:om,scope:lm}=G("checkbox-item"),nl=om(tm(nm,lm,Be,Wn,jn)),ol={modelValue:{type:[String,Boolean,Number],default:!1},disabled:{type:Boolean,default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[String,Number,Boolean],default:!0},inactiveValue:{type:[String,Number,Boolean],default:!1},loading:{type:Boolean,default:!1},name:{type:String,default:"loading1"},size:{type:[String,Number],default:"12px"},color:{type:String,default:""}},{componentName:am,create:rm}=G("switch"),sm=rm({components:{Loading1:oe.Loading1},props:{...ol},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const i=am;return{[i]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${i}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const s=i=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,i)};return t.watch(()=>e.modelValue,i=>{r=="click"?r="":n("change",i)}),{classes:o,style:l,isActive:a,onClick:s}}}),im={class:"fox-switch-button"};function cm(e,n,a,o,l,r){const s=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...i)=>e.onClick&&e.onClick(...i)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",im,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(s,{name:"loading",color:e.activeColor},null,8,["color"])]):t.createCommentVNode("",!0),e.activeText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label open"},t.toDisplayString(e.activeText),513),[[t.vShow,e.isActive]]),t.withDirectives(t.createElementVNode("view",{class:"fox-switch-label close"},t.toDisplayString(e.inactiveText),513),[[t.vShow,!e.isActive]])],64)):t.createCommentVNode("",!0)])],6)}const Xn=te(sm,[["render",cm]]);function dm(e,n,a,o){return{props:{...pe,...be,...ol},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,ol),disabled:s.value||i.value,value:p.value,"onUpdate:modelValue":d},y=[],b=t.h(o,S);y.push(b);const k={default:()=>y};k.label=r.slots.default,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const u=Se(l,be,pe);return u["content-class"]=f,t.h(a,{...u,prop:`${l.prop}_item`},k)}}}}const{componentName:um,create:fm,scope:mm}=G("switch-item"),ll=fm(dm(um,mm,Be,Xn));function pm(e,n,a,o){return{props:{...pe,...be,placeholder:{type:String,default:""},textAlign:{type:String},modelValue:{type:[String],required:!1},desc:{type:[String],required:!1},icon:{type:[Object],required:!1},iconSize:{type:[String],required:!1,default:""}},emits:["click","focus","blur","change"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),{toLocaleRefs:f}=ie.useFoxI18n(n),p=f(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,x=>{d.value=x,c("change",x)});const h=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!s.value&&ue(d.value),"is-disabled":s.value,"is-readonly":i.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),b=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),k=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),u=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),g=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const x={};return y.value&&(x["text-align"]=y.value),x}),A=()=>{c("focus",d.value)},w=()=>{c("blur",d.value)},B=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":s.value,"is-readonly":i.value})),T=t.computed(()=>ke(l.unit)>0),V=x=>{s.value==!0||i.value==!0||c("click")},E=t.computed(()=>l.icon??a),$=t.computed(()=>({action:!0}));return()=>{const x=[];if(typeof r.slots.content=="function"){const M=r.slots.content();x.push(M)}else{const M=[];if(k.value){const F={tabIndex:0,class:S.value,style:b.value,onFocus:A,onBlur:w};let L=null;r.slots.main?L=t.h("view",F,[r.slots.main(u.value)]):L=t.h("view",F,[u.value]),M.push(L)}if(m.value){const F={tabIndex:0,class:g.value,style:C.value,onFocus:A,onBlur:w};let L=null;r.slots.sub?L=t.h("view",F,[r.slots.sub(l.desc)]):L=t.h("view",F,[l.desc]),M.push(L)}const z={class:h.value,onClick:V},q=t.h("view",z,M);x.push(q)}const P=[],D=de(l.iconSize);let I=r.slots.icon;if(!I){const M={width:D,height:D,class:["action-icon"]};I=t.h(E.value,M)}const R={class:$.value,onClick:V},v=t.h("view",R,{default:()=>[I]});if(P.push(v),T.value){const M=t.h("view",{},[l.unit]);P.push(M)}const W={class:B.value},H=t.h("view",W,{default:()=>P});x.push(H);const J={default:()=>x};J.label=r.slots.default,J.prepend=r.slots.prepend,J.append=r.slots.append,J.fixedPreTip=r.slots.fixedPreTip,J.fixedTip=r.slots.fixedTip;const ee=Se(l,be,pe);return t.h(o,{...ee,prop:`${l.prop}_item`},J)}}}}const{componentName:hm,create:gm,scope:ym}=G("link-item"),al=gm(pm(hm,ym,oe.ArrowRight,Be)),rl={count:{type:[String,Number],default:5},modelValue:{type:[String,Number],default:0},customIcon:{type:Object},size:{type:[String,Number],default:void 0},activeColor:{type:String,default:""},voidColor:{type:String,default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},touchable:{type:Boolean,default:!0},spacing:{type:[String,Number],default:void 0}},{create:bm,componentName:km}=G("rate"),Sm=bm({props:{...rl},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[km]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},s=(S,y)=>{if(e.disabled||e.readonly)return;let b=0;y===1&&e.modelValue===y||(b=y,e.allowHalf&&S==2&&(b-=.5)),r(b)},i=(S,y,b)=>{let k=0;for(let u=y.value.length-1;u>=0;u--){const m=y.value[u];if(S>m.offsetLeft){b?k=u+(S>m.offsetLeft+m.clientWidth/2?1:.5):k=u+1;break}}return k},c=_e(),f={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(i(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??oe.StarFillN);return{classes:l,...f,onClick:s,toPxDesc:ge,renderIcon:(S,y)=>t.h(S,y),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),Cm=["id"],wm={class:"fox-rate-item__icon--full"},Nm={key:0,class:"fox-rate-item__icon--half"},Bm={key:1,class:"fox-rate-item__icon--half"};function Am(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...s)=>e.onTouchStart&&e.onTouchStart(...s)),onTouchmove:n[1]||(n[1]=(...s)=>e.onTouchMove&&e.onTouchMove(...s))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),s=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:s,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+s,style:t.normalizeStyle(s<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",wm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||s>e.modelValue}]),onClick:i=>e.onClick(1,s)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>s?(t.openBlock(),t.createElementBlock("view",Nm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:s<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<s?(t.openBlock(),t.createElementBlock("view",Bm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:e.voidColor})),{class:"fox-rate-item__icon fox-rate-item__icon--disabled",onClick:i=>e.onClick(2,s)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Cm))),128))],34)}const wt=te(Sm,[["render",Am]]);function Tm(e,n,a,o){return{props:{...pe,...be,...rl},emits:["change","update:modelValue","setValue"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return i.value},get disabled(){return s.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=h=>{p.value=h,c("update:modelValue",h,{}),c("change",h,{})};return()=>{const S={...Se(l,rl),disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d},y=[],b=t.h(o,S);y.push(b);const k={default:()=>y};if(r.slots.default){const g=r.slots.default();k.label=()=>g}const u=Se(l,be,pe);return u["content-class"]=f,t.h(a,u,k)}}}}const{componentName:Vm,create:$m,scope:Em}=G("rate-item"),sl=$m(Tm(Vm,Em,Be,wt)),Dm=/scroll|auto|overlay/i,ws=window;function Im(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function il(e,n=ws){let a=e;for(;a&&a!==n&&Im(a);){const{overflowY:o}=window.getComputedStyle(a);if(Dm.test(o))return a;a=a.parentNode}return n}function Ns(e,n=ws){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=il(e.value,n))}),a}const Bs=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,xm={modelValue:{type:[Boolean],default:!1},hasMore:{type:[Boolean],default:!0},threshold:{type:[Number],default:200},loadText:{type:[String]},loadMoreText:{type:[String]},useCapture:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1}};function qm(e,n,a){return{props:{...xm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["pullText","loadText","loadMoreText"]),c=t.ref(),f=Ns(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),h=m=>m?m.offsetTop+h(m.offsetParent):0,S=()=>{let m=0,g=0,C="down";if(f.value==window){const A=Bs();c.value&&(m=h(c.value)+c.value.offsetHeight-A-window.innerHeight),g=A}else{const{scrollHeight:A,clientHeight:w,scrollTop:B}=f.value;m=A-w-B,g=B}return p.beforeScrollTop>g?C="up":C="down",p.beforeScrollTop=g,l("scroll-change",g),m<=o.threshold&&C=="down"},y=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},b=()=>{f.value&&f.value.addEventListener("scroll",y,o.useCapture)},k=()=>{f.value&&f.value.removeEventListener("scroll",y,o.useCapture)};t.onMounted(()=>{b(),o.immediate&&y()}),t.onUnmounted(()=>{k()});const u=t.ref(!1);return t.onActivated(()=>{u.value&&(u.value=!1,b())}),t.onDeactivated(()=>{u.value=!0,k()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},g=t.h("view",m,[r?.default?.()]),C=[];if(p.isInfiniting){let T=r?.loading?.()??null;if(!T){let $=r?.loadingIcon?.()??null;if(!$){const D={class:["fox-infinite__bottom-box__img"]};$=t.h(a,D)}const x={class:"fox-infinite__bottom-box__text"},P=t.h("view",x,[i.loadText.value]);T=[$,P]}const V={class:"fox-infinite__bottom-box"},E=t.h("view",V,T);C.push(E)}else if(!o.hasMore){let T=r?.finished?.()??null;if(!T){const V={class:"fox-infinite__bottom-tips"};T=t.h("view",V,[i.loadMoreText.value]),C.push(T)}}const A={class:"fox-infinite__bottom"},w=t.h("view",A,C),B={class:d.value,ref:c};return t.h("view",B,[g,w])}}}}const{componentName:vm,create:Mm,scope:Pm}=G("infinite-loading"),Qn=Mm(qm(vm,Pm,oe.Loading)),{componentName:Lm,create:zm}=G("button"),Fm=zm({components:{Loading:oe.Loading},props:{color:String,shape:{type:String,default:"round"},plain:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{type:String,default:"default"},size:{type:String,default:"normal"},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:n,slots:a}){const{type:o,size:l,shape:r,disabled:s,loading:i,color:c,plain:f,block:p}=t.toRefs(e),d=y=>{!i.value&&!s.value&&n("click",y)},h=t.computed(()=>{const y=Lm;return{[y]:!0,[`${y}--${o.value}`]:o.value,[`${y}--${l.value}`]:l.value,[`${y}--${r.value}`]:r.value,[`${y}--plain`]:f.value,[`${y}--block`]:p.value,[`${y}--disabled`]:s.value,[`${y}--loading`]:i.value}}),S=t.computed(()=>{const y={};return c?.value&&(f.value?(y.color=c.value,y.background="#fff",c.value?.includes("gradient")||(y.borderColor=c.value)):(y.color="#fff",y.background=c.value)),y});return{handleClick:d,classes:h,getStyle:S}}}),Rm={class:"fox-button__wrap"};function Om(e,n,a,o,l,r){const s=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.createElementVNode("view",Rm,[e.loading?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-icon-loading"})):t.createCommentVNode("",!0),e.$slots.icon&&!e.loading?t.renderSlot(e.$slots,"icon",{key:1}):t.createCommentVNode("",!0),e.$slots.default?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass({"fox-button__text":e.$slots.icon||e.loading})},[t.renderSlot(e.$slots,"default")],2)):t.createCommentVNode("",!0)])],6)}const Le=te(Fm,[["render",Om]]),Km={modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text"},label:{type:String,default:""},shape:{type:String,default:"round"},maxLength:{type:[String,Number],default:"9999"},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Object},background:{type:String,default:""},inputBackground:{type:String,default:""},focusStyle:{type:Object,default:()=>({})},autofocus:{type:Boolean,default:!1},autoblur:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inputAlign:{type:String,default:"left"}},Um=(e,n,a)=>({props:{...Km},emits:["change","update:modelValue","blur","focus","clear","search","click-input","keyup-input","click-left-icon","click-right-icon"],setup(o,{slots:l}){const{emitEvent:r}=ht(),{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["placeholder"]),c=t.reactive({active:!1}),f=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=V=>{let $=V.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),r("update:modelValue",$,V),r("change",$,V)},h=t.ref({}),S=V=>{let $=V.target.value;c.active=!0,h.value=o.focusStyle,r("focus",$,V)},y=V=>{setTimeout(()=>{c.active=!1},0);let $=V.target.value;o.maxLength&&$.length>Number(o.maxLength)&&($=$.slice(0,Number(o.maxLength))),h.value={},r("blur",$,V)},b=V=>{r("update:modelValue","",V),r("change","",V),r("clear","")},k=t.computed(()=>String(o.modelValue).length>0),u=t.computed(()=>{const V={};return k.value||(V.display="none"),V}),m=V=>{o.autoblur&&B.value?.blur(),(typeof V.cancelable!="boolean"||V.cancelable)&&V.preventDefault(),r("search",o.modelValue)},g=V=>{r("keyup-input",V)},C=V=>{r("click-input",V)},A=V=>{r("click-left-icon",o.modelValue,V)},w=t.computed(()=>({textAlign:o.inputAlign})),B=t.ref(null);t.onMounted(()=>{o.autofocus&&B.value.focus()});const T=()=>{const V=[];if(l.leftin){const R={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:A},v=t.h("view",R,[l.leftin()]);V.push(v)}const E={class:`${e}__input-inner-input`,ref:B,style:w.value,type:o.inputType,maxlengt:o.maxLength,placeholder:i.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:d,onFocus:S,onBlur:y,onkeyup:g},$=t.h("input",E),x={class:[`${e}__input-inner`],action:"#",onSubmit:m},P=t.h("form",x,[$]);V.push(P);const D=[];if(o.clearable){const R={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:u.value,onClick:b},v=l?.clear?.()??o.clearIcon??a,W=t.h("view",R,[t.h(v)]);D.push(W)}if(l.rightin){const R={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},v=t.h("view",R,[l.rightin()]);D.push(v)}if(D.length>0){const R={class:`${e}__input-inner-right`},v=t.h("view",R,D);V.push(v)}const I={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...h.value}};return t.h("view",I,V)};return()=>{const V=[];if(o.label){const x={class:`${e}__search-label`},P=t.h("span",x,[o.label]);V.push(P)}if(l.leftout){const x={class:[`${e}__search-icon`,`${e}__left-search-icon`]},P=t.h("view",x,[l.leftout()]);V.push(P)}const E=T();if(V.push(E),l.rightout){const x={class:[`${e}__search-icon`,`${e}__right-search-icon`]},P=t.h("view",x,[l.rightout()]);V.push(P)}const $={class:`${e}`,style:f.value};return t.h("view",$,V)}}}),{componentName:Hm,create:jm,scope:Wm}=G("searchbar"),Gn=jm(Um(Hm,Wm,oe.CircleClose)),Zn={poppable:{type:[Boolean],default:!1},modelValue:{type:[Array,Number,String,Object],default(){return[]}},visible:{type:[Boolean]},disabled:{type:[Boolean,String],required:!1},textPosition:{type:[String],required:!1},source:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},valueType:{type:String,required:!1,default:"value"},textKey:{type:String,required:!1,default:"text"},subTextKey:{type:String,required:!1,default:"subText"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},itemOptions:{type:[Object,Function],required:!1},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number]},pageSize:{type:[Number],required:!1,default:10},optionsHeight:{type:[String],required:!1},multiple:{type:[Boolean]},position:{type:[String],default:"bottom"},closeOnClickOverlay:{type:[Boolean],default:!0},title:{type:[String]},confirmText:{type:[String]},loadText:{type:[String]},loadMoreText:{type:[String]},isAutoBackFill:{type:[Boolean]},showHeader:{type:[Boolean],default:!0},showFooter:{type:[Boolean],default:!0},showSearchbar:{type:[Boolean],default:!0},searchKey:{type:String,required:!1,default:"keyword"},seachPlaceholder:{type:String,required:!1},searchDelayTriggerClear:{type:Number,default:250},popClass:{type:String,required:!1},popCloseable:{type:Boolean,required:!1,default:!0},beforeMethod:{type:Function},beforeClose:{type:Function}};function Ym(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Jn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Ts(e,r)===a)return l}return-1}function Jn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function As(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function Ts(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Xm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Qm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Gm=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,s,i){if(Array.isArray(a)){let f=a;typeof i=="function"&&(f=f.filter(i));let p=(o-1)*l,d=p+l;d>f.length&&(d=f.length);const h=f.slice(p,d);return{totalSize:f.length,page:h}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,s]);const c=Ze(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(De(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function Zm(){const e=t.getCurrentInstance();return new Gm(e.proxy)}function Jm(e,n,a,o,l,r,s,i,c,f,p){return{props:{...Zn},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:h}){const{emitEvent:S}=ht(),{toLocaleRefs:y}=ie.useFoxI18n(n),b=y(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),k=Zm(),u=t.ref([]),m=t.ref(0),g=t.ref(""),C=t.shallowRef(null),A=t.computed(()=>{const U={};return d.params&&Object.assign(U,d.params),ue(g.value)||(U[`${d.searchKey}`]=g.value),C.value&&Object.assign(U,C.value),U});let w=!0;const B=async(U,j,Q)=>{try{if(V.value===!1)return;let O=null;ue(g.value)||(O=ne=>{const re=Jn(d,ne);if(typeof re=="string"&&re.includes(g.value))return!0;const se=As(d,ne);return!!(typeof se=="string"&&se.includes(g.value))});const Z=await k.load("actionsheet",U,j,Q,A.value,w,O??void 0);w=!1,Array.isArray(Z)?(u.value=Z,m.value=1,V.value=!1):!Array.isArray(Z.page)||Z.page.length===0?(console.warn("[FoxUI] can not load more data"),V.value=!1):(Reflect.apply([].push,u.value,Z.page),m.value=Math.ceil(u.value.length/d.pageSize),(Z.totalSize&&u.value.length>=Z.totalSize||Q<Z.page.length)&&(V.value=!1)),T.value=!1}catch(O){console.error("[FoxUI] ActionSheet load more data fail",O),V.value=!0,m.value=0,u.value=[]}setTimeout(()=>{S("loaded-data")},250)},T=t.ref(!1),V=t.ref(!0),E=async()=>{if(!d.source){T.value=!1;return}await B(d.source,m.value+1,d.pageSize)};let $=null;t.watch(g,(U,j)=>{$&&(clearTimeout($),$=null),ue(U)&&!ue(j)&&($=setTimeout(()=>{P()},d.searchDelayTriggerClear))});const x=()=>{V.value=!0,m.value=0,u.value=[],d.source&&E()},P=()=>{x()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([U,j,Q])=>{d.source&&x()},{immediate:!0});const D=t.computed(()=>!d.multiple&&d.isAutoBackFill),I=t.ref([]);let R=null;const v=t.ref(d.visible);t.watch(()=>d.visible,U=>{v.value!==U&&(v.value=U),U?R=[...I.value]:R=null});const W=(U,j)=>{const Q=[];return Array.isArray(U)||(U=[U]),U.forEach(O=>{let Z=Ym(d,j,O,d.valueType);Z!==-1&&Q.push(Z)}),Me(Q,I.value)?!1:(I.value=Q,!0)};t.watch([()=>d.modelValue,()=>u.value],([U,j],[Q,O])=>{if(W(U,j)){const ne=H();J(ne)}},{deep:!0});const H=()=>{const U=[],j=[],Q=[];for(let re of I.value){const se=u.value[re];j.push(se);const ye=Jn(d,se);if(Q.push(ye),d.valueType==="item")U.push(se);else if(d.valueType==="text")U.push(ye);else{const Ce=Ts(d,se);U.push(Ce)}}let O=null,Z=null,ne=null;return d.multiple?(O=U,Z=Q,ne=j):(O=U[0]??null,Z=Q[0]??null,ne=j[0]??null),{value:O,text:Z,item:ne}},J=U=>{S("update:modelValue",U.value),S("update:text",U.text),S("change",U.value,U.item,U.text)},ee=()=>{R&&(I.value=R)},Y=U=>{const j=I.value.indexOf(U);d.multiple?j===-1?I.value.push(U):I.value.splice(j,1):j===-1?I.value=[U]:I.value=[],(D.value||!d.poppable&&!d.showFooter)&&q()},M=U=>{v.value=U,S("update:visible",U)},z=()=>{const U=()=>{ee(),M(!1)},j=d.beforeMethod??d.beforeClose;if(typeof j=="function"){const Q=j("close");dt(Q)?Q.then(O=>{O!==!1&&U()}).catch(()=>{U()}):Q!==!1&&U()}else U()},q=()=>{const U=H(),j=()=>{J(U),M(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const O=Q("confirm",U.value,U.item,U.text);dt(O)?O.then(Z=>{Z!==!1&&j()}).catch(()=>{j()}):O!==!1&&j()}else j()},F=()=>{let U=b.title.value??"";h.title&&(U=h.title());const j=t.h("view",{class:["fox-actionsheet__header-title"]},[U]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:z});return t.h("view",{class:["fox-actionsheet__header"]},[j,Q])},L=()=>{let U=null;if(h.search)U=h.search();else{const j={onSearch:x,placeholder:b.seachPlaceholder.value,disabled:d.disabled,modelValue:g.value,"onUpdate:modelValue":Q=>{g.value=Q}};U=t.h(r,j,{leftin:()=>t.h(f)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[U])},K=(U,j,Q,O,Z)=>{if(h.optionLabel)return h.optionLabel({text:U,checked:j,disabled:Q,subText:O,item:Z});const ne=[],re=t.h("view",{class:"fox-actionsheet__list-item-text"},[U]);if(ne.push(re),O){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[O]);ne.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},ne)},X=(U,j,Q,O)=>{if(h.optionIcon)return h.optionIcon({checked:U,disabled:j,iconSize:Q,item:O});if(U){if(h.checkedIcon)return h.checkedIcon({disabled:j,item:O});{const Z=d.checkedIcon??i;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(h.icon)return h.icon({disabled:j,item:O});{const Z=d.icon??s;return t.h(Z,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},_=()=>{const U=[];for(let j=0;j<u.value.length;j++){const Q=u.value[j],O=Jn(d,Q),Z=As(d,Q),ne=["fox-actionsheet__list-item"],re={};let se=Xm(d,Q),ye=d.iconSize?de(d.iconSize):null;const Ce=Qm(d,Q,j);Ce&&(se=se||Ce.disabled,Ce.class&&ne.push(Ce.class),Ce.style&&Object.assign(re,Ce.style)),se=!!(d.disabled||se);const Xe=I.value.includes(j);se&&ne.push("is-disabled"),Xe&&ne.push("is-checked");const za={class:ne,style:re,key:`${j}`,onClick:()=>{se||Y(j)}};let _t=[];if(h.option)_t.push(h.option({item:Q,checked:Xe,disabled:se}));else{const sA=K(O,Xe,se,Z,Q);_t.push(sA);const iA=X(Xe,se,ye,Q);_t.push(iA),d.textPosition==="right"&&_t.reverse()}const rA=t.h("view",za,_t);U.push(rA)}return U},le=()=>{let U=[];if(h.buttons)U=h.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:q,disabled:d.disabled},{default:()=>b.confirmText.value});U.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[U])};return xe({search:async(U=null,j=!0)=>{C.value=U&&t.toRaw(U),t.triggerRef(C),j&&(V.value=!0,m.value=0,u.value=[]),t.nextTick(()=>{E()})},clear:()=>{V.value=!0,m.value=0,u.value=[]},confirm:()=>{q()},cancel:()=>{z()}}),()=>{const U=[];if(d.showHeader){const ye=F();U.push(ye)}if(d.showSearchbar){const ye=L();U.push(ye)}let j=null;if(h.content)j=h.content();else{const ye=_(),Ce={hasMore:V.value,loadText:b.loadText.value,loadMoreText:b.loadMoreText.value,modelValue:T.value,"onUpdate:modelValue":Xe=>{T.value=Xe},onLoadMore:E};j=t.h(o,Ce,{default:()=>ye})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const O={"fox-actionsheet__list":!0};d.poppable||(O["fox-actionsheet__list--inner"]=!0);const Z=t.h("view",{class:O,style:Q},[j]);if(U.push(Z),d.showFooter&&!D.value){const ye=le();U.push(ye)}const ne=t.h("view",{class:"fox-actionsheet"},U);if(!d.poppable)return ne;const re=["fox-actionsheet__popup"];d.popClass&&re.push(d.popClass);const se={popClass:re.join(" "),visible:v.value,closeable:!1,"onUpdate:visible":M,position:d.position,round:"round",onClickOverlay:z,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>ne})}}}}const{componentName:_m,create:ep,scope:tp}=G("actionsheet-pane"),_n=ep(Jm(_m,tp,fe,Qn,Le,Gn,oe.CheckNormal,oe.Checked,oe.Close,oe.Search2)),Vs={type:{type:String,default:"text"},placeholder:{type:String,default:""},textAlign:{type:String},maxLength:{type:[String,Number],required:!1},clearable:{type:Boolean,default:!0},unit:{type:[String],required:!1},text:{type:String},actionSheetClass:{type:String},separator:{type:[String],required:!1,defualt:" "}};function np(e,n,a,o,l,r,s){return{props:{...pe,...be,...Vs,...Zn},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(i,c){const f=Ee(t.computed(()=>i.disabled)),p=$e(t.computed(()=>i.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return f.value}},i.prop??c.attrs.name),{toLocaleRefs:h}=ie.useFoxI18n(n),S=h(i,["placeholder"]),y=t.ref(!1),b=ve(i,"modelValue",null,d),k=t.ref(""),u=t.computed(()=>Array.isArray(k.value)?k.value.join(i.separator):k.value),m="fox-input-item",g=t.computed(()=>({[m]:!0,"is-disabled":f.value,"is-readonly":p.value})),C=Ve(t.computed(()=>i.textAlign),"textAlign"),A=t.computed(()=>{const q={};return C.value&&(q["text-align"]=C.value),q}),w=t.ref(!1),B=()=>{w.value=!0},T=q=>{w.value=q},V=q=>{b.value=q,d("update:modelValue",q)},E=(q,F)=>{d("change",q,F)},$=q=>{let L=q.target.value;y.value=!0,d("focus",L,q)},x=q=>{setTimeout(()=>{y.value=!1},0);let L=q.target.value;i.maxLength&&L.length>Number(i.maxLength)&&(L=L.slice(0,Number(i.maxLength))),d("blur",L,q)},P=q=>{k.value=q,d("update:text",q)},D=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":f.value,"is-readonly":p.value})),I=t.computed(()=>ke(i.unit)>0),R=t.computed(()=>ke(i.unit)>0&&!y.value),v=t.computed(()=>({hidden:!R.value})),W=q=>{b.value="",d("update:modelValue","",q),d("change","",q),d("clear","")},H=t.computed(()=>i.clearable&&!f.value&&!p.value),J=t.computed(()=>ke(b.value)>0&&y.value),ee=q=>{J.value?W(q):B()},Y=t.computed(()=>J.value&&H.value?o:l),M=t.computed(()=>({action:!0})),z=t.ref(null);return xe({search:q=>{z.value&&z.value.search(q)},clear:()=>{z.value&&z.value.clear},confirm:q=>{z.value&&z.value.confirm()},cancel:()=>{z.value&&z.value.cancel()}}),()=>{const q={class:g.value,style:A.value,type:"text",maxlength:i.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:u.value,onClick:B,onFocus:$,onBlur:x};s&&(q.disabled=!0);const F=[],L=t.h("input",q);F.push(L);const K=[],X={class:["action-icon"]},_=t.h(Y.value,X),le={class:M.value,onClick:ee},U=t.h("view",le,{default:()=>[_]});if(K.push(U),I.value){const Ce=t.h("view",{class:v.value},[i.unit]);K.push(Ce)}const j={class:D.value},Q=t.h("view",j,{default:()=>K});F.push(Q);const O={default:()=>F};O.label=c.slots.default,O.prepend=c.slots.prepend,O.append=c.slots.append,O.fixedPreTip=c.slots.fixedPreTip,O.fixedTip=c.slots.fixedTip;const Z=Se(i,Zn);Z.ref=z,Z.class=i.actionsheetProps,Z.disabled=f.value||p.value,Z.visible=w.value,Z["onUpdate:visible"]=T,Z.modelValue=b.value,Z["onUpdate:modelValue"]=V,Z.text=k.value,Z["onUpdate:text"]=P,Z.onChange=E,Z.poppable=!0,Z["text-position"]=i.textPosition;const ne={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},re=t.h(r,Z,ne);O.hide=()=>[re];const se=ut(i,Vs,Zn);return t.h(a,{...se,prop:`${i.prop}_item`},O)}}}}const{componentName:op,create:lp,scope:ap}=G("actionsheet-item"),cl=lp(np(op,ap,Be,oe.CircleClose,oe.ArrowRight,_n)),dl={modelValue:{type:[Number,String],default:0},inputWidth:{type:[Number,String],default:""},buttonSize:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:9999},step:{type:[Number,String],default:1},decimalPlaces:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},{componentName:rp,create:sp}=G("input-number"),ip=sp({components:{Minus:oe.Minus,Plus:oe.Plus},props:{...dl},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=rp;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const y=S.target;n("update:modelValue",y.valueAsNumber,S)},r=(S,y)=>{let b=o(S);n("update:modelValue",b,y),n("change",b,y)},s=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,i=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),i()){let y=Number(e.modelValue)-Number(e.step);r(y,S)}else n("overlimit",S,"reduce")},f=S=>{if(n("add",S),s()){let y=Number(e.modelValue)+Number(e.step);r(y,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let b=S.target.valueAsNumber;b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),r(b,S),n("blur",S)},h=S=>{let y=Number(S);return y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),y};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const S=h(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:f,addAllow:s,reduce:c,reduceAllow:i,toPxDesc:ge}}}),cp=["min","max","disabled","readonly","value"];function dp(e,n,a,o,l,r){const s=t.resolveComponent("Minus"),i=t.resolveComponent("Plus");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__left",{"fox-input-number__icon--disabled":!e.reduceAllow()}]),onClick:n[0]||(n[0]=(...c)=>e.reduce&&e.reduce(...c))},[t.renderSlot(e.$slots,"left-icon",{},()=>[t.createVNode(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2),t.createElementVNode("input",{type:"number",min:e.min,max:e.max,style:t.normalizeStyle({width:e.toPxDesc(e.inputWidth),height:e.toPxDesc(e.buttonSize)}),disabled:e.disabled,readonly:e.readonly,value:e.modelValue,onInput:n[1]||(n[1]=(...c)=>e.change&&e.change(...c)),onBlur:n[2]||(n[2]=(...c)=>e.blur&&e.blur(...c)),onFocus:n[3]||(n[3]=(...c)=>e.focus&&e.focus(...c))},null,44,cp),t.createElementVNode("view",{class:t.normalizeClass(["fox-input-number__icon fox-input-number__right",{"fox-input-number__icon--disabled":!e.addAllow()}]),onClick:n[4]||(n[4]=(...c)=>e.add&&e.add(...c))},[t.renderSlot(e.$slots,"right-icon",{},()=>[t.createVNode(i,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const et=te(ip,[["render",dp]]);function up(e,n,a,o){return{props:{...pe,...be,...dl},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const s=Ee(t.computed(()=>l.disabled)),i=$e(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!s.value&&!i.value}},l.prop??r.attrs.name),f=e,p=ve(l,"modelValue",null,c),d=y=>{p.value=y,c("update:modelValue",y,{}),c("change",y,{})},h=y=>{c("add",y)},S=y=>{c("reduce",y)};return()=>{const y={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},b=Se(l,dl),u={...r.attrs,...b,disabled:s.value,readonly:i.value,value:p.value,"onUpdate:modelValue":d,onAdd:h,onReduce:S},m=t.h(o,u,y),g=[];g.push(m);const C={default:()=>g};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const A=Se(l,be,pe);return A["content-class"]=f,t.h(a,{...A,prop:`${l.prop}_item`},C)}}}}const{componentName:fp,create:mp,scope:pp}=G("inputnumber-item"),ul=mp(up(fp,pp,Be,et)),hp={direction:{type:[String],default:"horizontal"},mode:{type:[String]},align:{type:[String]},modelValue:{type:[Number,Boolean,String]},disabled:{type:[Boolean,String],required:!1},data:{type:[Array,Function,String],required:!1},params:{type:[Object],required:!1},textKey:{type:String,required:!1,default:"text"},valueKey:{type:String,required:!1,default:"value"},disabledKey:{type:String,required:!1,default:"disabled"},visibleKey:{type:String,required:!1,default:"visible"},statusKey:{type:String,required:!1,default:"status"},doitKey:{type:String,required:!1,default:"doit"},labelKey:{type:String,required:!1,default:"label"},itemOptions:{type:[Object,Function],required:!1},step:{type:[Boolean,String]},clickNavigatePolicy:{type:[String]},icon:{type:[String]},iconSize:{type:[String,Number]},markIcon:{type:[String]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function gp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function $s(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Es(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function yp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function fl(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Ds(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function Is(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function ml(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let bp=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await Reflect.apply(a,null,[o]);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function kp(){const e=t.getCurrentInstance();return new bp(e.proxy)}function Sp(e,n,a,o){return{props:{...hp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:s}){const i=e,c=kp(),f=t.ref([]),p=t.computed(()=>f.value.filter(M=>yp(l,M)!==!1)),d=t.ref(-1),h=()=>{const M=l.modelValue,z=p.value.findIndex(q=>$s(l,q)===M);d.value!==z&&(d.value=z,l.scroll&&ee(z,!1))};t.watch([()=>l.modelValue,p],()=>{h()});const S=M=>d.value===M,y=M=>{if(M<0&&M>=p.value.length)return!1;const z=p.value[M],F=(ml(l,z,M)??{}).status??fl(l,z);return S(M)||F},b=t.computed(()=>{const M={[i]:!0};return l.mode?M[`is-${l.mode}`]=!0:l.direction&&(M[`is-${l.direction}`]=!0),l.scroll&&(M["is-scroll"]=!0),M}),k=t.computed(()=>({})),u=(M,z,q,F,L)=>{const K={[`${i}__step`]:!0};return L&&(K[`${L}`]=!0),K[`${m.value}`]=!0,F&&(K["is-doit"]=!0),M===d.value?K["is-active"]=!0:z==="done"?K["is-done"]=!0:z==="error"?K["is-error"]=!0:z==="half"?K["is-half"]=!0:q?K["is-disabled"]=!0:K["is-normal"]=!0,K},m=t.computed(()=>{if(l.mode==="simple")return"start";let M=l.align;return M||(l.direction==="vertical"?M="start":M="center"),M}),g=(M,z={})=>{const q={...z};return m.value==="start"&&M===p.value.length-1?q.flex="0 0 auto":l.step?l.direction==="vertical"?q.height=l.step:q.width=l.step:q.flex="1 1 100%",q},C=(M,z)=>{let q={};if(z<p.value.length-1){const F=z+1;y(z)&&y(F)?l.direction==="vertical"?q.height="100%":q.width="100%":q.opacity="0"}return q},A=M=>p.value.length-1===M,w=(M,z)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&z>d.value||d.value===z)return;const q=d.value,F=z;d.value=z,l.scroll&&ee(z,!1);const L=$s(l,M);s("update:modelValue",L);const K={fromIndex:q,currentIndex:F,item:M,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};s("change",L,K)},B=t.ref(!0),T=async(M,z)=>{try{const q=await c.load("stesbar",M,z);Array.isArray(q)&&(f.value=q),B.value=!1}catch(q){console.error("[FoxUI] Load StepsBar Data Fail",q),f.value=[]}setTimeout(()=>{s("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([M,z])=>{M&&T(M,z)},{immediate:!0});const V=(M,z,q,F,L)=>{let K=null;if(r.icon)K=r.icon({item:M,index:z,status:F});else if(F==="done"){const _={};l.iconSize&&(_.width=l.iconSize,_.height=l.iconSize);const le=l.icon??a;K=t.h(le,_)}else{const _=q??`${z+1}`;K=t.h("span",{},[_])}const X={class:"fox-steps-bar__icon",onClick:()=>{s("click",{item:M,index:z}),!L&&w(M,z)}};return t.h("view",X,[K])},E=(M,z,q)=>{const F=t.h("i",{class:"fox-steps-bar__line-inner",style:C(M,z)});return t.h("view",{class:"fox-steps-bar__line"},[F])},$=()=>{let M=null;if(r.markIcon)M=r.markIcon();else{const q={};l.iconSize&&(q.width=l.markIconSize,q.height=l.markIconSize);const F=l.markIcon??o;M=t.h(F,q)}return t.h("view",{class:"fox-steps-bar__mark"},[M])},x=(M,z,q,F,L)=>{const K=[];if(!A(z)){const le=E(M,z);K.push(le)}const X=V(M,z,q,F,L);K.push(X);const _={class:"fox-steps-bar__head"};return t.h("view",_,K)},P=(M,z,q,F)=>{let L=null;r.main?L=r.main({item:M,index:z,status:q}):L=gp(l,M);const K={class:"fox-steps-bar__main",onClick:()=>{s("click",{item:M,index:z}),!F&&w(M,z)}};return t.h("view",K,[L])},D=(M,z,q)=>{let F=null;if(r.sub){F=r.sub({item:M,index:z,status:q});const L={class:"fox-steps-bar__sub"};return t.h("view",L,[F])}return null},I=(M,z)=>{const q=ml(l,M,z)??{},F=q.status??fl(l,M);let L=Es(l,M);q.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const K=q.label??Is(l,M),X=[],_=V(M,z,K,F,L);_&&X.push(_);const le=P(M,z,F,L);if(le&&X.push(le),!A(z)){const ne=E(M,z);ne&&X.push(ne)}const U=t.h("view",{class:"fox-steps-bar__head"},X),j=q.class,Q=q.style??{};let O=Ds(l,M);q.doit===!0&&(O=!0);const Z={ref:J(z),class:u(z,F,L,O,j),style:g(z,Q)};return t.h("view",Z,[U])},R=(M,z)=>{const q=ml(l,M,z)??{},F=q.status??fl(l,M);let L=Es(l,M);q.disabled===!0&&(L=!0),l.disabled===!0&&(L=!0);const K=q.label??Is(l,M),X=[],_=l.layout;for(let O of _)if(O==="head"){const Z=x(M,z,K,F,L);X.push(Z)}else if(O==="main"){const Z=P(M,z,F,L);X.push(Z)}else if(O==="sub"){const Z=D(M,z,F);X.push(Z)}else if(O==="mark"){const Z=$();X.push(Z)}const le=q.class,U=q.style??{};let j=Ds(l,M);q.doit===!0&&(j=!0);const Q={ref:J(z),class:u(z,F,L,j,le),style:g(z,U)};return t.h("view",Q,X)},v=t.ref(),W=t.ref([]),H=(M,z)=>{W.value[z]=M},J=M=>z=>{H(z,M)},ee=(M,z)=>{const q=v.value,F=W.value;if(!q||!F||!F[M])return;const L=F[M];let K=0;l.direction==="vertical"?K=L.offsetTop-(q.offsetHeight-L.offsetHeight)/2:K=L.offsetLeft-(q.offsetWidth-L.offsetWidth)/2,Y(q,K,z?0:.3,l.direction)},Y=(M,z,q,F)=>{let L=0;const K=F==="horizontal"?M.scrollLeft:M.scrollTop,X=q===0?1:Math.round(q*1e3/16);function _(){F==="horizontal"?M.scrollLeft+=(z-K)/X:M.scrollTop+=(z-K)/X,++L<X&&Ke(_)}_()};return()=>{const M=[];if(l.mode==="simple")for(let q=0;q<p.value.length;q++){const F=p.value[q],L=I(F,q);M.push(L)}else for(let q=0;q<p.value.length;q++){const F=p.value[q],L=R(F,q);M.push(L)}const z={ref:v,class:b.value,style:k.value};return t.h("view",z,M)}}}}const{componentName:Cp,create:wp,scope:Np}=G("steps-bar"),pl=wp(Sp(Cp,Np,oe.Checklist,oe.ArrowRight));function Bp(e){e.stopPropagation()}class Ap{startMove;updateMove;isTouch=!1;els=null;moving=!1;touchstart=null;touchmove=null;touchend=null;constructor(n,a){this.startMove=n,this.updateMove=a,this.isTouch=Oo()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=Ko(),o=(l,r,s,i)=>{this.updateMove({x:l,y:r})};this.touchstart=l=>{this.moving||(a.start(l),this.startMove({x:a.state.startX,y:a.state.startY}),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),document.addEventListener(this.isTouch?"touchend":"mouseup",this.touchend),this.moving=!0)},this.touchmove=l=>{this.moving&&(a.move(l),Bp(l),o(a.state.deltaX,a.state.deltaY))},this.touchend=()=>{o(a.state.deltaX,a.state.deltaY),this.touchmove&&document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.touchmove),this.touchend&&document.removeEventListener(this.isTouch?"touchend":"mouseup",this.touchend),a.reset(),this.moving=!1},this.els.forEach(l=>{this.touchstart&&l.addEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)})}close(){Array.isArray(this.els)&&this.els.forEach(n=>{this.touchstart&&n.removeEventListener(this.isTouch?"touchstart":"mousedown",this.touchstart)}),this.els=null}}function Tp(e,n){return new Ap(e,n)}const Vp={customClass:{type:[String]},top:{type:[String]},right:{type:[String]},bottom:{type:[String]},left:{type:[String]},width:{type:[String]},height:{type:[String]},color:{type:[String]},background:{type:[String]},borderRadius:{type:[String]},draggable:{type:[Boolean]}},$p=(e,n,a,o=!1)=>({props:{...Vp},emits:["click"],setup(l,{slots:r,emit:s}){const i=t.reactive({top:l.top,right:l.right,bottom:l.bottom,left:l.left}),c=t.computed(()=>{const m=[`${e}`];return l.customClass&&m.push(l.customClass),m}),f=t.computed(()=>{const m={};return ue(i.top)||(m.top=i.top),ue(i.right)||(m.right=i.right),ue(i.bottom)||(m.bottom=i.bottom),ue(i.left)||(m.left=i.left),ue(l.width)||(m.width=l.width),ue(l.height)||(m.height=l.height),ue(l.color)||(m.color=l.color),ue(l.background)||(m.background=l.background),ue(l.borderRadius)||(m["border-radius"]=l.borderRadius),m}),p=t.computed(()=>({[`${e}__icon`]:!0})),d=()=>{s("click")},h=t.ref(null),S=()=>{i.top=null,i.right=null,i.bottom=null,i.left=null},y={x:0,y:0},u=Tp(m=>{if(!h.value)return;const g=h.value;S(),i.left=g.offsetLeft,i.top=g.offsetTop,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`,g.style.right=null,g.style.bottom=null,y.x=i.left,y.y=i.top},m=>{if(!h.value)return;const g=h.value;S(),i.left=y.x+m.x,i.top=y.y+m.y,g.style.left=`${i.left}px`,g.style.top=`${i.top}px`});return t.onMounted(()=>{if(l.draggable&&h.value){const m=[h.value];u.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&h.value&&u.close()}),()=>{let m=[];const g=typeof r.default=="function"?r.default():[];if(g&&g.length>0)m=g;else{const A=t.h(a,{class:p.value});m.push(A)}const C={ref:A=>{h.value=A},class:c.value,style:f.value,onClick:d};return t.h("view",C,m)}}}),{componentName:Ep,create:Dp,scope:Ip}=G("floating-button"),hl=Dp($p(Ep,Ip,oe.Uploader,!1)),xp={modelValue:{type:[Boolean],requried:!0},type:{type:[String],requried:!1,default:""},disabled:{type:[Boolean,String],requried:!1},textPosition:{type:[String],requried:!1},collapseText:{type:[String],requried:!1,default:"收起"},expandText:{type:[String],requried:!1,default:"更多"},icon:{type:[Object],requried:!1}};function qp(e,n,a){return{props:{...xp},emits:["click","update:modelValue"],setup(o,{emit:l}){const r=t.computed(()=>{const d={[`${e}`]:!0};return o.disabled?d[`${e}--disabled`]=!0:d[`${e}--${o.type}`]=!0,d}),s=ve(o,"modelValue"),i=t.computed(()=>s.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),f=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!s.value,"is-collapse":s.value})),p=()=>{l("update:modelValue",!s.value)};return()=>{const d=[];if(i.value){const k={class:c.value},u=t.h("span",k,[i.value]);d.push(u)}const h={class:f.value},S=o.icon??a,y=t.h(S,h);return d.push(y),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:vp,create:Mp,scope:Pp}=G("more-button"),gl=Mp(qp(vp,Pp,oe.RectUp)),Lp={width:{type:[String,Number]},height:{type:[String,Number]},type:{type:[String],required:!1,default:"info"},icon:{type:[String,Object],required:!1},closeIcon:{type:[String,Object],required:!1},showClose:{type:[Boolean],required:!1},title:{type:[String],required:!1},message:{type:[Array,String,Object],required:!1},showConfirmButton:{type:[Boolean],required:!1},confirmButtonText:{type:[String],required:!1},confirmText:{type:[String],required:!1},confirmButtonClass:{type:[String],required:!1},confirmButtonStyle:{type:[Object],required:!1},showCancelButton:{type:[Boolean],required:!1},cancelButtonText:{type:[String],required:!1},cancelText:{type:[String],required:!1},cancelButtonClass:{type:[String],required:!1},cancelButtonStyle:{type:[Object],required:!1},popClass:{type:[String]},position:{type:[String],default:"center"},closeOnClickOverlay:{type:[Boolean],required:!1,default:!0},unmount:{type:[Function],required:!1},callback:{type:[Function],required:!1}},zp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Fp(e,n,a){return{props:{...Lp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:s}=ie.useFoxI18n(n),i=s(o,["confirmText","cancelText"]),c=e,f=t.ref(!0),p=C=>{f.value=C},d=C=>{if(typeof o.unmount=="function")try{o.unmount()}catch(A){console.error(A)}if(typeof o.callback=="function")try{o.callback(C)}catch(A){console.error(A)}},h=()=>{d("confirm")},S=()=>{d("cancel")},y=()=>{o.closeOnClickOverlay!==!1&&d("close")},b=(C,A)=>zp(C)?(A.src=C,t.h("img",A)):typeof C=="string"?(Array.isArray(A.class)?A.class.push(C):A.class&&typeof A.class=="object"?A[`${C}`]=!0:typeof A.class=="string"?A.class=`${A.class}, ${C}`:A.class=C,t.h(o.tag,A)):t.h(C,A),k=()=>{const C=[];if(o.icon){const w={class:[`${c}__header-icon`]},B=b(o.icon,w);C.push(B)}if(o.title){const w=t.h("view",{class:`${c}__header-title`},[o.title]);C.push(w)}if(o.showClose&&o.closeIcon){const w={class:[`${c}__header-close-icon`],onClick:y},B=b(o.closeIcon,w);C.push(B)}const A={class:[`${c}__header`]};return t.h("view",A,C)},u=(C,A)=>{const w=[];if(A){const T={class:`${c}__group-title`},V=t.h("view",T,[A]);w.push(V)}if(C){const T=[];Array.isArray(C)||(C=[C]);for(let V of C){const E={class:`${c}__group-row`,innerHTML:V},$=t.h("view",E);T.push($)}if(T.length>0){const V={class:`${c}__group-rows`},E=t.h("view",V,T);w.push(E)}}if(w.length===0)return null;const B={class:`${c}__group`};return t.h("view",B,w)},m=()=>{const C=[];if(typeof o.message=="string")C.push(o.message);else if(Array.isArray(o.message))for(let w of o.message)if(typeof w=="string"){const B=u(w);C.push(B)}else{const B=u(w.content,w.title);C.push(B)}else if(typeof o.message=="function"){const w=o.message();C.push(w)}else{const w=o.message;C.push(w)}const A={class:`${c}__body`};return t.h("view",A,C)},g=()=>{const C=[];if(o.showCancelButton){const w={class:[`${c}__footer-button`],style:{},onClick:S};o.cancelButtonClass&&w.class.push(o.cancelButtonClass),o.cancleButtonStyle&&typeof o.cancleButtonStyle=="object"&&Object.assign(w.style,o.cancleButtonStyle);const B=t.h("button",w,[o.cancelButtonText??i.cancelText.value]);C.push(B)}if(o.showConfirmButton){const w={class:[`${c}__footer-button`],style:{},onClick:h};o.confirmButtonClass&&w.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(w.style,o.confirmButtonStyle);const B=t.h("button",w,[o.confirmButtonText??i.confirmText.value]);C.push(B)}if(C.length===0)return null;const A={class:`${c}__footer`};return t.h("view",A,C)};return()=>{const C=[],A=k();A&&C.push(A);const w=m();w&&C.push(w);const B=g();B&&C.push(B);const T={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},V=t.h("view",T,C),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const $={};o.width&&($.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&($.height=typeof o.height=="number"?`${o.height}px`:o.height);const x={popClass:E.join(" "),style:$,visible:f.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:y,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,x,{default:()=>V})}}}}const{componentName:Rp,create:Op,scope:Kp}=G("messagebox"),Up=Op(Fp(Rp,Kp,fe)),Hp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M82.5121%201.93968L81.7498%206.07825C81.6498%206.6214%2081.1284%206.98064%2080.5853%206.8806C80.4326%206.85251%2080.2886%206.78925%2080.1646%206.69578L77.1586%204.43061C76.7175%204.09823%2076.6294%203.47123%2076.9618%203.03016C77.0552%202.90617%2077.1762%202.80562%2077.3153%202.73655L81.0834%200.863097C81.5779%200.617235%2082.1782%200.818843%2082.4241%201.31339C82.5204%201.50712%2082.5512%201.72688%2082.5121%201.93968Z'%20fill='%23FFD1C9'%20%3e%3c/path%3e%3cpath%20d='M3.08218%20102.2L6.53454%2094.2358C6.75419%2093.7291%207.34251%2093.4968%207.84925%2093.7164C7.99216%2093.7778%208.11815%2093.872%208.21791%2093.9909L13.2085%2099.9384C13.5635%20100.361%2013.5081%20100.992%2013.0852%20101.347C12.9665%20101.447%2012.8261%20101.518%2012.675%20101.554L4.23203%20103.571C3.69484%20103.699%203.15538%20103.367%203.02699%20102.83C2.97674%20102.62%202.99607%20102.399%203.08218%20102.2Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23FF5959'%20%3e%3c/circle%3e%3cpath%20d='M59.935%2049.6213C61.3827%2051.069%2061.3827%2053.4162%2059.935%2054.864L45.935%2068.864C44.4873%2070.3117%2042.1401%2070.3117%2040.6924%2068.864C39.2447%2067.4162%2039.2447%2065.069%2040.6924%2063.6213L54.6924%2049.6213C56.1401%2048.1736%2058.4873%2048.1736%2059.935%2049.6213Z'%20fill='%23FFB5AD'%20%3e%3c/path%3e%3cpath%20d='M40.6924%2049.6213C39.2447%2051.069%2039.2447%2053.4162%2040.6924%2054.864L54.6924%2068.864C56.1401%2070.3117%2058.4873%2070.3117%2059.935%2068.864C61.3827%2067.4162%2061.3827%2065.069%2059.935%2063.6213L45.935%2049.6213C44.4873%2048.1736%2042.1401%2048.1736%2040.6924%2049.6213Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%23FFD1C9'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%23FFB5AD'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L102%20110L102%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",jp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='110'%20viewBox='0%200%20102%20110'%20fill='none'%3e%3cpath%20d='M8%2087L8%2095C8%2095.5523%207.55228%2096%207%2096C6.44772%2096%206%2095.5523%206%2095L6%2087L2%2087C1.44772%2087%201%2086.5523%201%2086C1%2085.4477%201.44772%2085%202%2085L6%2085L6%2082C6%2081.4477%206.44772%2081%207%2081C7.55228%2081%208%2081.4477%208%2082L8%2085L12%2085C12.5523%2085%2013%2085.4477%2013%2086C13%2086.5523%2012.5523%2087%2012%2087L8%2087Z'%20fill-rule='evenodd'%20fill='%2396CEFF'%20%3e%3c/path%3e%3cpath%20d='M89%205L89%2010C89%2010.5523%2088.5523%2011%2088%2011C87.4477%2011%2087%2010.5523%2087%2010L87%205L85%205C84.4477%205%2084%204.55228%2084%204C84%203.44772%2084.4477%203%2085%203L87%203L87%201C87%200.447715%2087.4477%200%2088%200C88.5523%200%2089%200.447715%2089%201L89%203L91%203C91.5523%203%2092%203.44772%2092%204C92%204.55228%2091.5523%205%2091%205L89%205Z'%20fill-rule='evenodd'%20fill='%23BDE2FF'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='59'%20r='28'%20fill='%23237FFA'%20%3e%3c/circle%3e%3crect%20x='47.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%2396CEFF'%20%3e%3c/rect%3e%3crect%20x='47.5'%20y='66'%20width='7'%20height='7'%20rx='4'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='106.5'%20r='3.5'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='30'%20r='7'%20fill='%2396CEFF'%20%3e%3c/circle%3e%3c/svg%3e",Wp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='102'%20height='105'%20viewBox='0%200%20102%20105'%20fill='none'%3e%3cpath%20d='M7%2076C7.55228%2076%208%2076.4477%208%2077L7.999%2079.999L12%2080C12.5523%2080%2013%2080.4477%2013%2081C13%2081.5523%2012.5523%2082%2012%2082L7.999%2081.999L8%2090C8%2090.5523%207.55228%2091%207%2091C6.44772%2091%206%2090.5523%206%2090L5.999%2081.999L2%2082C1.44772%2082%201%2081.5523%201%2081C1%2080.4477%201.44772%2080%202%2080L5.999%2079.999L6%2077C6%2076.4477%206.44772%2076%207%2076Z'%20fill='%2338D677'%20%3e%3c/path%3e%3cpath%20d='M75%201.72421e-32C75.5523%20-1.01453e-16%2076%200.447715%2076%201L76%202.999L78%203C78.5523%203%2079%203.44772%2079%204C79%204.55228%2078.5523%205%2078%205L76%204.999L76%2010C76%2010.5523%2075.5523%2011%2075%2011C74.4477%2011%2074%2010.5523%2074%2010L74%204.999L72%205C71.4477%205%2071%204.55228%2071%204C71%203.44772%2071.4477%203%2072%203L74%202.999L74%201C74%200.447715%2074.4477%201.01453e-16%2075%201.72421e-32Z'%20fill='%238BF0AD'%20%3e%3c/path%3e%3ccircle%20cx='51'%20cy='54'%20r='28'%20fill='%2338D677'%20%3e%3c/circle%3e%3cpath%20d='M36.8787%2051.8786C38.3265%2050.4309%2040.6736%2050.4309%2042.1213%2051.8786L50.1214%2059.8786C51.5691%2061.3263%2051.5691%2063.6735%2050.1214%2065.1212C48.6737%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212L36.8787%2057.1212C35.431%2055.6735%2035.431%2053.3263%2036.8787%2051.8786Z'%20fill='%23B3F2C6'%20%3e%3c/path%3e%3cpath%20d='M64.1214%2045.8786C65.5691%2047.3263%2065.5691%2049.6735%2064.1214%2051.1212L50.1213%2065.1212C48.6736%2066.5689%2046.3265%2066.5689%2044.8787%2065.1212C43.431%2063.6735%2043.431%2061.3263%2044.8787%2059.8786L58.8788%2045.8786C60.3265%2044.4309%2062.6737%2044.4309%2064.1214%2045.8786Z'%20fill='%23FFFFFF'%20%3e%3c/path%3e%3ccircle%20cx='3.5'%20cy='14.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='85.5'%20cy='101.5'%20r='3.5'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3ccircle%20cx='95'%20cy='25'%20r='7'%20fill='%23B3F2C6'%20%3e%3c/circle%3e%3c/svg%3e",Yp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='101'%20height='110'%20viewBox='0%200%20101%20110'%20fill='none'%3e%3cg%20clip-path='url(%23clip-path-0)'%3e%3cpath%20d='M81.512%201.93968L80.7498%206.07825C80.6498%206.6214%2080.1284%206.98064%2079.5852%206.8806C79.4326%206.85251%2079.2886%206.78925%2079.1645%206.69578L76.1585%204.43061C75.7175%204.09823%2075.6293%203.47123%2075.9617%203.03016C76.0552%202.90617%2076.1761%202.80562%2076.3152%202.73655L80.0833%200.863097C80.5779%200.617235%2081.1781%200.818843%2081.424%201.31339C81.5203%201.50712%2081.5512%201.72688%2081.512%201.93968Z'%20fill='%23FEFAE0'%20%3e%3c/path%3e%3cpath%20d='M2.08224%20102.2L5.5346%2094.2358C5.75425%2093.7291%206.34257%2093.4968%206.84931%2093.7164C6.99222%2093.7778%207.11822%2093.872%207.21798%2093.9909L12.2086%2099.9384C12.5636%20100.361%2012.5082%20100.992%2012.0853%20101.347C11.9666%20101.447%2011.8261%20101.518%2011.675%20101.554L3.23209%20103.571C2.6949%20103.699%202.15544%20103.367%202.02705%20102.83C1.97681%20102.62%201.99613%20102.399%202.08224%20102.2Z'%20fill='%23FEE789'%20%3e%3c/path%3e%3ccircle%20cx='50'%20cy='59'%20r='28'%20fill='%23FAB007'%20%3e%3c/circle%3e%3crect%20x='46.5'%20y='45'%20width='7'%20height='17'%20rx='3'%20fill='%23FEE789'%20%3e%3c/rect%3e%3crect%20x='46.5'%20y='66'%20width='7'%20height='7'%20rx='3.5'%20fill='%23FFFFFF'%20%3e%3c/rect%3e%3ccircle%20cx='3.5'%20cy='19.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='84.5'%20cy='106.5'%20r='3.5'%20fill='%23FEE789'%20%3e%3c/circle%3e%3ccircle%20cx='94'%20cy='30'%20r='7'%20fill='%23FEE789'%20%3e%3c/circle%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip-path-0'%3e%3cpath%20d='M0%20110L101%20110L101%200L0%200L0%20110Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Xp=new En,Qp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},Gp=e=>{let n=document.body,a=e.teleport;a!="body"&&(typeof a=="string"?n=document.querySelector(a):a&&(n=e.teleport));const o=document.createElement("view"),l=`messagebox-${Xp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const s=document.querySelector(`#${l}`);s&&s.parentNode?.removeChild(s)};const r=t.createVNode(Up,e);n.appendChild(o),t.render(r,o)},ct={show:(e,n,a,o)=>{const l={...Qp};n&&!Array.isArray(n)&&typeof n=="object"?Object.assign(l,n):(n&&(l.message=n),a&&typeof a=="object"?Object.assign(l,a):(typeof a=="string"&&(l.title=a),o&&typeof o=="object"?Object.assign(l,o):typeof o=="string"&&(l.type=o)));const r=l.type??"info";return l.icon||(r==="success"?l.icon=Wp:r==="warning"?l.icon=Yp:r==="error"?l.icon=Hp:l.icon=jp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=oe.Close),new Promise((s,i)=>{const c=l.callback;l.callback=f=>{if(typeof c=="function")try{c(f)}catch(p){console.error(p)}s({action:f})},Gp(l)})},alert:(e,n,a)=>ct.show("alert",e,n,a),confirm:(e,n,a)=>ct.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ct.alert,e.config.globalProperties.$confirm=ct.confirm}},Zp=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let i in n)i==="bubbles"?l=!!n[i]:i==="cancelable"?r=!!n[i]:o[i]=n[i];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},Jp=new En,_p=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),eh=e=>`${e}-${Jp.get()}`,th=Symbol.for("InnerPageScopeKey"),nh=Symbol.for("PageWrapperKey"),oh="FoxLeave",lh="FoxLeaveEnd",ah={width:{type:[String,Number]},height:{type:[String,Number]},closeOnClickOverlay:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!0},showDelay:{type:Number,default:10},showClose:{type:Boolean,default:!0},closeIcon:{type:Object},showHeader:{type:Boolean,default:!1},popClass:{type:String},popStyle:{type:Object},position:{type:String,default:"center"},mode:{type:String}};function rh(e,n,a,o){return{props:{...Fe,...ah},emits:["update:visible"],setup(l,{attrs:r,slots:s,emit:i}){t.provide(th,!0);const c={};t.provide(nh,c);const f=w=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{f()},d=e,h=w=>{S.value=w,i("update:visible",w)},S=t.ref(!1),y=(w,B)=>_p(w)?(B.src=w,t.h("img",B)):typeof w=="string"?(Array.isArray(B.class)?B.class.push(w):B.class&&typeof B.class=="object"?B[`${w}`]=!0:typeof B.class=="string"?B.class=`${B.class}, ${w}`:B.class=w,t.h(l.tag,B)):t.h(w,B),b=()=>{if(!l.showHeader)return null;const w=[];if(s.header){const T=s.header();w.push(T)}else if(l.title){const T=t.h("view",{class:`${d}__header-title`},[l.title]);w.push(T)}if(w.length===0)return null;const B={class:[`${d}__header`]};return t.h("view",B,w)},k=()=>{if(!l.showClose)return null;const w={class:[`${d}__close-icon`],onClick:p},B=l.closeIcon??o;return y(B,w)};let u=null;const m=w=>{Zp(lh,{},u)},g=eh(e),C=()=>{h(!0)},A=()=>{if(!u)return;const w=u.querySelector(".fox-overlay");w&&(w.classList.add("overlay-fade-leave-active"),w.classList.add("overlay-fade-leave-to"));const B=u.querySelector(".fox-popup");B&&(B.classList.add(`fox-popup-slide-${l.position}-leave-active`),B.classList.add(`fox-popup-slide-${l.position}-leave-to`),B.addEventListener("animationend",m,{once:!0}),B.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{u=document.querySelector(`.${g}`),u?.addEventListener(oh,A,{once:!0}),C()}),()=>{const w=[],B=b();B&&w.push(B);const T=k();T&&w.push(T);const V=s.default?s.default():[];Reflect.apply([].push,w,V);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const $={class:E},x=t.h("view",$,w),P=[`${d}__popup`,g];l.popClass&&P.push(l.popClass),l.position&&P.push(`${d}__popup--${l.position}`);const D={};l.width&&(D.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(D.height=typeof l.height=="number"?`${l.height}px`:l.height);const R={...Se(l,Fe),popClass:P.join(" "),style:D,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":h},v=t.h(a,R,{default:()=>x});return t.h("div",{class:[`${d}__root`,g]},[v])}}}}const{componentName:sh,create:ih,scope:ch}=G("popup-wrapper"),yl=ih(rh(sh,ch,fe,oe.Close)),dh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function uh(e,n,a,o){return{props:{...dh},emits:["update:visible"],setup(l,{emit:r,slots:s}){const i=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const f={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":i},p=t.h(a,f,s),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:fh,create:mh,scope:ph}=G("dropdown"),bl=mh(uh(fh,ph,fe));function hh(e,n){const a=document.createRange();a.setStart(e,0),a.setEnd(e,e.childNodes.length);const o=a.getBoundingClientRect().width;if(o>0){n(o);return}e.classList.add("is-selectable"),setTimeout(()=>{a.setStart(e,0),a.setEnd(e,e.childNodes.length);const l=a.getBoundingClientRect().width;e.classList.remove("is-selectable"),n(l)},500)}const gh={tag:{type:[String],required:!1,default:"span"},showOverflowTooltip:{type:[Boolean],required:!1},showArrow:{type:[Boolean],required:!1,default:!0},showAfter:{type:[Number],required:!1,default:300},hideAfter:{type:[Number],required:!1,default:0},type:{type:[String],required:!1},size:{type:[String],required:!1},truncated:{type:[Boolean,String],required:!1,default:!0},numberFormat:{type:[Boolean],required:!1,default:!1},decimalLength:{type:[Number,String],required:!1,default:-1},autoPadding:{type:[Boolean,String],required:!1,default:!1},digits:{type:[Number,String],required:!1,default:4},separator:{type:String,required:!1,default:" "},highlightFilter:{type:[String,Function],required:!1},mark:{type:[Boolean],required:!1},color:{type:[String],required:!1},icon:{type:[Object],required:!1},textPosition:{type:String,default:"right"},textColor:{type:String}};function yh(e,n,a,o=!1){return{props:{...gh},emits:["click"],setup(l,r){const s=t.ref(null),i=t.computed(()=>{const g={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(g[`${e}--${l.type??"default"}`]=!0),l.size&&(g[`${e}--${l.size}`]=!0),g}),c=t.computed(()=>{const g={},C=l.textColor??l.color;return C&&(g.color=C),g}),f=(g,C)=>{let A=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const w=l.highlightFilter;if(g.indexOf(w)!==-1){const T=g.replace(new RegExp(w,"g"),`<span>${w}</span>`);C.innerHTML=T,C.class["is-highlight"]=!0,A=t.h(l.tag,C)}}else if(typeof l.highlightFilter=="function"){const w=l.highlightFilter(g);w&&(C.innerHTML=w,C.class["is-highlight"]=!0,A=t.h(l.tag,C))}return A},p=g=>{r.emit("click",g)};let d="";const h=()=>{const g=s.value;if(!g)return;const C=g.clientWidth;hh(g,A=>{const w=g.innerHTML??"";ue(w)||A<C||(d?a?.show(g,w,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(g,w,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let y=null;const b=g=>{y||(y=setTimeout(()=>{h(),y=null},l.showAfter??0))},k=g=>{y&&(clearTimeout(y),y=null),setTimeout(()=>{S()},l.hideAfter??0)},u=()=>{const g=s.value;g&&(g.addEventListener("mouseover",b),g.addEventListener("mouseleave",k))},m=()=>{const g=s.value;g&&(g.removeEventListener("mouseover",b),g.removeEventListener("mouseleave",k))};return t.onMounted(()=>{!he(l.showOverflowTooltip)||!a||u()}),t.onBeforeUnmount(()=>{!he(l.showOverflowTooltip)||!a||m()}),()=>{const g={onClick:p,class:i.value,style:c.value,ref:s};let C=null;if(he(l.numberFormat)&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const V=T[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const E=me(l.digits),$=me(l.decimalLength),x=he(l.autoPadding);let P=`${T[0].children}`,D=P.split("").reverse().join("");D=nn(D,$,x,E,l.separator),P=D.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=f(P,g)),C||(g.innerHTML=P,C=t.h(l.tag,g))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const V=T[0].type.toString();if(V==="Symbol(Text)"||V==="Symbol(v-txt)"){const E=`${T[0].children}`;C=f(E,g),C||(g.innerHTML=E,C=t.h(l.tag,g))}}}C||(C=t.h(l.tag,g,{default:r.slots.default}))}if(!l.mark&&!l.icon&&!r.slots.mark)return C;let w=null;if(l.icon){const T={[`${e}__mark-wrap`]:!0};l.type&&(T[`${e}__mark-wrap--${l.type}`]=!0);const V={},E=l.color;E&&(V.color=E);const $={class:T,style:V};w=t.h("view",$,t.h(l.icon))}else if(r.slots.mark){const T={[`${e}__mark-wrap`]:!0};l.type&&(T[`${e}__mark-wrap--${l.type}`]=!0);const V={},E=l.color;E&&(V.color=E);const $={class:T,style:V};w=t.h("view",$,{default:r.slots.mark})}else{const T={[`${e}__mark`]:!0};l.type&&(T[`${e}__mark--${l.type??"default"}`]=!0);const V={},E=l.color;E&&(V["background-color"]=E);const $={class:T,style:V};w=t.h("view",$)}const B={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",B,[w,C])}}}}const{componentName:bh,create:kh,scope:Sh}=G("text"),kl=kh(yh(bh,Sh,bt,!1));function Ch(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const s=[],i=n[0];if(Array.isArray(e)&&!Array.isArray(i)&&!i[l]){let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a])}return s}if(Array.isArray(i))for(let c=0;c<n.length&&c<r.length;c++){let f=n[c],p=r[c];const d=f.find(h=>h[o]===p);if(!d)break;s.push(d[a])}else{let c=n;for(let f=0;c&&f<r.length;f++){let p=r[f],d=c.find(h=>h[o]===p);if(!d)break;s.push(d[a]),c=d[l]}}return s}class wh{proxy;constructor(n){this.proxy=n}async load(n,a,o){if(Array.isArray(a))return a;if(typeof a=="function")return await a(o);const l=Ze(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(De(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Nh(){const e=t.getCurrentInstance();return new wh(e.proxy)}const Bh={tag:{type:[String,Object],required:!1,default:"span"},resolveTag:{type:[Boolean],required:!1,default:!1},source:{type:[Array,Function,String],required:!1},sourceType:{type:[String],required:!1,default:"mapping"},params:{type:[Object,String],required:!1},modelValue:{type:[String,Boolean,Number,Array],required:!1},separator:{type:[String,Boolean,Number,Array],required:!1,default:"/"},optionType:{type:String,required:!1},textKey:{type:[String],required:!1,default:"text"},valueKey:{type:[String],required:!1,default:"value"},childrenKey:{type:[String],required:!1,default:"children"},emptyText:{type:[String],required:!1},emptyTag:{type:[String],required:!1,default:"span"},emptyClass:{type:[String],required:!1}};function Ah(e,n,a=!1){return{props:{...Bh},setup(o,{attrs:l,slots:r}){const s=Nh(),i=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{i.value=await s.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(i.value)||i.value.length===0)return"";let p=Ch(o.modelValue,i.value,o.textKey,o.valueKey,o.childrenKey);return p.length==0?o.emptyText??"":p.length===1?o.optionType=="item"?`${o.modelValue}${o.separator}${p[0]}`:p[0]:p.join(o.separator)}),f=o.resolveTag?t.resolveComponent(o.tag):o.tag;return()=>{const p={...l};return r.default?r.default({text:c.value,value:o.modelValue}):o.resolveTag?o.emptyText!==void 0&&o.emptyText===c.value?t.h(o.emptyTag??"span",{...l,class:o.emptyClass},c.value):t.h(f,p,{default:()=>c.value}):t.h(f,p,c.value)}}}}const{componentName:Th,create:Vh,scope:$h}=G("mapping"),Sl=Vh(Ah(Th,$h,!1));function Eh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return mr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:mA,create:Dh,scope:pA}=G("domain-provider"),Cl=Dh(Eh()),Ih={initialVisibleObserverSize:{type:[Number],required:!1},initialInvisibleObserverHeight:{type:[String],required:!1,default:"250px"},disabled:{type:[Boolean],required:!1},loadPolicy:{type:[String],required:!1,default:"rolling"},rootMargin:{type:[String],required:!1,default:"250px 0px 250px 0px"},threshold:{type:[Array],required:!1,default:[0,.25]},root:{type:[Object,String]}};function xh(e,n){return{inheritAttrs:!1,props:Ih,setup(a,{slots:o}){if(nt&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const s=(h,S)=>{if(p===null){r.set(h,{visible:null,callback:S});return}l.has(h)&&p.unobserve(h),l.set(h,{visible:null,callback:S}),p.observe(h)},i=h=>{if(p===null){r.delete(h);return}l.has(h)&&(l.delete(h),p.unobserve(h))};let c=a.initialVisibleObserverSize;Xi({acquire:()=>{const h=c>0;return c--,h},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:s,unobserve:i});let p=null;const d=(h,S,y)=>{p=new IntersectionObserver(b=>{for(let k of b){let u=!1;k.intersectionRatio>0&&(u=!0);const m=l.get(k.target);if(m)try{if(a.loadPolicy==="lazy"&&!u&&m.visible!==null)return;m.visible=u,m.callback(u)}catch(g){console.error(g)}}},{root:h,rootMargin:S,threshold:y}),r.forEach((b,k)=>{l.set(k,b),p?.observe(k)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([h,S])=>{if(S||!h||p)return;let y=null;typeof h=="string"?y=document.querySelector(h):y=h,y&&d(y,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:hA,create:qh,scope:gA}=G("rolling-provider"),wl=qh(xh()),{componentName:vh,create:Mh}=G("cell"),Ph=Mh({components:{Right:oe.Right},props:{title:{type:String,default:""},subTitle:{type:String,default:""},desc:{type:String,default:""},descTextAlign:{type:String,default:"right"},isLink:{type:Boolean,default:!1},roundRadius:{type:[String,Number],default:""},url:{type:String,default:""},center:{type:Boolean,default:!1},size:{type:String,default:""}},emits:["click"],setup(e,{emit:n}){const a=t.computed(()=>{const r=vh;return{[r]:!0,[`${r}--clickable`]:e.isLink,[`${r}--center`]:e.center,[`${r}--large`]:e.size=="large"}}),o=t.computed(()=>({borderRadius:ge(e.roundRadius)}));return{handleClick:r=>{n("click",r)},classes:a,baseStyle:o}}}),Lh={key:0,class:"fox-cell__icon"},zh={key:1,class:"fox-cell__title"},Fh={class:"title"},Rh={class:"fox-cell__title-desc"};function Oh(e,n,a,o,l,r){const s=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...i)=>e.handleClick&&e.handleClick(...i))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",Lh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",zh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Fh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Rh,t.toDisplayString(e.subTitle),1)],64)):t.renderSlot(e.$slots,"title",{key:1},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])])):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("view",{key:2,class:t.normalizeClass(["fox-cell__value",{"fox-cell__value--alone":!e.title&&!e.subTitle&&!e.$slots.title}]),style:t.normalizeStyle({"text-align":e.descTextAlign})},t.toDisplayString(e.desc),7)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"link",{},()=>[e.isLink?(t.openBlock(),t.createBlock(s,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const Nl=te(Ph,[["render",Oh]]),{componentName:Kh,create:Uh}=G("cell-group"),Hh=Uh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Kh]:!0}))}}}),jh={key:1,class:"fox-cell-group__title"},Wh={key:3,class:"fox-cell-group__desc"},Yh={class:"fox-cell-group__wrap"};function Xh(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[e.$slots.title?t.renderSlot(e.$slots,"title",{key:0}):e.title?(t.openBlock(),t.createElementBlock("view",jh,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.$slots.desc?t.renderSlot(e.$slots,"desc",{key:2}):e.desc?(t.openBlock(),t.createElementBlock("view",Wh,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",Yh,[t.renderSlot(e.$slots,"default")])],2)}const Bl=te(Hh,[["render",Xh]]),{componentName:Qh,create:Gh}=G("image"),Zh=Gh({props:{src:String,fit:{type:String,default:"fill"},position:{type:String,default:"center"},alt:{type:String,default:""},width:{type:String,default:"center"},height:{type:String,default:""},round:{type:Boolean,default:!1},radius:[String,Number],showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},lazyLoad:{type:Boolean,default:!1}},components:{Image:oe.Image,ImageError:oe.ImageError},emits:["click","load","error"],setup(e,{emit:n}){const a=t.reactive({loading:!0,isError:!1,slotLoding:t.useSlots().loading,slotError:t.useSlots().error}),o=t.computed(()=>{const S=Qh;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),s=t.ref(null),i=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(y=>{y.forEach(b=>{b.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),s.value&&l.value.observe(s.value)};t.onMounted(()=>{e.lazyLoad&&i()}),t.onBeforeUnmount(()=>{l.value&&l.value.disconnect()});const c=t.computed(()=>{let S={};return e.width&&(S.width=ge(e.width)),e.height&&(S.height=ge(e.height)),e.radius!==void 0&&e.radius!==null&&(S.overflow="hidden",S.borderRadius=ge(e.radius)),S}),f=t.computed(()=>({objectFit:e.fit,objectPosition:e.position}));t.watch(()=>e.src,S=>{a.isError=!1,a.loading=!0});const p=()=>{a.loading=!1,n("load")},d=()=>{a.isError=!0,a.loading=!1,n("error")},h=S=>{n("click",S)};return{...t.toRefs(a),imageClick:h,classes:o,styles:f,stylebox:c,error:d,load:p,show:r,imgRef:s}}}),Jh=["src","date-src","alt"],_h={key:0,class:"fox-img-loading"},eg={key:1,class:"fox-img-error"};function tg(e,n,a,o,l,r){const s=t.resolveComponent("Image"),i=t.resolveComponent("ImageError");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.stylebox),onClick:n[2]||(n[2]=(...c)=>e.imageClick&&e.imageClick(...c))},[t.createElementVNode("img",{ref:"imgRef",class:"fox-img",src:e.lazyLoad?e.show?e.src:void 0:e.src,"date-src":e.lazyLoad?e.show?void 0:e.src:void 0,alt:e.alt,onLoad:n[0]||(n[0]=(...c)=>e.load&&e.load(...c)),onError:n[1]||(n[1]=(...c)=>e.error&&e.error(...c)),style:t.normalizeStyle(e.styles)},null,44,Jh),e.loading?(t.openBlock(),t.createElementBlock("div",_h,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"image"})),t.renderSlot(e.$slots,"loading")])):t.createCommentVNode("",!0),e.isError&&!e.loading?(t.openBlock(),t.createElementBlock("div",eg,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const Al=te(Zh,[["render",tg]]),{create:ng}=G("layout"),Tl=ng({}),{componentName:og,create:lg}=G("col"),ag=lg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=og,a=t.inject("gutter"),o=t.computed(()=>({[n]:!0,[`${n}-gutter`]:a,[`fox-col-${e.span}`]:!0,[`fox-col-offset-${e.offset}`]:!0})),l=t.computed(()=>({paddingLeft:a/2+"px",paddingRight:a/2+"px"}));return{classes:o,style:l}}});function rg(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6)}const Vl=te(ag,[["render",rg]]),{componentName:sg,create:ig}=G("row"),cg=ig({props:{type:{type:String,default:""},gutter:{type:[String,Number],default:""},justify:{type:String,default:"start"},align:{type:String,default:"flex-start"},flexWrap:{type:String,default:"nowrap"}},setup(e){const n=sg;t.provide("gutter",e.gutter);const a=(l,r)=>l?r?`fox-row-${l}-${r}`:"":`fox-row-${r}`;return{classes:t.computed(()=>e.type==="flex"?`
6
6
  ${a("",e.type)}
7
7
  ${a("justify",e.justify)}
8
8
  ${a("align",e.align)}