@fox-js/foxui 4.0.1-69 → 4.0.1-70

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(B,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):(B=typeof globalThis<"u"?globalThis:B||self,t(B.FoxUI={},B.Vue,B.FoxValidator,B.FoxIconsVue,B.FoxI18n))})(this,function(B,t,ot,le,ie){"use strict";/*!
2
- * @fox-js/foxui-base v4.0.0 Fri Nov 29 2024 20:01:05 GMT+0800 (中国标准时间)
2
+ * @fox-js/foxui-base v4.0.0 Sat Nov 30 2024 09:30:04 GMT+0800 (中国标准时间)
3
3
  */const tn=window,js=typeof window<"u";function Ws(){return typeof tn<"u"?tn.requestAnimationFrame||tn.webkitRequestAnimationFrame||function(e){tn.setTimeout(e,1e3/60)}:function(e){setTimeout(e,1e3/60)}}function Ka(e){js?cancelAnimationFrame(e):clearTimeout(e)}const Qe=Ws();/*!
4
4
  * @fox-js/big-decimal v4.0.1-6 Sat Aug 24 2024 07:04:11 GMT+0800 (中国标准时间)
5
- */function nn(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]=so(Ae(e),Ae(n)),a==1&&(o==1?e=ro(e):n=ro(n));let l=Ua(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(ro(l)):Ae(l)}function ro(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let i=0;i<a;i++)e[i]>="0"&&e[i]<="9"?n+=9-parseInt(e[i]):n+=e[i];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ua(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 so(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 Ua(e,n){[e,n]=so(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 Ce=(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))(Ce||{});function It(e,n=0,a=Ce.HALF_EVEN){if(a===Ce.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],i=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)+i,c=It(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ha(l[1],r,o,a)?(o?"-":"")+io(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");i=l[1].substring(0,n);let s=l[1].substring(n);return s&&Ha(s,i,o,a)&&(i=io(i),i.length>n)?(o?"-":"")+io(r,parseInt(i[0]))+"."+i.substring(1):(o?"-":"")+r+"."+i}function Ha(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===Ce.DOWN||!a&&o===Ce.FLOOR||a&&o===Ce.CEILING)return!1;if(o===Ce.UP||a&&o===Ce.FLOOR||!a&&o===Ce.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 Ce.HALF_DOWN:return!1;case Ce.HALF_UP:return!0;case Ce.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function io(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 co(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=xt(e),n=xt(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=xt(e.replace(".","")),n=xt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let i=n.length,s=0,c=[],u=i-1,p="";for(let d=0;d<i;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let g=0;for(let S=n.length-1;S>=u&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(g+=parseInt(e[c[S]--])*parseInt(n[S]));g+=s,s=Math.floor(g/10),p=g%10+p,u--}return p=xt(Ys(p,r)),a==1&&(p="-"+p),p}function Ys(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 xt(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 uo(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 u=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(u==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>u)e=e.replace(".",""),e=Ae(e+new Array(l-u+1).join("0"));else if(l<u){e=e.replace(".","");let p=e.length-u+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==u&&(e=Ae(e.replace(".","")))}let r=0,i=n.length,s="",c=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(0,i+1):e.substring(0,i);if(e=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(i+1):e.substring(i),c.indexOf(".")>-1){let u=c.length-c.indexOf(".")-1;c=c.replace(".",""),i>c.length&&(u+=i-c.length,c=c+new Array(i-c.length+1).join("0")),r=u,s="0."+new Array(u).join("0")}for(a=a+2;r<=a;){let u=0;for(;parseInt(c)>=parseInt(n);)c=nn(c,"-"+n),u++;s+=u,e?(e[0]=="."&&(s+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(s+="."),r++,c=c+"0")}return(o==1?"-":"")+Ae(It(s,a-2))}function fo(e,n){return e=e.toString(),n=n.toString(),n=mo(n),nn(e,n)}function mo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function ja(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Wa(e),Wa(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=fo(e,co(n,It(uo(e,n),0,Ce.FLOOR)));return a+o}function Wa(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ya(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]=so(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=Ce;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 i="",s=r;s>0;)s<a?(a=s,s=0):s-=a,i=n.substring(s,s+a)+(s<r-a&&s>=0?o:"")+i;return(l?"-":"")+i+n.substring(r)}getPrettyValue(n,a){return ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=Ce.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return It(n,a,o)}round(n=0,a=Ce.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(It(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,Ce.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,Ce.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,Ce.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,Ce.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),nn(n,a)}add(n){return new ce(nn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),fo(n,a)}subtract(n){return new ce(fo(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),co(n,a)}multiply(n){return new ce(co(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),uo(n,a,o)}divide(n,a){return new ce(uo(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),ja(n,a)}modulus(n){return new ce(ja(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ya(n,a)}compareTo(n){return Ya(this.value,n.getValue())}static negate(n){return n=ce.validate(n),mo(n)}negate(){return new ce(mo(this.value))}}function Xa(e,n){return ce.multiply(`${e}`,`${n}`)}function po(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function ho(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function Qa(e){return ce.negate(e)}function on(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let i=r.charAt(0);i=="-"?r=r.substring(1):i="";let s=r,c="",u=r.indexOf(".");u!=-1&&(s=r.substring(0,u),c=r.substring(u+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="",g=s.split("").reverse();for(let S=0;S<g.length;S++)d+=g[S]+((S+1)%o==0&&S+1!=g.length?l:"");c.length==0?p=`${i}${d.split("").reverse().join("")}`:p=`${i}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${i}${s}`:p=`${i}${s}.${c}`;return p}function Ga(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const Ge=typeof window<"u",Ue=Qe;function Za(e){return e==null}const ln=Array.isArray,Xs=e=>rn(e)==="[object Map]",Qs=e=>rn(e)==="[object Set]",He=e=>e instanceof Date,an=e=>typeof e=="function",Ja=e=>typeof e=="string",Gs=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",mt=e=>Ie(e)&&an(e.then)&&an(e.catch),_a=Object.prototype.toString,rn=e=>_a.call(e),go=e=>rn(e)==="[object Object]",er=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Zs(e){return e.__esModule||er&&e[Symbol.toStringTag]==="Module"}const Js=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function lt(...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 i in r){let s=n[i],c=r[i];if(s!==c)if(l===!0&&c&&typeof c=="object"){let u;Array.isArray(c)?u=s&&Array.isArray(s)?s:[]:u=s&&typeof s=="object"?s:{},n[i]=lt(l,u,c)}else c!==void 0&&(n[i]=c)}}return n}function yo(e,n,a=!1){if(!a)lt(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!go(i))continue;r=yo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!go(i))continue;r=yo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}}return e}const bo=Js?Promise.resolve():null;function _s(e,...n){bo!==null?n&&n.length>0?bo.then(()=>{e(n)}):bo.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function be(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function pe(e){return typeof e=="number"?e:Number(e)}const ei={"[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 at(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ei[a]||"object"}function sn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function tr(e){return e&&typeof e=="object"&&"setInterval"in e}function nr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||tr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function or(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 ti(e,n=[]){let a=n;return e!=null&&(nr(Object(e))?or(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=at(e),o=at(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 i=0;i<l.length;i++){let s=l[i],c=e[s],u=n[s];if(!Me(c,u))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],i=n[l];if(!Me(r,i))return!1}return!0}return!1}function lr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function ar(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 rr(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 sr(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 ir(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 ko(e,n=!0,a=!0){n?e=ir(e,".",/\./g):e=e.replace(/\./g,""),a?e=ir(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ni(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function oi(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 rt(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 cr=(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 So(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const st=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},je=(e,n,a)=>Math.min(Math.max(e,n),a),we=Symbol.for("BroadcastKey");class Co{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="*"):lr(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 i=this.callbacks.get(a);if(typeof i=="function"){const c=Reflect.apply(i,this.proxy,[...o]);c!=null&&r.push(c)}const s=this.proxy??{};if(typeof s[a]=="function"){const c=Reflect.apply(s[a],s,[...o]);c!=null&&r.push(c)}}return this.children.forEach(i=>{const s=Reflect.apply(i.emit,i,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,r,[...s])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const i=Reflect.apply(r.emit,r,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,l,[...i])}),l}on(n,a){this.callbacks.set(n,a)}}function cn(e,n,a,o){const l=new Co(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function li(e,n,a){const o=a;if(o[we])return o[we];const l=t.inject(we,null),r=new Co(l,a,e);if(n&&typeof n=="object")for(const i in n)r.on(i,n[i]);return o[we]=r,t.provide(we,r),t.onUnmounted(()=>{r.destroy(),o[we]=void 0}),r}function vt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[we]??t.inject(we,null):t.inject(we,null)}const it=e=>e.default??e;class ai{error(n,a){const o=a,l=a||t.hasInjectionContext()?vt(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()?vt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?vt(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()?vt(o):null,i=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),s=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!i&&s?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):i&&!s&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let qt=new ai;function ri(e){qt=e}function si(e){qt?Object.assign(qt,e):qt=e}function ii(e,n){it(ot).setValidator(e,n)}function ci(e){it(ot).deleteValidator(e)}let dr=["blur","clear"];function di(e){dr=e}function ur(){return dr}let fr=["focus","change","setValue"];function ui(e){fr=e}function mr(){return fr}function fi(e){it(ot).messages(e)}function Pt(...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 dn(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 Le=Symbol("ValidateSchemaKey");class pr{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=dn(Pt(this.attrRules,this.rules)),o=[];for(let r in n){let i=n[r];if(this.hasValidator(r,!0)){if(i===!1)continue;let c={type:r};i!==null&&typeof i=="object"&&Object.assign(c,i),o.push(c);continue}let s=this.getValidator(r);if(s!==null){let c={type:r,validator:s};o.push(c)}}this.attrRules=dn(o);const l=Pt(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=qt;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?it(ot).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?it(ot).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return it(ot).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=Pt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=dn(n):this.rules=dn([n]);const o=Pt(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=Pt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),i={[`${o}`]:r},s=it(ot),c=new s(l),u=this.proxy??i;return c.validate(i,{context:u}).then(d=>{if(d.pass)this.success();else{let g="error";Array.isArray(d.errors)&&d.errors.length>0&&(g=d.errors[0].message??g,d.errors=[d.errors[0]],d.errors[0].ref=u),this.error(g)}return d}).catch(d=>{const g=d.message??`${d}`;return this.error(g),d})}}return Promise.resolve({pass:!0})}}function un(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 pr(n,a,e)}const fn=Symbol.for("EventEmitterKey");class hr{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 Ze(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function mn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function mi(e,n){const a=Ze((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function pi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function wo(e,n,a,o=0,l=!0){let r=n,i=0;if(l){const c=e();if(i++,c||i>a)return}const s=()=>{const c=e();i++,!(c||i>a)&&(r+=o,setTimeout(s,r))};setTimeout(s,r)}const xe=Symbol("DomainKey"),pt=Symbol("DataItemsKey");class pn{_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 hi=new pn;function ht(){return hi}function We(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[xe]??t.inject(xe,null):t.inject(xe,null)}const No=Symbol("OriginalDateKey");function Bo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,i=t.inject(xe,null);i===null&&(i=ht());const s=e||n.prop||n.name;let c=new pn(s);c.parent=i;const u=y=>{r[No]||g(y),c?.set("modelValue",y)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[No]??null,g=y=>{const k={};lt(!0,k,t.toRaw(y)),r[No]=k};t.isReactive(n)||typeof n=="function"?t.watch(n,y=>{c?.merge(y,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&g(n.modelValue);const S=(y,k)=>{c?.set(y,k)},b=y=>c?.getForSelf(y)??null;if(r[xe]=c,t.provide(xe,c),l!==null){const y=t.inject(we,null),k=cn(r,y,s,o);c.broadcast=k,r[we]=k,t.provide(we,k),r.broadcast=(h,C,...A)=>Reflect.apply(k.emit,k,[h,C,...A]);const f=t.inject(Le,null),m=un(r,f,{componentName:""});c.validateSchema=m,r[Le]=m,t.provide(Le,m),r[pt]=new Map,r.validate=(h=!0)=>{const C=[];let A=null;const w={deep:!1};if(h===!0)A={name:"*"};else if(Array.isArray(h)&&h.length>0){const N=h;A={name:T=>T?N.indexOf(T)!==-1:!1}}else if(h!=null&&typeof h=="object"){const N=h;if(Object.assign(w,N),Array.isArray(N.include)&&N.include.length>0){const T=N.include;A={name:$=>$?T.indexOf($)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const T=N.exclude;A={name:$=>$?T.indexOf($)===-1:!1}}else A={name:"*"}}if(A){const N=k?.emitToChildren(A,"validate",w);N&&Reflect.apply([].push,C,N)}return C.length==1?C[0]:C.length>1?Promise.all(C).then(N=>{let T=[];return N.forEach($=>{$.pass===!1&&Array.isArray($.errors)&&(T=[...T,...$.errors])}),T.length>0?{pass:!1,errors:T}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(h,C=!0,A=!1)=>{if(A===!0){Reflect.ownKeys(h).forEach(N=>{let T=String(N);const $={componentName:"",fieldName:T,pureDataValidate:!0};if(c){const E=br(c,T,$,k,m);r[pt].set(T,E);const D=h[T];D&&E.validateSchema.setRule(D)}});return}if(C){const w=Reflect.ownKeys(h),N={name:T=>w.includes(T)};k?.emitToChildren(N,"setNameValidateRules",h,!1)}},r.clearValidate=(h=!0)=>{let C=null;if(h===!0)C={name:"*"};else if(Array.isArray(h)&&h.length>0){const A=h;C={name:w=>w?A.indexOf(w)!==-1:!1}}else if(h!=null&&typeof h=="object"){const A=h;if(Array.isArray(A.include)&&A.include.length>0){const w=A.include;C={name:N=>N?w.indexOf(N)!==-1:!1}}else if(Array.isArray(A.exclude)&&A.exclude.length>0){const w=A.exclude;C={name:N=>N?w.indexOf(N)===-1:!1}}else C={name:"*"}}C&&k?.emitToChildren(C,"clearValidate",!1)},r.resetFields=h=>{const C=p();if(!C)return;const A={};if(lt(!0,A,d()??{}),Array.isArray(h))h.forEach(w=>{C[w]=A[w]});else if(h&&Array.isArray(h.include))(h.include??[]).forEach(N=>{C[N]=A[N]});else if(h&&Array.isArray(h.exclude)){let w=h.exclude??[];Reflect.ownKeys(A).forEach(N=>{w.includes(N)||(C[N]=A[N])})}else Object.assign(C,A);r.clearValidate(h)},r.setModelValue=(h,C)=>{!C||C===s?u(h):k?.emitToChildren({name:C},"setModelValue",h)},r.getModelValue=()=>p(),r.setDomainProperty=(h,C)=>{S(h,C)},r.getDomainProperty=h=>b(h)}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Le]=void 0,t.provide(Le,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[we]=void 0,t.provide(we,null)),c?.destroy(),r[xe]=void 0,t.provide(xe,null),r[pt]&&(r[pt].clear(),r[pt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,r.setDomainProperty=null,r.getDomainProperty=null,c=null,r=null}),c}function gr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(xe,null);r===null&&(r=ht());const i=e||n.prop||n.name;let s=new pn(i);return s.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{s?.merge(c,a)},{immediate:!0}):s.merge(n,a),l[xe]=s,t.provide(xe,s),t.onUnmounted(()=>{s?.destroy(),l[xe]=void 0,t.provide(xe,null),s=null,l=null}),s}function yr(e,n,a){const l=We(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??"",i=t.inject(we,null);let s=cn(l,i,r,a);l[we]=s,t.provide(we,s),l.broadcast=(b,y,...k)=>s?Reflect.apply(s.emit,s,[b,y,...k]):null;const c=t.inject(Le,null);e.fieldName=e.fieldName??r;let u=un(l,c,e);l[Le]=u,t.provide(Le,u),yr(l,u,r),l.validate=(b=null)=>{if(!u)return Promise.resolve({pass:!0});const y=[];let k=!1,f=!1;if(Array.isArray(b)&&b.indexOf(r)!==-1)f=!0,k=!0;else if(b&&typeof b=="object"){const m=b,h=m.ignoreDisabled??!0,C=m.ignoreReadonly??!0,A=m.ignoreHidden??!0;h===!0&&e.disabled===!0||C===!0&&e.readonly===!0||A===!0&&sn(l.$el)?f=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),f=!0),k=m.deep??!1}else typeof b=="boolean"&&(k=b),f=!0;if(f){const m=u?.validate();y.push(m)}if(k){let m=null;const h={deep:!1};if(b===!0)m={name:"*"};else if(Array.isArray(b)&&b.length>0){const C=b;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(b!=null&&typeof b=="object"){const C=b;if(Object.assign(h,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&&s){const C=s.emitToChildren(m,"validate",h);Reflect.apply([].push,y,C)}}return y.length==1?y[0]:y.length>1?Promise.all(y).then(m=>{let h=[];return m.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(h=[...h,...C.errors])}),h.length>0?{pass:!1,errors:h}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=b=>u?.setRule(b),l.setNameValidateRules=(b,y=!1)=>{const k=b[r];if(k&&u?.setRule(k),y&&s){const f={name:m=>Reflect.ownKeys(b).includes(m)};s.emitToChildren(f,"setNameValidateRules",b,!1)}},l.clearValidate=(b=null)=>{(!Array.isArray(b)||b.indexOf(n??"")!==-1)&&u?.clear();let y=null;if(b===!0)y={name:"*"};else if(Array.isArray(b)&&b.length>0){const k=b;y={name:f=>f?k.indexOf(f)!==-1:!1}}else if(b!=null&&typeof b=="object"){const k=b;if(Array.isArray(k.include)&&k.include.length>0){const f=k.include;y={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const f=k.exclude;y={name:m=>m?f.indexOf(m)===-1:!1}}else y={name:"*"}}y&&s&&s.emitToChildren(y,"clearValidate",!1)};let p=new hr(l);l[fn]=p;const d=Ze((b="validate")=>{u&&(b==="reset"?u.clear():u.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:ur()).forEach(b=>{p&&p.on(b,y=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:mr()).forEach(b=>{p&&p.on(b,y=>{d("reset")})}),t.onUnmounted(()=>{s?.destroy(),l[we]=void 0,t.provide(we,null),s=null,u?.destroy(),l[Le]=void 0,t.provide(Le,null),u=null,p?.destroy(),l[fn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:s,validateSchema:u,emitEvent:(b,...y)=>{p&&Reflect.apply(p.emit,p,[b,...y])},onEvent:(b,y)=>{p&&Reflect.apply(p.on,p,[y])},offEvent:(b,y)=>{p&&Reflect.apply(p.off,p,[y])}}}function br(e,n,a,o,l){const r={},i=n??"",s={getValue(){const p=e.getForSelf("modelValue");return p?p[i]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,i):!1}};a.fieldName=i,a.validateHandler={getValue(p){return s.getValue()}};let c=un({},l,a);r.validate=(p=null)=>{if(!s.isExist())return console.warn(`validate error: field [${i}] not exist`),Promise.resolve({pass:!0});const d=[];let g=!1,S=!1;if(Array.isArray(p)&&p.indexOf(i)!==-1)S=!0,g=!0;else if(p&&typeof p=="object"){const b=p;Array.isArray(b.include)&&b.include.indexOf(i)!==-1||Array.isArray(b.exclude)&&b.exclude.indexOf(i),S=!0,g=b.deep??!1}else typeof p=="boolean"&&(g=p),S=!0;if(S&&c){const b=c.validate();d.push(b)}if(g){let b=null;const y={deep:!1};if(p===!0)b={name:"*"};else if(Array.isArray(p)&&p.length>0){const k=p;b={name:f=>f?k.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const k=p;if(Object.assign(y,k),Array.isArray(k.include)&&k.include.length>0){const f=k.include;b={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const f=k.exclude;b={name:m=>m?f.indexOf(m)===-1:!1}}else b={name:"*"}}if(b&&u){const k=u.emitToChildren(b,"validate",y);Reflect.apply([].push,d,k)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(b=>{let y=[];return b.forEach(k=>{k.pass===!1&&Array.isArray(k.errors)&&(y=[...y,...k.errors])}),y.length>0?{pass:!1,errors:y}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[i];d&&c?.setRule(d)};let u=cn(null,o,i,r);return t.onUnmounted(()=>{c=null,u=null}),{broadcast:u,validateSchema:c}}function gt(){let n=t.getCurrentInstance()?.proxy,a=new hr(n);return n[fn]=a,t.onUnmounted(()=>{a?.destroy(),n[fn]=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?`${fe(e)}px`:"";function fe(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(Ge){const{fontSize:i}=window.getComputedStyle(document.documentElement,null),s=i.indexOf("px");s>0&&(r=Number(i.substring(0,s)))}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 Je="PageStateKey";function Oe(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=fe(e.top)),e.left!==null&&e.left!==void 0&&(n.left=fe(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=fe(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=fe(e.right))),n}function Ao(e,n,a={},o=!0,l=-1,r=-1,i=0,s=0){if(e.headerHeight=fe(a.headerHeight??n.headerHeight??-1),e.headerPadding=Oe(a.headerPadding??n.headerPadding),e.footerHeight=fe(a.footerHeight??n.footerHeight??-1),e.footerPadding=Oe(a.footerPadding??n.footerPadding),e.contentPadding=Oe(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=fe(c,r):e.height=fe(r)-fe(i,r)-fe(s,r),e.width=fe(a.width??n.width??0,l)}}function kr(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=fe(l.top),o.safeAreaBottom=fe(l.bottom),o.safeAreaLeft=fe(l.left),o.safeAreaRight=fe(l.right));const r=e.get("pageLayout");if(!r)return null;const i=e.get("rootWidth")??-1,s=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,u=e.get("footerBarHeight")??0;Ao(o,r,n,!0,i,s,c,u);const p=t.reactive(o),d=e.getForParent(Je);d&&(o.height=bn(e,d),o.width=kn(e,d),t.watch([()=>bn(e,d),()=>kn(e,d)],([S,b])=>{p.height=S,p.width=b}));const g=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,b,y=-1,k=-1,f=0,m=0])=>{Ao(p,b,n,g,y,k,f,m)}),e.set(Je,p),p}function hn(e){return e.get(Je)}function gn(e,n){if(n=n??e.get(Je),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Je),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function bn(e,n){if(n=n??e.get(Je),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=gn(e,n),o=yn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function kn(e,n){return n=n??e.get(Je),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function gi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function yi(e){return!!e.getForParent(Je)}var Sn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(Sn||{});function Cn(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=We();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let s=r.length-1;s>=0;s--){const c=r[s];if(Cn(c,o))return c}const i=e.value;return Cn(i,o)?i:null}):t.computed(()=>{const r=e.value;if(Cn(r,o))return r;const i=l.getAll(n);for(let s=0;s<i.length;s++){const c=i[s];if(Cn(c,o))return c}return null})}function Ee(e){return Ve(e,"readonly",1)}function De(e){return Ve(e,"disabled",1)}function Pe(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const i=t.ref(r);return t.watch(l,s=>{if(typeof a=="function"){const c=a(s);c!==i.value&&(i.value=c,o&&o("setValue",c))}else s!==i.value&&(i.value=s,o&&o("setValue",s))}),i}const Sr=new Map,wn=new Map;let To=null;function bi(e){To=e}function Cr(e,n,a){if(a){let o=wn.get(a);o||(o=new Map,wn.set(a,o)),o.set(e,n)}else Sr.set(e,n)}function _e(e,n,a){!a&&To&&(a=To(e)??void 0);let o=null;if(a){let l=wn.get(a);l&&(o=l.get(n))}return o||(o=Sr.get(n)),o}function ki(e,n){for(let a in e){const o=e[a];Cr(a,o,n)}}function Si(e){wn.delete(e)}function Ci(){return{top:0,left:0,bottom:0,right:0}}function wi(){if(Ge){const e=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight;return{rootWidth:e,rootHeight:n,pageLayout:{}}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{headerHeight:-1,footerHeight:-1}}}function Ni(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Bi{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 i=Ni(r.name,a);n.component(i,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=ht();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=mn(()=>{const s={...a},c=document.documentElement.clientWidth||document.body.clientWidth,u=document.documentElement.clientHeight||document.body.clientHeight;s.width=c,s.height=u,this.initPageLayout(s,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=lt({},Ci(),n.safeAreaInset),i=wi(),s=lt({},i.pageLayout,n.pageLayout);a=a??ht(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",s),a.set("rootWidth",i.rootWidth),a.set("rootHeight",i.rootHeight)}setScopeGetter(n){bi(n)}setAPI(n,a,o){Cr(n,a,o)}getAPI(n,a,o){return _e(n,a,o)}batchSetAPI(n,a){ki(n,a)}clearScopeAPI(n){Si(n)}getRootDomain(){return ht()}}function _(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 Ai=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Ja(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",i=e.id||new Date().getTime();l.id=r+i;let s={};an(n.wrapper)?s=n.wrapper(a,l):s=n.wrapper;const c=t.createApp(s,e),u=n.components;return u&&u.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},wr=(e,n)=>e?t.h(e,n):"";function ve(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const he={disabled:{type:[Boolean,String],required:!1,default:()=>null},readonly:{type:[Boolean,String],required:!1,default:()=>null},labelPosition:{type:String,required:!1,default:()=>null},labelWidth:{type:[String,Number],required:!1,default:()=>null},textAlign:{type:[String],required:!1,default:()=>null},hasBorder:{type:Boolean,required:!1,default:()=>!0}},ye={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}},Nr={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}},Br={name:{type:String,required:!1},prop:{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}},Ar=[];for(const e in Br)Ar.push(e);const Ti=Symbol.for("InnerPageScopeKey"),$i={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:{...he,...Nr,...$i},setup(a,{slots:o}){const l=Bo(a.name,a),r=t.inject(Ti,!1);if(l){const p=kr(l,a);ve({getPageContentHeight:()=>bn(l,p),getPageContentWidth:()=>kn(l,p),getPageHeaderHeight:()=>gn(l,p),getPageFooterHeight:()=>yn(l,p)}),p&&r&&(p.contentHeight="100%")}const i=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),c=t.getCurrentInstance(),u=(p,d=!1)=>{const g=c?.proxy;g&&typeof g.setNameValidateRules=="function"&&g.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[g,S])=>{if(p&&g){const b=t.toRaw(g),y=t.toRaw(p),k=y?Reflect.ownKeys(y):[];(b?Reflect.ownKeys(b):[]).forEach(m=>{k.includes(m)||(y[m]=[])}),u(y)}if(d&&S){const b=t.toRaw(S),y=t.toRaw(d),k=y?Reflect.ownKeys(y):[];(b?Reflect.ownKeys(b):[]).forEach(m=>{k.includes(m)||(y[m]=[])}),u(y,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);u(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);u(p,!0)}}),()=>{const p={class:i.value,style:s.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ei,create:Di,scope:m2}=_("page"),$o=Di(Vi(Ei));function Vo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Nn(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")),i=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-i}}const Ii=Symbol.for("InnerPageScopeKey"),Tr={headerbar:{},radio:{},checkbox:{}};function xi(e){Object.assign(Tr,e)}function Bn(){return Tr}const vi=(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 i=We(),s=i?hn(i):null,c=t.inject(Ii,!1),u=Bn(),p=e,d=t.computed(()=>{const P={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(P[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),P}),g=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),S=l.height!==null&&l.height!==void 0?fe(l.height):null,b=t.computed(()=>{const P={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(i&&s){const K=Oe(l.padding??s.headerPadding);return Object.assign(P,K),S&&(s.headerHeight=S),s.headerHeight>0&&(P.height=s.headerHeight),P.safeAreaTop=s.safeAreaTop===-1?0:s.safeAreaTop,P.safeAreaTop>0&&(P.top=P.safeAreaTop+(K.top??0),P.height&&P.height>0&&(P.height=P.height+P.safeAreaTop)),P}if(S&&(P.height=S),l.padding){const K=Oe(l.padding);Object.assign(P,K)}return P}),y=t.ref(null),k=()=>{if(s&&y.value&&!sn(y.value)){if(!o){const P=Vo(y.value);s.headerAllHeight=P.height}return s.headerMounted=!0,!0}return!1};let f=null;t.onMounted(()=>{s&&(wo(k,50,5,50,!0),window.ResizeObserver&&y.value&&(f=new window.ResizeObserver(()=>{k()}),f.observe(y.value)))}),t.onUnmounted(()=>{s&&(s.headerMounted=!1,f&&(f.disconnect(),f=null))});const m=t.computed(()=>{const P={};return b.value.height!==null&&b.value.height!==void 0&&(P.height=`${b.value.height}px`),b.value.top!==null&&b.value.top!==void 0&&(P.paddingTop=`${b.value.top}px`),b.value.left!==null&&b.value.left!==void 0&&(P.paddingLeft=`${b.value.left}px`),b.value.right!==null&&b.value.right!==void 0&&(P.paddingRight=`${b.value.right}px`),b.value.bottom!==null&&b.value.bottom!==void 0&&(P.paddingBottom=`${b.value.bottom}px`),P}),h=t.computed(()=>!(b.value.height!==null&&b.value.height!==void 0&&b.value.height<=0));function C(){r.emit("back")}function A(){r.emit("click-title")}function w(){r.emit("click-right")}function N(){r.emit("click-right-text")}const T=()=>{if(!l.leftShow)return null;const P=[];if(r.slots.left)P.push(r.slots.left());else{if(r.slots.leftIcon){const K=t.h("view",{class:"left-icon",onClick:C},[r.slots.leftIcon()]);P.push(K)}else{const K=l.leftIcon??u.headerbar.Left??a,V=t.h("view",{class:"left-icon",onClick:C},[t.h(K)]);P.push(V)}if(l.leftText){const K=t.h("view",{class:"left-text",onClick:C},[l.leftText]);P.push(K)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__left"},P)},$=()=>{if(!l.rightShow)return null;const P=[];if(r.slots.right)P.push(r.slots.right());else{if(l.rightText){const K=t.h("view",{class:"right-text",onClick:N},[l.rightText]);P.push(K)}if(r.slots.rightIcon){const K=t.h("view",{class:"right-icon",onClick:w},[r.slots.rightIcon()]);P.push(K)}else if(l.rightIcon){const K=t.h("view",{class:"right-icon",onClick:w},[t.h(l.rightIcon)]);P.push(K)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__right"},P)},E=()=>{if(!l.titleShow)return null;const P=[],K=r.slots.default?r.slots.default():null;if(K)P.push(K);else{if(l.title){const V=t.h("view",{class:"title-text"},[l.title]);P.push(V)}if(r.slots.titleIcon){const V=t.h("view",{class:"title-icon",onClick:A},[r.slots.titleIcon()]);P.push(V)}else if(l.titleIcon){const V=t.h("view",{class:"title-icon",onClick:A},[t.h(l.titleIcon)]);P.push(V)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__title"},P)},D=()=>{const P=[],K=r.slots.bottom?r.slots.bottom():null;return K&&P.push(K),P.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},P)};return()=>{if(!h.value)return null;const P=[];if(r.slots.all)P.push(r.slots.all());else{const V=[],I=T();I&&V.push(I);const L=E();L&&V.push(L);const x=$();if(x&&V.push(x),V.length>0){const j=t.h("view",{class:g.value},V);P.push(j)}const W=D();W&&P.push(W)}if(P.length===0)return null;const K={class:d.value,style:m.value,ref:y};return t.h("view",K,P)}}}),{componentName:qi,create:Pi,scope:Mi}=_("header-bar"),Eo=Pi(vi(qi,Mi,le.Left,!1)),Li=Symbol.for("InnerPageScopeKey");function zi(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=We(),i=r?hn(r):null,s=t.inject(Li,!1),c=e,u=t.computed(()=>{const k={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return s||(k[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),k}),p=o.height!==null&&o.height!==void 0?fe(o.height):null,d=t.computed(()=>{const k={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&i){const f=Oe(o.padding??i.footerPadding);return Object.assign(k,f),p&&(i.footerHeight=p),i.footerHeight>0&&(k.height=i.footerHeight),k.safeAreaBottom=i.safeAreaBottom===-1?0:i.safeAreaBottom,k.safeAreaBottom>0&&(k.bottom=k.safeAreaBottom+(f.bottom??0),k.height&&k.height>0&&(k.height=k.height+k.safeAreaBottom)),k}if(p&&(k.height=p),o.padding){const f=Oe(o.padding);Object.assign(k,f)}return k}),g=t.ref(null),S=()=>{if(i&&g.value&&!sn(g.value)){if(!a){const k=Vo(g.value);i.footerAllHeight=k.height}return i.footerMounted=!0,!0}return!1};let b=null;t.onMounted(()=>{i&&(wo(S,50,5,50,!0),window.ResizeObserver&&(b=new window.ResizeObserver(()=>{S()}),b.observe(g.value)))}),t.onUnmounted(()=>{i&&(i.footerMounted=!1,b&&(b.disconnect(),b=null))});const y=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():[],f={ref:g,class:u.value,style:y.value};return t.h("view",f,k)}}}}const{componentName:Oi,create:Fi,scope:Ri}=_("footer-bar"),Do=Fi(zi(Oi,Ri,!1));function Ki(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=We(),l=t.computed(()=>({[e]:!0})),r=o?hn(o):null,i=t.computed(()=>{const u={};if(o&&r){if(a.padding){const f=Oe(a.padding);Object.assign(r.contentPadding,f)}const p=gn(o,r),d=yn(o,r);let g="";r.contentHeight?g=`${r.contentHeight}`:g=`${r.height}px`,console.debug("[content]page height:",g),console.debug("[content]header height:",p),console.debug("[content]footer height:",d),console.debug("[content]padding:",r.contentPadding),u.height=g;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,u.paddingTop=`${p+S}px`);let b=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(b>=0||d>0)&&(b=b<0?0:b,u.paddingBottom=`${d+b}px`);const y=(r&&r.contentPadding&&r.contentPadding.left)??-1;y>=0&&(u.paddingLeft=`${y}px`);const k=(r&&r.contentPadding&&r.contentPadding.right)??-1;return k>=0&&(u.paddingRight=`${k}px`),u}if(a.padding){const p=Oe(a.padding);p.left&&(u.paddingLeft=`${p.left}px`),p.top&&(u.paddingTop=`${p.top}px`),p.right&&(u.paddingRight=`${p.right}px`),p.bottom&&(u.paddingBottom=`${p.bottom}px`)}return u}),s=t.ref(null),c=Ze(()=>{if(r&&s.value){const u=Nn(s.value);r.contentInnerHeight=u.height,r.contentInnerWidth=u.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>i.value,()=>l.value],([])=>{c()}),{contentRef:s,classes:l,styles:i}}}}const{componentName:Ui,create:Hi,scope:p2}=_("content"),ji=Hi(Ki(Ui));function Wi(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 oe=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Io=oe(ji,[["render",Wi]]),yt="GroupStateKey",$r=Symbol.for("GroupScopeKey");function An(){return t.inject($r,!1)}function Tn(e=!0){t.provide($r,e)}function Yi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Za(l)||(e[o]=l)})}function Xi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Yi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(yt,r),r}function xo(e,n,a=-1,o=-1,l=!1,r,i,s){const c=e.get(yt);if(!c)return;const u=e.get("groupLayout")??{};a===-1&&(a=u.column??1),o===-1&&(o=u.gutter??0),r||(r=u.minItemWidth??-1),i||(i=u.maxItemWidth??-1);const p=fe(r),d=fe(i);s||(s=u.type??"grid");const g=()=>{const S=n===""||n===-1,b=fe(n);let y=pe(a);const k=fe(o);if(!S){let h=(b-(y-1)*k)/y;for(;d!==-1&&h>d;)y++,h=(b-(y-1)*k)/y;for(;p!==-1&&y>1&&h<p;)y--,h=(b-(y-1)*k)/y}let f=!1;const m=c.layout;m.value.width=n,m.value.column!==y&&(m.value.column=y,f=!0),m.value.gutter!==k&&(m.value.gutter=k,f=!0),m.value.type!==s&&(m.value.type=s,f=!0),f&&t.triggerRef(m)};if(l)g();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&g()},50)}}function $n(e,n=!1){let a;return n?a=e.getForParent(yt):a=e.get(yt),a.layout}function Vn(e,n=!1){let a;return n?a=e.getForParent(yt):a=e.get(yt),a.order}function Vr(e,n=1){if(n==="stretch")return-1;const a=pe(n);return a===-1?100:100*a/e}function En(e,n,a=1,o=0,l){const r={};let i=0;l?i=fe(l):i=Vr(n.column,a),i>0&&(r.width=`${i}%`);const s=Vr(n.column,o);s>0&&(r["margin-left"]=`${s}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function Dn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,u=c+(n.column-c);return e.index=e.index+(u-c),{"grid-column":`${c+1} / -1`}}let l=pe(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=pe(o)%n.column;let i=(e.index+r)%n.column,s=i+l;return s>n.column?(i=0,s=i+l,e.index=e.index+(n.column-i)+l):e.index=e.index+r+l,r>0?{"grid-column":`${i+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const Er=Symbol("RollingStateKey");function Qi(e){t.provide(Er,e)}function Gi(){return t.inject(Er,null)}function vo(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 Zi(e){let n=vo(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=vo(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Ji(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const _i={...he,...Nr,...Br};function ec(e,n,a){return{props:_i,emits:["update:collapse","header-click"],setup(o,l){const r=Bo(o.prop??o.name,o,Ar),i=Xi(r,{type:o.type}),s=An();Tn(!0);const c=o.rollingDisplay?Gi():null,u=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>s&&r?$n(r,!0).value:null),g=t.getCurrentInstance(),S=(R,X=!1)=>{const Q=g?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(R,!0,X)};t.watch([()=>o.rules,()=>o.pureDataRules],([R,X],[Q,U])=>{if(R&&Q){const J=t.toRaw(Q),te=t.toRaw(R),ae=te?Reflect.ownKeys(te):[];(J?Reflect.ownKeys(J):[]).forEach(de=>{ae.includes(de)||(te[de]=[])}),S(te)}if(X&&U){const J=t.toRaw(U),te=t.toRaw(X),ae=te?Reflect.ownKeys(te):[];(J?Reflect.ownKeys(J):[]).forEach(de=>{ae.includes(de)||(te[de]=[])}),S(te,!0)}},{deep:!0});const b=e,y=t.computed(()=>{const R={};if(R.height=I.value,o.width)o.width!=="auto"&&(R.width=ge(o.width));else{const X=s?Vn(r,!0):null;if(d.value&&X){if(d.value.type==="grid"){const Q=Dn(X,d.value,o.span,o.offset);Object.assign(R,Q)}else if(d.value.type==="flow"){const Q=En(X,d.value,o.span,o.offset,o.width);Object.assign(R,Q)}}}return R}),k=t.computed(()=>{const R=i.layout.value.type;return R==="grid"||R==="flow"?{[`${b}--${R}`]:!0,[`${b}--${R}-justify-${o.justify}`]:!0,[`${b}--${R}-align-${o.align}`]:!0,[`${b}--gutter`]:!0}:{[`${b}--${R}`]:!0,[`${b}--gutter`]:!0}}),f=t.computed(()=>{if(i.layout.value.type==="grid"){let X="";if(o.columnWidth)X=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Ji(T.value,i.layout.value.column,i.layout.value.gutter);X=`repeat(${i.layout.value.column}, ${Q})`}return{"column-gap":`${i.layout.value.gutter}px`,"grid-template-columns":X}}}),m=t.toRef(o,"gutter"),h=t.toRef(o,"column"),C=t.computed(()=>s||p.value?!0:be(o.isWrap)),A=[],w=R=>{A.push(R)},N=()=>{let R=A.length;A.splice(0,R)},T=t.ref(-1),$=R=>{const X=Nn(R).width;X>0&&X!==T.value&&(T.value=X)};xo(r,T.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([T,h,m],([R,X,Q])=>{i.order.index=0,xo(r,R,X,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>L.value?o.expandText??"":o.collapseText??""),D=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),P=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!L.value,"is-collapse":L.value})),K=t.ref(),V=t.ref(),I=t.computed(()=>x.value||ge(o.height)||""),L=t.ref(!1),x=t.ref(""),W=t.ref(!1);let j=-1;const O=(R,X=!0)=>{const Q=K.value;if(Q&&L.value!==R){if(j=j<=0?Zi(Q):j,W.value=!0,X)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",R||(x.value="",W.value=!1)},R){let U=0;o.collapseHeight?U=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(U=V.value.offsetHeight),x.value=`${j}px`,t.nextTick(()=>{x.value=`${U}px`})}else x.value=`${j}px`;else if(R){let U=0;o.collapseHeight?U=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(U=V.value.offsetHeight),x.value=`${U}px`}else W.value=!1,x.value=`${j}px`;L.value=R,l.emit("update:collapse",R)}};t.watch(()=>o.collapse,R=>{O(R)});const ee=R=>{l.emit("header-click",R)},H=()=>{q()},q=R=>{R=R??!L.value,O(R)};ve({toggleCollapse:q,doLayout:()=>{A[0]&&($(A[0]),xo(r,T.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let v=null,Y=!0;const z=R=>{if(o.rules){const X=t.toRaw(o.rules);S(X)}if(o.pureDataRules){const X=t.toRaw(o.pureDataRules);S(X,!0)}if(Ge&&(R&&O(be(o.collapse),!1),o.autoLayout&&Array.isArray(A)&&A.length>0)){const X=A[0];$(X),window.ResizeObserver&&(v=new window.ResizeObserver(()=>{$(X)}),v.observe(X))}},F=()=>{v?.disconnect(),v=null},G=!p.value||c?.acquire();G&&(u.value=p.value?!0:null),t.onMounted(()=>{if(G&&(z(Y),Y=!1),p.value&&c){let R=null,X=c.initialHeight;c.observe(K.value,Q=>{if(Q!==u.value)if(Q)u.value=!0,L.value||(x.value=""),R=setTimeout(()=>{R=null,u.value!==!1&&(z(Y),Y=!1)},100);else{if(R!==null&&clearTimeout(R),u.value=!1,!L.value)if(Y)x.value=c.initialHeight;else{let U=vo(K.value);U<=0?x.value=X:(x.value=`${U}px`,X=x.value)}Y||F()}})}}),t.onUnmounted(()=>{v?.disconnect(),c&&c.unobserve(K.value)});const Z=(R="right")=>{const X=[];if(E.value){const te={class:D.value},ae=t.h("span",te,[E.value]);X.push(ae)}const Q={class:P.value},U=o.collapseIcon??a,J=t.h(U,Q);return X.push(J),X.length>0?t.h("div",{class:{[`${b}__header-collapse`]:!0,[`is-${R}`]:!0},onClick:H},X):null},ne=(R,X,Q,U)=>{const J={...k.value};return X===0&&(J[`${b}__first`]=!0),Q>=U-1&&(J[`${b}__last`]=!0),t.h("div",{ref:w,key:`${X}`,class:J,style:f.value},R)};return()=>{if(p.value&&u.value!==!0){const J=o.tag||"div";return t.h(J,{ref:K,prop:o.name,class:{[`${b}`]:!0,"is-collapse":W.value},style:y.value},[])}i.order.index=0;const R=[];let X=0;if(l.slots.header){const J={key:`${X++}`,ref:V,class:{[`${b}__header`]:!0,[`${b}__first`]:!0},onClick:ee},te=t.h("div",J,[l.slots.header()]);R.push(te)}else{const J=[],te=o.collapsePosition==="left";if(te&&o.showCollapse){const ae=Z("left");ae&&J.push(ae)}if(o.title||l.slots.title){if(o.showMark){const ae={class:{[`${b}__header-mark`]:!0}};o.markColor&&(ae.style={background:o.markColor});const se=t.h("div",ae);J.push(se)}if(l.slots.title){const ae=t.h("div",{class:{[`${b}__header-title`]:!0}},[l.slots.title()]);J.push(ae)}else if(o.title){const ae=t.h("div",{class:{[`${b}__header-title`]:!0}},[o.title]);J.push(ae)}}if(l.slots.toolbar&&J.push(l.slots.toolbar()),!te&&o.showCollapse){const ae=Z("right");ae&&J.push(ae)}if(J.length>0){const ae={key:`${X++}`,ref:V,class:{[`${b}__header`]:!0,[`${b}__first`]:!0},onClick:ee},se=t.h("div",ae,J);R.push(se)}}N();const Q=l.slots.default?l.slots.default():[],U=i.layout.value.type;if(U==="grid"){const J=ne(Q,X++,0,Q.length);R.push(J)}else if(U==="flow"){const J=ne(Q,X++,0,Q.length);R.push(J)}else for(let J=0;J<Q.length;J++){const te=Q[J],ae=ne([te],X++,J,Q.length);R.push(ae)}if(C.value){const J=o.tag||"div";return t.h(J,{ref:K,prop:o.name,class:{[`${b}`]:!0,"is-collapse":W.value},style:y.value},[R])}else return R}}}}const{componentName:tc,create:nc,scope:oc}=_("group"),qo=nc(ec(tc,oc,le.RectUp));function lc(e){return e===window}const ac=/matrix\((.+)\)/,Po=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(lc(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,i=0,s=0,c=0;for(l=n;l!==document;){i+=l.scrollTop,r+=l.scrollLeft;const{transform:u}=window.getComputedStyle(l);if(u){const p=ac.exec(u);if(p){let g=p[1].split(/\s*,\s*/);g.length==6&&(s+=Number(g[4]),c+=Number(g[5]))}}l=l.parentNode}return a-=r,o-=i,a+=s,o+=c,{x:a,y:o}};class rc{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 sc{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 rc,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 Mt=new sc,Dr={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:ic,create:cc}=_("price"),dc=cc({props:{...Dr},setup(e){const n=t.computed(()=>({[ic]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":on(e.price,e.decimalLength,!0,pe(e.digits),e.separator)),l=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(0,s)}),r=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(s+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),uc=["innerHTML"],fc=["innerHTML"];function mc(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,uc)):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,fc)):t.createCommentVNode("",!0)],2)}const et=oe(dc,[["render",mc]]),{componentName:Mo,create:pc}=_("hint-text"),hc=pc({components:{Price:et},props:{...Dr,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),i=t.ref(e.placement),s=t.ref(!1),c=t.ref(null),u=(D,P,K,V,I,L)=>{const x=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,j=D.split("-");let O=[];j[0]==="top"?O=["top","bottom","right","left"]:j[0]==="bottom"?O=["bottom","top","right","left"]:j[0]==="left"?O=["left","top","bottom","right"]:j[0]==="right"&&(O=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},H=[];for(let q=0;q<O.length;q++){const M=O[q];if(H[0]=M,j[1]&&(H[1]=j[1]),M==="top"){const v=P.y-L-e.arrowSize-e.offset;if(v>=0){ee.top=v;let Y=0;j[1]==="start"?Y=P.x:j[1]==="end"?Y=P.x+K-I:Y=P.x+K/2-I/2;const z=x-Y-I;z<0?(Y+=z,d.value=-z):d.value=0,ee.left=Y<0?0:Y;break}}else if(M==="bottom"){const v=P.y+V+e.arrowSize+e.offset;if(v+L<=W){ee.top=v;let Y=0;j[1]==="start"?Y=P.x:j[1]==="end"?Y=P.x+K-I:Y=P.x+K/2-I/2;const z=x-Y-I;z<0?(Y+=z,d.value=-z):d.value=0,ee.left=Y<0?0:Y;break}}else if(M==="left"){const v=P.x-I-e.arrowSize-e.offset;if(v>=0){ee.left=v;let Y=0;j[1]==="start"?Y=P.y:j[1]==="end"?Y=P.y+V-L:Y=P.y+V/2-L/2,ee.top=Y<0?0:Y;break}}else if(M==="right"){const v=P.x+K+e.arrowSize+e.offset;if(v+I<=x){ee.left=v;let Y=0;j[1]==="start"?Y=P.y:j[1]==="end"?Y=P.y+V-L:Y=P.y+V/2-L/2,ee.top=Y<0?0:Y;break}}}return{bestPlacement:H.join("-"),bestInsetRect:ee}},p=(D,P,K=10)=>{if(!Ge||P===!1||!D)return;o.value=Po(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const V=c.value.offsetHeight,I=c.value.offsetWidth,{bestPlacement:L,bestInsetRect:x}=u(e.placement,o.value,l.value,r.value,I,V);i.value=L,a.value=x,s.value=!0},d=t.ref(0),g=Ze(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,D=>{S.value=D});const b=t.computed(()=>S.value&&y.value),y=t.ref(!0),k=Ze(D=>{const P=D[0];P&&(y.value=P.isIntersecting)},10),f=new IntersectionObserver(k);t.watch([()=>e.message,()=>e.visible],([D,P])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Mt.watch(e.reference,g),f.observe(e.reference)}),t.onBeforeUnmount(()=>{Mt.unwatch(e.reference,g),f.unobserve(e.reference),f.disconnect()});const m=t.computed(()=>{const D={[Mo]:!0};return i.value.startsWith("top")?D["is-top"]=!0:i.value.startsWith("right")?D["is-right"]=!0:i.value.startsWith("bottom")?D["is-bottom"]=!0:i.value.startsWith("right")&&(D["is-right"]=!0),e.size==="small"?D["is-small"]=!0:e.size==="large"&&(D["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(D[`${e.customClass}`]=!0),D}),h=t.computed(()=>{const D={};a.value.top!==null&&(D.top=`${a.value.top}px`),a.value.right!==null&&(D.right=`${a.value.right}px`),a.value.bottom!==null&&(D.bottom=`${a.value.bottom}px`),a.value.left!==null&&(D.left=`${a.value.left}px`),e.autoFit&&(D["min-width"]=`${l.value}px`);const P=document.documentElement.clientWidth||document.body.clientWidth;return D["max-width"]=`${P}px`,s.value&&(D.opacity="1"),e.transition||(D.transition="none"),e.zIndex&&(D["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(D,e.customStyle),D}),C=t.computed(()=>{const D=[`${Mo}__content`];return e.customTextClass&&D.push(e.customTextClass),D}),A=t.computed(()=>{const D={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(D,e.customTextStyle),D}),w=t.computed(()=>({[`${Mo}__arrow`]:!0})),N=t.computed(()=>{const D={};return e.showArrow?(D.width=`${e.arrowSize}px`,D.height=`${e.arrowSize}px`,i.value==="top"?(D.left="50%",D.bottom=`-${e.arrowSize}px`,D.transform=" translate(-50%, 0%)"):i.value==="top-start"?(D.left=`${e.arrowOffset+d.value}px`,D.bottom=`-${e.arrowSize}px`):i.value==="top-end"?(D.right=`${e.arrowOffset-d.value}px`,D.bottom=`-${e.arrowSize}px`):i.value==="right"?(D.left=`-${e.arrowSize}px`,D.top="50%",D.transform=" translate(0%, -50%)"):i.value==="right-start"?(D.left=`-${e.arrowSize}px`,D.top=`${e.arrowOffset}px`):i.value==="right-end"?(D.left=`-${e.arrowSize}px`,D.bottom=`-${e.arrowOffset}px`):i.value==="bottom"?(D.left="50%",D.top=`-${e.arrowSize}px`,D.transform=" translate(-50%, 0%)"):i.value==="bottom-start"?(D.left=`${e.arrowOffset+d.value}px`,D.top=`-${e.arrowSize}px`):i.value==="bottom-end"?(D.right=`${e.arrowOffset-d.value}px`,D.top=`-${e.arrowSize}px`):i.value==="left"?(D.right=`-${e.arrowSize}px`,D.top="50%",D.transform=" translate(0%, -50%)"):i.value==="left-start"?(D.right=`-${e.arrowSize}px`,D.top=`${e.arrowOffset}px`):i.value==="left-end"&&(D.right=`-${e.arrowSize}px`,D.bottom=`-${e.arrowOffset}px`),D):{display:"none"}}),T=t.computed(()=>b.value&&e.closeOnClick),$=t.computed(()=>{const D={};return e.zIndex&&(D["z-index"]=`${e.zIndex}`),D});return{show:b,tipRef:c,classes:m,styles:h,textClasses:C,textStyles:A,arrowClasses:w,arrowStyles:N,overlayShow:T,overlayStyle:$,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),gc=["innerHTML"];function yc(e,n,a,o,l,r){const i=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]=(...s)=>e.onClickOverlay&&e.onClickOverlay(...s))},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(i,{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,gc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Ir=oe(hc,[["render",yc]]);class In{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 Lo={},bc=new In,bt=new Map,xn=e=>{if(e){const n=document.getElementById(e);bt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of bt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}bt.clear()}},kc=e=>{e.unmount=xn;const n=document.getElementById(e.id);if(n){const a=bt.get(e.id);a?e={...Lo,...a,...e}:e={...Lo,...e},e.transition=!1;const o=t.createVNode(Ir,e);return t.render(o,n),e.id}},Sc=e=>{e.unmount=xn;let n=e.id??`hinttext_${bc.get()}`;e={...Lo,...e},e.id=n,bt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(Ir,e);return t.render(o,a),document.body.appendChild(a),n},Cc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},kt={show(e,n,a={},o=!0){Cc(n);const l=a.id;return l&&bt.has(l)?kc({...a,message:n,reference:e}):(o&&xn(),Sc({...a,message:n,reference:e}))},hide(e){xn(e)},install(e){e.config.globalProperties.$hintText=kt}};function wc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...he,...ye},emits:["appear","disappear"],setup(l,r){const i=l.prop??r.attrs.name;Te({componentName:e,validate:!1},i);const s=We(),c=An();Tn(!1);const u=t.computed(()=>c&&s?$n(s,!1).value:null),p=e,d=t.ref(null),g=t.computed(()=>{const U={[p]:!0,[`${p}__gutter`]:u.value&&u.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:be(l.hasBorder)};if(U[l.errorMarkClass]=!!L.value,U[l.warnMarkClass]=!!V.value,U[l.infoMarkClass]=!!P.value,typeof d.value=="function"){const J=d.value(i);U[J]=!0}else if(typeof d.value=="string"){const J=d.value;U[J]=!0}return U}),S=t.ref(null),b=t.computed(()=>{const U={};if(l.width)l.width!=="auto"&&(U.width=ge(l.width));else{const J=c&&s?Vn(s,!1):null;if(u.value&&J){if(u.value.type==="grid"){const te=Dn(J,u.value,l.span,l.offset);Object.assign(U,te)}else if(u.value.type==="flow"){const te=En(J,u.value,l.span,l.offset,l.width);Object.assign(U,te)}}}if(typeof S.value=="function"){const J=S.value(i);J&&Object.assign(U,J)}else if(S.value&&typeof S.value=="object"){const J=S.value;Object.assign(U,J)}return U}),y=t.ref(null),k=t.computed({get:()=>y.value??be(l.isRequired),set:U=>{y.value=U}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",Sn.Near),h=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${h.value}`]:!0})),A=t.computed(()=>({label:!0,[`label--${h.value}`]:!0})),w=Ve(t.toRef(l,"labelWidth"),"labelWidth",Sn.Near),N=t.computed(()=>w&&w.value?{width:ge(w.value)}:{}),T=t.computed(()=>({"label--string":!0,"label--required":k.value})),$=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),D=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});ve({setRequired(U){k.value=U},setErrorTip(U){D.errorTip=U},setErrorIcon(U){D.errorIcon=U},setWarnTip(U){D.warnTip=U},setWarnIcon(U){D.warnIcon=U},setInfoTip(U){D.infoTip=U},setInfoIcon(U){D.infoIcon=U},setCustomClassName(U){d.value=U},setCustomStyle(U){S.value=U}});const P=t.computed(()=>l.infoTip||D.infoTip),K=t.computed(()=>l.infoIcon||D.infoIcon),V=t.computed(()=>l.warnTip||D.warnTip),I=t.computed(()=>l.warnIcon||D.warnIcon),L=t.computed(()=>l.errorTip||D.errorTip),x=t.computed(()=>l.errorIcon||D.errorIcon),W=t.computed(()=>L.value?"error":V.value?"warn":P.value?"info":""),j=()=>W.value.length>0,O=t.computed(()=>W.value==="error"?L.value:W.value==="warn"?V.value:W.value==="info"?P.value:""),ee=t.computed(()=>W.value==="error"?x.value:W.value==="warn"?I.value:W.value==="info"?K.value:null),H=t.computed(()=>{const U={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?U[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?U[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(U[`${l.infoClass}`]=!0),U}),q=t.computed(()=>{const U={};return m&&m.value==="top"||!f()?U["padding-left"]="0px":w&&w.value&&(U["padding-left"]=ge(w.value)),U}),M=t.ref();let v="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([U,J,te,ae])=>{M.value&&(U&&!ue(J)?v?a.show(M.value,J,{...ae,id:v,type:te},!0):v=a.show(M.value,J,{...ae,type:te},!0):a.hide(v))});let Y=null;const z=()=>{Y||!M.value||(Y=new IntersectionObserver(U=>{let J=!1;for(let te of U)if(te.intersectionRatio>0){J=!0,J&&r.emit("appear",te);break}J||r.emit("disappear")}),Y.observe(M.value))},F=()=>{!Y||!M.value||(Y.unobserve(M.value),Y=null)};t.watch(()=>be(l.appearListen),U=>{U?z():F()}),t.onMounted(()=>{be(l.appearListen)&&z()}),t.onUnmounted(F);const G=()=>{if(!f())return null;const U=[],J=r.slots?.label?.()??l.label,te={class:T.value},ae=t.h("div",te,[J]);if(U.push(ae),r.slots.fixedPreTip){const de=r.slots.fixedPreTip();U.push(de)}const se={class:A.value,style:N.value};return t.h("div",se,U)},Z=()=>{const U=[];if(r.slots.prepend){const te=r.slots.prepend();U.push(te)}if(r.slots.default){const te=r.slots.default();U.push(te)}if(r.slots.append){const te=r.slots.append();U.push(te)}if(r.slots.fixedTip){const te={class:[`${p}__fixed-tip`]},ae=t.h("div",te,[r.slots.fixedTip()]);U.push(ae)}const J={ref:M,class:$.value,style:E.value};return t.h("div",J,U)},ne=()=>{const U=ee.value;return U?typeof U=="function"?t.h("div",{class:"fox-item__tip--icon"},[U()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(U)]):null},R=()=>{const U=O.value;return U?typeof U=="function"?t.h("div",{class:"fox-item__tip--text"},[U()]):t.h("div",{class:"fox-item__tip--text"},[U]):null},X=()=>{if(!j())return null;const U=[],J=ne();J&&U.push(J);const te=R();te&&U.push(te);const ae={class:H.value,style:q.value};return t.h("div",ae,U)},Q=()=>r.slots?.hide?.()??null;return()=>{const U=[],J=[],te=G();te&&J.push(te);const ae=Z();ae&&J.push(ae);const se={class:C.value},de=t.h("div",se,J);U.push(de);const $e=X();$e&&U.push($e);const Ne=Q();Ne&&U.push(Ne);const ao={class:g.value,style:b.value,prop:l.prop};return t.h("div",ao,U)}}}}const{componentName:Nc,create:Bc,scope:Ac}=_("item"),Be=Bc(wc(Nc,Ac,kt,!1));function Tc(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})),i=We(),s=An();Tn(!1);const c=t.computed(()=>{const u={};if(a.width)a.width!=="auto"&&(u.width=ge(a.width));else if(s&&i){const p=$n(i,!1),d=Vn(i,!1);if(p.value&&d){if(p.value.type==="grid"){const g=Dn(d,p.value,a.span,a.offset);Object.assign(u,g)}else if(p.value.type==="flow"){const g=En(d,p.value,a.span,a.offset,a.width);Object.assign(u,g)}}}return u});return()=>{const u=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let g=0;g<d.length;g++){if(g>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});u.push(S)}u.push(d[g])}else Reflect.apply([].push,u,d)}const p={class:r.value,style:c.value};return t.h("div",p,u)}}}}const{componentName:$c,create:Vc,scope:h2}=_("row-item"),zo=Vc(Tc($c));function Ec(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=We(),r=An();Tn(!1);const i=t.computed(()=>r&&l?$n(l,!1).value:null),s=e,c=t.computed(()=>({[s]:!0,[`${s}__gutter`]:i.value&&i.value.type!=="flow",[`${s}__stretch`]:a.span==="stretch"})),u=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const d=r&&l?Vn(l,!1):null;if(i.value&&d){if(i.value.type==="grid"){const g=Dn(d,i.value,a.span,a.offset);Object.assign(p,g)}else if(i.value.type==="flow"){const g=En(d,i.value,a.span,a.offset,a.width);Object.assign(p,g)}}}return p});return()=>{const p={class:c.value,style:u.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Dc,create:Ic,scope:g2}=_("slot-item"),Oo=Ic(Ec(Dc)),xr={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 xc(e,n,a,o){return{props:{...he,...ye,...xr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:u}=ie.useFoxI18n(n),p=u(l,["placeholder"]),d=t.ref(!1),g=Pe(l,"modelValue",null,c),S=e,b=t.computed(()=>({[S]:!0,"is-disabled":i.value,"is-readonly":s.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const I={};return y.value&&(I["text-align"]=y.value),I}),f=I=>{let x=I.target.value;l.type==="digit"&&(x=ko(x,!0)),l.type==="number"&&(x=ko(x,!1)),l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),g.value=x,c("update:modelValue",x,I),c("change",x,I)};let m=Pe(l,"hintText"),h=t.ref(!1);const C=I=>{let x=I.target.value;d.value=!0,ue(m.value)||(h.value=!0),c("focus",x,I)},A=I=>{setTimeout(()=>{h.value&&(h.value=!1),d.value=!1},0);let x=I.target.value;l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),c("blur",x,I)},w=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),N=t.computed(()=>{const I={};return r.slots.append&&!T.value&&!K.value&&(I.display="none"),I}),T=t.computed(()=>ke(l.unit)>0),$=t.computed(()=>!K.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!$.value})),D=I=>{g.value="",c("update:modelValue","",I),c("change","",I),c("clear","")},P=t.computed(()=>be(l.clearable)&&!i.value&&!s.value),K=t.computed(()=>{let I=ke(g.value)>0;return be(l.clearable)&&I&&d.value}),V=t.computed(()=>({action:!0,hidden:!K.value}));return()=>{const I={class:b.value,style:k.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:C,onBlur:A},L=[],x=t.h("input",I);L.push(x);const W=[];if(P.value){const v={class:["action-icon"]},Y=t.h(o,v),z={class:V.value,onClick:D},F=t.h("view",z,{default:()=>[Y]});W.push(F)}if(T.value){const v=t.h("view",{class:E.value},[l.unit]);W.push(v)}const j={class:w.value,style:N.value},O=t.h("view",j,{default:()=>W});L.push(O);const ee={default:()=>L};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 q={...rt(l,xr),hintText:m.value,hintVisible:h.value};return l.prop&&(q.prop=`${l.prop}_item`),t.h(a,q,ee)}}}}const{componentName:vc,create:qc,scope:Pc}=_("input-item"),Fo=qc(xc(vc,Pc,Be,le.CircleClose));function vr(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=pe(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Xa(`${e}`,`${n}`);return vr(o)}else{let o=po(`${e}`,Qa(`${n}`),20);return vr(o)}}function Mc(e,n=-1,a=!1,o=3,l=","){return on(e,n,a,o,l)}function Pr(e,n,a,o,l=!0){if(e==="")return"";if(e=Ga(e),n=pe(n),n==1)return e;if(o)e=qr(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(pe(a)+2,"0"):e=po(e,1,pe(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=be(n.minInclude),l=ho(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=be(n.maxInclude),l=ho(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Lr={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 Lc(e,n,a,o){return{props:{...he,...ye,...Lr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=t.ref(!1),p=Pe(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([j,O,ee])=>{if(ue(j)){d.value="";return}const H=Pr(j,O,ee,!1);d.value!==H&&(d.value=H)},{immediate:!0});const g=t.computed(()=>{let j="";return u.value&&(j=d.value),j}),{t:S}=ie.useFoxI18n(n),b=t.computed(()=>{let j=l.placeholder??"";return!u.value&&!ue(d.value)?j=Mc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):j=ue(j)?S(["placeholder"]):j,j}),y=e,k=t.computed(()=>({[y]:!0,[`${y}__placeholder`]:d.value.length>0,"is-disabled":i.value,"is-readonly":s.value})),f=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const j={};return f.value&&(j["text-align"]=f.value),j}),h=t.ref(""),C=t.computed(()=>{let j=h.value;return ue(j)&&(j=l.errorTip??""),j}),A=t.ref(""),w=t.ref(!1),N=j=>{let ee=j.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",j),c("change","",j),be(l.showTip)&&w.value&&(w.value=!1);return}if(ee.length>=2){let H=ee;if(H.charAt(0)=="-"&&(H=H.substring(1)),H.length>=2&&H.charAt(0)=="0"&&H.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!ar(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&rr(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&sr(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let H=Mr(ee,l);if(H.maxValid===!1){h.value=H.message,t.triggerRef(d);return}}else if(l.min!=null&&pe(l.min)>=0){t.triggerRef(d);return}A.value=ee,be(l.showTip)&&(w.value=ee.length>0),d.value=ee,p.value=Pr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,j),c("change",p.value,j)},T=j=>{if(u.value=!0,be(l.showTip)){let O=d.value;ue(O)&&(O=l.hintText),ue(O)||(A.value=O,w.value=!0)}h.value="",c("focus",p.value,j)},$=j=>{if(setTimeout(()=>{u.value=!1,be(l.showTip)&&w.value===!0&&(w.value=!1)},0),!ue(d.value)){let O=Mr(d.value,l);if(O.minValid===!1||O.maxValid===!1){h.value=O.message;return}}c("update:modelValue",p.value,j),c("blur",p.value,j)},E=t.computed(()=>({[`${y}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),D=t.computed(()=>{const j={};return r.slots.append&&!P.value&&!x.value&&(j.display="none"),j}),P=t.computed(()=>ke(l.unit)>0),K=t.computed(()=>!x.value),V=t.computed(()=>({[`${y}__unit`]:!0,hidden:!K.value})),I=j=>{p.value="",c("update:modelValue","",j),c("change","",j),c("clear","")},L=t.computed(()=>be(l.clearable)&&!i.value&&!s.value),x=t.computed(()=>{let j=ke(p.value)>0;return be(l.clearable)&&j&&u.value}),W=t.computed(()=>({action:!0,hidden:!x.value}));return()=>{let j={class:k.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:b.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:N,onFocus:T,onBlur:$},O=[],ee=t.h("input",j);O.push(ee);let H=[];if(L.value){const F={class:["action-icon"]},G=t.h(o,F),Z={class:W.value,onClick:I},ne=t.h("view",Z,{default:()=>[G]});H.push(ne)}if(P.value){const F=t.h("view",{class:V.value},[l.unit]);H.push(F)}const q={class:E.value,style:D.value},M=t.h("view",q,{default:()=>H});O.push(M);const v={default:()=>O};v.label=r.slots.default,v.prepend=r.slots.prepend,v.append=r.slots.append,v.fixedPreTip=r.slots.fixedPreTip,v.fixedTip=r.slots.fixedTip;const z={...rt(l,Lr),errorTip:C.value,hintText:A.value,hintVisible:w.value,hintType:"number"};return l.prop&&(z.prop=`${l.prop}_item`),t.h(a,z,v)}}}}const{componentName:zc,create:Oc,scope:Fc}=_("money-item"),Ro=Oc(Lc(zc,Fc,Be,le.CircleClose)),Ko={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:Kc,scope:Uc}=_("textarea"),Hc=Kc({props:{...Ko},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Uc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const g=Rc;return{[g]:!0,[`${g}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(s)});const i=t.computed(()=>({textAlign:e.textAlign})),s=()=>{let g=l.value;g.style.height="auto";let S=g.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:b,minHeight:y}=e.autosize;b!==void 0&&(S=Math.min(S,b)),y!==void 0&&(S=Math.max(S,y))}S&&(console.info("----------- height",S),g.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(s)});const c=(g,S)=>{e.maxLength&&g.length>Number(e.maxLength)&&(g=g.substring(0,Number(e.maxLength))),n("update:modelValue",g,S),n("change",g,S)};return{...o,textareaRef:l,classes:r,styles:i,change:g=>{const S=g.target;c(S.value,g)},focus:g=>{e.disabled||e.readonly||n("focus",g)},blur:g=>{if(e.disabled||e.readonly)return;let b=g.target.value;c(b,g),n("blur",{value:b,event:g})}}}}),jc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Wc={key:0,class:"fox-textarea__limit"};function Yc(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]=(...i)=>e.change&&e.change(...i)),onBlur:n[1]||(n[1]=(...i)=>e.blur&&e.blur(...i)),onFocus:n[2]||(n[2]=(...i)=>e.focus&&e.focus(...i)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,jc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Wc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const vn=oe(Hc,[["render",Yc]]);function Xc(e,n,a,o){return{props:{...he,...ye,...Ko},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=Pe(l,"modelValue",null,c),p=y=>{u.value=y,c("update:modelValue",y,{}),c("change",y,{})};let d=Pe(l,"hintText"),g=t.ref(!1);const S=y=>{ue(d.value)||(g.value=!0),c("focus",u.value,y)},b=y=>{setTimeout(()=>{g.value&&(g.value=!1)},0),c("blur",u.value,y)};return()=>{const k={...Se(l,Ko),disabled:i.value,readonly:s.value,value:u.value,"onUpdate:modelValue":p,onFocus:S,onBlur:b},f=[],m=t.h(o,k);f.push(m);const h={default:()=>f};h.label=r.slots.default,h.prepend=r.slots.prepend,h.append=r.slots.append,h.fixedPreTip=r.slots.fixedPreTip,h.fixedTip=r.slots.fixedTip;const A={...Se(l,ye,he)};return l.prop&&(A.prop=`${l.prop}_item`),t.h(a,A,h)}}}}const{componentName:Qc,create:Gc,scope:Zc}=_("textarea-item"),Uo=Gc(Xc(Qc,Zc,Be,vn));function Jc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Jc(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}},zr=10;function Or(e,n){return e>n&&e>zr?"horizontal":n>e&&n>zr?"vertical":""}function Ho(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function jo(){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:i=>{if(i.touches){const u=i.touches[0];e.deltaX=u.clientX-e.startX,e.deltaY=u.clientY-e.startY,e.moveX=u.clientX,e.moveY=u.clientY}else{const c=i;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:i=>{if(o(),i.touches){const u=i.touches[0];e.startX=u.clientX,e.startY=u.clientY}else{const c=i;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function tt(){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),i=t.ref(0),s=t.ref(0),c=t.ref(0),u=t.ref(0),p=t.ref(""),d=()=>p.value==="vertical",g=()=>p.value==="horizontal",S=()=>{i.value=0,s.value=0,c.value=0,u.value=0,p.value="",a.value=0};return{move:k=>{if(k.touches){const h=k.touches[0];i.value=h.clientX-e.value,s.value=h.clientY-n.value,l.value=h.clientX,r.value=h.clientY}else{const m=k;i.value=m.clientX-e.value,s.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(i.value),u.value=Math.abs(s.value),o.value=Date.now()-a.value,p.value||(p.value=Or(c.value,u.value))},start:k=>{if(S(),k.touches){const h=k.touches[0];e.value=h.clientX,n.value=h.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:i,deltaY:s,offsetX:c,offsetY:u,direction:p,isVertical:d,isHorizontal:g}}let _c=2e3;const Fr=()=>_c++,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:{}}},ed=(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=Fr());const r=t.computed(()=>{const y=e,k=[y,`${y}--${a.position}`];return a.round&&k.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&k.push(`${y}--${a.position}--safebottom`),typeof a.popClass=="string"?k.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{k.push(f)}),k}),i=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),s=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Fr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},u=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=y=>{o("click-pop",y)},d=y=>{y.stopPropagation(),o("click-close-icon",y),o("update:visible",!1)},g=y=>{o("click-overlay",y),a.closeOnClickOverlay&&o("update:visible",!1)},S=y=>{o("opend",y)},b=y=>{o("closed",y)};return t.watch(()=>a.visible,y=>{a.visible?c():u()}),t.watch(()=>a.closeable,y=>{l.closed=y}),{...t.toRefs(l),popStyle:i,transitionName:s,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:g,onOpened:S,onClosed:b}}}),Rr={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}},Wo={...Fe,...Rr,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},poppable:{type:[Boolean],default:()=>!0}};let Kr=36;function td(){return Kr}function nd(e){Kr=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Yo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function od(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function ct(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ur(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let ld=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function ad(){const e=t.getCurrentInstance();return new ld(e.proxy)}function Hr(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=ct(e,n),i=ct(e,a);return r===i}function rd(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 i=0;i<n.length&&i<a.length;i++){const s=n[i];let u=a[i].findIndex(p=>{if(r==="text")return Re(e,p)===s;if(r==="value"){let d=ct(e,p);return d==null&&(d=Re(e,p)),d===s}else if(r==="item")return Hr(e,p,s)});if(u==-1)break;l.push(u)}else{let i=a[0];for(let s=0;s<n.length;s++){const c=n[s];let u=i.findIndex(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let g=ct(e,d);return g==null&&(g=Re(e,d)),g===c}else if(r==="item")return Hr(e,d,c)});if(u==-1)break;l.push(u);const p=Yo(e,i[u]);if(!Array.isArray(p))break;i=p}}return l}function jr(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 i=0;i<n.length&&i<a.length;i++){const s=a[i];let c=n[i];c<0&&c>=s.length&&(c=0);const u=s[c],p=Re(e,u);if(l.texts.push(p),l.items.push(u),r==="text")l.values.push(p);else if(r==="value"){let d=ct(e,u);d==null&&(d=p),l.values.push(d)}else l.values.push(u)}else{let i=a[0];for(let s=0;s<n.length;s++){let c=n[s];c<0&&c>=i.length&&(c=0);const u=i[c],p=Object.assign({},u);p.children=null;const d=Re(e,u);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let g=ct(e,u);g==null&&(g=d),l.values.push(g)}else l.values.push(p);if(!Array.isArray(u.children))break;i=u.children}}return l}function Wr(e){return{text:e,value:e}}const sd=15,id=300,cd=200,{create:dd}=_("picker-column");function ud(e){e.stopPropagation()}function fd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),ud(e)}const md=dd({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},...Rr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${pe(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)),i=N=>N>=d.currIndex+8||N<=d.currIndex-8,s=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=N=>`transform: rotate3d(1, 0, 0, ${-d.rotation*N}deg) translate3d(0px, 0px, 104px)`,u=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}),g=N=>Re(e,N),S=N=>ct(e,N),b=tt(),y=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},k=(N,T=!1,$=!1)=>{if(d.currIndex=N,T){const E=()=>{d.moving=!1,n("update:modelValue",N),n("change",N)};$?d.transitionEndTrigger=E:E()}},f=(N,T,$)=>{let E=N+d.startDistance;if(T==="end"){const D=-(e.source.length-1)*e.itemHeight;E<D&&(E=D),E>0&&(E=0);let P=Math.abs(Math.round(-E/e.itemHeight));const K=-P*e.itemHeight,V=`${(P+1)*d.rotation}deg`,I=$?$>0:!1;k(P,!0,I),m(K,T,$,V)}else{let D=(-E/e.itemHeight+1)*d.rotation;const P=(e.source.length+1)*d.rotation,K=0;if(D=Math.min(Math.max(D,K),P),e.threeDimensional&&(D<K||D>P))return;m(E,null,void 0,`${D}deg`)}},m=(N=0,T,$=cd,E)=>{T==="end"?d.scrollTime=$:d.scrollTime=0,d.deg=E,d.scrollDistance=N},h=(N,T)=>(N=Math.abs(N/T)/.003*(N<0?-1:1),N),C=N=>{e.readonly||(d.startDistance=d.scrollDistance,b.start(N),d.transitionEndTrigger=null)},A=N=>{e.readonly||(d.moving=!0,b.move(N),b.isVertical()&&(d.moving=!0,fd(N)),f(b.deltaY.value,"",0))},w=()=>{if(e.readonly)return;const N=b.deltaY.value,T=b.duration.value;if(T<id&&Math.abs(N)>sd){const E=h(N,T);f(E,"end",e.swipeDuration)}else f(N,"end",0)};return t.watch(()=>e.modelValue,N=>{const T=d.currIndex-N;if(T!==0){d.currIndex=N,d.startDistance=d.scrollDistance;const $=T*e.itemHeight;f($,"",0)}}),t.watch(()=>e.source,N=>{if(d.currIndex>=N.length){const E=(N.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,f(E,"end",0)}}),t.watch(()=>e.visible,N=>{N===!1&&y()}),t.onMounted(()=>{const N=-e.modelValue*e.itemHeight;f(N)}),{classes:a,styles:o,contentClasses:l,itemText:g,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:C,onTouchMove:A,onTouchEnd:w,isHidden:i,setRollerStyle:c,touchRollerStyle:s,touchTileStyle:u,stopMomentum:y}}}),pd={key:1,class:"fox-picker__item-tile"};function hd(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]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i)),onTouchend:n[2]||(n[2]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTouchcancel:n[3]||(n[3]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTransitionend:n[4]||(n[4]=(...i)=>e.stopMomentum&&e.stopMomentum(...i))},[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,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${s}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(s+1)}]),style:t.normalizeStyle(e.setRollerStyle(s+1))},t.toDisplayString(e.itemText(i)),7)):(t.openBlock(),t.createElementBlock("view",pd,t.toDisplayString(e.itemText(i)),1))],64))),128))],6)],38)}const gd=oe(md,[["render",hd]]);let Lt=0;const Yr="fox-overflow-hidden",Xr=()=>Ge?document.body:{classList:[]},yd=e=>[()=>{if(e())try{!Lt&&Xr().classList.add(Yr),Lt++}catch{}},()=>{if(e()&&Lt)try{Lt--,!Lt&&Xr().classList.remove(Yr)}catch{}}],bd={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:kd,create:Sd}=_("overlay"),Cd=Sd({props:{...bd},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=yd(()=>e.lockScroll),l=t.computed(()=>({[kd]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,s=>{s?a():o()}),{classes:l,style:r,onClick:s=>{n("click",s),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function wd(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((...i)=>e.onClick&&e.onClick(...i),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const dt=oe(Cd,[["render",wd]]),{componentName:Nd,create:Bd}=_("popup"),Ad=Bd(ed(Nd,{FoxOverLay:dt,Close:le.Close}));function Td(e,n,a,o,l,r){const i=t.resolveComponent("FoxOverLay"),s=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(i,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(s)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const me=oe(Ad,[["render",Td]]),$d=t.defineComponent({props:{position:{type:[String],default:()=>"bottom"},visible:{type:[Boolean]},teleport:{type:[String,Element],default:()=>"body"},lockScroll:{type:[Boolean],default:()=>!0},closeOnClickOverlay:{type:[Boolean],default:()=>!0},round:{type:[Boolean],default:()=>!1},teleportDisable:{type:[Boolean],default:()=>!1},poppable:{type:[Boolean],default:()=>!0}},setup(e,{slots:n}){return()=>{if(e.poppable){const a=rt({...e},{poppable:!1});return t.h(me,a,n)}else return n?.default?.()??null}}});function Vd(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"default")])}const Ed=oe($d,[["render",Vd]]),{create:Dd,componentName:Id,scope:xd}=_("picker"),vd=Dd({components:{Column:gd,Wrapper:Ed},props:{...Wo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n(xd),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),i=t.ref(td());t.watch(()=>e.visible,V=>{V&&i.value<=0&&setTimeout(()=>{if(r.value){const I=qe(r.value);i.value=I.height,nd(i.value)}},50)});const s=t.computed(()=>({[Id]:!0})),c=ad(),u=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([V,I])=>{if(V){let L=await c.load("picker",V,I);if(L.length>0){let x=L[0];if(Array.isArray(x)){if(typeof x[0]=="string"){let W=L,j=[];W.forEach(O=>{let ee=O.map(H=>Wr(H));j.push(ee)}),p.value=j}else p.value=L;u.value="multipleColumn"}else if(typeof x=="string"){let W=L,j=[],O=W.map(ee=>Wr(ee));j.push(O),p.value=j,u.value="singleColumn"}else{const W=Yo(e,x);Array.isArray(W)?(u.value="cascade",p.value=[L]):(u.value="singleColumn",p.value=[L])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),g=t.ref(e.modelValue),S=t.ref([]);let b=null;const y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([V,I])=>{let L=rd(e,V,I,u.value);if(!Me(L,y.value)){y.value=L,b||(b=L?[...L]:[]);let x=jr(e,L,I,u.value);x&&(d.value=x.texts,n("update:text",d.value))}});let k="";const f=t.ref(e.visible);t.watch(()=>e.visible,V=>{f.value=V,V&&(k="active",y.value.length>0&&(b=[...y.value]))});const m=V=>{let I=Ur(e,V);return Ie(I)?I.defaultIndex??0:0},h=V=>{if(e.readonly===!0)return!0;let I=Ur(e,V);return Ie(I)?I.readonly??!1:!1},C=(V,I)=>{let L=y.value;L[V]=I;for(let W=0;W<V;W++)L[W]==null&&(L[W]=m(W));if(u.value==="cascade")for(let W=V+1;W<w.value.length;W++){let j=m(W);W<L.length?L[W]=j:L.push(j)}else for(let W=L.length;W<w.value.length;W++){let j=m(W);L.push(j)}y.value=L;let x=jr(e,L,p.value,u.value);x&&(d.value=x.texts,g.value=x.values,S.value=x.items)},A=V=>V<y.value.length?y.value[V]:m(V),w=t.computed(()=>{if(p.value.length==0)return[];if(u.value=="singleColumn"||u.value=="multipleColumn")return p.value;let V=[],I=0,L=p.value[0],x=0;for(;;){let W=L.map(ee=>{let H=Object.assign({},ee);return od(e,H,null),H});V.push(W),I>=y.value.length?x=0:x=y.value[I],(x<0||x>=L.length)&&(x=0);let j=L[x];const O=Yo(e,j);if(!Array.isArray(O))break;L=O,I++}return V}),N=t.computed(()=>pe(+e.visibleItemCount-1)/2*i.value),T=(V=!1)=>{if(e.readonly===!0){V&&n("update:visible",!1);return}let I=p.value.length-1;for(;I>=0&&!(y.value[I]===null||y.value[I]===void 0);I--);if(I>=0&&C(I,0),u.value==="singleColumn"){let L=g.value.length>0?g.value[0]:"",x=S.value.length>0?S.value[0]:null;n("update:modelValue",L),n("update:text",d.value),n("change",L,x),V&&(n("confirm",L),n("update:visible",!1))}else n("update:modelValue",g.value),n("update:text",d.value),n("change",g.value,S.value),V&&(n("confirm",g.value),n("update:visible",!1))},$=(V,I)=>{if(k!=="close"&&(C(V,I),e.isAutoBackFill)){const L=!f.value;T(L)}},E=()=>{k==="active"&&(k="confirm",b=Array.isArray(y.value)?[...y.value]:[],T(!0))},D=()=>{u.value==="singleColumn"?(n("update:modelValue",""),n("update:text",""),n("change","")):(n("update:modelValue",[]),n("update:text",""),n("change",[])),y.value=[],b=null};return{...l,pickerLineRef:r,classes:s,columns:w,dataType:u,show:f,itemHeight:i,top:N,isReadonly:h,getIndex:A,change:$,close:()=>{if(k==="active"){if(k="close",b===null||b.length===0)D();else{if(Array.isArray(b))for(let V=0;V<b.length;V++)C(V,b[V]);T(!1)}n("close"),n("update:visible",!1)}},confirm:E,clear:()=>{if(k==="active"){if(k="clear",e.readonly===!0){n("update:visible",!1);return}D(),b=null,n("clear",""),n("update:visible",!1)}}}}}),qd={key:0,class:"fox-picker__bar"},Pd={class:"fox-picker__title"},Md={class:"fox-picker__bar__action"},Ld={class:"fox-picker__column"};function zd(e,n,a,o,l,r){const i=t.resolveComponent("Column"),s=t.resolveComponent("Wrapper");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(s,{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,poppable:e.poppable},{default:t.withCtx(()=>[e.poppable?(t.openBlock(),t.createElementBlock("view",qd,[t.createElementVNode("view",Pd,t.toDisplayString(e.title),1),t.createElementVNode("view",Md,[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.createCommentVNode("",!0),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Ld,[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,u)=>(t.openBlock(),t.createElementBlock("view",{key:u,class:"fox-picker__columnitem"},[t.createVNode(i,{visible:e.show,source:c,readonly:e.isReadonly(u),"column-index":u,modelValue:e.getIndex(u),"onUpdate:modelValue":p=>e.change(u,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","poppable"])],2)}const zt=oe(vd,[["render",zd]]);function Od(e,n,a,o,l,r,i=!0){return{props:{...he,...ye,...Wo,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(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Pe(s,"modelValue",null,d),k=t.ref([]),f=t.computed(()=>Array.isArray(k.value)?k.value.join(s.separator):k.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const M={};return C.value&&(M["text-align"]=C.value),M}),w=t.ref(!1),N=()=>{w.value=!0},T=M=>{w.value=M},$=M=>{y.value=M,d("update:modelValue",M)},E=(M,v)=>{d("change",M,v)},D=M=>{let Y=M.target.value;b.value=!0,d("focus",Y,M)},P=M=>{setTimeout(()=>{b.value=!1},0);let Y=M.target.value;s.maxLength&&Y.length>Number(s.maxLength)&&(Y=Y.slice(0,Number(s.maxLength))),d("blur",Y,M)},K=M=>{k.value=M,Array.isArray(M)&&M.length===0?d("update:text",M[0]):d("update:text",M)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),I=t.computed(()=>ke(s.unit)>0),L=t.computed(()=>ke(s.unit)>0&&!b.value),x=t.computed(()=>({hidden:!L.value})),W=M=>{y.value="",d("update:modelValue","",M),d("change","",M),d("clear","")},j=t.computed(()=>s.clearable&&!u.value&&!p.value),O=t.computed(()=>ke(y.value)>0&&b.value),ee=M=>{O.value?W(M):N()},H=t.computed(()=>O.value&&j.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const M={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P};i&&(M.disabled=!0);const v=[],Y=t.h("input",M);v.push(Y);const z=[],F={class:["action-icon"]},G=t.h(H.value,F),Z={class:q.value,onClick:ee},ne=t.h("view",Z,{default:()=>[G]});if(z.push(ne),I.value){const se=t.h("view",{class:x.value},[s.unit]);z.push(se)}const R={class:V.value},X=t.h("view",R,{default:()=>z});v.push(X);const Q={default:()=>v};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 U=Se(s,Wo);U.disabled=!1,U.readonly=u.value||p.value,U.visible=w.value,U["onUpdate:visible"]=T,U.modelValue=y.value,U["onUpdate:modelValue"]=$,U.text=k.value,U["onUpdate:text"]=K,U.onChange=E;const J=t.h(r,U);Q.hide=()=>[J];const te=Se(s,ye,he);return s.prop&&(te.prop=`${s.prop}_item`),t.h(a,te,Q)}}}}const{componentName:Fd,create:Rd,scope:Kd}=_("picker-item"),Xo=Rd(Od(Fd,Kd,Be,le.CircleClose,le.ArrowRight,zt,!1)),qn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:i="children"}=a??{},{[l]:s,[r]:c,[i]:u,...p}=o,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:s,text:c,children:u,_parent:n};return d.children&&d.children.length&&(d.children=qn(d.children,d,a)),d}),Qr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Qr(o.children,n)},Ud={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Hd=(e,n)=>{const a={...Ud,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:i}=a;let s=[],c={};return e.forEach(u=>{u={...u};const{[l]:p,[r]:d}=u,g=c[d]=c[d]||[];!s.length&&d===o&&(s=g),g.push(u),u.children=c[p]||(c[p]=[])}),i&&Object.keys(c).forEach(u=>{c[u].length>1&&c[u].sort((p,d)=>p[i]-d[i])}),c=null,s},jd={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}},Gr=(e,n)=>n[e.textKey],Ot=(e,n)=>n[e.valueKey],Wd=(e,n)=>n[e.visibleKey],Zr=(e,n)=>n[e.disabledKey],Yd=(e,n)=>{const a=n[e.doitKey];return be(a)},Xd=(e,n)=>{const a=n[e.numKey];return a==null?null:pe(n[a])},Jr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Qd(e,n,a,o=!1){return{props:{...jd},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:i}){const s=t.computed(()=>{const H={};return H[`${e}`]=!0,H}),c=t.computed(()=>{const H={};return H[`${e}__titles`]=!0,H[`${l.direction}`]=!0,l.align==="left"&&(H.left=!0),l.scroll===!0&&(H.scrollable=!0),l.shape&&(H[`${l.shape}`]=!0),H}),u=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const H=fe(l.gutter);return H<=0?0:H}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,H=>{d.value!==H&&(d.value=H,x(!1))});const g=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const H={};return y.value||(H.display="none"),H}),b=t.ref(),y=t.ref(!1),k=()=>{const H=!y.value;f(H)},f=H=>{const q=H;q?(y.value=q,setTimeout(()=>{g.value["fox-tabs-bar__popup--show"]=!0,g.value["fox-tabs-bar__popup--hide"]=!1},0)):(g.value["fox-tabs-bar__popup--show"]=!1,g.value["fox-tabs-bar__popup--hide"]=!0,b.value?b.value.addEventListener("transitionend",()=>{y.value=!1},{once:!0}):setTimeout(()=>{y.value=!1},0))},m=t.ref(),h=t.ref([]),C=(H,q)=>{h.value[q]=H},A=H=>q=>{C(q,H)},w=(H,q)=>{const M=m.value,v=h.value;if(!M||!v||!v[H])return;const Y=v[H];let z=0;l.direction==="vertical"?z=Y.offsetTop-(M.offsetHeight-Y.offsetHeight)/2:z=Y.offsetLeft-(M.offsetWidth-Y.offsetWidth)/2,N(M,z,q?0:.3,l.direction)},N=(H,q,M,v)=>{let Y=0;const z=v==="horizontal"?H.scrollLeft:H.scrollTop,F=M===0?1:Math.round(M*1e3/16);function G(){v==="horizontal"?H.scrollLeft+=(q-z)/F:H.scrollTop+=(q-z)/F,++Y<F&&Ue(G)}G()},T=(H,q)=>{const M=Ot(l,H),v={};return v[`${e}__titles-item`]=!0,v.disabled=Zr(l,H),v.active=M===d.value,l.shape&&(v[`${l.shape}`]=!0),l.ellipsis&&(v.ellipsis=!0),q&&(q.class&&(v[`${q.class}`]=!0),q.disabled===!0&&(v.disabled=q.disabled)),v},$=(H,q)=>{const M={};if(p.value>0){const v=Math.abs(p.value/2);l.direction==="vertical"?(M["margin-top"]=`${v}px`,M["margin-bottom"]=`${v}px`):(M["margin-left"]=`${v}px`,M["margin-right"]=`${v}px`)}return q&&q.style&&Object.assign(M,q.style),M},E=(H,q)=>`${Ot(l,H)??q}`,D=(H,q)=>{const M=Ot(l,H),v={};v[`${e}__popup-item`]=!0,v.disabled=Zr(l,H),v.active=M===d.value,l.shape&&(v[`${l.shape}`]=!0);const Y=Jr(l,H,q);return Y&&Y.disabled===!0&&(v.disabled=Y.disabled),v},P=t.computed(()=>(l.data??[]).filter(q=>Wd(l,q)!==!1)),K=(H,q)=>{const M=Ot(l,H);if(i("click",H,q),d.value==M)return;const v=()=>{d.value=M,l.scroll&&w(q,!1),i("update:modelValue",M),i("change",H,q)};if(typeof l.beforeChange=="function"){const Y=l.beforeChange(H,q);mt(Y)?Y.then(z=>{z!==!1&&v()}).catch(()=>{v()}):Y!==!1&&v()}else v()},V=(H,q)=>function(){K(H,q)},I=(H,q)=>{K(H,q),f(!1)},L=(H,q)=>function(){I(H,q)},x=H=>{if(!Array.isArray(l.data)||!l.scroll)return;const q=l.data.findIndex(M=>Ot(l,M)===d.value);q!==-1&&w(q,H)};t.watch(()=>l.data,()=>{setTimeout(x,0)}),t.onMounted(()=>{x(!0)});const W=(H,q)=>{if(r.item)return r.item({item:H,index:q});const M=Jr(l,H,q),v=[];if(r.text){const G=r.text({item:H,index:q});v.push(G)}else{const G=[];if(M?.doit===!0||Yd(l,H)){const X={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",X);G.push(Q)}const Z=M?.num??Xd(l,H);if(Z){let X="";const Q=pe(Z);Q>=100?X="99+":X=`${Q}`;const U={class:[`${e}__titles-item-tip`,"num"]},J=t.h("view",U,[X]);G.push(J)}const ne={class:`${e}__titles-item-text`};G.push(Gr(l,H));const R=t.h("view",ne,G);v.push(R)}const Y={class:`${e}__titles-item-line`},z=t.h("view",Y);v.push(z);const F={ref:A(q),class:T(H,M),style:$(H,M),key:E(H,q),onClick:V(H,q)};return t.h("view",F,v)},j=()=>{const H=r.default?r.default():[];if(H.length===0)for(let M=0;M<P.value.length;M++){const v=P.value[M],Y=W(v,M);H.push(Y)}const q={ref:m,class:c.value,style:u.value};return t.h("view",q,H)},O=()=>{let H=null;r.navigation?H=r.navigation():H=t.h(a);const q={class:`${e}__navigation`,onClick:k};return t.h("view",q,[H])},ee=()=>{const H=[];for(let M=0;M<P.value.length;M++){const v=P.value[M];let Y=null;r.popupItem?Y=r.popupItem({item:v,index:M}):Y=Gr(l,v);const z={class:D(v,M),key:E(v,M),onClick:L(v,M)},F=t.h("view",z,[Y]);H.push(F)}const q={class:g.value,style:S.value};return t.h("view",q,H)};return()=>{const H=[],q=j();if(H.push(q),l.showQuickNavigation){const v=O();H.push(v);const Y=ee();H.push(Y)}const M={class:s.value};return t.h("view",M,H)}}}}const{create:Gd,componentName:Zd,scope:Jd}=_("tabs-bar"),Pn=Gd(Qd(Zd,Jd,le.MoreH,!1)),_r=Symbol("TabsStatesKey"),_d={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function eu(e,n,a=!1){return{props:{..._d},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const i=t.shallowRef([]),s={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:y=>{const k={name:y};s.current.value===y&&(k.loaded=!0),i.value.push(k),t.triggerRef(i)},remove:y=>{const k=i.value.findIndex(f=>f.name===y);k!==-1&&i.value.splice(k,1)},isLoaded:y=>{if(!o.lazy)return!0;const k=i.value.findIndex(f=>f.name===y);return k!==-1?s.current.value?i.value[k].loaded??!1:k===0:!1}};t.provide(_r,s);const c=y=>{const k=i.value.findIndex(f=>f.name===y);k!==-1&&(i.value[k].loaded=!0,t.triggerRef(i))};t.watch([()=>o.modelValue,()=>o.direction],([y,k])=>{s.current.value!==y&&(s.current.value=y??"",c(y??"")),s.direction.value!==k&&(s.direction.value=k)});const u=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let g=!0;const S=t.computed(()=>{const y={},k=i.value.length;if(k<=0)return y;const f=i.value.findIndex(m=>m.name===s.current.value);return s.direction.value==="vertical"?s.tabHeight.value>0&&(y.height=`${k*s.tabHeight.value}px`,f!==-1&&(y.transform=`translate(0, -${f*s.tabHeight.value}px)`)):s.tabWidth.value>0&&(y.width=`${k*s.tabWidth.value}px`,f!==-1&&(y.transform=`translate(-${f*s.tabWidth.value}px, 0)`)),g&&(g=!1,y.transition="transform 0s ease"),y});let b=null;return t.onMounted(()=>{if(!u.value)return;const y=()=>{const k=Nn(u.value);s.tabWidth.value=k.width,s.tabHeight.value=k.height};window.ResizeObserver&&(b=new window.ResizeObserver(y),b.observe(u.value)),y()}),t.onBeforeUnmount(()=>{b&&(b.disconnect(),b=null)}),()=>{const y={class:`${e}__panes`,style:S.value,ref:p},k=t.h("view",y,[r?.default?.()]),f={class:d.value,ref:u};return t.h("view",f,[k])}}}}const{create:tu,componentName:nu,scope:ou}=_("tabs-container"),Mn=tu(eu(nu,ou,!1)),lu={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function au(e,n,a){return{props:{...lu},setup(o,{emit:l,slots:r}){const i=t.inject(_r);t.onMounted(()=>{i.add(o.paneKey)}),t.onBeforeUnmount(()=>{i.remove(o.paneKey)});const s=t.computed(()=>{const u={};return i.direction.value==="vertical"&&i.tabHeight.value>0?u.height=`${i.tabHeight.value}px`:i.tabWidth.value>0&&(u.width=`${i.tabWidth.value}px`),u}),c=t.computed(()=>o.loaded!=null?be(o.loaded):i.isLoaded(o.paneKey));return()=>{let u=[];if(c.value)u=r?.default?.()??[];else if(r.empty)u=r.empty();else{const d={class:`${e}__empty-icon`},g=o.emptyIcon??a,S=t.h(g,d),b={class:`${e}__empty-text`},y=o.emptyText??"Loading",k=t.h("view",b,[y]),f={class:`${e}__empty`},m=t.h("view",f,[S,k]);u.push(m)}const p={class:`${e}`,style:s.value};return t.h("view",p,u)}}}}const{create:ru,componentName:su,scope:iu}=_("tabs-pane"),Ln=ru(au(su,iu,le.Loading));class es{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=qn(n,null,this.config)}updateChildren(n,a){a?a.children=qn(n,a,this.config):this.nodes=qn(n,null,this.config)}getNodeByValue(n){let a;return Qr(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:cu,scope:du}=_("cascader-pane"),uu=cu({components:{Loading:le.Loading,Checklist:le.Checklist,TabsBar:Pn,TabsContainer:Mn,TabsPane:Ln},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(du),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),i=t.ref(e.modelValue),s=t.ref(new es([],{})),c=t.ref([]),u=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,h)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:h}))),d=new Map;let g;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,g=null;let{options:m}=e;o.value.convertConfig&&(m=Hd(m,o.value.convertConfig)),s.value=new es(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),u.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:s.value.nodes,selectedNode:null}],b(!u.value)},b=async(m=!0)=>{const h=i.value;if(h===void 0||!s.value.nodes.length)return;if(h.length===0){l.value=0,c.value=[{nodes:s.value.nodes,selectedNode:null}];return}let C=h;if(u.value&&Array.isArray(h)&&h.length){C=[];let A=s.value.nodes.find(w=>w.value===h[0]);if(A){C=[A.value],r.value=!0;const w=await h.slice(1).reduce(async(N,T)=>{const $=await N;await y($);const E=$?.children?.find(D=>D.value===T);return E&&C.push(T),Promise.resolve(E)},Promise.resolve(A));await y(w),r.value=!1}}C.length&&h===e.modelValue&&s.value.getPathNodesByValue(C).map((w,N)=>{l.value=N,f.handleNode(w,m)})},y=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(s.value.isLeaf(m,u.value)||s.value.hasChildren(m,u.value))return;m.loading=!0;const h=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?s.value.updateChildren(A,h):m.leaf=!0,m.loading=!1,d.delete(m)},k=m=>{const h=m.map(C=>C.value);i.value=h,n("change",h,m),n("pathChange",m),n("update:modelValue",h)},f={async handleNode(m,h){const{disabled:C,loading:A}=m;if(!(!h&&C||!c.value[l.value])){if(s.value.isLeaf(m,u.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!h){const w=c.value.map(N=>N.selectedNode);k(w),n("pathChange",w)}return}if(s.value.hasChildren(m,u.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,!h){const N=c.value.map(T=>T.selectedNode);n("pathChange",N)}return}g=m,!A&&(await y(m),g===m&&(c.value[l.value].selectedNode=m,f.handleNode(m,h)))}},handleTabChange(m,h){g=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,h){return m.selectedNode&&m.selectedNode.value===h.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Me(m,i.value)||(i.value=m,b(!u.value))}),t.watch(()=>e.visible,m=>{m&&Array.isArray(i.value)&&i.value.length>0&&b()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),fu={class:"fox-cascader"},mu={role:"menu",class:"fox-cascader__pane"},pu=["aria-checked","aria-disabled","onClick"],hu={class:"fox-cascader__item__title"};function gu(e,n,a,o,l,r){const i=t.resolveComponent("TabsBar"),s=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),u=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",fu,[t.createVNode(i,{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,g)=>(t.openBlock(),t.createBlock(u,{"pane-key":g,key:g},{default:t.withCtx(()=>[t.createElementVNode("view",mu,[(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:b=>e.handleNode(S,!1)},[t.createElementVNode("view",hu,t.toDisplayString(S.text),1),S.loading?(t.openBlock(),t.createBlock(s,{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,pu))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(u,{key:1,"pane-key":0},{default:t.withCtx(()=>n[2]||(n[2]=[t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1)])),_:1}))]),_:1},8,["modelValue"])])}const yu=oe(uu,[["render",gu]]),{create:bu}=_("cascader"),ku=bu({components:{FoxCascaderPane:yu,FoxPopup:me},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(i){n("update:visible",i)}}),l=(i,s)=>{a.value=i,o.value=!1,n("change",i,s),n("update:modelValue",i)},r=i=>{n("pathChange",i)};return t.watch(()=>e.modelValue,i=>{i!==a.value&&(a.value=i)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),Su=["innerHTML"];function Cu(e,n,a,o,l,r){const i=t.resolveComponent("FoxCascaderPane"),s=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(s,{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,Su)):t.createCommentVNode("",!0),t.createVNode(i,{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(i,{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 zn=oe(ku,[["render",Cu]]);function St(e,n){const a=e.textKey??"text";return n[a]??""}function Ct(e,n){const a=e.valueKey??"value";return n[a]}function ts(e,n){const a=e.childrenKey??"children";return n[a]}function On(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=St(e,l),i=Ct(e,l);a.texts.push(r),a.values.push(i??"")}return a}function ns(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(St(e,n[i])===r){const c=Ct(e,n[i])??"",u={[e.textKey]:r,[e.valueKey]:c};l.push(u);const p=ts(e,n[i]);Array.isArray(p)&&ns(e,p,a,o+1,l);return}}function os(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(Ct(e,n[i])===r){const c=St(e,n[i])??"",u={[e.textKey]:c,[e.valueKey]:r};l.push(u);const p=ts(e,n[i]);Array.isArray(p)&&os(e,p,a,o+1,l);return}}function Qo(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=St(e,n[o]),r=St(e,a[o]);if(l!==r)return!1;const i=Ct(e,n[o]),s=Ct(e,a[o]);if(i!==s)return!1}return!0}let wu=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){const l="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a,o);const r=_e(this.proxy,l);return r===null?(console.error(`${l} component not found api function`),[]):(Ie(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await r(n,a,o))}};function Nu(){const e=t.getCurrentInstance();return new wu(e.proxy)}const ls={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 Bu(e,n,a,o,l,r,i=!1){return{props:{...he,...ye,...ls},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Nu(),k=t.ref([]),f=t.ref([]),m=t.computed(()=>{if(Array.isArray(f.value)){if(s.showAllLevels===!1){const F=f.value.length-1;return f.value[F]}return f.value.join(s.separator)}else return f.value}),h=t.ref([]),C=t.ref([]);t.watch([()=>s.modelValue,()=>k.value],async([F,G])=>{if(d("setValue",F),s.lazy===!0){C.value.length==0&&(h.value=Array.isArray(F)?F:[]);return}if(s.valueType==="item"){let Z=F;if(!Qo(s,Z,C.value)){C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values}}else if(s.valueType==="text"){let Z=F,ne=[];if(ns(s,G,Z,0,ne),!Qo(s,ne,C.value)){C.value=ne;let R=On(s,ne);Z.value=R.texts,h.value=R.values}}else{let Z=[];if(os(s,G,F,0,Z),!Qo(s,Z,C.value)){C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values}}}),s.lazy===!0&&(h.value=Array.isArray(s.modelValue)?s.modelValue:[]),t.watch([()=>s.source,()=>s.params],async([F,G])=>{s.lazy||F&&(k.value=await y.load(F,G))},{immediate:!0});const A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":u.value,"is-readonly":p.value})),N=Ve(t.computed(()=>s.textAlign),"textAlign"),T=t.computed(()=>{const F={};return N.value&&(F["text-align"]=N.value),F}),$=t.ref(!1),E=()=>{u.value===!0||p.value===!0||($.value=!0)},D=F=>{$.value=F},P=(F,G)=>{let Z=G.map(R=>{if(R==null)return R;let X={...R};return Reflect.deleteProperty(X,"text"),X[s.textKey]=R.text??"",Reflect.deleteProperty(X,"value"),X[s.valueKey]=R.value??"",X});C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values,s.valueType==="text"?(d("change",f.value,Z),d("update:modelValue",f.value)):s.valueType==="item"?(d("change",Z,Z),d("update:modelValue",Z)):(d("change",h.value,Z),d("update:modelValue",h.value)),d("update:pathNodes",Z)},K=F=>{let G=F.map(Z=>{if(Z==null)return Z;let ne={...Z};return Reflect.deleteProperty(ne,"text"),ne[s.textKey]=Z.text??"",Reflect.deleteProperty(ne,"value"),ne[s.valueKey]=Z.value??"",ne});d("pathChange",G)},V=F=>{b.value=!0,d("focus",h.value,F)},I=F=>{setTimeout(()=>{b.value=!1},0),d("blur",h.value,F)},L=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),x=t.computed(()=>ke(s.unit)>0),W=t.computed(()=>ke(s.unit)>0&&!b.value),j=t.computed(()=>({hidden:!W.value})),O=F=>{C.value=[],f.value=[],h.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>s.clearable&&!u.value&&!p.value),H=t.computed(()=>{let F=h.value&&h.value.length>0;return s.clearable&&F&&b.value}),q=F=>{H.value?O(F):E()},M=t.computed(()=>H.value&&ee.value?o:l),v=t.computed(()=>({action:!0}));let Y=null;const z=()=>typeof Y=="function"?Y:typeof s.lazyLoad=="function"?s.lazyLoad:(Y=async(F,G)=>{const Z=[],ne=[];let R=0;if(!F.root){let Q=F;for(;Q;){const U=St(s,Q),J=Ct(s,Q);ne.splice(0,0,U),Z.splice(0,0,J),Q=Q._parent}R=Z.length}const X=await y.load(s.source,{...F,level:R,pathLabels:ne,pathValues:Z},!0);G(X)},Y);return()=>{const F={class:w.value,style:T.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:E,onFocus:V,onBlur:I};i&&(F.disabled=!0);const G=[],Z=t.h("input",F);G.push(Z);const ne=[],R={class:["action-icon"]},X=t.h(M.value,R),Q={class:v.value,onClick:q},U=t.h("view",Q,{default:()=>[X]});if(ne.push(U),x.value){const ft=t.h("view",{class:j.value},[s.unit]);ne.push(ft)}const J={class:L.value},te=t.h("view",J,{default:()=>ne});G.push(te);const ae={default:()=>G};ae.label=c.slots.default,ae.prepend=c.slots.prepend,ae.append=c.slots.append,ae.fixedPreTip=c.slots.fixedPreTip,ae.fixedTip=c.slots.fixedTip;let se={};se.visible=$.value,se["onUpdate:visible"]=D,se.modelValue=h.value,se.onChange=P,se.onPathChange=K,se.title=s.title,se.valueKey=s.valueKey,se.textKey=s.textKey,se.childrenKey=s.childrenKey,se.convertConfig=s.convertConfig,s.lazy?(se.lazy=!0,se.lazyLoad=z()):se.options=k.value;const de=t.h(r,se);ae.hide=()=>[de];const Ne={...rt(s,ls)};return s.prop&&(Ne.prop=`${s.prop}_item`),t.h(a,Ne,ae)}}}}const{componentName:Au,create:Tu,scope:$u}=_("cascader-item"),Go=Tu(Bu(Au,$u,Be,le.CircleClose,le.ArrowRight,zn,!1));var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",i="second",s="minute",c="hour",u="day",p="week",d="month",g="quarter",S="year",b="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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("_")},h=function(K,V,I){var L=String(K);return!L||L.length>=V?K:""+Array(V+1-L.length).join(I)+K},C={s:h,z:function(K){var V=-K.utcOffset(),I=Math.abs(V),L=Math.floor(I/60),x=I%60;return(V<=0?"+":"-")+h(L,2,"0")+":"+h(x,2,"0")},m:function K(V,I){if(V.date()<I.date())return-K(I,V);var L=12*(I.year()-V.year())+(I.month()-V.month()),x=V.clone().add(L,d),W=I-x<0,j=V.clone().add(L+(W?-1:1),d);return+(-(L+(I-x)/(W?x-j:j-x))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:d,y:S,w:p,d:u,D:b,h:c,m:s,s:i,ms:r,Q:g}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},A="en",w={};w[A]=m;var N=function(K){return K instanceof D},T=function K(V,I,L){var x;if(!V)return A;if(typeof V=="string"){var W=V.toLowerCase();w[W]&&(x=W),I&&(w[W]=I,x=W);var j=V.split("-");if(!x&&j.length>1)return K(j[0])}else{var O=V.name;w[O]=V,x=O}return!L&&x&&(A=x),x||!L&&A},$=function(K,V){if(N(K))return K.clone();var I=typeof V=="object"?V:{};return I.date=K,I.args=arguments,new D(I)},E=C;E.l=T,E.i=N,E.w=function(K,V){return $(K,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var D=function(){function K(I){this.$L=T(I.locale,null,!0),this.parse(I)}var V=K.prototype;return V.parse=function(I){this.$d=function(L){var x=L.date,W=L.utc;if(x===null)return new Date(NaN);if(E.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var j=x.match(k);if(j){var O=j[2]-1||0,ee=(j[7]||"0").substring(0,3);return W?new Date(Date.UTC(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)):new Date(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)}}return new Date(x)}(I),this.$x=I.x||{},this.init()},V.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()},V.$utils=function(){return E},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(I,L){var x=$(I);return this.startOf(L)<=x&&x<=this.endOf(L)},V.isAfter=function(I,L){return $(I)<this.startOf(L)},V.isBefore=function(I,L){return this.endOf(L)<$(I)},V.$g=function(I,L,x){return E.u(I)?this[L]:this.set(x,I)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(I,L){var x=this,W=!!E.u(L)||L,j=E.p(I),O=function(F,G){var Z=E.w(x.$u?Date.UTC(x.$y,G,F):new Date(x.$y,G,F),x);return W?Z:Z.endOf(u)},ee=function(F,G){return E.w(x.toDate()[F].apply(x.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(G)),x)},H=this.$W,q=this.$M,M=this.$D,v="set"+(this.$u?"UTC":"");switch(j){case S:return W?O(1,0):O(31,11);case d:return W?O(1,q):O(0,q+1);case p:var Y=this.$locale().weekStart||0,z=(H<Y?H+7:H)-Y;return O(W?M-z:M+(6-z),q);case u:case b:return ee(v+"Hours",0);case c:return ee(v+"Minutes",1);case s:return ee(v+"Seconds",2);case i:return ee(v+"Milliseconds",3);default:return this.clone()}},V.endOf=function(I){return this.startOf(I,!1)},V.$set=function(I,L){var x,W=E.p(I),j="set"+(this.$u?"UTC":""),O=(x={},x[u]=j+"Date",x[b]=j+"Date",x[d]=j+"Month",x[S]=j+"FullYear",x[c]=j+"Hours",x[s]=j+"Minutes",x[i]=j+"Seconds",x[r]=j+"Milliseconds",x)[W],ee=W===u?this.$D+(L-this.$W):L;if(W===d||W===S){var H=this.clone().set(b,1);H.$d[O](ee),H.init(),this.$d=H.set(b,Math.min(this.$D,H.daysInMonth())).$d}else O&&this.$d[O](ee);return this.init(),this},V.set=function(I,L){return this.clone().$set(I,L)},V.get=function(I){return this[E.p(I)]()},V.add=function(I,L){var x,W=this;I=Number(I);var j=E.p(L),O=function(q){var M=$(W);return E.w(M.date(M.date()+Math.round(q*I)),W)};if(j===d)return this.set(d,this.$M+I);if(j===S)return this.set(S,this.$y+I);if(j===u)return O(1);if(j===p)return O(7);var ee=(x={},x[s]=o,x[c]=l,x[i]=a,x)[j]||1,H=this.$d.getTime()+I*ee;return E.w(H,this)},V.subtract=function(I,L){return this.add(-1*I,L)},V.format=function(I){var L=this,x=this.$locale();if(!this.isValid())return x.invalidDate||y;var W=I||"YYYY-MM-DDTHH:mm:ssZ",j=E.z(this),O=this.$H,ee=this.$m,H=this.$M,q=x.weekdays,M=x.months,v=function(G,Z,ne,R){return G&&(G[Z]||G(L,W))||ne[Z].slice(0,R)},Y=function(G){return E.s(O%12||12,G,"0")},z=x.meridiem||function(G,Z,ne){var R=G<12?"AM":"PM";return ne?R.toLowerCase():R},F={YY:String(this.$y).slice(-2),YYYY:this.$y,M:H+1,MM:E.s(H+1,2,"0"),MMM:v(x.monthsShort,H,M,3),MMMM:v(M,H),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:v(x.weekdaysMin,this.$W,q,2),ddd:v(x.weekdaysShort,this.$W,q,3),dddd:q[this.$W],H:String(O),HH:E.s(O,2,"0"),h:Y(1),hh:Y(2),a:z(O,ee,!0),A:z(O,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:j};return W.replace(f,function(G,Z){return Z||F[G]||j.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(I,L,x){var W,j=E.p(L),O=$(I),ee=(O.utcOffset()-this.utcOffset())*o,H=this-O,q=E.m(this,O);return q=(W={},W[S]=q/12,W[d]=q,W[g]=q/3,W[p]=(H-ee)/6048e5,W[u]=(H-ee)/864e5,W[c]=H/l,W[s]=H/o,W[i]=H/a,W)[j]||H,x?q:E.a(q)},V.daysInMonth=function(){return this.endOf(d).$D},V.$locale=function(){return w[this.$L]},V.locale=function(I,L){if(!I)return this.$L;var x=this.clone(),W=T(I,L,!0);return W&&(x.$L=W),x},V.clone=function(){return E.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},K}(),P=D.prototype;return $.prototype=P,[["$ms",r],["$s",i],["$m",s],["$H",c],["$W",u],["$M",d],["$y",S],["$D",b]].forEach(function(K){P[K[1]]=function(V){return this.$g(V,K[0],K[1])}}),$.extend=function(K,V){return K.$i||(K(V,D,$),K.$i=!0),$},$.locale=T,$.isDayjs=N,$.unix=function(K){return $(1e3*K)},$.en=w[A],$.Ls=w,$.p={},$})})(as);var Vu=as.exports;const Ke=Xe(Vu);var rs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,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?/,i=/\d*[^-_:/,()\s\d]+/,s={},c=function(y){return(y=+y)+(y>68?1900:2e3)},u=function(y){return function(k){this[y]=+k}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(k){if(!k||k==="Z")return 0;var f=k.match(/([+-]|\d\d)/g),m=60*f[1]+(+f[2]||0);return m===0?0:f[0]==="+"?-m:m}(y)}],d=function(y){var k=s[y];return k&&(k.indexOf?k:k.s.concat(k.f))},g=function(y,k){var f,m=s.meridiem;if(m){for(var h=1;h<=24;h+=1)if(y.indexOf(m(h,0,k))>-1){f=h>12;break}}else f=y===(k?"pm":"PM");return f},S={A:[i,function(y){this.afternoon=g(y,!1)}],a:[i,function(y){this.afternoon=g(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[l,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[l,u("day")],Do:[i,function(y){var k=s.ordinal,f=y.match(/\d+/);if(this.day=f[0],k)for(var m=1;m<=31;m+=1)k(m).replace(/\[|\]/g,"")===y&&(this.day=m)}],M:[r,u("month")],MM:[l,u("month")],MMM:[i,function(y){var k=d("months"),f=(d("monthsShort")||k.map(function(m){return m.slice(0,3)})).indexOf(y)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[i,function(y){var k=d("months").indexOf(y)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,u("year")],YY:[l,function(y){this.year=c(y)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function b(y){var k,f;k=y,f=s&&s.formats;for(var m=(y=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,E,D){var P=D&&D.toUpperCase();return E||f[D]||a[D]||f[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(K,V,I){return V||I.slice(1)})})).match(o),h=m.length,C=0;C<h;C+=1){var A=m[C],w=S[A],N=w&&w[0],T=w&&w[1];m[C]=T?{regex:N,parser:T}:A.replace(/^\[|\]$/g,"")}return function($){for(var E={},D=0,P=0;D<h;D+=1){var K=m[D];if(typeof K=="string")P+=K.length;else{var V=K.regex,I=K.parser,L=$.slice(P),x=V.exec(L)[0];I.call(E,x),$=$.replace(x,"")}}return function(W){var j=W.afternoon;if(j!==void 0){var O=W.hours;j?O<12&&(W.hours+=12):O===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(y,k,f){f.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var m=k.prototype,h=m.parse;m.parse=function(C){var A=C.date,w=C.utc,N=C.args;this.$u=w;var T=N[1];if(typeof T=="string"){var $=N[2]===!0,E=N[3]===!0,D=$||E,P=N[2];E&&(P=N[2]),s=this.$locale(),!$&&P&&(s=f.Ls[P]),this.$d=function(L,x,W){try{if(["x","X"].indexOf(x)>-1)return new Date((x==="X"?1e3:1)*L);var j=b(x)(L),O=j.year,ee=j.month,H=j.day,q=j.hours,M=j.minutes,v=j.seconds,Y=j.milliseconds,z=j.zone,F=new Date,G=H||(O||ee?1:F.getDate()),Z=O||F.getFullYear(),ne=0;O&&!ee||(ne=ee>0?ee-1:F.getMonth());var R=q||0,X=M||0,Q=v||0,U=Y||0;return z?new Date(Date.UTC(Z,ne,G,R,X,Q,U+60*z.offset*1e3)):W?new Date(Date.UTC(Z,ne,G,R,X,Q,U)):new Date(Z,ne,G,R,X,Q,U)}catch{return new Date("")}}(A,T,w),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),D&&A!=this.format(T)&&(this.$d=new Date("")),s={}}else if(T instanceof Array)for(var K=T.length,V=1;V<=K;V+=1){N[1]=T[V-1];var I=f.apply(this,N);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}V===K&&(this.$d=new Date(""))}else h.call(this,C)}}})})(rs);var Eu=rs.exports;const Du=Xe(Eu);var ss={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){var r=o.prototype,i=r.format;l.en.ordinal=function(s){var c=["th","st","nd","rd"],u=s%100;return"["+s+(c[(u-20)%10]||c[u]||c[0])+"]"},r.format=function(s){var c=this,u=this.$locale();if(!this.isValid())return i.bind(this)(s);var p=this.$utils(),d=(s||"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(g){switch(g){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return u.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return u.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),g==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),g==="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 g}});return i.bind(this)(d)}}})})(ss);var Iu=ss.exports;const xu=Xe(Iu);var is={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){var r=o.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,g,S,b,y){var k=d.name?d:d.$locale(),f=i(k[g]),m=i(k[S]),h=f||m.map(function(A){return A.slice(0,b)});if(!y)return h;var C=k.weekStart;return h.map(function(A,w){return h[(w+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},u=function(d,g){return d.formats[g]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,y,k){return y||k.slice(1)})}(d.formats[g.toUpperCase()])},p=function(){var d=this;return{months:function(g){return g?g.format("MMMM"):s(d,"months")},monthsShort:function(g){return g?g.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):s(d,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return u(d.$locale(),g)},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(g){return u(d,g)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return s(c(),"months")},l.monthsShort=function(){return s(c(),"monthsShort","months",3)},l.weekdays=function(d){return s(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return s(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return s(c(),"weekdaysMin","weekdays",2,d)}}})})(is);var vu=is.exports;const qu=Xe(vu);var cs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){var a="week",o="year";return function(l,r,i){var s=r.prototype;s.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=i(this).startOf(o).add(1,o).date(u),d=i(this).endOf(a);if(p.isBefore(d))return 1}var g=i(this).startOf(o).date(u).startOf(a).subtract(1,"millisecond"),S=this.diff(g,a,!0);return S<0?i(this).startOf("week").week():Math.ceil(S)},s.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(cs);var Pu=cs.exports;const Mu=Xe(Pu);var ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),i=this.year();return r===1&&l===11?i+1:l===0&&r>=52?i-1:i}}})})(ds);var Lu=ds.exports;const zu=Xe(Lu);var us={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var i=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?i:this.add(r-i,"day")}}})})(us);var Ou=us.exports;const Fu=Xe(Ou);var fs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(fs);var Ru=fs.exports;const Ku=Xe(Ru);var ms={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(ms);var Uu=ms.exports;const Hu=Xe(Uu);Ke.extend(qu),Ke.extend(xu),Ke.extend(Du),Ke.extend(Mu),Ke.extend(zu),Ke.extend(Fu),Ke.extend(Ku),Ke.extend(Hu);const re={format(e,n){return Ke(e).format(n)},parser(e,n){return Ke(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,a){e=e||0;let o=n??new Date;const l=e*(1e3*60*60*24);return o=new Date(o.getTime()+l),a=a??"YYYY-MM-DD",this.format(o,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(),i=l.getDate(),s=6-r;return o!==0&&(r=r==0?7:r,s=7-r),Math.ceil((i+s)/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),i=Math.round((l.valueOf()-r.valueOf())/864e5);let s=l.getDay(),c=6-s;return o!==0&&(s=s==0?7:s,c=7-s),Math.ceil((i+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let i=l.getDay();if(o===0){const c=r-i*864e5,u=r+(6-i)*864e5,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(u));return[p,d]}else{i=i==0?7:i;const s=24*60*60*1e3,c=r-(i-1)*s,u=r+(7-i)*s,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(u));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=re.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=re.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(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i}},ps=new Date().getFullYear(),Zo={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"},Fn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ke(n)>0?o=re.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)},Jo=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),re.format(new Date(o),a)};let _o={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(ps-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(ps+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:ju,scope:Wu}=_("date-picker"),Yu=ju({components:{Picker:zt},props:{..._o},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Wu),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds"),today:a("today")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,h){return new Date(m,h,0).getDate()}const i=(m,h)=>{const C=e[`${m}Date`],A=C.getFullYear();let w=1,N=1,T=0,$=0;m==="max"&&(w=12,N=r(h.getFullYear(),h.getMonth()+1),T=23,$=59);const E=$;return h.getFullYear()===A&&(w=C.getMonth()+1,h.getMonth()+1===w&&(N=C.getDate(),h.getDate()===N&&(T=C.getHours(),h.getHours()===T&&($=C.getMinutes())))),{[`${m}Year`]:A,[`${m}Month`]:w,[`${m}Date`]:N,[`${m}Hour`]:T,[`${m}Minute`]:$,[`${m}Seconds`]:E}},s=t.computed(()=>{if(!g.value)return[];const{maxYear:m,maxDate:h,maxMonth:C,maxHour:A,maxMinute:w,maxSeconds:N}=i("max",g.value),{minYear:T,minDate:$,minMonth:E,minHour:D,minMinute:P,minSeconds:K}=i("min",g.value);let V=[{type:"year",range:[T,m]},{type:"month",range:[E,C]},{type:"day",range:[$,h]},{type:"hour",range:[D,A]},{type:"minute",range:[P,w]},{type:"seconds",range:[K,N]}];switch(e.type){case"date":V=V.slice(0,3);break;case"datetime":V=V.slice(0,5);break;case"time":V=V.slice(3,6);break;case"year-month":V=V.slice(0,2);break;case"month-day":V=V.slice(1,3);break;case"datehour":V=V.slice(0,4);break;case"hour-minute":V=V.slice(3,5);break}return V}),c=(m,h,C,A,w)=>{if(!(h>m))return null;const N=[];for(;m<=h;)e.isShowChinese?C==="day"&&A&&m===w?N.push({text:o.today,value:m}):N.push({text:m+o[C],value:m}):N.push({text:`${m}`,value:m}),C==="minute"?m+=e.minuteStep:m++;return N},u=t.computed(()=>{let m=!1;const h=new Date;let C=h.getDate();g.value&&(m=h.getFullYear()===g.value.getFullYear()&&h.getMonth()===g.value.getMonth());let A=[];return s.value.forEach(w=>{let N=c(w.range[0],w.range[1],w.type,m,C);N&&A.push(N)}),A}),p=(m,h)=>m==="year"?h.getFullYear():m==="month"?h.getMonth()+1:m==="day"?h.getDate():m==="hour"?h.getHours():m==="minute"?h.getMinutes():m==="seconds"?h.getSeconds():0,d=t.ref(),g=t.ref(null);t.watch(()=>e.modelValue,m=>{let h;if(typeof m=="string"?m.length==0?h=new Date:e.valueFormat?h=Fn(e,e.modelValue,e.valueFormat):h=Fn(e,m,Zo[e.type]):He(m)?h=m:h=new Date,!!h&&(!g.value||h.getTime()!==g.value.getTime())){g.value=h;let C=[];s.value.forEach(A=>{let w=p(A.type,h);C.push(w)}),d.value=C}},{immediate:!0});const S=m=>{if(e.type==="date"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1));A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A)}else if(e.type==="datetime"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1)),w=m[3],N=m[4];A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A,w,N)}else if(e.type==="time"){const h=m[0],C=m[1],A=m[2],w=g.value??new Date,N=new Date(w.getFullYear(),w.getMonth(),w.getDate(),h,C,A);g.value=N}else if(e.type==="year-month"){const h=m[0],C=m[1]-1;g.value=new Date(h,C)}else if(e.type==="month-day"){const C=(g.value??new Date).getFullYear(),A=m[0]-1,w=Math.min(m[1],r(C,A+1));w!==m[1]&&(m[1]=w);const N=new Date(C,A,w);g.value=N}else if(e.type==="datehour"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1)),w=m[3];A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A,w)}else if(e.type==="hour-minute"){const h=m[0],C=m[1],A=g.value??new Date,w=new Date(A.getFullYear(),A.getMonth(),A.getDate(),h,C);g.value=w}d.value=m};return{columns:u,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 h=g.value??new Date;if(e.valueFormat){let C=Jo(e,h,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",h);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Xu(e,n,a,o,l,r){const i=t.resolveComponent("Picker");return t.openBlock(),t.createBlock(i,{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 Rn=oe(Yu,[["render",Xu]]),Qu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Gu(e){let n=e.format;if(!n){let a=e.type??"date";n=Zo[a]}return n}function Zu(e,n,a,o,l,r,i=!1){return{props:{...he,...ye,..._o,...Qu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),k=Pe(s,"modelValue",q=>q==null?null:typeof q=="string"?q.length==0?null:s.valueFormat?Fn(s,q,s.valueFormat)??q:Fn(s,q,Zo[s.type])??q:He(q)?q:null,d),f=t.computed(()=>{if(!k.value)return"";const q=Gu(s);return Jo(s,k.value,q)}),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const q={};return C.value&&(q["text-align"]=C.value),q}),w=t.ref(!1),N=()=>{w.value=!0},T=()=>{w.value=!1};c.expose({showPicker:N,hidePicker:T});const $=q=>{w.value=q},E=q=>{if(k.value=q,s.valueFormat){let M=Jo(s,q,s.valueFormat);d("update:modelValue",M,{}),d("change",M,{})}else d("update:modelValue",q,{}),d("change",q,{})},D=q=>{let v=q.target.value;b.value=!0,d("focus",v,q)},P=q=>{setTimeout(()=>{b.value=!1},0);let v=q.target.value;s.maxLength&&v.length>Number(s.maxLength)&&(v=v.slice(0,Number(s.maxLength))),d("blur",v,q)},K=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),V=t.computed(()=>ke(s.unit)>0),I=t.computed(()=>ke(s.unit)>0&&!b.value),L=t.computed(()=>({hidden:!I.value})),x=q=>{k.value="",d("update:modelValue","",q),d("change","",q),d("clear",""),T()},W=t.computed(()=>s.clearable&&!u.value&&!p.value),j=t.computed(()=>{let q=ke(k.value)>0;return s.clearable&&q&&b.value}),O=q=>{j.value?x(q):N()},ee=t.computed(()=>j.value&&W.value?o:l),H=t.computed(()=>({action:!0}));return()=>{const q={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P};i&&(q.disabled=!0);const M=[],v=t.h("input",q);M.push(v);const Y=[],z={class:["action-icon"]},F=t.h(ee.value,z),G={class:H.value,onClick:O},Z=t.h("view",G,{default:()=>[F]});if(Y.push(Z),V.value){const de=t.h("view",{class:L.value},[s.unit]);Y.push(de)}const ne={class:K.value},R=t.h("view",ne,{default:()=>Y});M.push(R);const X={default:()=>M};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const Q=Se(s,_o);Q.valueFormat=null,Q.disabled=!1,Q.readonly=u.value||p.value,Q.visible=w.value,Q["onUpdate:visible"]=$,Q.modelValue=k.value,Q["onUpdate:modelValue"]=E,Q.onClear=x;const U={};if(c.slots.top){const de=c.slots.top();U.top=()=>de}if(c.slots.bottom){const de=c.slots.bottom();U.default=()=>de}const J=t.h(r,Q,U);X.hide=()=>[J];const ae={...Se(s,ye,he)};return s.prop&&(ae.prop=`${s.prop}_item`),t.h(a,ae,X)}}}}const{create:Ju,componentName:_u,scope:ef}=_("date-item"),el=Ju(Zu(_u,ef,Be,le.CircleClose,le.Date,Rn,!1)),tf=39,nf=64,{create:of,scope:lf}=_("calendar-pane"),af=of({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:re.getDay(0)},endDate:{type:String,default:re.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(lf),r=o(e,["title","confirmText","startText","endText","today"]),i=JSON.parse(l("weekdays")),s=t.ref([...i.slice(e.firstDayOfWeek,7),...i.slice(0,e.firstDayOfWeek)]),c=t.ref(null),u=t.ref(null),p=t.ref(null),d=t.ref(null),g=t.ref(0),S=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),b=t.computed(()=>a.btn),y=t.computed(()=>a["top-info"]),k=t.computed(()=>a["bottom-info"]),f=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=z=>z.split("-"),h=z=>re.isEqual(f.currDate[0],z),C=z=>re.isEqual(f.currDate[1],z),A=z=>f.currDate?.length>0?f.currDate?.some(F=>re.isEqual(F,z)):!1,w=(z,F)=>F.curData[0]+"-"+F.curData[1]+"-"+re.getNumTwoBit(+z.day),N=(z,F)=>{const G=w(z,F),{type:Z}=e;return z.type=="curr"?re.isEqual(f.currDate,G)||(Z=="range"||Z=="week")&&(h(G)||C(G))||Z=="multiple"&&A(G)?`${f.dayPrefix}--active`:f.propStartDate&&re.compareDate(G,f.propStartDate)||f.propEndDate&&re.compareDate(f.propEndDate,G)?`${f.dayPrefix}--disabled`:(Z=="range"||Z=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&re.compareDate(f.currDate[0],G)&&re.compareDate(G,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},T=()=>{const{type:z}=e;if(z=="range"&&f.chooseData.length==2||z!="range"){let F=f.chooseData.slice(0);z=="week"&&(F={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("choose",F),e.poppable&&n("update")}},$=(z,F,G=!1)=>{if(N(z,F)!=`${f.dayPrefix}--disabled`){const{type:Z}=e;let[ne,R]=F.curData,X=[...F.curData];if(X[2]=re.getNumTwoBit(Number(z.day)),X[3]=`${X[0]}-${X[1]}-${X[2]}`,X[4]=re.getWhatDay(+X[0],+X[1],+X[2]),Z=="multiple")if(f.currDate?.length>0){let Q;f.currDate?.forEach((U,J)=>{U==X[3]&&(Q=J)}),G?f.chooseData.push([...X]):Q!==void 0?(f.currDate.splice(Q,1),f.chooseData.splice(Q,1)):(f.currDate.push(X[3]),f.chooseData.push([...X]))}else f.currDate=[X[3]],f.chooseData=[[...X]];else if(Z=="range"){let Q=Object.values(f.currDate).length;Q==2||Q==0?f.currDate=[X[3]]:re.compareDate(f.currDate[0],X[3])?Array.isArray(f.currDate)&&f.currDate.push(X[3]):Array.isArray(f.currDate)&&f.currDate.unshift(X[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...X]]:re.compareDate(f.chooseData[0][3],X[3])?f.chooseData=[...f.chooseData,[...X]]:f.chooseData=[[...X],...f.chooseData]}else if(Z=="week"){let Q=re.getWeekDate(ne,R,z.day,e.firstDayOfWeek);f.propStartDate&&re.compareDate(Q[0],f.propStartDate)&&Q.splice(0,1,f.propStartDate),f.propEndDate&&re.compareDate(f.propEndDate,Q[1])&&Q.splice(1,1,f.propEndDate),f.currDate=Q,f.chooseData=[re.formatResultDate(Q[0]),re.formatResultDate(Q[1])]}else f.currDate=X[3],f.chooseData=[...X];if(!G){let Q=f.chooseData;Z=="week"&&(Q={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&T()}}},E=z=>{let[F,G,Z]=z;return{date:z,monthWeekNum:re.getMonthWeek(F,G,Z,e.firstDayOfWeek),yearWeekNum:re.getYearWeek(F,G,Z,e.firstDayOfWeek)}},D=z=>{const F=f.monthsData[f.monthsData.length-1];let G=parseInt(F.curData[0]),Z=parseInt(F.curData[1].toString().replace(/^0/,""));switch(z){case"prev":Z==1&&(G-=1),Z=Z==1?12:--Z;break;case"next":Z==12&&(G+=1),Z=Z==12?1:++Z;break}return[G+"",re.getNumTwoBit(Z),re.getMonthDays(String(G),String(Z))+""]},P=(z,F,G)=>{let{year:Z,month:ne}=G;return Array.from(Array(z),(R,X)=>({day:String(X+1),type:F,year:Z,month:ne}))},K=(z,F,G,Z)=>{z=z-e.firstDayOfWeek;let{year:ne,month:R}=G;return z>=7&&(z-=7),Array.from(Array(Z),(Q,U)=>({day:String(U+1),type:F,year:ne,month:R})).slice(Z-z)},V=(z,F)=>{const G=re.getMonthPreDay(+z[0],+z[1]);let Z=Number(z[1])-1,ne=Number(z[0]);Z<=0&&(Z=12,ne+=1);const R=re.getMonthDays(String(z[0]),String(z[1])),X=re.getMonthDays(ne+"",Z+""),Q={year:z[0],month:z[1]},U={curData:z,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...K(G,"prev",{month:String(Z),year:String(ne)},X),...P(R,"curr",Q)],cssHeight:0,cssScrollHeight:0},J=U.monthData.length>35?6:5;U.cssHeight=tf+nf*J;let te=0;f.monthsData.length>0&&(te=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),U.cssScrollHeight=te,(!f.endData||!re.compareDate(`${f.endData[0]}-${f.endData[1]}-${re.getMonthDays(f.endData[0],f.endData[1])}`,`${z[0]}-${z[1]}-${z[2]}`))&&f.monthsData.push(U)},I=()=>{let z=e.startDate?e.startDate:re.getDay(0),F=e.endDate?e.endDate:re.getDay(365);f.propStartDate=z,f.propEndDate=F,f.startData=m(z),f.endData=m(F),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const G={year:Number(f.startData[0]),month:Number(f.startData[1])},Z={year:Number(f.endData[0]),month:Number(f.endData[1])};let ne=Z.month-G.month;Z.year-G.year>0&&(ne=ne+12*(Z.year-G.year)),ne<=0&&(ne=1),V(f.startData);let R=1;do V(D("next"));while(R++<ne);if(f.monthsNum=ne,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(z&&re.compareDate(f.currDate[0],z)&&f.currDate.splice(0,1,z),F&&re.compareDate(F,f.currDate[1])&&f.currDate.splice(1,1,F),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let X=[],Q={};f.currDate.forEach(U=>{z&&!re.compareDate(U,z)&&F&&!re.compareDate(F,U)&&(Object.hasOwnProperty.call(Q,U)||(X.push(U),Q[U]=U))}),f.currDate=[...X],f.defaultData=[...m(X[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[X,Q,U]=m(f.currDate[0]),J=re.getWeekDate(X,Q,U,e.firstDayOfWeek);f.currDate=J,z&&re.compareDate(f.currDate[0],z)&&f.currDate.splice(0,1,z),F&&re.compareDate(F,f.currDate[1])&&f.currDate.splice(1,1,F),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]}}else f.currDate&&(z&&re.compareDate(f.currDate,z)?f.currDate=z:F&&!re.compareDate(f.currDate,F)&&(f.currDate=F),f.defaultData=[...m(f.currDate)])};ve({scrollToDate:z=>{re.compareDate(z,f.propStartDate)?z=f.propStartDate:re.compareDate(z,f.propEndDate)||(z=f.propEndDate);let F=m(z);f.monthsData.forEach((G,Z)=>{if(G.title==l("monthTitle",{year:F[0],month:F[1]})&&c.value){let ne=f.monthsData[Z].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let R=0,X=setInterval(()=>{if(R++,c.value){let Q=ne/10;c.value.scrollTop=c.value.scrollTop+Q}R>=10&&(clearInterval(X),c.value&&(c.value.scrollTop=f.monthsData[Z].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[Z].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let z=0,F=0;f.defaultData.length>0&&f.monthsData.forEach((ne,R)=>{ne.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(z=R),(e.type=="range"||e.type=="week")&&ne.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(F=R)}),j(f.monthsNum,z),f.currentIndex=z,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?($({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),$({day:f.defaultData[5],type:"curr"},f.monthsData[F],!0)):e.type=="week"?$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(ne=>{let R=m(ne),X=f.currentIndex;f.monthsData.forEach((Q,U)=>{Q.title==l("monthTitle",{year:R[0],month:R[1]})&&(X=U)}),$({day:R[2],type:"curr"},f.monthsData[X],!0)}):$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let G=f.monthsData[f.monthsData.length-1],Z=G.cssHeight+G.cssScrollHeight;Qe(()=>{c?.value&&u?.value&&d?.value&&(g.value=c.value.clientHeight,u.value.style.height=`${Z}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(Z/(f.monthsNum+1))}});const j=(z,F)=>{z>=3?F>0&&F<z?f.defaultRange=[F-1,F+3]:F==0?f.defaultRange=[F,F+4]:F==z&&(f.defaultRange=[F-2,F+2]):f.defaultRange=[0,z+2];let G=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=G},O=(z,F)=>(e.type=="range"||e.type=="week")&&z.type=="curr"&&N(z,F)=="fox-calendar__day--active",ee=(z,F)=>O(z,F)&&h(w(z,F)),H=(z,F)=>f.currDate.length>=2&&C(w(z,F))?O(z,F):!1,q=()=>{if(f.currDate.length>=2)return re.isEqual(f.currDate[0],f.currDate[1])},M=z=>{const F=`${z.year}-${z.month}-${Number(z.day)<10?"0"+z.day:z.day}`;return re.isEqual(F,re.date2Str(new Date))},v=z=>{if(f.monthsData.length<=1)return;const F=z.target.scrollTop;let G=Math.floor(F/f.avgHeight);if(G==0)F>=f.monthsData[G+1].cssScrollHeight&&(G+=1);else if(G>0&&G<f.monthsNum-1)F>=f.monthsData[G+1].cssScrollHeight&&(G+=1),F<f.monthsData[G].cssScrollHeight&&(G-=1);else{const Z=Math.round(F+g.value);Z<f.monthsData[G].cssScrollHeight+f.monthsData[G].cssHeight&&F>f.monthsData[G-1].cssScrollHeight&&(G-=1),G+1<=f.monthsNum&&Z>=f.monthsData[G+1].cssScrollHeight+f.monthsData[G+1].cssHeight&&(G+=1),G>=1&&F<f.monthsData[G-1].cssScrollHeight&&(G-=1)}f.currentIndex!==G&&(f.currentIndex=G,j(f.monthsNum,G)),f.yearMonthTitle=f.monthsData[G].title},Y=()=>{f.chooseData.splice(0),f.monthsData.splice(0),I()};return I(),t.watch(()=>e.defaultValue,z=>{z&&e.poppable&&Y()}),{weeks:s,compConthsData:S,showTopBtn:b,topInfo:y,bottomInfo:k,rangeTip:q,mothsViewScroll:v,getClass:N,isStartTip:ee,isEndTip:H,chooseDay:$,isCurrDay:M,confirm:T,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:u,weeksPanel:p,viewArea:d}}}),rf={class:"fox-calendar__header"},sf={key:0,class:"fox-calendar__header-title"},cf={key:1,class:"fox-calendar__header-slot"},df={key:2,class:"fox-calendar__header-subtitle"},uf={class:"fox-calendar__weekdays",ref:"weeksPanel"},ff={class:"fox-calendar__panel",ref:"monthsPanel"},mf={class:"fox-calendar__month-title"},pf={class:"fox-calendar__days"},hf=["onClick"],gf={class:"fox-calendar__day-value"},yf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},bf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},kf={key:2,class:"fox-calendar__day-tips--curr"},Sf={key:4,class:"fox-calendar__day-tip"},Cf={key:0,class:"fox-calendar__footer"};function wf(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",rf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",sf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",cf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",df,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",uf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:s},t.toDisplayString(i),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...i)=>e.mothsViewScroll&&e.mothsViewScroll(...i))},[t.createElementVNode("view",ff,[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,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:s},[t.createElementVNode("view",mf,t.toDisplayString(i.title),1),t.createElementVNode("view",pf,[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(i.monthData,(c,u)=>(t.openBlock(),t.createElementBlock("view",{key:u,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,i)]),onClick:p=>e.chooseDay(c,i)},[t.createElementVNode("view",gf,[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",yf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",bf,[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",kf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,i)?(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,i)?(t.openBlock(),t.createElementBlock("view",Sf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,hf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",Cf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...i)=>e.confirm&&e.confirm(...i))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const hs=oe(af,[["render",wf]]),Nf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Kn={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:Bf}=_("calendar"),Af=Bf({components:{[hs.name]:hs,[me.name]:me},props:{...Kn},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),i=t.computed(()=>a["bottom-info"]),s=t.ref(null),c=y=>{s.value?.scrollToDate(y)},u=()=>{s.value?.initPosition()};t.watch(()=>e.visible,y=>{y&&t.nextTick(()=>{s.value?s.value.doLayout():setTimeout(()=>{s.value&&s.value.doLayout()},250)})}),ve({scrollToDate:c,initPosition:u});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:y=>{n("select",y)},choose:y=>{d(),n("choose",y)},calendarRef:s,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:i}}});function Tf(e,n,a,o,l,r){const i=t.resolveComponent("fox-calendar-pane"),s=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(s,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(i,{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(i,{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 Un=oe(Af,[["render",Tf]]),gs={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}},tl=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ke(e)>0?a=re.parser(e,n):a=new Date,a},wt=(e,n,a)=>(He(n)||(n=new Date),re.format(n,a)),Nt=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=re.date2Str(e),r=re.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function $f(e,n,a,o,{CloseIcon:l,MarkIcon:r},i=!1){return{props:{...he,...ye,...Kn,...gs},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=t.computed(()=>s.type==="range"),k=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{k.startDate!==null&&(k.startDate=null,k.endDate=null,k.startArray=[],k.endArray=[])},m=(v,Y="one",z="YYYY-MM-DD")=>{if(Nf(v)){f();return}if(y.value&&Array.isArray(v)&&v.length==2){let F,G;typeof v[0]=="string"?(F=tl(v[0],z),G=tl(v[1],z)):(F=v[0],G=v[1]);let Z=Nt(F),ne=Nt(G);(k.startDate===null||k.startDate.getTime()!==F.getTime()||k.endDate?.getTime()!==G.getTime())&&(k.startDate=F,k.startArray=Z,k.endDate=G,k.endArray=ne)}else{let F;typeof v=="string"?F=tl(v,z):F=v;let G=Nt(F);(k.startDate===null||k.startDate.getTime()!==F.getTime())&&(k.startDate=F,k.startArray=G)}};m(s.modelValue,s.type,s.valueFormat),t.watch(()=>s.modelValue,v=>{m(v,s.type,s.valueFormat),d("setValue",v)});const h=t.computed(()=>{if(k.startDate===null)return"";if(y.value){let v=wt(s,k.startDate,s.format),Y=wt(s,k.endDate,s.format);return`${v} ${s.rangeSeparator} ${Y}`}else{let v=wt(s,k.startDate,s.format);return s.showWeek&&(v=`${v} ${k.startArray[4]}`),v}}),C=t.computed(()=>{if(k.startDate===null)return null;if(y.value){let v=re.date2Str(k.startDate),Y=re.date2Str(k.endDate??new Date);return[v,Y]}else return re.date2Str(k.startDate)}),A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":u.value,"is-readonly":p.value})),N=Ve(t.computed(()=>s.textAlign),"textAlign"),T=t.computed(()=>{const v={};return N.value&&(v["text-align"]=N.value),v}),$=t.ref(!1),E=()=>{p.value||u.value||($.value=!0)},D=v=>{$.value=v},P=v=>{if(v){if(y.value&&Array.isArray(v)){let Y=v[0],z=pe(Y[0]),F=pe(Y[1]),G=pe(Y[2]),Z=new Date(z,F-1,G),ne=v[1];z=pe(ne[0]),F=pe(ne[1]),G=pe(ne[2]);let R=new Date(z,F-1,G);if(k.startDate=Z,k.startArray=Nt(Z),k.endDate=R,k.endArray=Nt(R),s.valueFormat){let X=wt(s,Z,s.valueFormat),Q=wt(s,R,s.valueFormat);d("update:modelValue",[X,Q],{})}else d("update:modelValue",[Z,R],{})}else{let Y=v,z=pe(Y[0]),F=pe(Y[1]),G=pe(Y[2]),Z=new Date(z,F-1,G);if(k.startDate=Z,k.startArray=Nt(Z),s.valueFormat){let ne=wt(s,Z,s.valueFormat);d("update:modelValue",ne,{})}else d("update:modelValue",Z,{})}d("change",v,{})}},K=v=>{let z=v.target.value;b.value=!0,d("focus",z,v)},V=v=>{setTimeout(()=>{b.value=!1},0);let z=v.target.value;s.maxLength&&z.length>Number(s.maxLength)&&(z=z.slice(0,Number(s.maxLength))),d("blur",z,v)},I=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),L=t.computed(()=>ke(s.unit)>0),x=t.computed(()=>ke(s.unit)>0&&!b.value),W=t.computed(()=>({hidden:!x.value})),j=v=>{f(),d("update:modelValue",null,v),d("change","",v),d("clear","")},O=t.computed(()=>s.clearable&&!u.value&&!p.value),ee=t.computed(()=>{let v=ke(h.value)>0;return s.clearable&&v&&b.value}),H=v=>{ee.value?j(v):E()},q=t.computed(()=>ee.value&&O.value?l:r),M=t.computed(()=>({action:!0}));return()=>{const v={class:w.value,style:T.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:h.value,onClick:E,onFocus:K,onBlur:V};i&&(v.disabled=!0);const Y=[],z=t.h("input",v);Y.push(z);const F=[],G={class:["action-icon"]},Z=t.h(q.value,G),ne={class:M.value,onClick:H},R=t.h("view",ne,{default:()=>[Z]});if(F.push(R),L.value){const Ne=t.h("view",{class:W.value},[s.unit]);F.push(Ne)}const X={class:I.value},Q=t.h("view",X,{default:()=>F});Y.push(Q);const U={default:()=>Y};U.label=c.slots.default,U.prepend=c.slots.prepend,U.append=c.slots.append,U.fixedPreTip=c.slots.fixedPreTip,U.fixedTip=c.slots.fixedTip;const J=Se(s,Kn);J.visible=$.value,J["onUpdate:visible"]=D,J["default-value"]=C.value,J.onChoose=P;const te={};if(c.slots.btn){const Ne=c.slots.btn();te.btn=()=>Ne}c.slots.day&&(te.day=c.slots.day),c.slots.topInfo&&(te.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(te.bottomInfo=c.slots.bottomInfo);const ae=t.h(a,J,te);U.hide=()=>[ae];const de={...rt(s,Kn,gs)};return s.prop&&(de.prop=`${s.prop}_item`),t.h(o,de,U)}}}}const{componentName:Vf,create:Ef,scope:Df}=_("calendar-item"),nl=Ef($f(Vf,Df,Un,Be,{CloseIcon:le.CircleClose,MarkIcon:le.Date},!1)),If={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 xf(e,{CheckNormal:n,Checked:a}){return{props:{...If},setup(o,{emit:l,slots:r}){const i=t.inject("parent",null),s=Bn(),c=t.computed(()=>i.label.value===o.label),u=t.computed(()=>i.position),p=()=>{const y=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const k=fe(o.iconSize),f=o.checkedIcon??s.radio.Checked??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:k,height:k,class:y})}}else{if(r.icon)return r.icon();{const k=fe(o.iconSize),f=o.icon??s.radio.CheckNormal??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:k,height:k,class:y})}}},d=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},g=()=>{const y=[`${e}__button`];return c.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},S=()=>{c.value||o.disabled||o.readonly||i.updateValue(o.label)},b=u.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${b?`${e}--reverse`:""}`,onClick:S},[o.shape=="button"?g():b?[d(),p()]:[p(),d()]])}}}const{componentName:vf,create:qf}=_("radio"),Hn=qf(xf(vf,{CheckNormal:le.CheckNormal,Checked:le.CheckChecked})),{componentName:ys,create:Pf}=_("radio-group"),jn=Pf({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}=gt(),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:`${ys} ${ys}--${e.direction}`,style:l},n.default?.())}}});function bs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Wn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Ft(e,r)===a)return l}return-1}function Wn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ft(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Mf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Lf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let zf=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Of(){const e=t.getCurrentInstance();return new zf(e.proxy)}function Ff(e){return{text:e,value:e}}const ks={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Rf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Kf={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 Uf(e,n,a,o,l){return{props:{...he,...ye,...ks,...Rf,...Kf},emits:["change","update:modelValue","setValue"],setup(r,i){const s=Ee(t.computed(()=>r.readonly)),c=De(t.computed(()=>r.disabled)),u=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return c.value}},r.prop??i.attrs.name),d=Of(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await d.load("radio",f,m);if(h.length>0)if(typeof h[0]=="string"){const w=h.map(N=>Ff(N));g.value=w}else g.value=h;else g.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{S.value=bs(r,m,f,r.valueType),p("setValue",f)},{deep:!0});const b=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const f=g.value[S.value];return Ft(r,f)}),y=f=>{let m=null,h=null;if(g.value.length>0){let C=bs(r,g.value,f,"value");S.value=C,C>=0&&(h=g.value[C],r.valueType==="text"?m=Wn(r,h):r.valueType==="item"?m=h:m=Ft(r,h))}else m=f;p("update:modelValue",m),p("change",m,h)},k=()=>{let f=null,m=null;if(g.value.length>0&&S.value!==-1){let h=g.value[S.value];r.valueType==="text"?f=Wn(r,h):r.valueType==="item"?f=h:f=Ft(r,h)}p("update:modelValue",f),p("change",f,m)};if(ve({clear(){S.value!==-1&&(S.value=-1,k())}}),r.source){const f=()=>{const m=[],h=Se(r,ks);return g.value.forEach((C,A)=>{const w=Ft(r,C),N=Mf(r,C);let T={...h,label:w,disabled:N};const $=Lf(r,C,A);T={...T,...$},c.value&&(T.disabled=!0),s.value&&(T.readonly=!0);const E={};if(i.slots.icon&&(E.icon=i.slots.icon),i.slots.checkedIcon&&(E.checkedIcon=i.slots.checkedIcon),typeof i.slots.text=="function"){const P=i.slots.text(C);E.default=()=>[P]}else{const P=Wn(r,C);E.default=()=>P}let D=t.h(l,T,E);m.push(D)}),m};return()=>{const m=f(),h={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"onUpdate:modelValue":y},C=t.h(o,h,{default:()=>m}),A={default:()=>C};A.label=i.slots.default,A.prepend=i.slots.prepend,A.append=i.slots.append,A.fixedPreTip=i.slots.fixedPreTip,A.fixedTip=i.slots.fixedTip;const N={...Se(r,ye,he)};return r.prop&&(N.prop=`${r.prop}_item`),t.h(a,N,A)}}else return()=>{const f=i.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"update:modelValue":y},{default:()=>f})}}}}const{componentName:Hf,create:jf,scope:Wf}=_("radio-item"),ol=jf(Uf(Hf,Wf,Be,jn,Hn)),Yf=(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:i}=gt(),s=Bn(),c=t.inject("parent",null),u=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,h=>{u.partialSelect=h});const p=t.computed(()=>!!c),d=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),g=t.computed(()=>p.value?c.position:l.textPosition);let S="";const b=(h,C)=>{S="click",i("update:modelValue",h),i("change",h,C)};t.watch(()=>l.modelValue,h=>{S=="click"?S="":i("change",h)});const y=()=>{const h=[];if(u.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const C=fe(l.iconSize),A=l.indeterminateIcon??s.checkbox.Indeterminate??o;return h.push("fox-checkbox__icon--indeterminate"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}else if(d.value){if(r.checkedIcon)return r.checkedIcon();{const C=fe(l.iconSize),A=l.checkedIcon??s.checkbox.Checked??a;return h.push("fox-checkbox__icon"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}else{if(r.icon)return r.icon();{const C=fe(l.iconSize),A=l.icon??s.checkbox.CheckNormal??n;return h.push("fox-checkbox__icon--unchecked"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}},k=()=>{const h=[`${e}__label`];return l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},f=()=>{const h=[`${e}__button`];return d.value&&h.push(`${e}__button--active`),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},m=h=>{if(!(l.disabled||l.readonly)){if(d.value&&u.partialSelect){u.partialSelect=!1,b(d.value,r.default?.()[0].children);return}if(b(!d.value,r.default?.()[0].children),p.value){const C=c.value.value,A=c.max.value,{label:w}=l,N=C.indexOf(w);N>-1?C.splice(N,1):N<=-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} ${g.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?f():[y(),k()]])}}),{componentName:Xf,create:Qf}=_("checkbox"),Yn=Qf(Yf(Xf,{CheckNormal:le.CheckNormal,Checked:le.Checked,Indeterminate:le.CheckDisabled})),{create:Gf,componentName:Ss}=_("checkbox-group"),Xn=Gf({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}=gt(),o=t.reactive({children:[]}),l=u=>{u.proxy&&o.children.push(u.proxy)},r=u=>{u.proxy&&(o.children=o.children.filter(p=>p!==u.proxy))},i=u=>{a("update:modelValue",u),a("change",u)},s=u=>{const p=[];u&&o.children.forEach(d=>{d?.disabled||p.push(d?.label)}),a("update:modelValue",p)},c=()=>{const u=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",u)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:i,link:l,unlink:r}),t.watch(()=>e.modelValue,u=>{a("change",u)}),ve({toggleAll:s,toggleReverse:c}),()=>{const u={};return e.textAlign&&(u["text-align"]=e.textAlign),t.h("view",{class:`${Ss} ${Ss}--${e.direction}`,style:u},n.default?.())}}});function Cs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(ll(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Qn(e,r)===a)return l}return-1}function ll(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Qn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Zf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Jf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let _f=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function em(){const e=t.getCurrentInstance();return new _f(e.proxy)}function tm(e){return{text:e,value:e}}const nm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ws={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},om={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 lm(e,n,a,o,l){return{props:{...he,...ye,...nm,...ws,...om},emits:["change","update:modelValue","setValue"],setup(r,i){const s=De(t.computed(()=>r.disabled)),c=Ee(t.computed(()=>r.readonly)),u=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 s.value}},r.prop??i.attrs.name),d=em(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await d.load("checkbox",f,m);if(h.length>0)if(typeof h[0]=="string"){const w=h.map(N=>tm(N));g.value=w}else g.value=h;else g.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{const h=[];Array.isArray(f)&&f.forEach(C=>{let A=Cs(r,m,C,r.valueType);A!==-1&&h.push(A)}),!Me(h,S.value)&&(S.value=h,p("setValue",h))},{deep:!0});const b=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return S.value.forEach(m=>{let h=g.value[m];f.push(Qn(r,h))}),f}),y=f=>{let m=[],h=[];if(g.value.length>0){const C=[];Array.isArray(f)&&f.forEach(A=>{let w=Cs(r,g.value,A,"value");w!==-1&&C.push(w);const N=g.value[w];h.push(N),r.valueType==="text"?m.push(ll(r,N)):r.valueType==="item"?m.push(N):m.push(Qn(r,N))}),S.value=C}else m=f;p("update:modelValue",m),p("change",m,h)},k=t.ref();if(ve({toggleAll:f=>{k.value.toggleAll(f)},toggleReverse:()=>{k.value.toggleReverse()}}),r.source){const f=()=>{const m=[],h=Se(r,ws);return g.value.forEach((C,A)=>{const w=Qn(r,C),N=Zf(r,C);let T={...h,label:w,disabled:N};const $=Jf(r,C,A);T={...T,...$},s.value&&(T.disabled=!0),c.value&&(T.readonly=!0);const E={};if(i.slots.icon&&(E.icon=i.slots.icon),i.slots.checkedIcon&&(E.checkedIcon=i.slots.checkedIcon),i.slots.indeterminateIcon&&(E.indeterminateIcon=i.slots.indeterminateIcon),typeof i.slots.text=="function"){const P=i.slots.text(C);E.default=()=>[P]}else{const P=ll(r,C);E.default=()=>P}let D=t.h(l,T,E);m.push(D)}),m};return()=>{const m=f(),h={class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:b.value,"onUpdate:modelValue":y},C=t.h(o,h,{default:()=>m}),A={default:()=>C};A.label=i.slots.default,A.prepend=i.slots.prepend,A.append=i.slots.append,A.fixedPreTip=i.slots.fixedPreTip,A.fixedTip=i.slots.fixedTip;const N={...Se(r,ye,he)};return r.prop&&(N.prop=`${r.prop}_item`),t.h(a,N,A)}}else return()=>{const f=i.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"onUpdate:modelValue":y},{default:()=>f})}}}}const{componentName:am,create:rm,scope:sm}=_("checkbox-item"),al=rm(lm(am,sm,Be,Xn,Yn)),rl={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:im,create:cm}=_("switch"),dm=cm({components:{Loading1:le.Loading1},props:{...rl},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const s=im;return{[s]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${s}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const i=s=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,s)};return t.watch(()=>e.modelValue,s=>{r=="click"?r="":n("change",s)}),{classes:o,style:l,isActive:a,onClick:i}}}),um={class:"fox-switch-button"};function fm(e,n,a,o,l,r){const i=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...s)=>e.onClick&&e.onClick(...s)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",um,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(i,{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 Gn=oe(dm,[["render",fm]]);function mm(e,n,a,o){return{props:{...he,...ye,...rl},emits:["change","update:modelValue","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const S={...Se(l,rl),disabled:i.value||s.value,value:p.value,"onUpdate:modelValue":d},b=[],y=t.h(o,S);b.push(y);const k={default:()=>b};k.label=r.slots.default,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const m={...Se(l,ye,he)};return l.prop&&(m.prop=`${l.prop}_item`),m["content-class"]=u,t.h(a,m,k)}}}}const{componentName:pm,create:hm,scope:gm}=_("switch-item"),sl=hm(mm(pm,gm,Be,Gn));function ym(e,n,a,o){return{props:{...he,...ye,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 i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:u}=ie.useFoxI18n(n),p=u(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,P=>{d.value=P,c("change",P)});const g=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!i.value&&ue(d.value),"is-disabled":i.value,"is-readonly":s.value})),b=Ve(t.computed(()=>l.textAlign),"textAlign"),y=t.computed(()=>{const P={};return b.value&&(P["text-align"]=b.value),P}),k=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),h=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const P={};return b.value&&(P["text-align"]=b.value),P}),A=()=>{c("focus",d.value)},w=()=>{c("blur",d.value)},N=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),T=t.computed(()=>ke(l.unit)>0),$=P=>{i.value==!0||s.value==!0||c("click")},E=t.computed(()=>l.icon??a),D=t.computed(()=>({action:!0}));return()=>{const P=[];if(typeof r.slots.content=="function"){const M=r.slots.content();P.push(M)}else{const M=[];if(k.value){const z={tabIndex:0,class:S.value,style:y.value,onFocus:A,onBlur:w};let F=null;r.slots.main?F=t.h("view",z,[r.slots.main(f.value)]):F=t.h("view",z,[f.value]),M.push(F)}if(m.value){const z={tabIndex:0,class:h.value,style:C.value,onFocus:A,onBlur:w};let F=null;r.slots.sub?F=t.h("view",z,[r.slots.sub(l.desc)]):F=t.h("view",z,[l.desc]),M.push(F)}const v={class:g.value,onClick:$},Y=t.h("view",v,M);P.push(Y)}const K=[],V=fe(l.iconSize);let I=r.slots.icon;if(!I){const M={width:V,height:V,class:["action-icon"]};I=t.h(E.value,M)}const L={class:D.value,onClick:$},x=t.h("view",L,{default:()=>[I]});if(K.push(x),T.value){const M=t.h("view",{},[l.unit]);K.push(M)}const W={class:N.value},j=t.h("view",W,{default:()=>K});P.push(j);const O={default:()=>P};O.label=r.slots.default,O.prepend=r.slots.prepend,O.append=r.slots.append,O.fixedPreTip=r.slots.fixedPreTip,O.fixedTip=r.slots.fixedTip;const H={...Se(l,ye,he)};return l.prop&&(H.prop=`${l.prop}_item`),t.h(o,H,O)}}}}const{componentName:bm,create:km,scope:Sm}=_("link-item"),il=km(ym(bm,Sm,le.ArrowRight,Be)),cl={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:Cm,componentName:wm}=_("rate"),Nm=Cm({props:{...cl},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[wm]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},i=(S,b)=>{if(e.disabled||e.readonly)return;let y=0;b===1&&e.modelValue===b||(y=b,e.allowHalf&&S==2&&(y-=.5)),r(y)},s=(S,b,y)=>{let k=0;for(let f=b.value.length-1;f>=0;f--){const m=b.value[f];if(S>m.offsetLeft){y?k=f+(S>m.offsetLeft+m.clientWidth/2?1:.5):k=f+1;break}}return k},c=tt(),u={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(s(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??le.StarFillN);return{classes:l,...u,onClick:i,toPxDesc:ge,renderIcon:(S,b)=>t.h(S,b),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),Bm=["id"],Am={class:"fox-rate-item__icon--full"},Tm={key:0,class:"fox-rate-item__icon--half"},$m={key:1,class:"fox-rate-item__icon--half"};function Vm(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),i=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:i,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+i,style:t.normalizeStyle(i<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Am,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||i>e.modelValue}]),onClick:s=>e.onClick(1,i)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>i?(t.openBlock(),t.createElementBlock("view",Tm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:s=>e.onClick(2,i)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<i?(t.openBlock(),t.createElementBlock("view",$m,[(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:s=>e.onClick(2,i)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Bm))),128))],34)}const Bt=oe(Nm,[["render",Vm]]);function Em(e,n,a,o){return{props:{...he,...ye,...cl},emits:["change","update:modelValue","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const S={...Se(l,cl),disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":d},b=[],y=t.h(o,S);b.push(y);const k={default:()=>b};if(r.slots.default){const h=r.slots.default();k.label=()=>h}const f=Se(l,ye,he);return l.prop&&(f.prop=`${l.prop}_item`),f["content-class"]=u,t.h(a,f,k)}}}}const{componentName:Dm,create:Im,scope:xm}=_("rate-item"),dl=Im(Em(Dm,xm,Be,Bt)),vm=/scroll|auto|overlay/i,Ns=window;function qm(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ul(e,n=Ns){let a=e;for(;a&&a!==n&&qm(a);){const{overflowY:o}=window.getComputedStyle(a);if(vm.test(o))return a;a=a.parentNode}return n}function Bs(e,n=Ns){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=ul(e.value,n))}),a}const As=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Pm={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 Mm(e,n,a){return{props:{...Pm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["pullText","loadText","loadMoreText"]),c=t.ref(),u=Bs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),g=m=>m?m.offsetTop+g(m.offsetParent):0,S=()=>{let m=0,h=0,C="down";if(u.value==window){const A=As();c.value&&(m=g(c.value)+c.value.offsetHeight-A-window.innerHeight),h=A}else{const{scrollHeight:A,clientHeight:w,scrollTop:N}=u.value;m=A-w-N,h=N}return p.beforeScrollTop>h?C="up":C="down",p.beforeScrollTop=h,l("scroll-change",h),m<=o.threshold&&C=="down"},b=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},y=()=>{u.value&&u.value.addEventListener("scroll",b,o.useCapture)},k=()=>{u.value&&u.value.removeEventListener("scroll",b,o.useCapture)};t.onMounted(()=>{y(),o.immediate&&b()}),t.onUnmounted(()=>{k()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,y())}),t.onDeactivated(()=>{f.value=!0,k()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},h=t.h("view",m,[r?.default?.()]),C=[];if(p.isInfiniting){let T=r?.loading?.()??null;if(!T){let D=r?.loadingIcon?.()??null;if(!D){const V={class:["fox-infinite__bottom-box__img"]};D=t.h(a,V)}const P={class:"fox-infinite__bottom-box__text"},K=t.h("view",P,[s.loadText.value]);T=[D,K]}const $={class:"fox-infinite__bottom-box"},E=t.h("view",$,T);C.push(E)}else if(!o.hasMore){let T=r?.finished?.()??null;if(!T){const $={class:"fox-infinite__bottom-tips"};T=t.h("view",$,[s.loadMoreText.value]),C.push(T)}}const A={class:"fox-infinite__bottom"},w=t.h("view",A,C),N={class:d.value,ref:c};return t.h("view",N,[h,w])}}}}const{componentName:Lm,create:zm,scope:Om}=_("infinite-loading"),Zn=zm(Mm(Lm,Om,le.Loading)),{componentName:Fm,create:Rm}=_("button"),Km=Rm({components:{Loading:le.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:i,loading:s,color:c,plain:u,block:p}=t.toRefs(e),d=b=>{!s.value&&!i.value&&n("click",b)},g=t.computed(()=>{const b=Fm;return{[b]:!0,[`${b}--${o.value}`]:o.value,[`${b}--${l.value}`]:l.value,[`${b}--${r.value}`]:r.value,[`${b}--plain`]:u.value,[`${b}--block`]:p.value,[`${b}--disabled`]:i.value,[`${b}--loading`]:s.value}}),S=t.computed(()=>{const b={};return c?.value&&(u.value?(b.color=c.value,b.background="#fff",c.value?.includes("gradient")||(b.borderColor=c.value)):(b.color="#fff",b.background=c.value)),b});return{handleClick:d,classes:g,getStyle:S}}}),Um={class:"fox-button__wrap"};function Hm(e,n,a,o,l,r){const i=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.createElementVNode("view",Um,[e.loading?(t.openBlock(),t.createBlock(i,{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 ze=oe(Km,[["render",Hm]]),jm={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"}},Wm=(e,n,a)=>({props:{...jm},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}=gt(),{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["placeholder"]),c=t.reactive({active:!1}),u=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=$=>{let D=$.target.value;o.maxLength&&D.length>Number(o.maxLength)&&(D=D.slice(0,Number(o.maxLength))),r("update:modelValue",D,$),r("change",D,$)},g=t.ref({}),S=$=>{let D=$.target.value;c.active=!0,g.value=o.focusStyle,r("focus",D,$)},b=$=>{setTimeout(()=>{c.active=!1},0);let D=$.target.value;o.maxLength&&D.length>Number(o.maxLength)&&(D=D.slice(0,Number(o.maxLength))),g.value={},r("blur",D,$)},y=$=>{r("update:modelValue","",$),r("change","",$),r("clear","")},k=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const $={};return k.value||($.display="none"),$}),m=$=>{o.autoblur&&N.value?.blur(),(typeof $.cancelable!="boolean"||$.cancelable)&&$.preventDefault(),r("search",o.modelValue)},h=$=>{r("keyup-input",$)},C=$=>{r("click-input",$)},A=$=>{r("click-left-icon",o.modelValue,$)},w=t.computed(()=>({textAlign:o.inputAlign})),N=t.ref(null);t.onMounted(()=>{o.autofocus&&N.value.focus()});const T=()=>{const $=[];if(l.leftin){const L={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:A},x=t.h("view",L,[l.leftin()]);$.push(x)}const E={class:`${e}__input-inner-input`,ref:N,style:w.value,type:o.inputType,maxlengt:o.maxLength,placeholder:s.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:d,onFocus:S,onBlur:b,onkeyup:h},D=t.h("input",E),P={class:[`${e}__input-inner`],action:"#",onSubmit:m},K=t.h("form",P,[D]);$.push(K);const V=[];if(o.clearable){const L={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:y},x=l?.clear?.()??o.clearIcon??a,W=t.h("view",L,[t.h(x)]);V.push(W)}if(l.rightin){const L={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},x=t.h("view",L,[l.rightin()]);V.push(x)}if(V.length>0){const L={class:`${e}__input-inner-right`},x=t.h("view",L,V);$.push(x)}const I={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...g.value}};return t.h("view",I,$)};return()=>{const $=[];if(o.label){const P={class:`${e}__search-label`},K=t.h("span",P,[o.label]);$.push(K)}if(l.leftout){const P={class:[`${e}__search-icon`,`${e}__left-search-icon`]},K=t.h("view",P,[l.leftout()]);$.push(K)}const E=T();if($.push(E),l.rightout){const P={class:[`${e}__search-icon`,`${e}__right-search-icon`]},K=t.h("view",P,[l.rightout()]);$.push(K)}const D={class:`${e}`,style:u.value};return t.h("view",D,$)}}}),{componentName:Ym,create:Xm,scope:Qm}=_("searchbar"),Jn=Xm(Wm(Ym,Qm,le.CircleClose)),_n={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 Gm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(eo(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if($s(e,r)===a)return l}return-1}function eo(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ts(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function $s(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Zm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Jm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let _m=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,i,s){if(Array.isArray(a)){let u=a;typeof s=="function"&&(u=u.filter(s));let p=(o-1)*l,d=p+l;d>u.length&&(d=u.length);const g=u.slice(p,d);return{totalSize:u.length,page:g}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,i]);const c=_e(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ie(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function ep(){const e=t.getCurrentInstance();return new _m(e.proxy)}function tp(e,n,a,o,l,r,i,s,c,u,p){return{props:{..._n},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:g}){const{emitEvent:S}=gt(),{toLocaleRefs:b}=ie.useFoxI18n(n),y=b(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),k=ep(),f=t.ref([]),m=t.ref(0),h=t.ref(""),C=t.shallowRef(null),A=t.computed(()=>{const R={};return d.params&&Object.assign(R,d.params),ue(h.value)||(R[`${d.searchKey}`]=h.value),C.value&&Object.assign(R,C.value),R});let w=!0;const N=async(R,X,Q)=>{try{if($.value===!1)return;let U=null;ue(h.value)||(U=te=>{const ae=eo(d,te);if(typeof ae=="string"&&ae.includes(h.value))return!0;const se=Ts(d,te);return!!(typeof se=="string"&&se.includes(h.value))});const J=await k.load("actionsheet",R,X,Q,A.value,w,U??void 0);w=!1,Array.isArray(J)?(f.value=J,m.value=1,$.value=!1):!Array.isArray(J.page)||J.page.length===0?(console.warn("[FoxUI] can not load more data"),$.value=!1):(Reflect.apply([].push,f.value,J.page),m.value=Math.ceil(f.value.length/d.pageSize),(J.totalSize&&f.value.length>=J.totalSize||Q<J.page.length)&&($.value=!1)),T.value=!1}catch(U){console.error("[FoxUI] ActionSheet load more data fail",U),$.value=!0,m.value=0,f.value=[]}setTimeout(()=>{S("loaded-data")},250)},T=t.ref(!1),$=t.ref(!0),E=async()=>{if(!d.source){T.value=!1;return}await N(d.source,m.value+1,d.pageSize)};let D=null;t.watch(h,(R,X)=>{D&&(clearTimeout(D),D=null),ue(R)&&!ue(X)&&(D=setTimeout(()=>{K()},d.searchDelayTriggerClear))});const P=()=>{$.value=!0,m.value=0,f.value=[],d.source&&E()},K=()=>{P()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([R,X,Q])=>{d.source&&P()},{immediate:!0});const V=t.computed(()=>!d.multiple&&d.isAutoBackFill),I=t.ref([]);let L=null;const x=t.ref(d.visible);t.watch(()=>d.visible,R=>{x.value!==R&&(x.value=R),R?L=[...I.value]:L=null});const W=(R,X)=>{const Q=[];return Array.isArray(R)||(R=[R]),R.forEach(U=>{let J=Gm(d,X,U,d.valueType);J!==-1&&Q.push(J)}),Me(Q,I.value)?!1:(I.value=Q,!0)};t.watch([()=>d.modelValue,()=>f.value],([R,X],[Q,U])=>{if(W(R,X)){const te=j();O(te)}},{deep:!0});const j=()=>{const R=[],X=[],Q=[];for(let ae of I.value){const se=f.value[ae];X.push(se);const de=eo(d,se);if(Q.push(de),d.valueType==="item")R.push(se);else if(d.valueType==="text")R.push(de);else{const $e=$s(d,se);R.push($e)}}let U=null,J=null,te=null;return d.multiple?(U=R,J=Q,te=X):(U=R[0]??null,J=Q[0]??null,te=X[0]??null),{value:U,text:J,item:te}},O=R=>{S("update:modelValue",R.value),S("update:text",R.text),S("change",R.value,R.item,R.text)},ee=()=>{L&&(I.value=L)},H=R=>{const X=I.value.indexOf(R);d.multiple?X===-1?I.value.push(R):I.value.splice(X,1):X===-1?I.value=[R]:I.value=[],(V.value||!d.poppable&&!d.showFooter)&&v()},q=R=>{x.value=R,S("update:visible",R)},M=()=>{const R=()=>{ee(),q(!1)},X=d.beforeMethod??d.beforeClose;if(typeof X=="function"){const Q=X("close");mt(Q)?Q.then(U=>{U!==!1&&R()}).catch(()=>{R()}):Q!==!1&&R()}else R()},v=()=>{const R=j(),X=()=>{O(R),q(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const U=Q("confirm",R.value,R.item,R.text);mt(U)?U.then(J=>{J!==!1&&X()}).catch(()=>{X()}):U!==!1&&X()}else X()},Y=()=>{let R=y.title.value??"";g.title&&(R=g.title());const X=t.h("view",{class:["fox-actionsheet__header-title"]},[R]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:M});return t.h("view",{class:["fox-actionsheet__header"]},[X,Q])},z=()=>{let R=null;if(g.search)R=g.search();else{const X={onSearch:P,placeholder:y.seachPlaceholder.value,disabled:d.disabled,modelValue:h.value,"onUpdate:modelValue":Q=>{h.value=Q}};R=t.h(r,X,{leftin:()=>t.h(u)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[R])},F=(R,X,Q,U,J)=>{if(g.optionLabel)return g.optionLabel({text:R,checked:X,disabled:Q,subText:U,item:J});const te=[],ae=t.h("view",{class:"fox-actionsheet__list-item-text"},[R]);if(te.push(ae),U){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[U]);te.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},te)},G=(R,X,Q,U)=>{if(g.optionIcon)return g.optionIcon({checked:R,disabled:X,iconSize:Q,item:U});if(R){if(g.checkedIcon)return g.checkedIcon({disabled:X,item:U});{const J=d.checkedIcon??s;return t.h(J,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(g.icon)return g.icon({disabled:X,item:U});{const J=d.icon??i;return t.h(J,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},Z=()=>{const R=[];for(let X=0;X<f.value.length;X++){const Q=f.value[X],U=eo(d,Q),J=Ts(d,Q),te=["fox-actionsheet__list-item"],ae={};let se=Zm(d,Q),de=d.iconSize?fe(d.iconSize):null;const $e=Jm(d,Q,X);$e&&(se=se||$e.disabled,$e.class&&te.push($e.class),$e.style&&Object.assign(ae,$e.style)),se=!!(d.disabled||se);const Ne=I.value.includes(X);se&&te.push("is-disabled"),Ne&&te.push("is-checked");const ao={class:te,style:ae,key:`${X}`,onClick:()=>{se||H(X)}};let ft=[];if(g.option)ft.push(g.option({item:Q,checked:Ne,disabled:se}));else{const u2=F(U,Ne,se,J,Q);ft.push(u2);const f2=G(Ne,se,de,Q);ft.push(f2),d.textPosition==="right"&&ft.reverse()}const d2=t.h("view",ao,ft);R.push(d2)}return R},ne=()=>{let R=[];if(g.buttons)R=g.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:v,disabled:d.disabled},{default:()=>y.confirmText.value});R.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[R])};return ve({search:async(R=null,X=!0)=>{C.value=R&&t.toRaw(R),t.triggerRef(C),X&&($.value=!0,m.value=0,f.value=[]),t.nextTick(()=>{E()})},clear:()=>{$.value=!0,m.value=0,f.value=[]},confirm:()=>{v()},cancel:()=>{M()}}),()=>{const R=[];if(d.showHeader){const de=Y();R.push(de)}if(d.showSearchbar){const de=z();R.push(de)}let X=null;if(g.content)X=g.content();else{const de=Z(),$e={hasMore:$.value,loadText:y.loadText.value,loadMoreText:y.loadMoreText.value,modelValue:T.value,"onUpdate:modelValue":Ne=>{T.value=Ne},onLoadMore:E};X=t.h(o,$e,{default:()=>de})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const U={"fox-actionsheet__list":!0};d.poppable||(U["fox-actionsheet__list--inner"]=!0);const J=t.h("view",{class:U,style:Q},[X]);if(R.push(J),d.showFooter&&!V.value){const de=ne();R.push(de)}const te=t.h("view",{class:"fox-actionsheet"},R);if(!d.poppable)return te;const ae=["fox-actionsheet__popup"];d.popClass&&ae.push(d.popClass);const se={popClass:ae.join(" "),visible:x.value,closeable:!1,"onUpdate:visible":q,position:d.position,round:"round",onClickOverlay:M,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>te})}}}}const{componentName:np,create:op,scope:lp}=_("actionsheet-pane"),to=op(tp(np,lp,me,Zn,ze,Jn,le.CheckNormal,le.Checked,le.Close,le.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 ap(e,n,a,o,l,r,i){return{props:{...he,...ye,...Vs,..._n},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Pe(s,"modelValue",null,d),k=t.ref(""),f=t.computed(()=>Array.isArray(k.value)?k.value.join(s.separator):k.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const v={};return C.value&&(v["text-align"]=C.value),v}),w=t.ref(!1),N=()=>{w.value=!0},T=v=>{w.value=v},$=v=>{y.value=v,d("update:modelValue",v)},E=(v,Y)=>{d("change",v,Y)},D=v=>{let z=v.target.value;b.value=!0,d("focus",z,v)},P=v=>{setTimeout(()=>{b.value=!1},0);let z=v.target.value;s.maxLength&&z.length>Number(s.maxLength)&&(z=z.slice(0,Number(s.maxLength))),d("blur",z,v)},K=v=>{k.value=v,d("update:text",v)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),I=t.computed(()=>ke(s.unit)>0),L=t.computed(()=>ke(s.unit)>0&&!b.value),x=t.computed(()=>({hidden:!L.value})),W=v=>{y.value="",d("update:modelValue","",v),d("change","",v),d("clear","")},j=t.computed(()=>s.clearable&&!u.value&&!p.value),O=t.computed(()=>ke(y.value)>0&&b.value),ee=v=>{O.value?W(v):N()},H=t.computed(()=>O.value&&j.value?o:l),q=t.computed(()=>({action:!0})),M=t.ref(null);return ve({search:v=>{M.value&&M.value.search(v)},clear:()=>{M.value&&M.value.clear},confirm:v=>{M.value&&M.value.confirm()},cancel:()=>{M.value&&M.value.cancel()}}),()=>{const v={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P},Y=[],z=t.h("input",v);Y.push(z);const F=[],G={class:["action-icon"]},Z=t.h(H.value,G),ne={class:q.value,onClick:ee},R=t.h("view",ne,{default:()=>[Z]});if(F.push(R),I.value){const Ne=t.h("view",{class:x.value},[s.unit]);F.push(Ne)}const X={class:V.value},Q=t.h("view",X,{default:()=>F});Y.push(Q);const U={default:()=>Y};U.label=c.slots.default,U.prepend=c.slots.prepend,U.append=c.slots.append,U.fixedPreTip=c.slots.fixedPreTip,U.fixedTip=c.slots.fixedTip;const J=Se(s,_n);J.ref=M,J.class=s.actionsheetProps,J.disabled=u.value||p.value,J.visible=w.value,J["onUpdate:visible"]=T,J.modelValue=y.value,J["onUpdate:modelValue"]=$,J.text=k.value,J["onUpdate:text"]=K,J.onChange=E,J.poppable=!0,J["text-position"]=s.textPosition;const te={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},ae=t.h(r,J,te);U.hide=()=>[ae];const de={...rt(s,Vs,_n)};return s.prop&&(de.prop=`${s.prop}_item`),t.h(a,de,U)}}}}const{componentName:rp,create:sp,scope:ip}=_("actionsheet-item"),fl=sp(ap(rp,ip,Be,le.CircleClose,le.ArrowRight,to)),ml={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:cp,create:dp}=_("input-number"),up=dp({components:{Minus:le.Minus,Plus:le.Plus},props:{...ml},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=cp;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const b=S.target;n("update:modelValue",b.valueAsNumber,S)},r=(S,b)=>{let y=o(S);n("update:modelValue",y,b),n("change",y,b)},i=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,s=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),s()){let b=Number(e.modelValue)-Number(e.step);r(b,S)}else n("overlimit",S,"reduce")},u=S=>{if(n("add",S),i()){let b=Number(e.modelValue)+Number(e.step);r(b,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let y=S.target.valueAsNumber;y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),r(y,S),n("blur",S)},g=S=>{let b=Number(S);return b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),b};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const S=g(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:u,addAllow:i,reduce:c,reduceAllow:s,toPxDesc:ge}}}),fp=["min","max","disabled","readonly","value"];function mp(e,n,a,o,l,r){const i=t.resolveComponent("Minus"),s=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(i,{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,fp),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(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const nt=oe(up,[["render",mp]]);function pp(e,n,a,o){return{props:{...he,...ye,...ml},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!i.value&&!s.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=b=>{p.value=b,c("update:modelValue",b,{}),c("change",b,{})},g=b=>{c("add",b)},S=b=>{c("reduce",b)};return()=>{const b={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},y=Se(l,ml),f={...r.attrs,...y,disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":d,onAdd:g,onReduce:S},m=t.h(o,f,b),h=[];h.push(m);const C={default:()=>h};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const w={...Se(l,ye,he)};return l.prop&&(w.prop=`${l.prop}_item`),w["content-class"]=u,t.h(a,w,C)}}}}const{componentName:hp,create:gp,scope:yp}=_("inputnumber-item"),pl=gp(pp(hp,yp,Be,nt)),bp={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:[Object]},iconSize:{type:[String,Number]},markIcon:{type:[Object]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function kp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Es(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ds(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Sp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function hl(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Is(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function xs(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function gl(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Cp=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function wp(){const e=t.getCurrentInstance();return new Cp(e.proxy)}function Np(e,n,a,o){return{props:{...bp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:i}){const s=e,c=wp(),u=t.ref([]),p=t.computed(()=>u.value.filter(q=>Sp(l,q)!==!1)),d=t.ref(-1),g=()=>{const q=l.modelValue,M=p.value.findIndex(v=>Es(l,v)===q);d.value!==M&&(d.value=M,l.scroll&&ee(M))};t.watch([()=>l.modelValue,p],()=>{g()});const S=q=>d.value===q,b=q=>{if(q<0&&q>=p.value.length)return!1;const M=p.value[q],Y=(gl(l,M,q)??{}).status??hl(l,M);return S(q)||Y},y=t.computed(()=>{const q={[s]:!0};return l.mode?q[`is-${l.mode}`]=!0:l.direction&&(q[`is-${l.direction}`]=!0),l.scroll&&(q["is-scroll"]=!0),q}),k=t.computed(()=>({})),f=(q,M,v,Y,z)=>{const F={[`${s}__step`]:!0};return z&&(F[`${z}`]=!0),F[`${m.value}`]=!0,Y&&(F["is-doit"]=!0),q===d.value?F["is-active"]=!0:M==="done"?F["is-done"]=!0:M==="error"?F["is-error"]=!0:M==="half"?F["is-half"]=!0:v?F["is-disabled"]=!0:F["is-normal"]=!0,F},m=t.computed(()=>{if(l.mode==="simple")return"start";let q=l.align;return q||(l.direction==="vertical"?q="start":q="center"),q}),h=(q,M={})=>{const v={...M};return m.value==="start"&&q===p.value.length-1?v.flex="0 0 auto":l.step?l.direction==="vertical"?v.height=l.step:v.width=l.step:v.flex="1 1 100%",v},C=(q,M)=>{let v={};if(M<p.value.length-1){const Y=M+1;b(M)&&b(Y)?l.direction==="vertical"?v.height="100%":v.width="100%":v.opacity="0"}return v},A=q=>p.value.length-1===q,w=(q,M)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&M>d.value||d.value===M)return;const v=d.value,Y=M;d.value=M,l.scroll&&ee(M);const z=Es(l,q);i("update:modelValue",z);const F={fromIndex:v,currentIndex:Y,item:q,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};i("change",z,F)},N=t.ref(!0),T=async(q,M)=>{try{const v=await c.load("stesbar",q,M);Array.isArray(v)&&(u.value=v),N.value=!1}catch(v){console.error("[FoxUI] Load StepsBar Data Fail",v),u.value=[]}setTimeout(()=>{i("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([q,M])=>{q&&T(q,M)},{immediate:!0});const $=(q,M,v,Y,z)=>{let F=null;if(r.icon)F=r.icon({item:q,index:M,status:Y});else if(Y==="done"){const Z={};l.iconSize&&(Z.width=l.iconSize,Z.height=l.iconSize);const ne=l.icon??a;F=t.h(ne,Z)}else{const Z=v??`${M+1}`;F=t.h("span",{},[Z])}const G={class:"fox-steps-bar__icon",onClick:()=>{i("click",{item:q,index:M}),!z&&w(q,M)}};return t.h("view",G,[F])},E=(q,M,v)=>{const Y=t.h("i",{class:"fox-steps-bar__line-inner",style:C(q,M)});return t.h("view",{class:"fox-steps-bar__line"},[Y])},D=()=>{let q=null;if(r.markIcon)q=r.markIcon();else{const v={};l.iconSize&&(v.width=l.markIconSize,v.height=l.markIconSize);const Y=l.markIcon??o;q=t.h(Y,v)}return t.h("view",{class:"fox-steps-bar__mark"},[q])},P=(q,M,v,Y,z)=>{const F=[];if(!A(M)){const ne=E(q,M);F.push(ne)}const G=$(q,M,v,Y,z);F.push(G);const Z={class:"fox-steps-bar__head"};return t.h("view",Z,F)},K=(q,M,v,Y)=>{let z=null;r.main?z=r.main({item:q,index:M,status:v}):z=kp(l,q);const F={class:"fox-steps-bar__main",onClick:()=>{i("click",{item:q,index:M}),!Y&&w(q,M)}};return t.h("view",F,[z])},V=(q,M,v)=>{let Y=null;if(r.sub){Y=r.sub({item:q,index:M,status:v});const z={class:"fox-steps-bar__sub"};return t.h("view",z,[Y])}return null},I=(q,M)=>{const v=gl(l,q,M)??{},Y=v.status??hl(l,q);let z=Ds(l,q);v.disabled===!0&&(z=!0),l.disabled===!0&&(z=!0);const F=v.label??xs(l,q),G=[],Z=$(q,M,F,Y,z);Z&&G.push(Z);const ne=K(q,M,Y,z);if(ne&&G.push(ne),!A(M)){const te=E(q,M);te&&G.push(te)}const R=t.h("view",{class:"fox-steps-bar__head"},G),X=v.class,Q=v.style??{};let U=Is(l,q);v.doit===!0&&(U=!0);const J={ref:O(M),class:f(M,Y,z,U,X),style:h(M,Q)};return t.h("view",J,[R])},L=(q,M)=>{const v=gl(l,q,M)??{},Y=v.status??hl(l,q);let z=Ds(l,q);v.disabled===!0&&(z=!0),l.disabled===!0&&(z=!0);const F=v.label??xs(l,q),G=[],Z=l.layout;for(let U of Z)if(U==="head"){const J=P(q,M,F,Y,z);G.push(J)}else if(U==="main"){const J=K(q,M,Y,z);G.push(J)}else if(U==="sub"){const J=V(q,M,Y);G.push(J)}else if(U==="mark"){const J=D();G.push(J)}const ne=v.class,R=v.style??{};let X=Is(l,q);v.doit===!0&&(X=!0);const Q={ref:O(M),class:f(M,Y,z,X,ne),style:h(M,R)};return t.h("view",Q,G)},x=t.ref(),W=t.ref([]),j=(q,M)=>{W.value[M]=q},O=q=>M=>{j(M,q)},ee=(q,M)=>{const v=x.value,Y=W.value;if(!v||!Y||!Y[q])return;const z=Y[q];let F=0;l.direction==="vertical"?F=z.offsetTop-(v.offsetHeight-z.offsetHeight)/2:F=z.offsetLeft-(v.offsetWidth-z.offsetWidth)/2,H(v,F,.3,l.direction)},H=(q,M,v,Y)=>{let z=0;const F=Y==="horizontal"?q.scrollLeft:q.scrollTop,G=Math.round(v*1e3/16);function Z(){Y==="horizontal"?q.scrollLeft+=(M-F)/G:q.scrollTop+=(M-F)/G,++z<G&&Ue(Z)}Z()};return()=>{const q=[];if(l.mode==="simple")for(let v=0;v<p.value.length;v++){const Y=p.value[v],z=I(Y,v);q.push(z)}else for(let v=0;v<p.value.length;v++){const Y=p.value[v],z=L(Y,v);q.push(z)}const M={ref:x,class:y.value,style:k.value};return t.h("view",M,q)}}}}const{componentName:Bp,create:Ap,scope:Tp}=_("steps-bar"),yl=Ap(Np(Bp,Tp,le.Checklist,le.ArrowRight));function $p(e){e.stopPropagation()}class Vp{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=Ho()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=jo(),o=(l,r,i,s)=>{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),$p(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 Ep(e,n){return new Vp(e,n)}const Dp={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]}},Ip=(e,n,a,o=!1)=>({props:{...Dp},emits:["click"],setup(l,{slots:r,emit:i}){const s=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}),u=t.computed(()=>{const m={};return ue(s.top)||(m.top=s.top),ue(s.right)||(m.right=s.right),ue(s.bottom)||(m.bottom=s.bottom),ue(s.left)||(m.left=s.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=()=>{i("click")},g=t.ref(null),S=()=>{s.top=null,s.right=null,s.bottom=null,s.left=null},b={x:0,y:0},f=Ep(m=>{if(!g.value)return;const h=g.value;S(),s.left=h.offsetLeft,s.top=h.offsetTop,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`,h.style.right=null,h.style.bottom=null,b.x=s.left,b.y=s.top},m=>{if(!g.value)return;const h=g.value;S(),s.left=b.x+m.x,s.top=b.y+m.y,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`});return t.onMounted(()=>{if(l.draggable&&g.value){const m=[g.value];f.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&g.value&&f.close()}),()=>{let m=[];const h=typeof r.default=="function"?r.default():[];if(h&&h.length>0)m=h;else{const A=t.h(a,{class:p.value});m.push(A)}const C={ref:A=>{g.value=A},class:c.value,style:u.value,onClick:d};return t.h("view",C,m)}}}),{componentName:xp,create:vp,scope:qp}=_("floating-button"),bl=vp(Ip(xp,qp,le.Uploader,!1)),Pp={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 Mp(e,n,a){return{props:{...Pp},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}),i=Pe(o,"modelValue"),s=t.computed(()=>i.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),u=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!i.value,"is-collapse":i.value})),p=()=>{l("update:modelValue",!i.value)};return()=>{const d=[];if(s.value){const k={class:c.value},f=t.h("span",k,[s.value]);d.push(f)}const g={class:u.value},S=o.icon??a,b=t.h(S,g);return d.push(b),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:Lp,create:zp,scope:Op}=_("more-button"),kl=zp(Mp(Lp,Op,le.RectUp)),Fp={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}},Rp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Kp(e,n,a){return{props:{...Fp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["confirmText","cancelText"]),c=e,u=t.ref(!0),p=C=>{u.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)}},g=()=>{d("confirm")},S=()=>{d("cancel")},b=()=>{o.closeOnClickOverlay!==!1&&d("close")},y=(C,A)=>Rp(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`]},N=y(o.icon,w);C.push(N)}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:b},N=y(o.closeIcon,w);C.push(N)}const A={class:[`${c}__header`]};return t.h("view",A,C)},f=(C,A)=>{const w=[];if(A){const T={class:`${c}__group-title`},$=t.h("view",T,[A]);w.push($)}if(C){const T=[];Array.isArray(C)||(C=[C]);for(let $ of C){const E={class:`${c}__group-row`,innerHTML:$},D=t.h("view",E);T.push(D)}if(T.length>0){const $={class:`${c}__group-rows`},E=t.h("view",$,T);w.push(E)}}if(w.length===0)return null;const N={class:`${c}__group`};return t.h("view",N,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 N=f(w);C.push(N)}else{const N=f(w.content,w.title);C.push(N)}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)},h=()=>{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 N=t.h("button",w,[o.cancelButtonText??s.cancelText.value]);C.push(N)}if(o.showConfirmButton){const w={class:[`${c}__footer-button`],style:{},onClick:g};o.confirmButtonClass&&w.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(w.style,o.confirmButtonStyle);const N=t.h("button",w,[o.confirmButtonText??s.confirmText.value]);C.push(N)}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 N=h();N&&C.push(N);const T={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},$=t.h("view",T,C),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const D={};o.width&&(D.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(D.height=typeof o.height=="number"?`${o.height}px`:o.height);const P={popClass:E.join(" "),style:D,visible:u.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:b,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,P,{default:()=>$})}}}}const{componentName:Up,create:Hp,scope:jp}=_("messagebox"),Wp=Hp(Kp(Up,jp,me)),Yp="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",Xp="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",Qp="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",Gp="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",Zp=new In,Jp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},_p=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-${Zp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const i=document.querySelector(`#${l}`);i&&i.parentNode?.removeChild(i)};const r=t.createVNode(Wp,e);n.appendChild(o),t.render(r,o)},ut={show:(e,n,a,o)=>{const l={...Jp};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=Qp:r==="warning"?l.icon=Gp:r==="error"?l.icon=Yp:l.icon=Xp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=le.Close),new Promise((i,s)=>{const c=l.callback;l.callback=u=>{if(typeof c=="function")try{c(u)}catch(p){console.error(p)}i({action:u})},_p(l)})},alert:(e,n,a)=>ut.show("alert",e,n,a),confirm:(e,n,a)=>ut.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ut.alert,e.config.globalProperties.$confirm=ut.confirm}},eh=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let s in n)s==="bubbles"?l=!!n[s]:s==="cancelable"?r=!!n[s]:o[s]=n[s];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},th=new In,nh=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),oh=e=>`${e}-${th.get()}`,lh=Symbol.for("InnerPageScopeKey"),ah=Symbol.for("PageWrapperKey"),rh="FoxLeave",sh="FoxLeaveEnd",ih={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 ch(e,n,a,o){return{props:{...Fe,...ih},emits:["update:visible"],setup(l,{attrs:r,slots:i,emit:s}){t.provide(lh,!0);const c={};t.provide(ah,c);const u=w=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{u()},d=e,g=w=>{S.value=w,s("update:visible",w)},S=t.ref(!1),b=(w,N)=>nh(w)?(N.src=w,t.h("img",N)):typeof w=="string"?(Array.isArray(N.class)?N.class.push(w):N.class&&typeof N.class=="object"?N[`${w}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${w}`:N.class=w,t.h(l.tag,N)):t.h(w,N),y=()=>{if(!l.showHeader)return null;const w=[];if(i.header){const T=i.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 N={class:[`${d}__header`]};return t.h("view",N,w)},k=()=>{if(!l.showClose)return null;const w={class:[`${d}__close-icon`],onClick:p},N=l.closeIcon??o;return b(N,w)};let f=null;const m=w=>{eh(sh,{},f)},h=oh(e),C=()=>{g(!0)},A=()=>{if(!f)return;const w=f.querySelector(".fox-overlay");w&&(w.classList.add("overlay-fade-leave-active"),w.classList.add("overlay-fade-leave-to"));const N=f.querySelector(".fox-popup");N&&(N.classList.add(`fox-popup-slide-${l.position}-leave-active`),N.classList.add(`fox-popup-slide-${l.position}-leave-to`),N.addEventListener("animationend",m,{once:!0}),N.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${h}`),f?.addEventListener(rh,A,{once:!0}),C()}),()=>{const w=[],N=y();N&&w.push(N);const T=k();T&&w.push(T);const $=i.default?i.default():[];Reflect.apply([].push,w,$);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const D={class:E},P=t.h("view",D,w),K=[`${d}__popup`,h];l.popClass&&K.push(l.popClass),l.position&&K.push(`${d}__popup--${l.position}`);const V={};l.width&&(V.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(V.height=typeof l.height=="number"?`${l.height}px`:l.height);const L={...Se(l,Fe),popClass:K.join(" "),style:V,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":g},x=t.h(a,L,{default:()=>P});return t.h("div",{class:[`${d}__root`,h]},[x])}}}}const{componentName:dh,create:uh,scope:fh}=_("popup-wrapper"),Sl=uh(ch(dh,fh,me,le.Close)),mh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function ph(e,n,a,o){return{props:{...mh},emits:["update:visible"],setup(l,{emit:r,slots:i}){const s=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const u={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":s},p=t.h(a,u,i),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:hh,create:gh,scope:yh}=_("dropdown"),Cl=gh(ph(hh,yh,me)),bh={visible:{type:Boolean},reference:{type:Object},referenceInset:{type:Object},width:{type:String},offset:{type:Number,default:()=>6},placement:{type:String,default:()=>"top-start"},autoFit:{type:Boolean,default:()=>!0},title:{type:String},effect:{type:String},showArrow:{type:Boolean,default:()=>!0},arrowSize:{type:Number,default:()=>14},arrowOffset:{type:Number,default:()=>20},showOverlay:{type:Number,default:()=>!0},closeOnClick:{type:Boolean,default:()=>!0},zIndex:{type:[String,Number]},customClass:{type:[String]},customStyle:{type:[Object]},leaveHide:{type:[Boolean]}};function kh(e,n,a=!1){return{props:{...bh},emits:["update:visible"],setup(o,{emit:l,slots:r,expose:i}){const s=t.ref({top:null,right:null,bottom:null,left:null}),c=t.ref(0),u=t.ref(0),p=t.ref(0),d=t.ref(0),g=t.ref(o.placement),S=t.ref(!1),b=t.ref(!1),y=t.ref(null),k=()=>typeof o.reference=="string"?document.querySelector(o.reference):o.reference,f=(O,ee,H,q,M,v,Y,z=!0)=>{const F=document.documentElement.clientWidth||document.body.clientWidth,G=document.documentElement.clientHeight||document.body.clientHeight,Z=O.split("-");let ne=[];z?Z[0]==="top"?ne=["top","bottom","right","left"]:Z[0]==="bottom"?ne=["bottom","top","right","left"]:Z[0]==="left"?ne=["left","top","bottom","right"]:Z[0]==="right"&&(ne=["right","top","bottom","left"]):ne=[O[0]];const R={top:null,right:null,bottom:null,left:null},X=[];for(let Q=0;Q<ne.length;Q++){const U=ne[Q];if(X[0]=U,Z[1]&&(X[1]=Z[1]),U==="top"){const J=H-Y-o.arrowSize/2-o.offset;if(J>=0){R.top=J;let te=0;Z[1]==="start"?te=ee:Z[1]==="end"?te=ee+q-v:te=ee+q/2-v/2;const ae=F-te-v;ae<0?(te+=ae,h.value=-ae):h.value=0,R.left=te<0?0:te;break}}else if(U==="bottom"){const J=H+M+o.arrowSize/2+o.offset;if(J+Y<=G){R.top=J;let te=0;Z[1]==="start"?te=ee:Z[1]==="end"?te=ee+q-v:te=ee+q/2-v/2;const ae=F-te-v;ae<0?(te+=ae,h.value=-ae):h.value=0,R.left=te<0?0:te;break}}else if(U==="left"){const J=ee-v-o.arrowSize/2-o.offset;if(J>=0){R.left=J;let te=0;Z[1]==="start"?te=H:Z[1]==="end"?te=H+M-Y:te=H+M/2-Y/2,R.top=te<0?0:te;break}}else if(U==="right"){const J=ee+q+o.arrowSize/2+o.offset;if(J+v<=F){R.left=J;let te=0;Z[1]==="start"?te=H:Z[1]==="end"?te=H+M-Y:te=H+M/2-Y/2,R.top=te<0?0:te;break}}}return{bestPlacement:X.join("-"),bestInsetRect:R}},m=()=>{const O=o.visible,ee=o.autoFit;if(!Ge||O===!1)return;if(o.reference){const Y=k(),z=Po(Y);c.value=z.x,u.value=z.y,p.value=Y.offsetWidth,d.value=Y.offsetHeight}else o.referenceInset&&(c.value=o.referenceInset.left,u.value=o.referenceInset.top,p.value=o.referenceInset.right-o.referenceInset.left,d.value=o.referenceInset.bottom-o.referenceInset.top);const H=y.value.offsetWidth,q=y.value.offsetHeight,{bestPlacement:M,bestInsetRect:v}=f(o.placement,c.value,u.value,p.value,d.value,H,q,ee);g.value=M,s.value=v},h=t.ref(0),C=Ze(()=>{m()},10),A=t.ref(o.visible);t.watch([()=>o.visible],([O])=>{A.value=O,O?(S.value=O,setTimeout(()=>{m(),b.value=!0},0)):b.value=!1});const w=t.computed(()=>A.value&&N.value),N=t.ref(!0),T=Ze(O=>{const ee=O[0];ee&&(N.value=ee.isIntersecting)},10),$=new IntersectionObserver(T);t.watch([()=>o.reference,()=>o.referenceInset],([O,ee],[H,q])=>{!O&&!ee||(setTimeout(()=>{m()},0),o.autoFit&&(H&&(Mt.unwatch(H,C),$.unobserve(H)),O&&(Mt.watch(O,C),$.observe(O))))},{immediate:!0}),t.onBeforeUnmount(()=>{o.reference&&(Mt.unwatch(o.reference,C),$.unobserve(o.reference),$.disconnect())});const E=t.computed(()=>{const O={[e]:!0};return g.value.startsWith("top")?O["is-top"]=!0:g.value.startsWith("right")?O["is-right"]=!0:g.value.startsWith("bottom")?O["is-bottom"]=!0:g.value.startsWith("left")&&(O["is-left"]=!0),O[`is-${o.effect}`]=!0,!b.value&&w.value&&(O["is-opacity"]=!0),b.value&&w.value&&(O["is-show"]=!0),w.value||(O["is-hide"]=!0),o.customClass&&typeof o.customClass=="string"&&(O[`${o.customClass}`]=!0),O}),D=t.computed(()=>{const O={};return s.value.top!==null&&(O.top=`${s.value.top}px`),s.value.right!==null&&(O.right=`${s.value.right}px`),s.value.bottom!==null&&(O.bottom=`${s.value.bottom}px`),s.value.left!==null&&(O.left=`${s.value.left}px`),o.width&&(O.width=o.width),o.zIndex&&(O["z-index"]=`${o.zIndex}`),o.customStyle&&typeof o.customStyle=="object"&&Object.assign(O,o.customStyle),O}),P=()=>{A.value=!1,l("update:visible",!1)},K=()=>{if(!o.showOverlay)return null;const O={class:`${e}__overlay`,onClick:P};return t.h("div",O)},V=()=>{let O=null;return r.title?O=t.h("div",{class:`${e}__title`},{default:r.title}):o.title&&(O=t.h("div",{class:`${e}__title`},[o.title])),O},I=t.computed(()=>({[`${e}__arrow`]:!0})),L=t.computed(()=>{const O={};return o.showArrow?(O.width=`${o.arrowSize}px`,O.height=`${o.arrowSize}px`,g.value==="top"?(O.left="50%",O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="top-start"?(O.left=`${o.arrowOffset+h.value}px`,O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="top-end"?(O.right=`${o.arrowOffset-h.value}px`,O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="right"?(O.left="0",O.top="50%",O.transform="translate(-50%, -50%)"):g.value==="right-start"?(O.left="0",O.top=`${o.arrowOffset}px`,O.transform="translate(-50%, 50%)"):g.value==="right-end"?(O.left="0",O.bottom=`-${o.arrowOffset}px`,O.transform="translate(-50%, 50%)"):g.value==="bottom"?(O.left="50%",O.top="0",O.transform="translate(-50%, -50%)"):g.value==="bottom-start"?(O.left=`${o.arrowOffset+h.value}px`,O.top="0",O.transform="translate(-50%, -50%)"):g.value==="bottom-end"?(O.right=`${o.arrowOffset-h.value}px`,O.top="0",O.transform="translate(-50%, -50%)"):g.value==="left"?(O.right="0",O.top="50%",O.transform="translate(50%, -50%)"):g.value==="left-start"?(O.right="0",O.top=`${o.arrowOffset}px`,O.transform="translate(50%, -50%)"):g.value==="left-end"&&(O.right="0",O.bottom=`-${o.arrowOffset}px`,O.transform="translate(50%, -50%)"),O):{display:"none"}}),x=()=>{const O={class:I.value,style:L.value};return t.h("div",O)},W=()=>{A.value===!1&&(S.value=!1)},j=O=>{if(!y.value||A.value===!1)return;const{relatedTarget:ee}=O;y.value.contains(ee)||(A.value=!1,l("update:visible",!1))};return i({doLayout:m}),()=>{if(!S.value)return null;const O=[],ee=K();ee&&O.push(ee);const H=[],q=V();if(q&&H.push(q),r.default){const z=r.default();H.push(z)}const M=x();M&&H.push(M);const v={ref:y,class:E.value,style:D.value,onAnimationend:W};o.leaveHide&&(v.onMouseleave=j);const Y=t.h("div",v,{default:()=>H});return O.push(Y),O}}}}const{componentName:Sh,create:Ch,scope:wh}=_("popover-dialog"),wl=Ch(kh(Sh,wh,!1));function Nh(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 Bh={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 Ah(e,n,a,o=!1){return{props:{...Bh},emits:["click"],setup(l,r){const i=t.ref(null),s=t.computed(()=>{const h={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(h[`${e}--${l.type??"default"}`]=!0),l.size&&(h[`${e}--${l.size}`]=!0),h}),c=t.computed(()=>{const h={},C=l.textColor??l.color;return C&&(h.color=C),h}),u=(h,C)=>{let A=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const w=l.highlightFilter;if(h.indexOf(w)!==-1){const T=h.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(h);w&&(C.innerHTML=w,C.class["is-highlight"]=!0,A=t.h(l.tag,C))}return A},p=h=>{r.emit("click",h)};let d="";const g=()=>{const h=i.value;if(!h)return;const C=h.clientWidth;Nh(h,A=>{const w=h.innerHTML??"";ue(w)||A<C||(d?a?.show(h,w,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(h,w,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let b=null;const y=h=>{b||(b=setTimeout(()=>{g(),b=null},l.showAfter??0))},k=h=>{b&&(clearTimeout(b),b=null),setTimeout(()=>{S()},l.hideAfter??0)},f=()=>{const h=i.value;h&&(h.addEventListener("mouseover",y),h.addEventListener("mouseleave",k))},m=()=>{const h=i.value;h&&(h.removeEventListener("mouseover",y),h.removeEventListener("mouseleave",k))};return t.onMounted(()=>{!be(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!be(l.showOverflowTooltip)||!a||m()}),()=>{const h={onClick:p,class:s.value,style:c.value,ref:i};let C=null;if(be(l.numberFormat)&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const $=T[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=pe(l.digits),D=pe(l.decimalLength),P=be(l.autoPadding);let K=`${T[0].children}`,V=K.split("").reverse().join("");V=on(V,D,P,E,l.separator),K=V.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=u(K,h)),C||(h.innerHTML=K,C=t.h(l.tag,h))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const $=T[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=`${T[0].children}`;C=u(E,h),C||(h.innerHTML=E,C=t.h(l.tag,h))}}}C||(C=t.h(l.tag,h,{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 $={},E=l.color;E&&($.color=E);const D={class:T,style:$};w=t.h("view",D,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 $={},E=l.color;E&&($.color=E);const D={class:T,style:$};w=t.h("view",D,{default:r.slots.mark})}else{const T={[`${e}__mark`]:!0};l.type&&(T[`${e}__mark--${l.type??"default"}`]=!0);const $={},E=l.color;E&&($["background-color"]=E);const D={class:T,style:$};w=t.h("view",D)}const N={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",N,[w,C])}}}}const{componentName:Th,create:$h,scope:Vh}=_("text"),Nl=$h(Ah(Th,Vh,kt,!1));function Eh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const i=[],s=n[0];if(Array.isArray(e)&&!Array.isArray(s)&&!s[l]){let c=n;for(let u=0;c&&u<r.length;u++){let p=r[u],d=c.find(g=>g[o]===p);if(!d)break;i.push(d[a])}return i}if(Array.isArray(s))for(let c=0;c<n.length&&c<r.length;c++){let u=n[c],p=r[c];const d=u.find(g=>g[o]===p);if(!d)break;i.push(d[a])}else{let c=n;for(let u=0;c&&u<r.length;u++){let p=r[u],d=c.find(g=>g[o]===p);if(!d)break;i.push(d[a]),c=d[l]}}return i}class Dh{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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ih(){const e=t.getCurrentInstance();return new Dh(e.proxy)}const xh={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 vh(e,n,a=!1){return{props:{...xh},setup(o,{attrs:l,slots:r}){const i=Ih(),s=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{s.value=await i.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(s.value)||s.value.length===0)return"";let p=Eh(o.modelValue,s.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)}),u=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(u,p,{default:()=>c.value}):t.h(u,p,c.value)}}}}const{componentName:qh,create:Ph,scope:Mh}=_("mapping"),Bl=Ph(vh(qh,Mh,!1));function Lh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return gr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:y2,create:zh,scope:b2}=_("domain-provider"),Al=zh(Lh()),Oh={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 Fh(e,n){return{inheritAttrs:!1,props:Oh,setup(a,{slots:o}){if(Ge&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const i=(g,S)=>{if(p===null){r.set(g,{visible:null,callback:S});return}l.has(g)&&p.unobserve(g),l.set(g,{visible:null,callback:S}),p.observe(g)},s=g=>{if(p===null){r.delete(g);return}l.has(g)&&(l.delete(g),p.unobserve(g))};let c=a.initialVisibleObserverSize;Qi({acquire:()=>{const g=c>0;return c--,g},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:i,unobserve:s});let p=null;const d=(g,S,b)=>{p=new IntersectionObserver(y=>{for(let k of y){let f=!1;k.intersectionRatio>0&&(f=!0);const m=l.get(k.target);if(m)try{if(a.loadPolicy==="lazy"&&!f&&m.visible!==null)return;m.visible=f,m.callback(f)}catch(h){console.error(h)}}},{root:g,rootMargin:S,threshold:b}),r.forEach((y,k)=>{l.set(k,y),p?.observe(k)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([g,S])=>{if(S||!g||p)return;let b=null;typeof g=="string"?b=document.querySelector(g):b=g,b&&d(b,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:k2,create:Rh,scope:S2}=_("rolling-provider"),Tl=Rh(Fh()),{componentName:Kh,create:Uh}=_("cell"),Hh=Uh({components:{Right:le.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=Kh;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}}}),jh={key:0,class:"fox-cell__icon"},Wh={key:1,class:"fox-cell__title"},Yh={class:"title"},Xh={class:"fox-cell__title-desc"};function Qh(e,n,a,o,l,r){const i=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",jh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Wh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Yh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Xh,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(i,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const $l=oe(Hh,[["render",Qh]]),{componentName:Gh,create:Zh}=_("cell-group"),Jh=Zh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Gh]:!0}))}}}),_h={key:1,class:"fox-cell-group__title"},eg={key:3,class:"fox-cell-group__desc"},tg={class:"fox-cell-group__wrap"};function ng(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",_h,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",eg,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",tg,[t.renderSlot(e.$slots,"default")])],2)}const Vl=oe(Jh,[["render",ng]]),{componentName:og,create:lg}=_("image"),ag=lg({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:le.Image,ImageError:le.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=og;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),i=t.ref(null),s=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(b=>{b.forEach(y=>{y.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),i.value&&l.value.observe(i.value)};t.onMounted(()=>{e.lazyLoad&&s()}),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}),u=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")},g=S=>{n("click",S)};return{...t.toRefs(a),imageClick:g,classes:o,styles:u,stylebox:c,error:d,load:p,show:r,imgRef:i}}}),rg=["src","date-src","alt"],sg={key:0,class:"fox-img-loading"},ig={key:1,class:"fox-img-error"};function cg(e,n,a,o,l,r){const i=t.resolveComponent("Image"),s=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,rg),e.loading?(t.openBlock(),t.createElementBlock("div",sg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{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",ig,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const El=oe(ag,[["render",cg]]),{create:dg}=_("layout"),Dl=dg({}),{componentName:ug,create:fg}=_("col"),mg=fg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ug,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 pg(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 Il=oe(mg,[["render",pg]]),{componentName:hg,create:gg}=_("row"),yg=gg({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=hg;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 nn(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]=so(Ae(e),Ae(n)),a==1&&(o==1?e=ro(e):n=ro(n));let l=Ua(e,n);return a?a==2?"-"+Ae(l):e.length<l.length?Ae(l.substring(1)):"-"+Ae(ro(l)):Ae(l)}function ro(e){let n="",a=e.length,o=e.split(".")[1],l=o?o.length:0;for(let i=0;i<a;i++)e[i]>="0"&&e[i]<="9"?n+=9-parseInt(e[i]):n+=e[i];let r=l>0?"0."+new Array(l).join("0")+"1":"1";return Ua(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 so(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 Ua(e,n){[e,n]=so(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 Ce=(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))(Ce||{});function It(e,n=0,a=Ce.HALF_EVEN){if(a===Ce.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],i=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)+i,c=It(e,0,a),(o?"-":"")+c+new Array(n+1).join("0")}}if(n==0)return r.length,Ha(l[1],r,o,a)?(o?"-":"")+io(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");i=l[1].substring(0,n);let s=l[1].substring(n);return s&&Ha(s,i,o,a)&&(i=io(i),i.length>n)?(o?"-":"")+io(r,parseInt(i[0]))+"."+i.substring(1):(o?"-":"")+r+"."+i}function Ha(e,n,a,o){if(!e||e===new Array(e.length+1).join("0")||o===Ce.DOWN||!a&&o===Ce.FLOOR||a&&o===Ce.CEILING)return!1;if(o===Ce.UP||a&&o===Ce.FLOOR||!a&&o===Ce.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 Ce.HALF_DOWN:return!1;case Ce.HALF_UP:return!0;case Ce.HALF_EVEN:default:return parseInt(n[n.length-1])%2==1}}function io(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 co(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=xt(e),n=xt(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=xt(e.replace(".","")),n=xt(n.replace(".","")),e.length<n.length){let d=e;e=n,n=d}if(n=="0")return"0";let i=n.length,s=0,c=[],u=i-1,p="";for(let d=0;d<i;d++)c[d]=e.length-1;for(let d=0;d<2*e.length;d++){let g=0;for(let S=n.length-1;S>=u&&S>=0;S--)c[S]>-1&&c[S]<e.length&&(g+=parseInt(e[c[S]--])*parseInt(n[S]));g+=s,s=Math.floor(g/10),p=g%10+p,u--}return p=xt(Ys(p,r)),a==1&&(p="-"+p),p}function Ys(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 xt(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 uo(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 u=e.indexOf(".")>0?e.length-e.indexOf(".")-1:-1;if(u==-1)e=Ae(e+new Array(l+1).join("0"));else if(l>u)e=e.replace(".",""),e=Ae(e+new Array(l-u+1).join("0"));else if(l<u){e=e.replace(".","");let p=e.length-u+l;e=Ae(e.substring(0,p)+"."+e.substring(p))}else l==u&&(e=Ae(e.replace(".","")))}let r=0,i=n.length,s="",c=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(0,i+1):e.substring(0,i);if(e=e.indexOf(".")>-1&&e.indexOf(".")<i?e.substring(i+1):e.substring(i),c.indexOf(".")>-1){let u=c.length-c.indexOf(".")-1;c=c.replace(".",""),i>c.length&&(u+=i-c.length,c=c+new Array(i-c.length+1).join("0")),r=u,s="0."+new Array(u).join("0")}for(a=a+2;r<=a;){let u=0;for(;parseInt(c)>=parseInt(n);)c=nn(c,"-"+n),u++;s+=u,e?(e[0]=="."&&(s+=".",r++,e=e.substring(1)),c=c+e.substring(0,1),e=e.substring(1)):(r||(s+="."),r++,c=c+"0")}return(o==1?"-":"")+Ae(It(s,a-2))}function fo(e,n){return e=e.toString(),n=n.toString(),n=mo(n),nn(e,n)}function mo(e){return e[0]=="-"?e=e.substr(1):e="-"+e,e}function ja(e,n){if(n==0)throw new Error("Cannot divide by 0");e=e.toString(),n=n.toString(),Wa(e),Wa(n);let a="";e[0]=="-"&&(a="-",e=e.substr(1)),n[0]=="-"&&(n=n.substr(1));let o=fo(e,co(n,It(uo(e,n),0,Ce.FLOOR)));return a+o}function Wa(e){if(e.indexOf(".")!=-1)throw new Error("Modulus of non-integers not supported")}function Ya(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]=so(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=Ce;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 i="",s=r;s>0;)s<a?(a=s,s=0):s-=a,i=n.substring(s,s+a)+(s<r-a&&s>=0?o:"")+i;return(l?"-":"")+i+n.substring(r)}getPrettyValue(n,a){return ce.getPrettyValue(this.value,n,a)}static round(n,a=0,o=Ce.HALF_EVEN){if(n=ce.validate(n),isNaN(a))throw Error("Precision is not a number: "+a);return It(n,a,o)}round(n=0,a=Ce.HALF_EVEN){if(isNaN(n))throw Error("Precision is not a number: "+n);return new ce(It(this.value,n,a))}static floor(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,Ce.FLOOR)}floor(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,Ce.FLOOR)}static ceil(n){return n=ce.validate(n),n.indexOf(".")===-1?n:ce.round(n,0,Ce.CEILING)}ceil(){return this.value.indexOf(".")===-1?new ce(this.value):new ce(this.value).round(0,Ce.CEILING)}static add(n,a){return n=ce.validate(n),a=ce.validate(a),nn(n,a)}add(n){return new ce(nn(this.value,n.getValue()))}static subtract(n,a){return n=ce.validate(n),a=ce.validate(a),fo(n,a)}subtract(n){return new ce(fo(this.value,n.getValue()))}static multiply(n,a){return n=ce.validate(n),a=ce.validate(a),co(n,a)}multiply(n){return new ce(co(this.value,n.getValue()))}static divide(n,a,o){return n=ce.validate(n),a=ce.validate(a),uo(n,a,o)}divide(n,a){return new ce(uo(this.value,n.getValue(),a))}static modulus(n,a){return n=ce.validate(n),a=ce.validate(a),ja(n,a)}modulus(n){return new ce(ja(this.value,n.getValue()))}static compareTo(n,a){return n=ce.validate(n),a=ce.validate(a),Ya(n,a)}compareTo(n){return Ya(this.value,n.getValue())}static negate(n){return n=ce.validate(n),mo(n)}negate(){return new ce(mo(this.value))}}function Xa(e,n){return ce.multiply(`${e}`,`${n}`)}function po(e,n,a=8){return ce.divide(`${e}`,`${n}`,a)}function ho(e,n){return e=`${e}`,n=`${n}`,ce.compareTo(e,n)}function Qa(e){return ce.negate(e)}function on(e,n=-1,a=!1,o=3,l=","){let r=`${e}`;if(r.length==0||r==="-")return"";let i=r.charAt(0);i=="-"?r=r.substring(1):i="";let s=r,c="",u=r.indexOf(".");u!=-1&&(s=r.substring(0,u),c=r.substring(u+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="",g=s.split("").reverse();for(let S=0;S<g.length;S++)d+=g[S]+((S+1)%o==0&&S+1!=g.length?l:"");c.length==0?p=`${i}${d.split("").reverse().join("")}`:p=`${i}${d.split("").reverse().join("")}.${c}`}else c.length==0?p=`${i}${s}`:p=`${i}${s}.${c}`;return p}function Ga(e){let n=`${e}`,a=n.charAt(0);a=="-"?n=n.substring(1):a="";let o=n.replace(/[^\d\.-]/g,"");return`${a}${o}`}const Ge=typeof window<"u",Ue=Qe;function Za(e){return e==null}const ln=Array.isArray,Xs=e=>rn(e)==="[object Map]",Qs=e=>rn(e)==="[object Set]",He=e=>e instanceof Date,an=e=>typeof e=="function",Ja=e=>typeof e=="string",Gs=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",mt=e=>Ie(e)&&an(e.then)&&an(e.catch),_a=Object.prototype.toString,rn=e=>_a.call(e),go=e=>rn(e)==="[object Object]",er=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function Zs(e){return e.__esModule||er&&e[Symbol.toStringTag]==="Module"}const Js=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function lt(...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 i in r){let s=n[i],c=r[i];if(s!==c)if(l===!0&&c&&typeof c=="object"){let u;Array.isArray(c)?u=s&&Array.isArray(s)?s:[]:u=s&&typeof s=="object"?s:{},n[i]=lt(l,u,c)}else c!==void 0&&(n[i]=c)}}return n}function yo(e,n,a=!1){if(!a)lt(!0,e,n);else{if(typeof n!="object")return{};typeof e!="object"&&(e={});for(let l in n){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!go(i))continue;r=yo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}const o=Object.getOwnPropertySymbols(n);for(let l of o){let r=e[l],i=n[l];if(r!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!go(i))continue;r=yo(r,i,a),e[l]=r}else{if(typeof i=="function")continue;e[l]=i}}}return e}const bo=Js?Promise.resolve():null;function _s(e,...n){bo!==null?n&&n.length>0?bo.then(()=>{e(n)}):bo.then(e):n&&n.length>0?setTimeout(()=>{e(n)}):setTimeout(e)}function be(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function pe(e){return typeof e=="number"?e:Number(e)}const ei={"[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 at(e){let a=Object.prototype.toString.call(e);return e==null?String(e):ei[a]||"object"}function sn(e){if(!e)return!0;const{display:n}=window.getComputedStyle(e);return n==="none"}function tr(e){return e&&typeof e=="object"&&"setInterval"in e}function nr(e){let n=!!e&&"length"in e&&e.length,a=at(e);return a==="function"||tr(e)?!1:a==="array"||n===0||typeof n=="number"&&n>0&&n-1 in e}function or(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 ti(e,n=[]){let a=n;return e!=null&&(nr(Object(e))?or(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=at(e),o=at(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 i=0;i<l.length;i++){let s=l[i],c=e[s],u=n[s];if(!Me(c,u))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],i=n[l];if(!Me(r,i))return!1}return!0}return!1}function lr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}const ue=e=>e==null?!0:typeof e!="string"?!1:e.length===0;function ar(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 rr(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 sr(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 ir(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 ko(e,n=!0,a=!0){n?e=ir(e,".",/\./g):e=e.replace(/\./g,""),a?e=ir(e,"-",/-/g):e=e.replace(/-/,"");const o=n?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}function ni(e,n){return typeof e=="object"||Array.isArray(e)?n.findIndex(a=>{if(Me(e,a))return!0}):n.indexOf(e)}function oi(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 rt(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 cr=(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 So(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),n&&e.stopPropagation()}const st=(e,n=2)=>{for(e+="";e.length<n;)e="0"+e;return e.toString()},je=(e,n,a)=>Math.min(Math.max(e,n),a),we=Symbol.for("BroadcastKey");class Co{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="*"):lr(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 i=this.callbacks.get(a);if(typeof i=="function"){const c=Reflect.apply(i,this.proxy,[...o]);c!=null&&r.push(c)}const s=this.proxy??{};if(typeof s[a]=="function"){const c=Reflect.apply(s[a],s,[...o]);c!=null&&r.push(c)}}return this.children.forEach(i=>{const s=Reflect.apply(i.emit,i,[{...n},a,...o]);s!=null&&Array.isArray(s)&&Reflect.apply([].push,r,[...s])}),r}emitToChildren(n,a,...o){const l=[];return this.children.forEach(r=>{const i=Reflect.apply(r.emit,r,[{...n},a,...o]);i!=null&&Array.isArray(i)&&Reflect.apply([].push,l,[...i])}),l}on(n,a){this.callbacks.set(n,a)}}function cn(e,n,a,o){const l=new Co(n,e,a);if(o&&typeof o=="object")for(const r in o)l.on(r,o[r]);return l}function li(e,n,a){const o=a;if(o[we])return o[we];const l=t.inject(we,null),r=new Co(l,a,e);if(n&&typeof n=="object")for(const i in n)r.on(i,n[i]);return o[we]=r,t.provide(we,r),t.onUnmounted(()=>{r.destroy(),o[we]=void 0}),r}function vt(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[we]??t.inject(we,null):t.inject(we,null)}const it=e=>e.default??e;class ai{error(n,a){const o=a,l=a||t.hasInjectionContext()?vt(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()?vt(n):null;o?o.emit({name:"*",maxLevel:1},"setErrorTip",""):typeof a.setErrorTip=="function"&&a.setErrorTip("")}success(n){const a=n,o=n||t.hasInjectionContext()?vt(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()?vt(o):null,i=a.find(c=>c.required===!0||c.type==="required"&&c.required!==!1),s=n.find(c=>c.required===!0||c.type==="required"&&c.required!==!1);!i&&s?r?r.emit({name:"*"},"setRequired",!0):typeof l.setRequired=="function"&&l.setRequired(!0):i&&!s&&(r?r.emit({name:"*"},"setRequired",!1):typeof l.setRequired=="function"&&l.setRequired(!1),this.reset(o))}getValue(n){return n.modelValue}}let qt=new ai;function ri(e){qt=e}function si(e){qt?Object.assign(qt,e):qt=e}function ii(e,n){it(ot).setValidator(e,n)}function ci(e){it(ot).deleteValidator(e)}let dr=["blur","clear"];function di(e){dr=e}function ur(){return dr}let fr=["focus","change","setValue"];function ui(e){fr=e}function mr(){return fr}function fi(e){it(ot).messages(e)}function Pt(...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 dn(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 Le=Symbol("ValidateSchemaKey");class pr{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=dn(Pt(this.attrRules,this.rules)),o=[];for(let r in n){let i=n[r];if(this.hasValidator(r,!0)){if(i===!1)continue;let c={type:r};i!==null&&typeof i=="object"&&Object.assign(c,i),o.push(c);continue}let s=this.getValidator(r);if(s!==null){let c={type:r,validator:s};o.push(c)}}this.attrRules=dn(o);const l=Pt(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=qt;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?it(ot).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?it(ot).deleteValidator(n):Reflect.deleteProperty(this.validators,n)}hasValidator(n,a=!1){if(a)return it(ot).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=Pt(this.attrRules,this.rules);n===null?this.rules=[]:Array.isArray(n)?this.rules=dn(n):this.rules=dn([n]);const o=Pt(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=Pt(this.attrRules,this.rules);const o=this.descriptor.fieldName??"value";if(a.length>0){const l={[`${o}`]:a},r=this.getValue(),i={[`${o}`]:r},s=it(ot),c=new s(l),u=this.proxy??i;return c.validate(i,{context:u}).then(d=>{if(d.pass)this.success();else{let g="error";Array.isArray(d.errors)&&d.errors.length>0&&(g=d.errors[0].message??g,d.errors=[d.errors[0]],d.errors[0].ref=u),this.error(g)}return d}).catch(d=>{const g=d.message??`${d}`;return this.error(g),d})}}return Promise.resolve({pass:!0})}}function un(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 pr(n,a,e)}const fn=Symbol.for("EventEmitterKey");class hr{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 Ze(e,n){let a=null;return function(...o){a&&clearTimeout(a),a=setTimeout(()=>{a=null,Reflect.apply(e,null,[...o])},n)}}function mn(e,n){let a=0;return function(...o){const l=new Date().getTime();l-a<n||(a=l,Reflect.apply(e,null,[...o]))}}function mi(e,n){const a=Ze((o,l)=>{e=o,l()},n);return t.customRef((o,l)=>({get(){return o(),e},set(r){a(r,l)}}))}function pi(e){let n=!1;return function(...a){n||(n=!0,Reflect.apply(e,null,[...a]))}}function wo(e,n,a,o=0,l=!0){let r=n,i=0;if(l){const c=e();if(i++,c||i>a)return}const s=()=>{const c=e();i++,!(c||i>a)&&(r+=o,setTimeout(s,r))};setTimeout(s,r)}const xe=Symbol("DomainKey"),pt=Symbol("DataItemsKey");class pn{_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 hi=new pn;function ht(){return hi}function We(e=null){return e||(e=t.getCurrentInstance()?.proxy??null),e?e[xe]??t.inject(xe,null):t.inject(xe,null)}const No=Symbol("OriginalDateKey");function Bo(e,n,a=[],o){const l=t.getCurrentInstance();let r=l?.proxy,i=t.inject(xe,null);i===null&&(i=ht());const s=e||n.prop||n.name;let c=new pn(s);c.parent=i;const u=y=>{r[No]||g(y),c?.set("modelValue",y)},p=()=>c?.getForSelf("modelValue")??null,d=()=>r[No]??null,g=y=>{const k={};lt(!0,k,t.toRaw(y)),r[No]=k};t.isReactive(n)||typeof n=="function"?t.watch(n,y=>{c?.merge(y,a)},{immediate:!0}):c.merge(n,a),n.modelValue&&g(n.modelValue);const S=(y,k)=>{c?.set(y,k)},b=y=>c?.getForSelf(y)??null;if(r[xe]=c,t.provide(xe,c),l!==null){const y=t.inject(we,null),k=cn(r,y,s,o);c.broadcast=k,r[we]=k,t.provide(we,k),r.broadcast=(h,C,...A)=>Reflect.apply(k.emit,k,[h,C,...A]);const f=t.inject(Le,null),m=un(r,f,{componentName:""});c.validateSchema=m,r[Le]=m,t.provide(Le,m),r[pt]=new Map,r.validate=(h=!0)=>{const C=[];let A=null;const w={deep:!1};if(h===!0)A={name:"*"};else if(Array.isArray(h)&&h.length>0){const N=h;A={name:T=>T?N.indexOf(T)!==-1:!1}}else if(h!=null&&typeof h=="object"){const N=h;if(Object.assign(w,N),Array.isArray(N.include)&&N.include.length>0){const T=N.include;A={name:$=>$?T.indexOf($)!==-1:!1}}else if(Array.isArray(N.exclude)&&N.exclude.length>0){const T=N.exclude;A={name:$=>$?T.indexOf($)===-1:!1}}else A={name:"*"}}if(A){const N=k?.emitToChildren(A,"validate",w);N&&Reflect.apply([].push,C,N)}return C.length==1?C[0]:C.length>1?Promise.all(C).then(N=>{let T=[];return N.forEach($=>{$.pass===!1&&Array.isArray($.errors)&&(T=[...T,...$.errors])}),T.length>0?{pass:!1,errors:T}:{pass:!0}}):Promise.resolve({pass:!0})},r.setNameValidateRules=(h,C=!0,A=!1)=>{if(A===!0){Reflect.ownKeys(h).forEach(N=>{let T=String(N);const $={componentName:"",fieldName:T,pureDataValidate:!0};if(c){const E=br(c,T,$,k,m);r[pt].set(T,E);const D=h[T];D&&E.validateSchema.setRule(D)}});return}if(C){const w=Reflect.ownKeys(h),N={name:T=>w.includes(T)};k?.emitToChildren(N,"setNameValidateRules",h,!1)}},r.clearValidate=(h=!0)=>{let C=null;if(h===!0)C={name:"*"};else if(Array.isArray(h)&&h.length>0){const A=h;C={name:w=>w?A.indexOf(w)!==-1:!1}}else if(h!=null&&typeof h=="object"){const A=h;if(Array.isArray(A.include)&&A.include.length>0){const w=A.include;C={name:N=>N?w.indexOf(N)!==-1:!1}}else if(Array.isArray(A.exclude)&&A.exclude.length>0){const w=A.exclude;C={name:N=>N?w.indexOf(N)===-1:!1}}else C={name:"*"}}C&&k?.emitToChildren(C,"clearValidate",!1)},r.resetFields=h=>{const C=p();if(!C)return;const A={};if(lt(!0,A,d()??{}),Array.isArray(h))h.forEach(w=>{C[w]=A[w]});else if(h&&Array.isArray(h.include))(h.include??[]).forEach(N=>{C[N]=A[N]});else if(h&&Array.isArray(h.exclude)){let w=h.exclude??[];Reflect.ownKeys(A).forEach(N=>{w.includes(N)||(C[N]=A[N])})}else Object.assign(C,A);r.clearValidate(h)},r.setModelValue=(h,C)=>{!C||C===s?u(h):k?.emitToChildren({name:C},"setModelValue",h)},r.getModelValue=()=>p(),r.setDomainProperty=(h,C)=>{S(h,C)},r.getDomainProperty=h=>b(h)}return t.onUnmounted(function(){c?.validateSchema&&(c.validateSchema.destroy(),r[Le]=void 0,t.provide(Le,null)),c?.broadcast&&(c?.broadcast?.destroy(),r[we]=void 0,t.provide(we,null)),c?.destroy(),r[xe]=void 0,t.provide(xe,null),r[pt]&&(r[pt].clear(),r[pt]=void 0),r.broadcast=null,r.validate=null,r.setNameValidateRules=null,r.clearValidate=null,r.resetFields=null,r.setModelValue=null,r.getModelValue=null,r.setDomainProperty=null,r.getDomainProperty=null,c=null,r=null}),c}function gr(e,n,a=[]){let l=t.getCurrentInstance()?.proxy,r=t.inject(xe,null);r===null&&(r=ht());const i=e||n.prop||n.name;let s=new pn(i);return s.parent=r,t.isReactive(n)||typeof n=="function"?t.watch(n,c=>{s?.merge(c,a)},{immediate:!0}):s.merge(n,a),l[xe]=s,t.provide(xe,s),t.onUnmounted(()=>{s?.destroy(),l[xe]=void 0,t.provide(xe,null),s=null,l=null}),s}function yr(e,n,a){const l=We(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??"",i=t.inject(we,null);let s=cn(l,i,r,a);l[we]=s,t.provide(we,s),l.broadcast=(b,y,...k)=>s?Reflect.apply(s.emit,s,[b,y,...k]):null;const c=t.inject(Le,null);e.fieldName=e.fieldName??r;let u=un(l,c,e);l[Le]=u,t.provide(Le,u),yr(l,u,r),l.validate=(b=null)=>{if(!u)return Promise.resolve({pass:!0});const y=[];let k=!1,f=!1;if(Array.isArray(b)&&b.indexOf(r)!==-1)f=!0,k=!0;else if(b&&typeof b=="object"){const m=b,h=m.ignoreDisabled??!0,C=m.ignoreReadonly??!0,A=m.ignoreHidden??!0;h===!0&&e.disabled===!0||C===!0&&e.readonly===!0||A===!0&&sn(l.$el)?f=!1:(Array.isArray(m.include)&&m.include.indexOf(r)!==-1||Array.isArray(m.exclude)&&m.exclude.indexOf(r),f=!0),k=m.deep??!1}else typeof b=="boolean"&&(k=b),f=!0;if(f){const m=u?.validate();y.push(m)}if(k){let m=null;const h={deep:!1};if(b===!0)m={name:"*"};else if(Array.isArray(b)&&b.length>0){const C=b;m={name:A=>A?C.indexOf(A)!==-1:!1}}else if(b!=null&&typeof b=="object"){const C=b;if(Object.assign(h,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&&s){const C=s.emitToChildren(m,"validate",h);Reflect.apply([].push,y,C)}}return y.length==1?y[0]:y.length>1?Promise.all(y).then(m=>{let h=[];return m.forEach(C=>{C.pass===!1&&Array.isArray(C.errors)&&(h=[...h,...C.errors])}),h.length>0?{pass:!1,errors:h}:{pass:!0}}):Promise.resolve({pass:!0})},l.setValidateRule=b=>u?.setRule(b),l.setNameValidateRules=(b,y=!1)=>{const k=b[r];if(k&&u?.setRule(k),y&&s){const f={name:m=>Reflect.ownKeys(b).includes(m)};s.emitToChildren(f,"setNameValidateRules",b,!1)}},l.clearValidate=(b=null)=>{(!Array.isArray(b)||b.indexOf(n??"")!==-1)&&u?.clear();let y=null;if(b===!0)y={name:"*"};else if(Array.isArray(b)&&b.length>0){const k=b;y={name:f=>f?k.indexOf(f)!==-1:!1}}else if(b!=null&&typeof b=="object"){const k=b;if(Array.isArray(k.include)&&k.include.length>0){const f=k.include;y={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const f=k.exclude;y={name:m=>m?f.indexOf(m)===-1:!1}}else y={name:"*"}}y&&s&&s.emitToChildren(y,"clearValidate",!1)};let p=new hr(l);l[fn]=p;const d=Ze((b="validate")=>{u&&(b==="reset"?u.clear():u.validate())},60);return(Array.isArray(e.validateCheckEvents)?e.validateCheckEvents:ur()).forEach(b=>{p&&p.on(b,y=>{d("validate")})}),(Array.isArray(e.validateResetEvents)?e.validateResetEvents:mr()).forEach(b=>{p&&p.on(b,y=>{d("reset")})}),t.onUnmounted(()=>{s?.destroy(),l[we]=void 0,t.provide(we,null),s=null,u?.destroy(),l[Le]=void 0,t.provide(Le,null),u=null,p?.destroy(),l[fn]=void 0,p=null,l.broadcast=null,l.validate=null,l.setValidateRule=null,l.setNameValidateRules=null,l.clearValidate=null}),{broadcast:s,validateSchema:u,emitEvent:(b,...y)=>{p&&Reflect.apply(p.emit,p,[b,...y])},onEvent:(b,y)=>{p&&Reflect.apply(p.on,p,[y])},offEvent:(b,y)=>{p&&Reflect.apply(p.off,p,[y])}}}function br(e,n,a,o,l){const r={},i=n??"",s={getValue(){const p=e.getForSelf("modelValue");return p?p[i]:null},isExist(){const p=e.getForSelf("modelValue");return p?Reflect.has(p,i):!1}};a.fieldName=i,a.validateHandler={getValue(p){return s.getValue()}};let c=un({},l,a);r.validate=(p=null)=>{if(!s.isExist())return console.warn(`validate error: field [${i}] not exist`),Promise.resolve({pass:!0});const d=[];let g=!1,S=!1;if(Array.isArray(p)&&p.indexOf(i)!==-1)S=!0,g=!0;else if(p&&typeof p=="object"){const b=p;Array.isArray(b.include)&&b.include.indexOf(i)!==-1||Array.isArray(b.exclude)&&b.exclude.indexOf(i),S=!0,g=b.deep??!1}else typeof p=="boolean"&&(g=p),S=!0;if(S&&c){const b=c.validate();d.push(b)}if(g){let b=null;const y={deep:!1};if(p===!0)b={name:"*"};else if(Array.isArray(p)&&p.length>0){const k=p;b={name:f=>f?k.indexOf(f)!==-1:!1}}else if(p!=null&&typeof p=="object"){const k=p;if(Object.assign(y,k),Array.isArray(k.include)&&k.include.length>0){const f=k.include;b={name:m=>m?f.indexOf(m)!==-1:!1}}else if(Array.isArray(k.exclude)&&k.exclude.length>0){const f=k.exclude;b={name:m=>m?f.indexOf(m)===-1:!1}}else b={name:"*"}}if(b&&u){const k=u.emitToChildren(b,"validate",y);Reflect.apply([].push,d,k)}}return d.length==1?d[0]:d.length>1?Promise.all(d).then(b=>{let y=[];return b.forEach(k=>{k.pass===!1&&Array.isArray(k.errors)&&(y=[...y,...k.errors])}),y.length>0?{pass:!1,errors:y}:{pass:!0}}):Promise.resolve({pass:!0})},r.setValidateRule=p=>c?.setRule(p),r.setNameValidateRules=p=>{const d=p[i];d&&c?.setRule(d)};let u=cn(null,o,i,r);return t.onUnmounted(()=>{c=null,u=null}),{broadcast:u,validateSchema:c}}function gt(){let n=t.getCurrentInstance()?.proxy,a=new hr(n);return n[fn]=a,t.onUnmounted(()=>{a?.destroy(),n[fn]=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?`${fe(e)}px`:"";function fe(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(Ge){const{fontSize:i}=window.getComputedStyle(document.documentElement,null),s=i.indexOf("px");s>0&&(r=Number(i.substring(0,s)))}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 Je="PageStateKey";function Oe(e){const n={top:null,left:null,bottom:null,right:null};return e&&(e.top!==null&&e.top!==void 0&&(n.top=fe(e.top)),e.left!==null&&e.left!==void 0&&(n.left=fe(e.left)),e.bottom!==null&&e.bottom!==void 0&&(n.bottom=fe(e.bottom)),e.right!==null&&e.right!==void 0&&(n.right=fe(e.right))),n}function Ao(e,n,a={},o=!0,l=-1,r=-1,i=0,s=0){if(e.headerHeight=fe(a.headerHeight??n.headerHeight??-1),e.headerPadding=Oe(a.headerPadding??n.headerPadding),e.footerHeight=fe(a.footerHeight??n.footerHeight??-1),e.footerPadding=Oe(a.footerPadding??n.footerPadding),e.contentPadding=Oe(a.contentPadding??n.contentPadding),o){const c=a.height??n.height;c?e.height=fe(c,r):e.height=fe(r)-fe(i,r)-fe(s,r),e.width=fe(a.width??n.width??0,l)}}function kr(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=fe(l.top),o.safeAreaBottom=fe(l.bottom),o.safeAreaLeft=fe(l.left),o.safeAreaRight=fe(l.right));const r=e.get("pageLayout");if(!r)return null;const i=e.get("rootWidth")??-1,s=e.get("rootHeight")??-1,c=e.get("headerBarHeight")??0,u=e.get("footerBarHeight")??0;Ao(o,r,n,!0,i,s,c,u);const p=t.reactive(o),d=e.getForParent(Je);d&&(o.height=bn(e,d),o.width=kn(e,d),t.watch([()=>bn(e,d),()=>kn(e,d)],([S,b])=>{p.height=S,p.width=b}));const g=!d;return t.watch([()=>n.height,()=>e.get("pageLayout"),()=>e.get("rootWidth"),()=>e.get("rootHeight"),()=>e.get("headerBarHeight"),()=>e.get("footerBarHeight")],([S,b,y=-1,k=-1,f=0,m=0])=>{Ao(p,b,n,g,y,k,f,m)}),e.set(Je,p),p}function hn(e){return e.get(Je)}function gn(e,n){if(n=n??e.get(Je),n&&n.headerMounted){const a=n.safeAreaTop==-1?0:n.safeAreaTop;return n.headerAllHeight??n.headerHeight+a}return 0}function yn(e,n){if(n=n??e.get(Je),n&&n.footerMounted){const a=n.safeAreaBottom==-1?0:n.safeAreaBottom;return n.footerAllHeight??n.footerHeight+a}return 0}function bn(e,n){if(n=n??e.get(Je),n){if(n.contentInnerHeight)return n.contentInnerHeight;const a=gn(e,n),o=yn(e,n);return n.height-a-o-(n.contentPadding.top??0)-(n.contentPadding.bottom??0)}return 0}function kn(e,n){return n=n??e.get(Je),n?n.contentInnerWidth??n.width-(n.contentPadding.left??0)-(n.contentPadding.right??0):0}function gi(e,n){const a=e.get("isInnerPage");return typeof a=="function"?Reflect.apply(a,{},[n,e]):!1}function yi(e){return!!e.getForParent(Je)}var Sn=(e=>(e[e.Parent=0]="Parent",e[e.Near=1]="Near",e))(Sn||{});function Cn(e,n){return e==null?!1:typeof n=="function"?n(e):!0}function Ve(e,n,a=1,o){const l=We();return l==null?e:a===0?t.computed(()=>{const r=l.getAll(n);for(let s=r.length-1;s>=0;s--){const c=r[s];if(Cn(c,o))return c}const i=e.value;return Cn(i,o)?i:null}):t.computed(()=>{const r=e.value;if(Cn(r,o))return r;const i=l.getAll(n);for(let s=0;s<i.length;s++){const c=i[s];if(Cn(c,o))return c}return null})}function Ee(e){return Ve(e,"readonly",1)}function De(e){return Ve(e,"disabled",1)}function Pe(e,n="modelValue",a=null,o){const l=t.toRef(e,n);let r=l.value;typeof a=="function"&&(r=a(l.value));const i=t.ref(r);return t.watch(l,s=>{if(typeof a=="function"){const c=a(s);c!==i.value&&(i.value=c,o&&o("setValue",c))}else s!==i.value&&(i.value=s,o&&o("setValue",s))}),i}const Sr=new Map,wn=new Map;let To=null;function bi(e){To=e}function Cr(e,n,a){if(a){let o=wn.get(a);o||(o=new Map,wn.set(a,o)),o.set(e,n)}else Sr.set(e,n)}function _e(e,n,a){!a&&To&&(a=To(e)??void 0);let o=null;if(a){let l=wn.get(a);l&&(o=l.get(n))}return o||(o=Sr.get(n)),o}function ki(e,n){for(let a in e){const o=e[a];Cr(a,o,n)}}function Si(e){wn.delete(e)}function Ci(){return{top:0,left:0,bottom:0,right:0}}function wi(){if(Ge){const e=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight;return{rootWidth:e,rootHeight:n,pageLayout:{}}}else return{rootWidth:-1,rootHeight:-1,pageLayout:{headerHeight:-1,footerHeight:-1}}}function Ni(e,n){if(n.componentPrefix){const a=e.indexOf("-");return`${n.componentPrefix}${e.slice(a)}`}return e}class Bi{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 i=Ni(r.name,a);n.component(i,r)}});const o=["safeAreaInset","pageLayout","headerBarHeight","footerBarHeight"],l=ht();if(this.initPageLayout(a,l),a.autoAdjustPageLayout!==!1&&window.ResizeObserver){const r=mn(()=>{const s={...a},c=document.documentElement.clientWidth||document.body.clientWidth,u=document.documentElement.clientHeight||document.body.clientHeight;s.width=c,s.height=u,this.initPageLayout(s,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=lt({},Ci(),n.safeAreaInset),i=wi(),s=lt({},i.pageLayout,n.pageLayout);a=a??ht(),a.set("safeAreaInset",r),a.set("headerBarHeight",o),a.set("footerBarHeight",l),a.set("pageLayout",s),a.set("rootWidth",i.rootWidth),a.set("rootHeight",i.rootHeight)}setScopeGetter(n){bi(n)}setAPI(n,a,o){Cr(n,a,o)}getAPI(n,a,o){return _e(n,a,o)}batchSetAPI(n,a){ki(n,a)}clearScopeAPI(n){Si(n)}getRootDomain(){return ht()}}function _(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 Ai=(e,n)=>{let a=document.body;const o=e.teleport||"body";o!="body"&&(Ja(o)?a=document.querySelector(o):a=e.teleport);const l=document.createElement("view"),r=n.name?n.name+"-":"",i=e.id||new Date().getTime();l.id=r+i;let s={};an(n.wrapper)?s=n.wrapper(a,l):s=n.wrapper;const c=t.createApp(s,e),u=n.components;return u&&u.forEach(p=>{c.use(p)}),a.appendChild(l),{instance:c.mount(l),unmount:()=>{c.unmount(),a.removeChild(l)}}},wr=(e,n)=>e?t.h(e,n):"";function ve(e,n=null){if(n||(n=t.getCurrentInstance()),n&&n.proxy){let a=n.proxy;Object.assign(a,e)}}const he={disabled:{type:[Boolean,String],required:!1,default:()=>null},readonly:{type:[Boolean,String],required:!1,default:()=>null},labelPosition:{type:String,required:!1,default:()=>null},labelWidth:{type:[String,Number],required:!1,default:()=>null},textAlign:{type:[String],required:!1,default:()=>null},hasBorder:{type:Boolean,required:!1,default:()=>!0}},ye={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}},Nr={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}},Br={name:{type:String,required:!1},prop:{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}},Ar=[];for(const e in Br)Ar.push(e);const Ti=Symbol.for("InnerPageScopeKey"),$i={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:{...he,...Nr,...$i},setup(a,{slots:o}){const l=Bo(a.name,a),r=t.inject(Ti,!1);if(l){const p=kr(l,a);ve({getPageContentHeight:()=>bn(l,p),getPageContentWidth:()=>kn(l,p),getPageHeaderHeight:()=>gn(l,p),getPageFooterHeight:()=>yn(l,p)}),p&&r&&(p.contentHeight="100%")}const i=t.computed(()=>({[e]:!0})),s=t.computed(()=>({})),c=t.getCurrentInstance(),u=(p,d=!1)=>{const g=c?.proxy;g&&typeof g.setNameValidateRules=="function"&&g.setNameValidateRules(p,!0,d)};return t.watch([()=>a.rules,()=>a.pureDataRules],([p,d],[g,S])=>{if(p&&g){const b=t.toRaw(g),y=t.toRaw(p),k=y?Reflect.ownKeys(y):[];(b?Reflect.ownKeys(b):[]).forEach(m=>{k.includes(m)||(y[m]=[])}),u(y)}if(d&&S){const b=t.toRaw(S),y=t.toRaw(d),k=y?Reflect.ownKeys(y):[];(b?Reflect.ownKeys(b):[]).forEach(m=>{k.includes(m)||(y[m]=[])}),u(y,!0)}},{deep:!0}),t.onMounted(()=>{if(a.rules){const p=t.toRaw(a.rules);u(p)}if(a.pureDataRules){const p=t.toRaw(a.pureDataRules);u(p,!0)}}),()=>{const p={class:i.value,style:s.value};return t.h("div",p,[o?.default?.()])}}}),{componentName:Ei,create:Di,scope:m2}=_("page"),$o=Di(Vi(Ei));function Vo(e){const n=t.unref(e);return{width:n.offsetWidth,height:n.offsetHeight}}function Nn(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")),i=parseFloat(a.getPropertyValue("padding-bottom"));return{width:n.clientWidth-o-l,height:n.clientHeight-r-i}}const Ii=Symbol.for("InnerPageScopeKey"),Tr={headerbar:{},radio:{},checkbox:{}};function xi(e){Object.assign(Tr,e)}function Bn(){return Tr}const vi=(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 i=We(),s=i?hn(i):null,c=t.inject(Ii,!1),u=Bn(),p=e,d=t.computed(()=>{const P={[p]:!0,[`${p}--border`]:l.border,[`${p}--fixed`]:l.fixed};return c||(P[`${p}--safe-area-inset-top`]=l.safeAreaInsetTop),P}),g=t.computed(()=>({[`${p}__inner`]:!0,[`${p}__inner--${l.align}`]:!0})),S=l.height!==null&&l.height!==void 0?fe(l.height):null,b=t.computed(()=>{const P={safeAreaTop:null,height:null,left:null,top:null,right:null,bottom:null};if(i&&s){const K=Oe(l.padding??s.headerPadding);return Object.assign(P,K),S&&(s.headerHeight=S),s.headerHeight>0&&(P.height=s.headerHeight),P.safeAreaTop=s.safeAreaTop===-1?0:s.safeAreaTop,P.safeAreaTop>0&&(P.top=P.safeAreaTop+(K.top??0),P.height&&P.height>0&&(P.height=P.height+P.safeAreaTop)),P}if(S&&(P.height=S),l.padding){const K=Oe(l.padding);Object.assign(P,K)}return P}),y=t.ref(null),k=()=>{if(s&&y.value&&!sn(y.value)){if(!o){const P=Vo(y.value);s.headerAllHeight=P.height}return s.headerMounted=!0,!0}return!1};let f=null;t.onMounted(()=>{s&&(wo(k,50,5,50,!0),window.ResizeObserver&&y.value&&(f=new window.ResizeObserver(()=>{k()}),f.observe(y.value)))}),t.onUnmounted(()=>{s&&(s.headerMounted=!1,f&&(f.disconnect(),f=null))});const m=t.computed(()=>{const P={};return b.value.height!==null&&b.value.height!==void 0&&(P.height=`${b.value.height}px`),b.value.top!==null&&b.value.top!==void 0&&(P.paddingTop=`${b.value.top}px`),b.value.left!==null&&b.value.left!==void 0&&(P.paddingLeft=`${b.value.left}px`),b.value.right!==null&&b.value.right!==void 0&&(P.paddingRight=`${b.value.right}px`),b.value.bottom!==null&&b.value.bottom!==void 0&&(P.paddingBottom=`${b.value.bottom}px`),P}),h=t.computed(()=>!(b.value.height!==null&&b.value.height!==void 0&&b.value.height<=0));function C(){r.emit("back")}function A(){r.emit("click-title")}function w(){r.emit("click-right")}function N(){r.emit("click-right-text")}const T=()=>{if(!l.leftShow)return null;const P=[];if(r.slots.left)P.push(r.slots.left());else{if(r.slots.leftIcon){const K=t.h("view",{class:"left-icon",onClick:C},[r.slots.leftIcon()]);P.push(K)}else{const K=l.leftIcon??u.headerbar.Left??a,V=t.h("view",{class:"left-icon",onClick:C},[t.h(K)]);P.push(V)}if(l.leftText){const K=t.h("view",{class:"left-text",onClick:C},[l.leftText]);P.push(K)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__left"},P)},$=()=>{if(!l.rightShow)return null;const P=[];if(r.slots.right)P.push(r.slots.right());else{if(l.rightText){const K=t.h("view",{class:"right-text",onClick:N},[l.rightText]);P.push(K)}if(r.slots.rightIcon){const K=t.h("view",{class:"right-icon",onClick:w},[r.slots.rightIcon()]);P.push(K)}else if(l.rightIcon){const K=t.h("view",{class:"right-icon",onClick:w},[t.h(l.rightIcon)]);P.push(K)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__right"},P)},E=()=>{if(!l.titleShow)return null;const P=[],K=r.slots.default?r.slots.default():null;if(K)P.push(K);else{if(l.title){const V=t.h("view",{class:"title-text"},[l.title]);P.push(V)}if(r.slots.titleIcon){const V=t.h("view",{class:"title-icon",onClick:A},[r.slots.titleIcon()]);P.push(V)}else if(l.titleIcon){const V=t.h("view",{class:"title-icon",onClick:A},[t.h(l.titleIcon)]);P.push(V)}}return P.length===0?null:t.h("view",{class:"fox-header-bar__title"},P)},D=()=>{const P=[],K=r.slots.bottom?r.slots.bottom():null;return K&&P.push(K),P.length===0?null:t.h("view",{class:"fox-header-bar__bottom"},P)};return()=>{if(!h.value)return null;const P=[];if(r.slots.all)P.push(r.slots.all());else{const V=[],I=T();I&&V.push(I);const L=E();L&&V.push(L);const x=$();if(x&&V.push(x),V.length>0){const j=t.h("view",{class:g.value},V);P.push(j)}const W=D();W&&P.push(W)}if(P.length===0)return null;const K={class:d.value,style:m.value,ref:y};return t.h("view",K,P)}}}),{componentName:qi,create:Pi,scope:Mi}=_("header-bar"),Eo=Pi(vi(qi,Mi,le.Left,!1)),Li=Symbol.for("InnerPageScopeKey");function zi(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=We(),i=r?hn(r):null,s=t.inject(Li,!1),c=e,u=t.computed(()=>{const k={[c]:!0,[`${c}--${o.align}`]:!0,[`${c}--border`]:o.border,[`${c}--fixed`]:o.fixed};return s||(k[`${c}--safe-area-inset-bottom`]=o.safeAreaInsetBottom),k}),p=o.height!==null&&o.height!==void 0?fe(o.height):null,d=t.computed(()=>{const k={safeAreaBottom:null,height:null,left:null,top:null,right:null,bottom:null};if(r&&i){const f=Oe(o.padding??i.footerPadding);return Object.assign(k,f),p&&(i.footerHeight=p),i.footerHeight>0&&(k.height=i.footerHeight),k.safeAreaBottom=i.safeAreaBottom===-1?0:i.safeAreaBottom,k.safeAreaBottom>0&&(k.bottom=k.safeAreaBottom+(f.bottom??0),k.height&&k.height>0&&(k.height=k.height+k.safeAreaBottom)),k}if(p&&(k.height=p),o.padding){const f=Oe(o.padding);Object.assign(k,f)}return k}),g=t.ref(null),S=()=>{if(i&&g.value&&!sn(g.value)){if(!a){const k=Vo(g.value);i.footerAllHeight=k.height}return i.footerMounted=!0,!0}return!1};let b=null;t.onMounted(()=>{i&&(wo(S,50,5,50,!0),window.ResizeObserver&&(b=new window.ResizeObserver(()=>{S()}),b.observe(g.value)))}),t.onUnmounted(()=>{i&&(i.footerMounted=!1,b&&(b.disconnect(),b=null))});const y=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():[],f={ref:g,class:u.value,style:y.value};return t.h("view",f,k)}}}}const{componentName:Oi,create:Fi,scope:Ri}=_("footer-bar"),Do=Fi(zi(Oi,Ri,!1));function Ki(e,n){return{props:{padding:{type:[Object],required:!1}},setup(a){const o=We(),l=t.computed(()=>({[e]:!0})),r=o?hn(o):null,i=t.computed(()=>{const u={};if(o&&r){if(a.padding){const f=Oe(a.padding);Object.assign(r.contentPadding,f)}const p=gn(o,r),d=yn(o,r);let g="";r.contentHeight?g=`${r.contentHeight}`:g=`${r.height}px`,console.debug("[content]page height:",g),console.debug("[content]header height:",p),console.debug("[content]footer height:",d),console.debug("[content]padding:",r.contentPadding),u.height=g;let S=(r&&r.contentPadding&&r.contentPadding.top)??-1;(S>=0||p>0)&&(S=S<0?0:S,u.paddingTop=`${p+S}px`);let b=(r&&r.contentPadding&&r.contentPadding.bottom)??-1;(b>=0||d>0)&&(b=b<0?0:b,u.paddingBottom=`${d+b}px`);const y=(r&&r.contentPadding&&r.contentPadding.left)??-1;y>=0&&(u.paddingLeft=`${y}px`);const k=(r&&r.contentPadding&&r.contentPadding.right)??-1;return k>=0&&(u.paddingRight=`${k}px`),u}if(a.padding){const p=Oe(a.padding);p.left&&(u.paddingLeft=`${p.left}px`),p.top&&(u.paddingTop=`${p.top}px`),p.right&&(u.paddingRight=`${p.right}px`),p.bottom&&(u.paddingBottom=`${p.bottom}px`)}return u}),s=t.ref(null),c=Ze(()=>{if(r&&s.value){const u=Nn(s.value);r.contentInnerHeight=u.height,r.contentInnerWidth=u.width}},0);return t.onMounted(()=>{c()}),o&&r&&t.watch([()=>i.value,()=>l.value],([])=>{c()}),{contentRef:s,classes:l,styles:i}}}}const{componentName:Ui,create:Hi,scope:p2}=_("content"),ji=Hi(Ki(Ui));function Wi(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 oe=(e,n)=>{const a=e.__vccOpts||e;for(const[o,l]of n)a[o]=l;return a},Io=oe(ji,[["render",Wi]]),yt="GroupStateKey",$r=Symbol.for("GroupScopeKey");function An(){return t.inject($r,!1)}function Tn(e=!0){t.provide($r,e)}function Yi(e,n={}){Reflect.ownKeys(n).forEach(o=>{if(typeof o!="string")return;const l=n[o];Za(l)||(e[o]=l)})}function Xi(e,n={}){const o={type:"grid",width:e.get("width",-1),column:-1,gutter:-1};Yi(o,n);const l=t.shallowRef(o),r=t.markRaw({layout:l,passport:0,order:{index:0}});return e.set(yt,r),r}function xo(e,n,a=-1,o=-1,l=!1,r,i,s){const c=e.get(yt);if(!c)return;const u=e.get("groupLayout")??{};a===-1&&(a=u.column??1),o===-1&&(o=u.gutter??0),r||(r=u.minItemWidth??-1),i||(i=u.maxItemWidth??-1);const p=fe(r),d=fe(i);s||(s=u.type??"grid");const g=()=>{const S=n===""||n===-1,b=fe(n);let y=pe(a);const k=fe(o);if(!S){let h=(b-(y-1)*k)/y;for(;d!==-1&&h>d;)y++,h=(b-(y-1)*k)/y;for(;p!==-1&&y>1&&h<p;)y--,h=(b-(y-1)*k)/y}let f=!1;const m=c.layout;m.value.width=n,m.value.column!==y&&(m.value.column=y,f=!0),m.value.gutter!==k&&(m.value.gutter=k,f=!0),m.value.type!==s&&(m.value.type=s,f=!0),f&&t.triggerRef(m)};if(l)g();else{const S=++c.passport;setTimeout(()=>{S===c.passport&&g()},50)}}function $n(e,n=!1){let a;return n?a=e.getForParent(yt):a=e.get(yt),a.layout}function Vn(e,n=!1){let a;return n?a=e.getForParent(yt):a=e.get(yt),a.order}function Vr(e,n=1){if(n==="stretch")return-1;const a=pe(n);return a===-1?100:100*a/e}function En(e,n,a=1,o=0,l){const r={};let i=0;l?i=fe(l):i=Vr(n.column,a),i>0&&(r.width=`${i}%`);const s=Vr(n.column,o);s>0&&(r["margin-left"]=`${s}%`);const c=n.gutter/2;return c>0&&(r["padding-left"]=`${c}px`,r["padding-right"]=`${c}px`),r}function Dn(e,n,a=1,o=0){if(a==="stretch"){const c=e.index%n.column,u=c+(n.column-c);return e.index=e.index+(u-c),{"grid-column":`${c+1} / -1`}}let l=pe(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=pe(o)%n.column;let i=(e.index+r)%n.column,s=i+l;return s>n.column?(i=0,s=i+l,e.index=e.index+(n.column-i)+l):e.index=e.index+r+l,r>0?{"grid-column":`${i+1} / span ${l}`}:{"grid-column-start":`span ${l}`}}const Er=Symbol("RollingStateKey");function Qi(e){t.provide(Er,e)}function Gi(){return t.inject(Er,null)}function vo(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 Zi(e){let n=vo(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=vo(a),console.info("2.---------- get expand height",n),document.body.removeChild(a)}return n}function Ji(e,n,a){if(e<=0)return"1fr";const o=(e-(n-1)*a)/n;return o>0?`${o}px`:"1fr"}const _i={...he,...Nr,...Br};function ec(e,n,a){return{props:_i,emits:["update:collapse","header-click"],setup(o,l){const r=Bo(o.prop??o.name,o,Ar),i=Xi(r,{type:o.type}),s=An();Tn(!0);const c=o.rollingDisplay?Gi():null,u=t.ref(null),p=t.computed(()=>o.rollingDisplay?c&&!c.disabled:!1),d=t.computed(()=>s&&r?$n(r,!0).value:null),g=t.getCurrentInstance(),S=(R,X=!1)=>{const Q=g?.proxy;Q&&typeof Q.setNameValidateRules=="function"&&Q.setNameValidateRules(R,!0,X)};t.watch([()=>o.rules,()=>o.pureDataRules],([R,X],[Q,U])=>{if(R&&Q){const J=t.toRaw(Q),te=t.toRaw(R),ae=te?Reflect.ownKeys(te):[];(J?Reflect.ownKeys(J):[]).forEach(de=>{ae.includes(de)||(te[de]=[])}),S(te)}if(X&&U){const J=t.toRaw(U),te=t.toRaw(X),ae=te?Reflect.ownKeys(te):[];(J?Reflect.ownKeys(J):[]).forEach(de=>{ae.includes(de)||(te[de]=[])}),S(te,!0)}},{deep:!0});const b=e,y=t.computed(()=>{const R={};if(R.height=I.value,o.width)o.width!=="auto"&&(R.width=ge(o.width));else{const X=s?Vn(r,!0):null;if(d.value&&X){if(d.value.type==="grid"){const Q=Dn(X,d.value,o.span,o.offset);Object.assign(R,Q)}else if(d.value.type==="flow"){const Q=En(X,d.value,o.span,o.offset,o.width);Object.assign(R,Q)}}}return R}),k=t.computed(()=>{const R=i.layout.value.type;return R==="grid"||R==="flow"?{[`${b}--${R}`]:!0,[`${b}--${R}-justify-${o.justify}`]:!0,[`${b}--${R}-align-${o.align}`]:!0,[`${b}--gutter`]:!0}:{[`${b}--${R}`]:!0,[`${b}--gutter`]:!0}}),f=t.computed(()=>{if(i.layout.value.type==="grid"){let X="";if(o.columnWidth)X=`repeat(auto-fill, ${o.columnWidth})`;else{const Q=Ji(T.value,i.layout.value.column,i.layout.value.gutter);X=`repeat(${i.layout.value.column}, ${Q})`}return{"column-gap":`${i.layout.value.gutter}px`,"grid-template-columns":X}}}),m=t.toRef(o,"gutter"),h=t.toRef(o,"column"),C=t.computed(()=>s||p.value?!0:be(o.isWrap)),A=[],w=R=>{A.push(R)},N=()=>{let R=A.length;A.splice(0,R)},T=t.ref(-1),$=R=>{const X=Nn(R).width;X>0&&X!==T.value&&(T.value=X)};xo(r,T.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type),o.autoLayout&&t.watch([T,h,m],([R,X,Q])=>{i.order.index=0,xo(r,R,X,Q,!1,o.minItemWidth,o.maxItemWidth,o.type)});const E=t.computed(()=>L.value?o.expandText??"":o.collapseText??""),D=t.computed(()=>({[`${e}__header-collapse-text`]:!0})),P=t.computed(()=>({[`${e}__header-collapse-icon`]:!0,"is-expand":!L.value,"is-collapse":L.value})),K=t.ref(),V=t.ref(),I=t.computed(()=>x.value||ge(o.height)||""),L=t.ref(!1),x=t.ref(""),W=t.ref(!1);let j=-1;const O=(R,X=!0)=>{const Q=K.value;if(Q&&L.value!==R){if(j=j<=0?Zi(Q):j,W.value=!0,X)if(Q.style["will-change"]="height",Q.ontransitionend=function(){Q.ontransitionend=null,this.style["will-change"]="auto",R||(x.value="",W.value=!1)},R){let U=0;o.collapseHeight?U=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(U=V.value.offsetHeight),x.value=`${j}px`,t.nextTick(()=>{x.value=`${U}px`})}else x.value=`${j}px`;else if(R){let U=0;o.collapseHeight?U=o.collapseHeight:V.value&&V.value.classList.contains(`${e}__header`)&&(U=V.value.offsetHeight),x.value=`${U}px`}else W.value=!1,x.value=`${j}px`;L.value=R,l.emit("update:collapse",R)}};t.watch(()=>o.collapse,R=>{O(R)});const ee=R=>{l.emit("header-click",R)},H=()=>{q()},q=R=>{R=R??!L.value,O(R)};ve({toggleCollapse:q,doLayout:()=>{A[0]&&($(A[0]),xo(r,T.value,h.value,m.value,!0,o.minItemWidth,o.maxItemWidth,o.type))}});let v=null,Y=!0;const z=R=>{if(o.rules){const X=t.toRaw(o.rules);S(X)}if(o.pureDataRules){const X=t.toRaw(o.pureDataRules);S(X,!0)}if(Ge&&(R&&O(be(o.collapse),!1),o.autoLayout&&Array.isArray(A)&&A.length>0)){const X=A[0];$(X),window.ResizeObserver&&(v=new window.ResizeObserver(()=>{$(X)}),v.observe(X))}},F=()=>{v?.disconnect(),v=null},G=!p.value||c?.acquire();G&&(u.value=p.value?!0:null),t.onMounted(()=>{if(G&&(z(Y),Y=!1),p.value&&c){let R=null,X=c.initialHeight;c.observe(K.value,Q=>{if(Q!==u.value)if(Q)u.value=!0,L.value||(x.value=""),R=setTimeout(()=>{R=null,u.value!==!1&&(z(Y),Y=!1)},100);else{if(R!==null&&clearTimeout(R),u.value=!1,!L.value)if(Y)x.value=c.initialHeight;else{let U=vo(K.value);U<=0?x.value=X:(x.value=`${U}px`,X=x.value)}Y||F()}})}}),t.onUnmounted(()=>{v?.disconnect(),c&&c.unobserve(K.value)});const Z=(R="right")=>{const X=[];if(E.value){const te={class:D.value},ae=t.h("span",te,[E.value]);X.push(ae)}const Q={class:P.value},U=o.collapseIcon??a,J=t.h(U,Q);return X.push(J),X.length>0?t.h("div",{class:{[`${b}__header-collapse`]:!0,[`is-${R}`]:!0},onClick:H},X):null},ne=(R,X,Q,U)=>{const J={...k.value};return X===0&&(J[`${b}__first`]=!0),Q>=U-1&&(J[`${b}__last`]=!0),t.h("div",{ref:w,key:`${X}`,class:J,style:f.value},R)};return()=>{if(p.value&&u.value!==!0){const J=o.tag||"div";return t.h(J,{ref:K,prop:o.name,class:{[`${b}`]:!0,"is-collapse":W.value},style:y.value},[])}i.order.index=0;const R=[];let X=0;if(l.slots.header){const J={key:`${X++}`,ref:V,class:{[`${b}__header`]:!0,[`${b}__first`]:!0},onClick:ee},te=t.h("div",J,[l.slots.header()]);R.push(te)}else{const J=[],te=o.collapsePosition==="left";if(te&&o.showCollapse){const ae=Z("left");ae&&J.push(ae)}if(o.title||l.slots.title){if(o.showMark){const ae={class:{[`${b}__header-mark`]:!0}};o.markColor&&(ae.style={background:o.markColor});const se=t.h("div",ae);J.push(se)}if(l.slots.title){const ae=t.h("div",{class:{[`${b}__header-title`]:!0}},[l.slots.title()]);J.push(ae)}else if(o.title){const ae=t.h("div",{class:{[`${b}__header-title`]:!0}},[o.title]);J.push(ae)}}if(l.slots.toolbar&&J.push(l.slots.toolbar()),!te&&o.showCollapse){const ae=Z("right");ae&&J.push(ae)}if(J.length>0){const ae={key:`${X++}`,ref:V,class:{[`${b}__header`]:!0,[`${b}__first`]:!0},onClick:ee},se=t.h("div",ae,J);R.push(se)}}N();const Q=l.slots.default?l.slots.default():[],U=i.layout.value.type;if(U==="grid"){const J=ne(Q,X++,0,Q.length);R.push(J)}else if(U==="flow"){const J=ne(Q,X++,0,Q.length);R.push(J)}else for(let J=0;J<Q.length;J++){const te=Q[J],ae=ne([te],X++,J,Q.length);R.push(ae)}if(C.value){const J=o.tag||"div";return t.h(J,{ref:K,prop:o.name,class:{[`${b}`]:!0,"is-collapse":W.value},style:y.value},[R])}else return R}}}}const{componentName:tc,create:nc,scope:oc}=_("group"),qo=nc(ec(tc,oc,le.RectUp));function lc(e){return e===window}const ac=/matrix\((.+)\)/,Po=e=>{const n=t.unref(e);if(!n)return{x:0,y:0};if(lc(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,i=0,s=0,c=0;for(l=n;l!==document;){i+=l.scrollTop,r+=l.scrollLeft;const{transform:u}=window.getComputedStyle(l);if(u){const p=ac.exec(u);if(p){let g=p[1].split(/\s*,\s*/);g.length==6&&(s+=Number(g[4]),c+=Number(g[5]))}}l=l.parentNode}return a-=r,o-=i,a+=s,o+=c,{x:a,y:o}};class rc{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 sc{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 rc,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 Mt=new sc,Dr={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:ic,create:cc}=_("price"),dc=cc({props:{...Dr},setup(e){const n=t.computed(()=>({[ic]:!0})),a=t.computed(()=>e.needSymbol?e.symbol:""),o=t.computed(()=>ke(e.price)==0?"":on(e.price,e.decimalLength,!0,pe(e.digits),e.separator)),l=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(0,s)}),r=t.computed(()=>{let i=o.value;if(i.length==0)return"";let s=i.indexOf(".");return i.substring(s+1)});return{classes:n,showSymbol:a,intText:l,decimalText:r}}}),uc=["innerHTML"],fc=["innerHTML"];function mc(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,uc)):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,fc)):t.createCommentVNode("",!0)],2)}const et=oe(dc,[["render",mc]]),{componentName:Mo,create:pc}=_("hint-text"),hc=pc({components:{Price:et},props:{...Dr,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),i=t.ref(e.placement),s=t.ref(!1),c=t.ref(null),u=(D,P,K,V,I,L)=>{const x=document.documentElement.clientWidth||document.body.clientWidth,W=document.documentElement.clientHeight||document.body.clientHeight,j=D.split("-");let O=[];j[0]==="top"?O=["top","bottom","right","left"]:j[0]==="bottom"?O=["bottom","top","right","left"]:j[0]==="left"?O=["left","top","bottom","right"]:j[0]==="right"&&(O=["right","top","bottom","left"]);const ee={top:null,right:null,bottom:null,left:null},H=[];for(let q=0;q<O.length;q++){const M=O[q];if(H[0]=M,j[1]&&(H[1]=j[1]),M==="top"){const v=P.y-L-e.arrowSize-e.offset;if(v>=0){ee.top=v;let Y=0;j[1]==="start"?Y=P.x:j[1]==="end"?Y=P.x+K-I:Y=P.x+K/2-I/2;const z=x-Y-I;z<0?(Y+=z,d.value=-z):d.value=0,ee.left=Y<0?0:Y;break}}else if(M==="bottom"){const v=P.y+V+e.arrowSize+e.offset;if(v+L<=W){ee.top=v;let Y=0;j[1]==="start"?Y=P.x:j[1]==="end"?Y=P.x+K-I:Y=P.x+K/2-I/2;const z=x-Y-I;z<0?(Y+=z,d.value=-z):d.value=0,ee.left=Y<0?0:Y;break}}else if(M==="left"){const v=P.x-I-e.arrowSize-e.offset;if(v>=0){ee.left=v;let Y=0;j[1]==="start"?Y=P.y:j[1]==="end"?Y=P.y+V-L:Y=P.y+V/2-L/2,ee.top=Y<0?0:Y;break}}else if(M==="right"){const v=P.x+K+e.arrowSize+e.offset;if(v+I<=x){ee.left=v;let Y=0;j[1]==="start"?Y=P.y:j[1]==="end"?Y=P.y+V-L:Y=P.y+V/2-L/2,ee.top=Y<0?0:Y;break}}}return{bestPlacement:H.join("-"),bestInsetRect:ee}},p=(D,P,K=10)=>{if(!Ge||P===!1||!D)return;o.value=Po(e.reference),l.value=e.reference.offsetWidth,r.value=e.reference.offsetHeight;const V=c.value.offsetHeight,I=c.value.offsetWidth,{bestPlacement:L,bestInsetRect:x}=u(e.placement,o.value,l.value,r.value,I,V);i.value=L,a.value=x,s.value=!0},d=t.ref(0),g=Ze(()=>{p(e.message,e.visible)},10),S=t.ref(e.visible);t.watch(()=>e.visible,D=>{S.value=D});const b=t.computed(()=>S.value&&y.value),y=t.ref(!0),k=Ze(D=>{const P=D[0];P&&(y.value=P.isIntersecting)},10),f=new IntersectionObserver(k);t.watch([()=>e.message,()=>e.visible],([D,P])=>{setTimeout(()=>{p(e.message,e.visible)},0)}),t.onMounted(()=>{setTimeout(()=>{p(e.message,e.visible)},0),Mt.watch(e.reference,g),f.observe(e.reference)}),t.onBeforeUnmount(()=>{Mt.unwatch(e.reference,g),f.unobserve(e.reference),f.disconnect()});const m=t.computed(()=>{const D={[Mo]:!0};return i.value.startsWith("top")?D["is-top"]=!0:i.value.startsWith("right")?D["is-right"]=!0:i.value.startsWith("bottom")?D["is-bottom"]=!0:i.value.startsWith("right")&&(D["is-right"]=!0),e.size==="small"?D["is-small"]=!0:e.size==="large"&&(D["is-large"]=!0),e.customClass&&typeof e.customClass=="string"&&(D[`${e.customClass}`]=!0),D}),h=t.computed(()=>{const D={};a.value.top!==null&&(D.top=`${a.value.top}px`),a.value.right!==null&&(D.right=`${a.value.right}px`),a.value.bottom!==null&&(D.bottom=`${a.value.bottom}px`),a.value.left!==null&&(D.left=`${a.value.left}px`),e.autoFit&&(D["min-width"]=`${l.value}px`);const P=document.documentElement.clientWidth||document.body.clientWidth;return D["max-width"]=`${P}px`,s.value&&(D.opacity="1"),e.transition||(D.transition="none"),e.zIndex&&(D["z-index"]=`${e.zIndex}`),e.customStyle&&typeof e.customStyle=="object"&&Object.assign(D,e.customStyle),D}),C=t.computed(()=>{const D=[`${Mo}__content`];return e.customTextClass&&D.push(e.customTextClass),D}),A=t.computed(()=>{const D={};return e.customTextStyle&&typeof e.customTextStyle=="object"&&Object.assign(D,e.customTextStyle),D}),w=t.computed(()=>({[`${Mo}__arrow`]:!0})),N=t.computed(()=>{const D={};return e.showArrow?(D.width=`${e.arrowSize}px`,D.height=`${e.arrowSize}px`,i.value==="top"?(D.left="50%",D.bottom=`-${e.arrowSize}px`,D.transform=" translate(-50%, 0%)"):i.value==="top-start"?(D.left=`${e.arrowOffset+d.value}px`,D.bottom=`-${e.arrowSize}px`):i.value==="top-end"?(D.right=`${e.arrowOffset-d.value}px`,D.bottom=`-${e.arrowSize}px`):i.value==="right"?(D.left=`-${e.arrowSize}px`,D.top="50%",D.transform=" translate(0%, -50%)"):i.value==="right-start"?(D.left=`-${e.arrowSize}px`,D.top=`${e.arrowOffset}px`):i.value==="right-end"?(D.left=`-${e.arrowSize}px`,D.bottom=`-${e.arrowOffset}px`):i.value==="bottom"?(D.left="50%",D.top=`-${e.arrowSize}px`,D.transform=" translate(-50%, 0%)"):i.value==="bottom-start"?(D.left=`${e.arrowOffset+d.value}px`,D.top=`-${e.arrowSize}px`):i.value==="bottom-end"?(D.right=`${e.arrowOffset-d.value}px`,D.top=`-${e.arrowSize}px`):i.value==="left"?(D.right=`-${e.arrowSize}px`,D.top="50%",D.transform=" translate(0%, -50%)"):i.value==="left-start"?(D.right=`-${e.arrowSize}px`,D.top=`${e.arrowOffset}px`):i.value==="left-end"&&(D.right=`-${e.arrowSize}px`,D.bottom=`-${e.arrowOffset}px`),D):{display:"none"}}),T=t.computed(()=>b.value&&e.closeOnClick),$=t.computed(()=>{const D={};return e.zIndex&&(D["z-index"]=`${e.zIndex}`),D});return{show:b,tipRef:c,classes:m,styles:h,textClasses:C,textStyles:A,arrowClasses:w,arrowStyles:N,overlayShow:T,overlayStyle:$,onClickOverlay:()=>{S.value=!1,n.emit("update:visible",!1)}}}}),gc=["innerHTML"];function yc(e,n,a,o,l,r){const i=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]=(...s)=>e.onClickOverlay&&e.onClickOverlay(...s))},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(i,{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,gc))],6),t.createElementVNode("div",{class:t.normalizeClass(e.arrowClasses),style:t.normalizeStyle(e.arrowStyles)},null,6)],6),[[t.vShow,e.show]])],64)}const Ir=oe(hc,[["render",yc]]);class In{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 Lo={},bc=new In,bt=new Map,xn=e=>{if(e){const n=document.getElementById(e);bt.delete(e),n&&n.parentNode?.removeChild(n)}else{for(const n of bt.keys()){const a=document.getElementById(n);a&&a.parentNode?.removeChild(a)}bt.clear()}},kc=e=>{e.unmount=xn;const n=document.getElementById(e.id);if(n){const a=bt.get(e.id);a?e={...Lo,...a,...e}:e={...Lo,...e},e.transition=!1;const o=t.createVNode(Ir,e);return t.render(o,n),e.id}},Sc=e=>{e.unmount=xn;let n=e.id??`hinttext_${bc.get()}`;e={...Lo,...e},e.id=n,bt.set(n,e);const a=document.createElement("div");a.id=e.id;const o=t.createVNode(Ir,e);return t.render(o,a),document.body.appendChild(a),n},Cc=e=>{if(!e){console.warn("[FoxUI HintText]: msg不能为空");return}},kt={show(e,n,a={},o=!0){Cc(n);const l=a.id;return l&&bt.has(l)?kc({...a,message:n,reference:e}):(o&&xn(),Sc({...a,message:n,reference:e}))},hide(e){xn(e)},install(e){e.config.globalProperties.$hintText=kt}};function wc(e,n,a,o=!1){return{inheritAttrs:!0,props:{...he,...ye},emits:["appear","disappear"],setup(l,r){const i=l.prop??r.attrs.name;Te({componentName:e,validate:!1},i);const s=We(),c=An();Tn(!1);const u=t.computed(()=>c&&s?$n(s,!1).value:null),p=e,d=t.ref(null),g=t.computed(()=>{const U={[p]:!0,[`${p}__gutter`]:u.value&&u.value.type!=="flow",[`${p}__stretch`]:l.span==="stretch",[`${p}__input--border`]:be(l.hasBorder)};if(U[l.errorMarkClass]=!!L.value,U[l.warnMarkClass]=!!V.value,U[l.infoMarkClass]=!!P.value,typeof d.value=="function"){const J=d.value(i);U[J]=!0}else if(typeof d.value=="string"){const J=d.value;U[J]=!0}return U}),S=t.ref(null),b=t.computed(()=>{const U={};if(l.width)l.width!=="auto"&&(U.width=ge(l.width));else{const J=c&&s?Vn(s,!1):null;if(u.value&&J){if(u.value.type==="grid"){const te=Dn(J,u.value,l.span,l.offset);Object.assign(U,te)}else if(u.value.type==="flow"){const te=En(J,u.value,l.span,l.offset,l.width);Object.assign(U,te)}}}if(typeof S.value=="function"){const J=S.value(i);J&&Object.assign(U,J)}else if(S.value&&typeof S.value=="object"){const J=S.value;Object.assign(U,J)}return U}),y=t.ref(null),k=t.computed({get:()=>y.value??be(l.isRequired),set:U=>{y.value=U}}),f=()=>typeof l.label=="string"&&l.label.length>0||typeof r.slots.label=="function",m=Ve(t.toRef(l,"labelPosition"),"labelPosition",Sn.Near),h=t.computed(()=>m&&m.value==="top"?"top":m&&m.value==="right"?"right":"left"),C=t.computed(()=>({[`${p}__main`]:!0,[`${p}__main--${h.value}`]:!0})),A=t.computed(()=>({label:!0,[`label--${h.value}`]:!0})),w=Ve(t.toRef(l,"labelWidth"),"labelWidth",Sn.Near),N=t.computed(()=>w&&w.value?{width:ge(w.value)}:{}),T=t.computed(()=>({"label--string":!0,"label--required":k.value})),$=t.computed(()=>({content:!0,[l.contentClass]:!0})),E=t.computed(()=>({...l.contentStyle})),D=t.shallowReactive({errorTip:"",errorIcon:null,warnTip:"",warnIcon:null,infoTip:"",infoIcon:null});ve({setRequired(U){k.value=U},setErrorTip(U){D.errorTip=U},setErrorIcon(U){D.errorIcon=U},setWarnTip(U){D.warnTip=U},setWarnIcon(U){D.warnIcon=U},setInfoTip(U){D.infoTip=U},setInfoIcon(U){D.infoIcon=U},setCustomClassName(U){d.value=U},setCustomStyle(U){S.value=U}});const P=t.computed(()=>l.infoTip||D.infoTip),K=t.computed(()=>l.infoIcon||D.infoIcon),V=t.computed(()=>l.warnTip||D.warnTip),I=t.computed(()=>l.warnIcon||D.warnIcon),L=t.computed(()=>l.errorTip||D.errorTip),x=t.computed(()=>l.errorIcon||D.errorIcon),W=t.computed(()=>L.value?"error":V.value?"warn":P.value?"info":""),j=()=>W.value.length>0,O=t.computed(()=>W.value==="error"?L.value:W.value==="warn"?V.value:W.value==="info"?P.value:""),ee=t.computed(()=>W.value==="error"?x.value:W.value==="warn"?I.value:W.value==="info"?K.value:null),H=t.computed(()=>{const U={[`${p}__tip`]:!0,[`${p}__tip--${W.value}`]:!0,[`${p}--animate`]:!0};return W.value==="error"&&l.errorClass?U[`${l.errorClass}`]=!0:W.value==="warn"&&l.warnClass?U[`${l.warnClass}`]=!0:W.value==="info"&&l.infoClass&&(U[`${l.infoClass}`]=!0),U}),q=t.computed(()=>{const U={};return m&&m.value==="top"||!f()?U["padding-left"]="0px":w&&w.value&&(U["padding-left"]=ge(w.value)),U}),M=t.ref();let v="";t.watch([()=>l.hintVisible,()=>l.hintText,()=>l.hintType,()=>l.hintProps],([U,J,te,ae])=>{M.value&&(U&&!ue(J)?v?a.show(M.value,J,{...ae,id:v,type:te},!0):v=a.show(M.value,J,{...ae,type:te},!0):a.hide(v))});let Y=null;const z=()=>{Y||!M.value||(Y=new IntersectionObserver(U=>{let J=!1;for(let te of U)if(te.intersectionRatio>0){J=!0,J&&r.emit("appear",te);break}J||r.emit("disappear")}),Y.observe(M.value))},F=()=>{!Y||!M.value||(Y.unobserve(M.value),Y=null)};t.watch(()=>be(l.appearListen),U=>{U?z():F()}),t.onMounted(()=>{be(l.appearListen)&&z()}),t.onUnmounted(F);const G=()=>{if(!f())return null;const U=[],J=r.slots?.label?.()??l.label,te={class:T.value},ae=t.h("div",te,[J]);if(U.push(ae),r.slots.fixedPreTip){const de=r.slots.fixedPreTip();U.push(de)}const se={class:A.value,style:N.value};return t.h("div",se,U)},Z=()=>{const U=[];if(r.slots.prepend){const te=r.slots.prepend();U.push(te)}if(r.slots.default){const te=r.slots.default();U.push(te)}if(r.slots.append){const te=r.slots.append();U.push(te)}if(r.slots.fixedTip){const te={class:[`${p}__fixed-tip`]},ae=t.h("div",te,[r.slots.fixedTip()]);U.push(ae)}const J={ref:M,class:$.value,style:E.value};return t.h("div",J,U)},ne=()=>{const U=ee.value;return U?typeof U=="function"?t.h("div",{class:"fox-item__tip--icon"},[U()]):t.h("div",{class:"fox-item__tip--icon"},[t.h(U)]):null},R=()=>{const U=O.value;return U?typeof U=="function"?t.h("div",{class:"fox-item__tip--text"},[U()]):t.h("div",{class:"fox-item__tip--text"},[U]):null},X=()=>{if(!j())return null;const U=[],J=ne();J&&U.push(J);const te=R();te&&U.push(te);const ae={class:H.value,style:q.value};return t.h("div",ae,U)},Q=()=>r.slots?.hide?.()??null;return()=>{const U=[],J=[],te=G();te&&J.push(te);const ae=Z();ae&&J.push(ae);const se={class:C.value},de=t.h("div",se,J);U.push(de);const $e=X();$e&&U.push($e);const Ne=Q();Ne&&U.push(Ne);const ao={class:g.value,style:b.value,prop:l.prop};return t.h("div",ao,U)}}}}const{componentName:Nc,create:Bc,scope:Ac}=_("item"),Be=Bc(wc(Nc,Ac,kt,!1));function Tc(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})),i=We(),s=An();Tn(!1);const c=t.computed(()=>{const u={};if(a.width)a.width!=="auto"&&(u.width=ge(a.width));else if(s&&i){const p=$n(i,!1),d=Vn(i,!1);if(p.value&&d){if(p.value.type==="grid"){const g=Dn(d,p.value,a.span,a.offset);Object.assign(u,g)}else if(p.value.type==="flow"){const g=En(d,p.value,a.span,a.offset,a.width);Object.assign(u,g)}}}return u});return()=>{const u=[];if(o.slots.default){const d=o.slots.default();if(a.divide)for(let g=0;g<d.length;g++){if(g>0){const S=t.h("div",{class:{[`${l}__divide`]:!0}});u.push(S)}u.push(d[g])}else Reflect.apply([].push,u,d)}const p={class:r.value,style:c.value};return t.h("div",p,u)}}}}const{componentName:$c,create:Vc,scope:h2}=_("row-item"),zo=Vc(Tc($c));function Ec(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=We(),r=An();Tn(!1);const i=t.computed(()=>r&&l?$n(l,!1).value:null),s=e,c=t.computed(()=>({[s]:!0,[`${s}__gutter`]:i.value&&i.value.type!=="flow",[`${s}__stretch`]:a.span==="stretch"})),u=t.computed(()=>{const p={};if(a.width)a.width!=="auto"&&(p.width=ge(a.width));else{const d=r&&l?Vn(l,!1):null;if(i.value&&d){if(i.value.type==="grid"){const g=Dn(d,i.value,a.span,a.offset);Object.assign(p,g)}else if(i.value.type==="flow"){const g=En(d,i.value,a.span,a.offset,a.width);Object.assign(p,g)}}}return p});return()=>{const p={class:c.value,style:u.value};return o.slots&&typeof o.slots.default=="function"?t.h("div",p,o.slots.default()):t.h("div",p)}}}}const{componentName:Dc,create:Ic,scope:g2}=_("slot-item"),Oo=Ic(Ec(Dc)),xr={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 xc(e,n,a,o){return{props:{...he,...ye,...xr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:u}=ie.useFoxI18n(n),p=u(l,["placeholder"]),d=t.ref(!1),g=Pe(l,"modelValue",null,c),S=e,b=t.computed(()=>({[S]:!0,"is-disabled":i.value,"is-readonly":s.value})),y=Ve(t.computed(()=>l.textAlign),"textAlign"),k=t.computed(()=>{const I={};return y.value&&(I["text-align"]=y.value),I}),f=I=>{let x=I.target.value;l.type==="digit"&&(x=ko(x,!0)),l.type==="number"&&(x=ko(x,!1)),l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),g.value=x,c("update:modelValue",x,I),c("change",x,I)};let m=Pe(l,"hintText"),h=t.ref(!1);const C=I=>{let x=I.target.value;d.value=!0,ue(m.value)||(h.value=!0),c("focus",x,I)},A=I=>{setTimeout(()=>{h.value&&(h.value=!1),d.value=!1},0);let x=I.target.value;l.maxLength&&x.length>Number(l.maxLength)&&(x=x.slice(0,Number(l.maxLength))),c("blur",x,I)},w=t.computed(()=>({[`${S}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),N=t.computed(()=>{const I={};return r.slots.append&&!T.value&&!K.value&&(I.display="none"),I}),T=t.computed(()=>ke(l.unit)>0),$=t.computed(()=>!K.value),E=t.computed(()=>({[`${S}__unit`]:!0,hidden:!$.value})),D=I=>{g.value="",c("update:modelValue","",I),c("change","",I),c("clear","")},P=t.computed(()=>be(l.clearable)&&!i.value&&!s.value),K=t.computed(()=>{let I=ke(g.value)>0;return be(l.clearable)&&I&&d.value}),V=t.computed(()=>({action:!0,hidden:!K.value}));return()=>{const I={class:b.value,style:k.value,type:l.type,maxlength:l.maxLength,placeholder:p.placeholder.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:f,onFocus:C,onBlur:A},L=[],x=t.h("input",I);L.push(x);const W=[];if(P.value){const v={class:["action-icon"]},Y=t.h(o,v),z={class:V.value,onClick:D},F=t.h("view",z,{default:()=>[Y]});W.push(F)}if(T.value){const v=t.h("view",{class:E.value},[l.unit]);W.push(v)}const j={class:w.value,style:N.value},O=t.h("view",j,{default:()=>W});L.push(O);const ee={default:()=>L};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 q={...rt(l,xr),hintText:m.value,hintVisible:h.value};return l.prop&&(q.prop=`${l.prop}_item`),t.h(a,q,ee)}}}}const{componentName:vc,create:qc,scope:Pc}=_("input-item"),Fo=qc(xc(vc,Pc,Be,le.CircleClose));function vr(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=pe(n)),n==1||n==-1)return`${e}`;if(n==0)return"0";if(n>0){let o=Xa(`${e}`,`${n}`);return vr(o)}else{let o=po(`${e}`,Qa(`${n}`),20);return vr(o)}}function Mc(e,n=-1,a=!1,o=3,l=","){return on(e,n,a,o,l)}function Pr(e,n,a,o,l=!0){if(e==="")return"";if(e=Ga(e),n=pe(n),n==1)return e;if(o)e=qr(e,n),a&&(e=="0"&&l?e=`${e}.`.padEnd(pe(a)+2,"0"):e=po(e,1,pe(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=be(n.minInclude),l=ho(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=be(n.maxInclude),l=ho(e,n.max);(o&&l==1||!o&&(l==0||l==1))&&(a.maxValid=!1)}return a}const Lr={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 Lc(e,n,a,o){return{props:{...he,...ye,...Lr},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=t.ref(!1),p=Pe(l,"modelValue",null,c),d=t.ref("");t.watch([()=>p.value,()=>l.rates,()=>l.precision],([j,O,ee])=>{if(ue(j)){d.value="";return}const H=Pr(j,O,ee,!1);d.value!==H&&(d.value=H)},{immediate:!0});const g=t.computed(()=>{let j="";return u.value&&(j=d.value),j}),{t:S}=ie.useFoxI18n(n),b=t.computed(()=>{let j=l.placeholder??"";return!u.value&&!ue(d.value)?j=Mc(d.value,l.decimalLength,l.autoPadding,l.digits,l.separator):j=ue(j)?S(["placeholder"]):j,j}),y=e,k=t.computed(()=>({[y]:!0,[`${y}__placeholder`]:d.value.length>0,"is-disabled":i.value,"is-readonly":s.value})),f=Ve(t.computed(()=>l.textAlign),"textAlign"),m=t.computed(()=>{const j={};return f.value&&(j["text-align"]=f.value),j}),h=t.ref(""),C=t.computed(()=>{let j=h.value;return ue(j)&&(j=l.errorTip??""),j}),A=t.ref(""),w=t.ref(!1),N=j=>{let ee=j.target.value;if(ue(ee)){d.value="",p.value="",c("update:modelValue","",j),c("change","",j),be(l.showTip)&&w.value&&(w.value=!1);return}if(ee.length>=2){let H=ee;if(H.charAt(0)=="-"&&(H=H.substring(1)),H.length>=2&&H.charAt(0)=="0"&&H.charAt(1)!="."){t.triggerRef(d);return}}if(ee!="-"){if(!ar(ee)){t.triggerRef(d);return}if(l.integerLength!=-1&&rr(ee)>Number(l.integerLength)){t.triggerRef(d);return}if(l.decimalLength&&l.decimalLength!=-1&&sr(ee)>Number(l.decimalLength)){t.triggerRef(d);return}let H=Mr(ee,l);if(H.maxValid===!1){h.value=H.message,t.triggerRef(d);return}}else if(l.min!=null&&pe(l.min)>=0){t.triggerRef(d);return}A.value=ee,be(l.showTip)&&(w.value=ee.length>0),d.value=ee,p.value=Pr(ee,l.rates,l.precision,!0),c("update:modelValue",p.value,j),c("change",p.value,j)},T=j=>{if(u.value=!0,be(l.showTip)){let O=d.value;ue(O)&&(O=l.hintText),ue(O)||(A.value=O,w.value=!0)}h.value="",c("focus",p.value,j)},$=j=>{if(setTimeout(()=>{u.value=!1,be(l.showTip)&&w.value===!0&&(w.value=!1)},0),!ue(d.value)){let O=Mr(d.value,l);if(O.minValid===!1||O.maxValid===!1){h.value=O.message;return}}c("update:modelValue",p.value,j),c("blur",p.value,j)},E=t.computed(()=>({[`${y}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),D=t.computed(()=>{const j={};return r.slots.append&&!P.value&&!x.value&&(j.display="none"),j}),P=t.computed(()=>ke(l.unit)>0),K=t.computed(()=>!x.value),V=t.computed(()=>({[`${y}__unit`]:!0,hidden:!K.value})),I=j=>{p.value="",c("update:modelValue","",j),c("change","",j),c("clear","")},L=t.computed(()=>be(l.clearable)&&!i.value&&!s.value),x=t.computed(()=>{let j=ke(p.value)>0;return be(l.clearable)&&j&&u.value}),W=t.computed(()=>({action:!0,hidden:!x.value}));return()=>{let j={class:k.value,style:m.value,type:"digit",maxlength:l.maxLength,placeholder:b.value,disabled:i.value,readonly:s.value,value:g.value,"adjust-position":l.adjustPosition,"always-system":l.alwaysSystem,onInput:N,onFocus:T,onBlur:$},O=[],ee=t.h("input",j);O.push(ee);let H=[];if(L.value){const F={class:["action-icon"]},G=t.h(o,F),Z={class:W.value,onClick:I},ne=t.h("view",Z,{default:()=>[G]});H.push(ne)}if(P.value){const F=t.h("view",{class:V.value},[l.unit]);H.push(F)}const q={class:E.value,style:D.value},M=t.h("view",q,{default:()=>H});O.push(M);const v={default:()=>O};v.label=r.slots.default,v.prepend=r.slots.prepend,v.append=r.slots.append,v.fixedPreTip=r.slots.fixedPreTip,v.fixedTip=r.slots.fixedTip;const z={...rt(l,Lr),errorTip:C.value,hintText:A.value,hintVisible:w.value,hintType:"number"};return l.prop&&(z.prop=`${l.prop}_item`),t.h(a,z,v)}}}}const{componentName:zc,create:Oc,scope:Fc}=_("money-item"),Ro=Oc(Lc(zc,Fc,Be,le.CircleClose)),Ko={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:Kc,scope:Uc}=_("textarea"),Hc=Kc({props:{...Ko},emits:["update:modelValue","change","blur","focus"],setup(e,{emit:n}){let{toLocaleRefs:a}=ie.useFoxI18n(Uc);const o=a(e,["placeholder"]),l=t.ref(),r=t.computed(()=>{const g=Rc;return{[g]:!0,[`${g}--disabled`]:e.disabled}});t.onMounted(()=>{e.modelValue&&c(String(e.modelValue)),e.autosize&&t.nextTick(s)});const i=t.computed(()=>({textAlign:e.textAlign})),s=()=>{let g=l.value;g.style.height="auto";let S=g.scrollHeight;if(typeof e.autosize=="object"){const{maxHeight:b,minHeight:y}=e.autosize;b!==void 0&&(S=Math.min(S,b)),y!==void 0&&(S=Math.max(S,y))}S&&(console.info("----------- height",S),g.style.height=S+"px")};t.watch(()=>e.modelValue,()=>{e.autosize&&t.nextTick(s)});const c=(g,S)=>{e.maxLength&&g.length>Number(e.maxLength)&&(g=g.substring(0,Number(e.maxLength))),n("update:modelValue",g,S),n("change",g,S)};return{...o,textareaRef:l,classes:r,styles:i,change:g=>{const S=g.target;c(S.value,g)},focus:g=>{e.disabled||e.readonly||n("focus",g)},blur:g=>{if(e.disabled||e.readonly)return;let b=g.target.value;c(b,g),n("blur",{value:b,event:g})}}}}),jc=["rows","disabled","readonly","value","maxlength","placeholder","autofocus"],Wc={key:0,class:"fox-textarea__limit"};function Yc(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]=(...i)=>e.change&&e.change(...i)),onBlur:n[1]||(n[1]=(...i)=>e.blur&&e.blur(...i)),onFocus:n[2]||(n[2]=(...i)=>e.focus&&e.focus(...i)),maxlength:e.maxLength,placeholder:e.placeholder,autofocus:e.autofocus},null,44,jc),e.limitShow?(t.openBlock(),t.createElementBlock("view",Wc,t.toDisplayString(e.modelValue?e.modelValue.length:0)+"/"+t.toDisplayString(e.maxLength),1)):t.createCommentVNode("",!0)],2)}const vn=oe(Hc,[["render",Yc]]);function Xc(e,n,a,o){return{props:{...he,...ye,...Ko},emits:["update:modelValue","change","blur","focus","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=Pe(l,"modelValue",null,c),p=y=>{u.value=y,c("update:modelValue",y,{}),c("change",y,{})};let d=Pe(l,"hintText"),g=t.ref(!1);const S=y=>{ue(d.value)||(g.value=!0),c("focus",u.value,y)},b=y=>{setTimeout(()=>{g.value&&(g.value=!1)},0),c("blur",u.value,y)};return()=>{const k={...Se(l,Ko),disabled:i.value,readonly:s.value,value:u.value,"onUpdate:modelValue":p,onFocus:S,onBlur:b},f=[],m=t.h(o,k);f.push(m);const h={default:()=>f};h.label=r.slots.default,h.prepend=r.slots.prepend,h.append=r.slots.append,h.fixedPreTip=r.slots.fixedPreTip,h.fixedTip=r.slots.fixedTip;const A={...Se(l,ye,he)};return l.prop&&(A.prop=`${l.prop}_item`),t.h(a,A,h)}}}}const{componentName:Qc,create:Gc,scope:Zc}=_("textarea-item"),Uo=Gc(Xc(Qc,Zc,Be,vn));function Jc(e){return e===window}const qe=e=>{const n=t.unref(e);if(Jc(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}},zr=10;function Or(e,n){return e>n&&e>zr?"horizontal":n>e&&n>zr?"vertical":""}function Ho(){const e=window.navigator.userAgent;return"ontouchstart"in window||e.indexOf("touch")!==-1||e.indexOf("mobile")!==-1}function jo(){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:i=>{if(i.touches){const u=i.touches[0];e.deltaX=u.clientX-e.startX,e.deltaY=u.clientY-e.startY,e.moveX=u.clientX,e.moveY=u.clientY}else{const c=i;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:i=>{if(o(),i.touches){const u=i.touches[0];e.startX=u.clientX,e.startY=u.clientY}else{const c=i;e.startX=c.clientX,e.startY=c.clientY}e.startTime=Date.now()},reset:o,isVertical:n,isHorizontal:a,state:e}}function tt(){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),i=t.ref(0),s=t.ref(0),c=t.ref(0),u=t.ref(0),p=t.ref(""),d=()=>p.value==="vertical",g=()=>p.value==="horizontal",S=()=>{i.value=0,s.value=0,c.value=0,u.value=0,p.value="",a.value=0};return{move:k=>{if(k.touches){const h=k.touches[0];i.value=h.clientX-e.value,s.value=h.clientY-n.value,l.value=h.clientX,r.value=h.clientY}else{const m=k;i.value=m.clientX-e.value,s.value=m.clientY-n.value,l.value=m.clientX,r.value=m.clientY}c.value=Math.abs(i.value),u.value=Math.abs(s.value),o.value=Date.now()-a.value,p.value||(p.value=Or(c.value,u.value))},start:k=>{if(S(),k.touches){const h=k.touches[0];e.value=h.clientX,n.value=h.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:i,deltaY:s,offsetX:c,offsetY:u,direction:p,isVertical:d,isHorizontal:g}}let _c=2e3;const Fr=()=>_c++,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:{}}},ed=(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=Fr());const r=t.computed(()=>{const y=e,k=[y,`${y}--${a.position}`];return a.round&&k.push("round"),a.position==="bottom"&&a.safeAreaInsetBottom&&k.push(`${y}--${a.position}--safebottom`),typeof a.popClass=="string"?k.push(a.popClass):Array.isArray(a.popClass)&&a.popClass.forEach(f=>{k.push(f)}),k}),i=t.computed(()=>({zIndex:l.zIndex,transitionDuration:`${a.duration}s`,...a.style})),s=t.computed(()=>a.transition?a.transition:`fox-popup-slide-${a.position}`),c=()=>{o("update:visible",!0),a.zIndex?l.zIndex=a.zIndex:l.zIndex=Fr(),a.destroyOnClose&&(l.showSlot=!0),o("open")},u=()=>{o("update:visible",!1),o("close"),a.destroyOnClose&&setTimeout(()=>{l.showSlot=!1},+a.duration*1e3)},p=y=>{o("click-pop",y)},d=y=>{y.stopPropagation(),o("click-close-icon",y),o("update:visible",!1)},g=y=>{o("click-overlay",y),a.closeOnClickOverlay&&o("update:visible",!1)},S=y=>{o("opend",y)},b=y=>{o("closed",y)};return t.watch(()=>a.visible,y=>{a.visible?c():u()}),t.watch(()=>a.closeable,y=>{l.closed=y}),{...t.toRefs(l),popStyle:i,transitionName:s,classes:r,onClick:p,onClickCloseIcon:d,onClickOverlay:g,onOpened:S,onClosed:b}}}),Rr={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}},Wo={...Fe,...Rr,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},poppable:{type:[Boolean],default:()=>!0}};let Kr=36;function td(){return Kr}function nd(e){Kr=e}function Re(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Yo(e,n){return typeof e.childrenKey=="string"&&e.childrenKey.length>0?n[e.childrenKey]:n.children??null}function od(e,n,a){typeof e.childrenKey=="string"&&e.childrenKey.length>0&&(n[e.childrenKey]=a),n.children=a}function ct(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ur(e,n){return typeof e.itemOptions=="function"?e.columnOptions(n):e.columnOptions}let ld=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function ad(){const e=t.getCurrentInstance();return new ld(e.proxy)}function Hr(e,n,a){const o=Re(e,n),l=Re(e,a);if(o!==l)return!1;const r=ct(e,n),i=ct(e,a);return r===i}function rd(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 i=0;i<n.length&&i<a.length;i++){const s=n[i];let u=a[i].findIndex(p=>{if(r==="text")return Re(e,p)===s;if(r==="value"){let d=ct(e,p);return d==null&&(d=Re(e,p)),d===s}else if(r==="item")return Hr(e,p,s)});if(u==-1)break;l.push(u)}else{let i=a[0];for(let s=0;s<n.length;s++){const c=n[s];let u=i.findIndex(d=>{if(r==="text")return Re(e,d)===c;if(r==="value"){let g=ct(e,d);return g==null&&(g=Re(e,d)),g===c}else if(r==="item")return Hr(e,d,c)});if(u==-1)break;l.push(u);const p=Yo(e,i[u]);if(!Array.isArray(p))break;i=p}}return l}function jr(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 i=0;i<n.length&&i<a.length;i++){const s=a[i];let c=n[i];c<0&&c>=s.length&&(c=0);const u=s[c],p=Re(e,u);if(l.texts.push(p),l.items.push(u),r==="text")l.values.push(p);else if(r==="value"){let d=ct(e,u);d==null&&(d=p),l.values.push(d)}else l.values.push(u)}else{let i=a[0];for(let s=0;s<n.length;s++){let c=n[s];c<0&&c>=i.length&&(c=0);const u=i[c],p=Object.assign({},u);p.children=null;const d=Re(e,u);if(l.texts.push(d),l.items.push(p),r==="text")l.values.push(d);else if(r==="value"){let g=ct(e,u);g==null&&(g=d),l.values.push(g)}else l.values.push(p);if(!Array.isArray(u.children))break;i=u.children}}return l}function Wr(e){return{text:e,value:e}}const sd=15,id=300,cd=200,{create:dd}=_("picker-column");function ud(e){e.stopPropagation()}function fd(e,n){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),ud(e)}const md=dd({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},...Rr},emits:["click","change","update:modelValue"],setup(e,{emit:n}){const a=t.computed(()=>({"fox-picker__list":!0})),o=t.computed(()=>({height:`${pe(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)),i=N=>N>=d.currIndex+8||N<=d.currIndex-8,s=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=N=>`transform: rotate3d(1, 0, 0, ${-d.rotation*N}deg) translate3d(0px, 0px, 104px)`,u=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}),g=N=>Re(e,N),S=N=>ct(e,N),b=tt(),y=()=>{d.transitionEndTrigger&&(d.transitionEndTrigger(),d.transitionEndTrigger=null)},k=(N,T=!1,$=!1)=>{if(d.currIndex=N,T){const E=()=>{d.moving=!1,n("update:modelValue",N),n("change",N)};$?d.transitionEndTrigger=E:E()}},f=(N,T,$)=>{let E=N+d.startDistance;if(T==="end"){const D=-(e.source.length-1)*e.itemHeight;E<D&&(E=D),E>0&&(E=0);let P=Math.abs(Math.round(-E/e.itemHeight));const K=-P*e.itemHeight,V=`${(P+1)*d.rotation}deg`,I=$?$>0:!1;k(P,!0,I),m(K,T,$,V)}else{let D=(-E/e.itemHeight+1)*d.rotation;const P=(e.source.length+1)*d.rotation,K=0;if(D=Math.min(Math.max(D,K),P),e.threeDimensional&&(D<K||D>P))return;m(E,null,void 0,`${D}deg`)}},m=(N=0,T,$=cd,E)=>{T==="end"?d.scrollTime=$:d.scrollTime=0,d.deg=E,d.scrollDistance=N},h=(N,T)=>(N=Math.abs(N/T)/.003*(N<0?-1:1),N),C=N=>{e.readonly||(d.startDistance=d.scrollDistance,b.start(N),d.transitionEndTrigger=null)},A=N=>{e.readonly||(d.moving=!0,b.move(N),b.isVertical()&&(d.moving=!0,fd(N)),f(b.deltaY.value,"",0))},w=()=>{if(e.readonly)return;const N=b.deltaY.value,T=b.duration.value;if(T<id&&Math.abs(N)>sd){const E=h(N,T);f(E,"end",e.swipeDuration)}else f(N,"end",0)};return t.watch(()=>e.modelValue,N=>{const T=d.currIndex-N;if(T!==0){d.currIndex=N,d.startDistance=d.scrollDistance;const $=T*e.itemHeight;f($,"",0)}}),t.watch(()=>e.source,N=>{if(d.currIndex>=N.length){const E=(N.length-1-d.currIndex)*e.itemHeight;d.startDistance=d.scrollDistance,f(E,"end",0)}}),t.watch(()=>e.visible,N=>{N===!1&&y()}),t.onMounted(()=>{const N=-e.modelValue*e.itemHeight;f(N)}),{classes:a,styles:o,contentClasses:l,itemText:g,itemValue:S,...t.toRefs(d),roller:p,getItemText:Re,onTouchStart:C,onTouchMove:A,onTouchEnd:w,isHidden:i,setRollerStyle:c,touchRollerStyle:s,touchTileStyle:u,stopMomentum:y}}}),pd={key:1,class:"fox-picker__item-tile"};function hd(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]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i)),onTouchend:n[2]||(n[2]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTouchcancel:n[3]||(n[3]=(...i)=>e.onTouchEnd&&e.onTouchEnd(...i)),onTransitionend:n[4]||(n[4]=(...i)=>e.stopMomentum&&e.stopMomentum(...i))},[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,(i,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`${e.columnIndex}_${s}`},[e.threeDimensional?(t.openBlock(),t.createElementBlock("view",{key:0,class:t.normalizeClass(["fox-picker__item",{"fox-picker__item-hidden":e.isHidden(s+1)}]),style:t.normalizeStyle(e.setRollerStyle(s+1))},t.toDisplayString(e.itemText(i)),7)):(t.openBlock(),t.createElementBlock("view",pd,t.toDisplayString(e.itemText(i)),1))],64))),128))],6)],38)}const gd=oe(md,[["render",hd]]);let Lt=0;const Yr="fox-overflow-hidden",Xr=()=>Ge?document.body:{classList:[]},yd=e=>[()=>{if(e())try{!Lt&&Xr().classList.add(Yr),Lt++}catch{}},()=>{if(e()&&Lt)try{Lt--,!Lt&&Xr().classList.remove(Yr)}catch{}}],bd={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:kd,create:Sd}=_("overlay"),Cd=Sd({props:{...bd},emits:["click","update:visible"],setup(e,{emit:n}){const[a,o]=yd(()=>e.lockScroll),l=t.computed(()=>({[kd]:!0,[e.overlayClass]:!0})),r=t.computed(()=>({transitionDuration:`${e.duration}s`,zIndex:e.zIndex,...e.overlayStyle}));return t.watch(()=>e.visible,s=>{s?a():o()}),{classes:l,style:r,onClick:s=>{n("click",s),e.closeOnClickOverlay&&n("update:visible",!1)}}}});function wd(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((...i)=>e.onClick&&e.onClick(...i),["stop"])),style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default")],6),[[t.vShow,e.visible]])]),_:3})}const dt=oe(Cd,[["render",wd]]),{componentName:Nd,create:Bd}=_("popup"),Ad=Bd(ed(Nd,{FoxOverLay:dt,Close:le.Close}));function Td(e,n,a,o,l,r){const i=t.resolveComponent("FoxOverLay"),s=t.resolveComponent("Close");return t.openBlock(),t.createBlock(t.Teleport,{to:e.teleport,disabled:e.teleportDisable},[e.overlay?(t.openBlock(),t.createBlock(i,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(s)])],2)):t.createCommentVNode("",!0)],6),[[t.vShow,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave"])],8,["to","disabled"])}const me=oe(Ad,[["render",Td]]),$d=t.defineComponent({props:{position:{type:[String],default:()=>"bottom"},visible:{type:[Boolean]},teleport:{type:[String,Element],default:()=>"body"},lockScroll:{type:[Boolean],default:()=>!0},closeOnClickOverlay:{type:[Boolean],default:()=>!0},round:{type:[Boolean],default:()=>!1},teleportDisable:{type:[Boolean],default:()=>!1},poppable:{type:[Boolean],default:()=>!0}},setup(e,{slots:n}){return()=>{if(e.poppable){const a=rt({...e},{poppable:!1});return t.h(me,a,n)}else return n?.default?.()??null}}});function Vd(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"default")])}const Ed=oe($d,[["render",Vd]]),{create:Dd,componentName:Id,scope:xd}=_("picker"),vd=Dd({components:{Column:gd,Wrapper:Ed},props:{...Wo},emits:["close","change","confirm","update:visible","update:text","update:modelValue","clear"],setup(e,{emit:n}){const{toLocaleRefs:a,t:o}=ie.useFoxI18n(xd),l=a(e,["title","cancelText","clearText","confirmText"]),r=t.ref(null),i=t.ref(td());t.watch(()=>e.visible,V=>{V&&i.value<=0&&setTimeout(()=>{if(r.value){const I=qe(r.value);i.value=I.height,nd(i.value)}},50)});const s=t.computed(()=>({[Id]:!0})),c=ad(),u=t.ref("singleColumn");let p=t.ref([]);t.watch([()=>e.source,()=>e.params],async([V,I])=>{if(V){let L=await c.load("picker",V,I);if(L.length>0){let x=L[0];if(Array.isArray(x)){if(typeof x[0]=="string"){let W=L,j=[];W.forEach(O=>{let ee=O.map(H=>Wr(H));j.push(ee)}),p.value=j}else p.value=L;u.value="multipleColumn"}else if(typeof x=="string"){let W=L,j=[],O=W.map(ee=>Wr(ee));j.push(O),p.value=j,u.value="singleColumn"}else{const W=Yo(e,x);Array.isArray(W)?(u.value="cascade",p.value=[L]):(u.value="singleColumn",p.value=[L])}}else p.value=[]}},{immediate:!0});const d=t.ref([]),g=t.ref(e.modelValue&&!Array.isArray(e.modelValue)?[e.modelValue]:e.modelValue),S=t.ref([]);let b=null;const y=t.ref([]);t.watch([()=>e.modelValue,()=>p.value],([V,I])=>{let L=rd(e,V,I,u.value);if(!Me(L,y.value)){y.value=L,b||(b=L?[...L]:[]);let x=jr(e,L,I,u.value);x&&(d.value=x.texts,n("update:text",d.value))}});let k="";const f=t.ref(e.visible);t.watch(()=>e.visible,V=>{f.value=V,V&&(k="active",y.value.length>0&&(b=[...y.value]))});const m=V=>{let I=Ur(e,V);return Ie(I)?I.defaultIndex??0:0},h=V=>{if(e.readonly===!0)return!0;let I=Ur(e,V);return Ie(I)?I.readonly??!1:!1},C=(V,I)=>{let L=y.value;L[V]=I;for(let W=0;W<V;W++)L[W]==null&&(L[W]=m(W));if(u.value==="cascade")for(let W=V+1;W<w.value.length;W++){let j=m(W);W<L.length?L[W]=j:L.push(j)}else for(let W=L.length;W<w.value.length;W++){let j=m(W);L.push(j)}y.value=L;let x=jr(e,L,p.value,u.value);x&&(d.value=x.texts,g.value=x.values,S.value=x.items)},A=V=>V<y.value.length?y.value[V]:m(V),w=t.computed(()=>{if(p.value.length==0)return[];if(u.value=="singleColumn"||u.value=="multipleColumn")return p.value;let V=[],I=0,L=p.value[0],x=0;for(;;){let W=L.map(ee=>{let H=Object.assign({},ee);return od(e,H,null),H});V.push(W),I>=y.value.length?x=0:x=y.value[I],(x<0||x>=L.length)&&(x=0);let j=L[x];const O=Yo(e,j);if(!Array.isArray(O))break;L=O,I++}return V}),N=t.computed(()=>pe(+e.visibleItemCount-1)/2*i.value),T=(V=!1)=>{if(e.readonly===!0){V&&n("update:visible",!1);return}let I=p.value.length-1;for(;I>=0&&!(y.value[I]===null||y.value[I]===void 0);I--);if(I>=0&&C(I,0),u.value==="singleColumn"){let L=g.value.length>0?g.value[0]:"",x=S.value.length>0?S.value[0]:null;n("update:modelValue",L),n("update:text",d.value),n("change",L,x),V&&(n("confirm",L),n("update:visible",!1))}else n("update:modelValue",g.value),n("update:text",d.value),n("change",g.value,S.value),V&&(n("confirm",g.value),n("update:visible",!1))},$=(V,I)=>{if(k!=="close"&&(C(V,I),e.isAutoBackFill)){const L=!f.value;T(L)}},E=()=>{k==="active"&&(k="confirm",b=Array.isArray(y.value)?[...y.value]:[],T(!0))},D=()=>{u.value==="singleColumn"?(n("update:modelValue",""),n("update:text",""),n("change","")):(n("update:modelValue",[]),n("update:text",""),n("change",[])),y.value=[],b=null};return{...l,pickerLineRef:r,classes:s,columns:w,dataType:u,show:f,itemHeight:i,top:N,isReadonly:h,getIndex:A,change:$,close:()=>{if(k==="active"){if(k="close",b===null||b.length===0)D();else{if(Array.isArray(b))for(let V=0;V<b.length;V++)C(V,b[V]);T(!1)}n("close"),n("update:visible",!1)}},confirm:E,clear:()=>{if(k==="active"){if(k="clear",e.readonly===!0){n("update:visible",!1);return}D(),b=null,n("clear",""),n("update:visible",!1)}}}}}),qd={key:0,class:"fox-picker__bar"},Pd={class:"fox-picker__title"},Md={class:"fox-picker__bar__action"},Ld={class:"fox-picker__column"};function zd(e,n,a,o,l,r){const i=t.resolveComponent("Column"),s=t.resolveComponent("Wrapper");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes)},[t.createVNode(s,{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,poppable:e.poppable},{default:t.withCtx(()=>[e.poppable?(t.openBlock(),t.createElementBlock("view",qd,[t.createElementVNode("view",Pd,t.toDisplayString(e.title),1),t.createElementVNode("view",Md,[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.createCommentVNode("",!0),t.renderSlot(e.$slots,"top"),t.createElementVNode("view",Ld,[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,u)=>(t.openBlock(),t.createElementBlock("view",{key:u,class:"fox-picker__columnitem"},[t.createVNode(i,{visible:e.show,source:c,readonly:e.isReadonly(u),"column-index":u,modelValue:e.getIndex(u),"onUpdate:modelValue":p=>e.change(u,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","poppable"])],2)}const zt=oe(vd,[["render",zd]]);function Od(e,n,a,o,l,r,i=!0){return{props:{...he,...ye,...Wo,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(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Pe(s,"modelValue",null,d),k=t.ref([]),f=t.computed(()=>Array.isArray(k.value)?k.value.join(s.separator):k.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const M={};return C.value&&(M["text-align"]=C.value),M}),w=t.ref(!1),N=()=>{w.value=!0},T=M=>{w.value=M},$=M=>{y.value=M,d("update:modelValue",M)},E=(M,v)=>{d("change",M,v)},D=M=>{let Y=M.target.value;b.value=!0,d("focus",Y,M)},P=M=>{setTimeout(()=>{b.value=!1},0);let Y=M.target.value;s.maxLength&&Y.length>Number(s.maxLength)&&(Y=Y.slice(0,Number(s.maxLength))),d("blur",Y,M)},K=M=>{k.value=M,Array.isArray(M)&&M.length===0?d("update:text",M[0]):d("update:text",M)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),I=t.computed(()=>ke(s.unit)>0),L=t.computed(()=>ke(s.unit)>0&&!b.value),x=t.computed(()=>({hidden:!L.value})),W=M=>{y.value="",d("update:modelValue","",M),d("change","",M),d("clear","")},j=t.computed(()=>s.clearable&&!u.value&&!p.value),O=t.computed(()=>ke(y.value)>0&&b.value),ee=M=>{O.value?W(M):N()},H=t.computed(()=>O.value&&j.value?o:l),q=t.computed(()=>({action:!0}));return()=>{const M={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P};i&&(M.disabled=!0);const v=[],Y=t.h("input",M);v.push(Y);const z=[],F={class:["action-icon"]},G=t.h(H.value,F),Z={class:q.value,onClick:ee},ne=t.h("view",Z,{default:()=>[G]});if(z.push(ne),I.value){const se=t.h("view",{class:x.value},[s.unit]);z.push(se)}const R={class:V.value},X=t.h("view",R,{default:()=>z});v.push(X);const Q={default:()=>v};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 U=Se(s,Wo);U.disabled=!1,U.readonly=u.value||p.value,U.visible=w.value,U["onUpdate:visible"]=T,U.modelValue=y.value,U["onUpdate:modelValue"]=$,U.text=k.value,U["onUpdate:text"]=K,U.onChange=E;const J=t.h(r,U);Q.hide=()=>[J];const te=Se(s,ye,he);return s.prop&&(te.prop=`${s.prop}_item`),t.h(a,te,Q)}}}}const{componentName:Fd,create:Rd,scope:Kd}=_("picker-item"),Xo=Rd(Od(Fd,Kd,Be,le.CircleClose,le.ArrowRight,zt,!1)),qn=(e,n,a)=>e.map(o=>{const{value:l="value",text:r="text",children:i="children"}=a??{},{[l]:s,[r]:c,[i]:u,...p}=o,d={loading:!1,...p,level:n?(n&&n.level||0)+1:0,value:s,text:c,children:u,_parent:n};return d.children&&d.children.length&&(d.children=qn(d.children,d,a)),d}),Qr=(e,n)=>{let a=0,o;for(;(o=e[a++])&&n(o)!==!0;)o.children&&o.children.length&&Qr(o.children,n)},Ud={topId:null,idKey:"id",pidKey:"pid",sortKey:""},Hd=(e,n)=>{const a={...Ud,...n||{}},{topId:o,idKey:l,pidKey:r,sortKey:i}=a;let s=[],c={};return e.forEach(u=>{u={...u};const{[l]:p,[r]:d}=u,g=c[d]=c[d]||[];!s.length&&d===o&&(s=g),g.push(u),u.children=c[p]||(c[p]=[])}),i&&Object.keys(c).forEach(u=>{c[u].length>1&&c[u].sort((p,d)=>p[i]-d[i])}),c=null,s},jd={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}},Gr=(e,n)=>n[e.textKey],Ot=(e,n)=>n[e.valueKey],Wd=(e,n)=>n[e.visibleKey],Zr=(e,n)=>n[e.disabledKey],Yd=(e,n)=>{const a=n[e.doitKey];return be(a)},Xd=(e,n)=>{const a=n[e.numKey];return a==null?null:pe(n[a])},Jr=(e,n,a)=>{const o=e.itemOptions;return typeof o=="function"?o(n,a):o||null};function Qd(e,n,a,o=!1){return{props:{...jd},emits:["update:modelValue","change","click"],setup(l,{slots:r,emit:i}){const s=t.computed(()=>{const H={};return H[`${e}`]=!0,H}),c=t.computed(()=>{const H={};return H[`${e}__titles`]=!0,H[`${l.direction}`]=!0,l.align==="left"&&(H.left=!0),l.scroll===!0&&(H.scrollable=!0),l.shape&&(H[`${l.shape}`]=!0),H}),u=t.computed(()=>({})),p=t.computed(()=>{if(!l.gutter)return 0;const H=fe(l.gutter);return H<=0?0:H}),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,H=>{d.value!==H&&(d.value=H,x(!1))});const g=t.ref({"fox-tabs-bar__popup":!0,"fox-tabs-bar__popup--show":!1,"fox-tabs-bar__popup--hide":!1}),S=t.computed(()=>{const H={};return y.value||(H.display="none"),H}),b=t.ref(),y=t.ref(!1),k=()=>{const H=!y.value;f(H)},f=H=>{const q=H;q?(y.value=q,setTimeout(()=>{g.value["fox-tabs-bar__popup--show"]=!0,g.value["fox-tabs-bar__popup--hide"]=!1},0)):(g.value["fox-tabs-bar__popup--show"]=!1,g.value["fox-tabs-bar__popup--hide"]=!0,b.value?b.value.addEventListener("transitionend",()=>{y.value=!1},{once:!0}):setTimeout(()=>{y.value=!1},0))},m=t.ref(),h=t.ref([]),C=(H,q)=>{h.value[q]=H},A=H=>q=>{C(q,H)},w=(H,q)=>{const M=m.value,v=h.value;if(!M||!v||!v[H])return;const Y=v[H];let z=0;l.direction==="vertical"?z=Y.offsetTop-(M.offsetHeight-Y.offsetHeight)/2:z=Y.offsetLeft-(M.offsetWidth-Y.offsetWidth)/2,N(M,z,q?0:.3,l.direction)},N=(H,q,M,v)=>{let Y=0;const z=v==="horizontal"?H.scrollLeft:H.scrollTop,F=M===0?1:Math.round(M*1e3/16);function G(){v==="horizontal"?H.scrollLeft+=(q-z)/F:H.scrollTop+=(q-z)/F,++Y<F&&Ue(G)}G()},T=(H,q)=>{const M=Ot(l,H),v={};return v[`${e}__titles-item`]=!0,v.disabled=Zr(l,H),v.active=M===d.value,l.shape&&(v[`${l.shape}`]=!0),l.ellipsis&&(v.ellipsis=!0),q&&(q.class&&(v[`${q.class}`]=!0),q.disabled===!0&&(v.disabled=q.disabled)),v},$=(H,q)=>{const M={};if(p.value>0){const v=Math.abs(p.value/2);l.direction==="vertical"?(M["margin-top"]=`${v}px`,M["margin-bottom"]=`${v}px`):(M["margin-left"]=`${v}px`,M["margin-right"]=`${v}px`)}return q&&q.style&&Object.assign(M,q.style),M},E=(H,q)=>`${Ot(l,H)??q}`,D=(H,q)=>{const M=Ot(l,H),v={};v[`${e}__popup-item`]=!0,v.disabled=Zr(l,H),v.active=M===d.value,l.shape&&(v[`${l.shape}`]=!0);const Y=Jr(l,H,q);return Y&&Y.disabled===!0&&(v.disabled=Y.disabled),v},P=t.computed(()=>(l.data??[]).filter(q=>Wd(l,q)!==!1)),K=(H,q)=>{const M=Ot(l,H);if(i("click",H,q),d.value==M)return;const v=()=>{d.value=M,l.scroll&&w(q,!1),i("update:modelValue",M),i("change",H,q)};if(typeof l.beforeChange=="function"){const Y=l.beforeChange(H,q);mt(Y)?Y.then(z=>{z!==!1&&v()}).catch(()=>{v()}):Y!==!1&&v()}else v()},V=(H,q)=>function(){K(H,q)},I=(H,q)=>{K(H,q),f(!1)},L=(H,q)=>function(){I(H,q)},x=H=>{if(!Array.isArray(l.data)||!l.scroll)return;const q=l.data.findIndex(M=>Ot(l,M)===d.value);q!==-1&&w(q,H)};t.watch(()=>l.data,()=>{setTimeout(x,0)}),t.onMounted(()=>{x(!0)});const W=(H,q)=>{if(r.item)return r.item({item:H,index:q});const M=Jr(l,H,q),v=[];if(r.text){const G=r.text({item:H,index:q});v.push(G)}else{const G=[];if(M?.doit===!0||Yd(l,H)){const X={class:[`${e}__titles-item-tip`,"doit"]},Q=t.h("view",X);G.push(Q)}const Z=M?.num??Xd(l,H);if(Z){let X="";const Q=pe(Z);Q>=100?X="99+":X=`${Q}`;const U={class:[`${e}__titles-item-tip`,"num"]},J=t.h("view",U,[X]);G.push(J)}const ne={class:`${e}__titles-item-text`};G.push(Gr(l,H));const R=t.h("view",ne,G);v.push(R)}const Y={class:`${e}__titles-item-line`},z=t.h("view",Y);v.push(z);const F={ref:A(q),class:T(H,M),style:$(H,M),key:E(H,q),onClick:V(H,q)};return t.h("view",F,v)},j=()=>{const H=r.default?r.default():[];if(H.length===0)for(let M=0;M<P.value.length;M++){const v=P.value[M],Y=W(v,M);H.push(Y)}const q={ref:m,class:c.value,style:u.value};return t.h("view",q,H)},O=()=>{let H=null;r.navigation?H=r.navigation():H=t.h(a);const q={class:`${e}__navigation`,onClick:k};return t.h("view",q,[H])},ee=()=>{const H=[];for(let M=0;M<P.value.length;M++){const v=P.value[M];let Y=null;r.popupItem?Y=r.popupItem({item:v,index:M}):Y=Gr(l,v);const z={class:D(v,M),key:E(v,M),onClick:L(v,M)},F=t.h("view",z,[Y]);H.push(F)}const q={class:g.value,style:S.value};return t.h("view",q,H)};return()=>{const H=[],q=j();if(H.push(q),l.showQuickNavigation){const v=O();H.push(v);const Y=ee();H.push(Y)}const M={class:s.value};return t.h("view",M,H)}}}}const{create:Gd,componentName:Zd,scope:Jd}=_("tabs-bar"),Pn=Gd(Qd(Zd,Jd,le.MoreH,!1)),_r=Symbol("TabsStatesKey"),_d={modelValue:{type:[String,Number]},direction:{type:[String],default:"horizontal"},lazy:{type:[Boolean],default:!0}};function eu(e,n,a=!1){return{props:{..._d},emits:["update:modelValue","change"],setup(o,{emit:l,slots:r}){const i=t.shallowRef([]),s={current:t.ref(o.modelValue??""),direction:t.ref(o.direction),tabWidth:t.ref(-1),tabHeight:t.ref(-1),add:y=>{const k={name:y};s.current.value===y&&(k.loaded=!0),i.value.push(k),t.triggerRef(i)},remove:y=>{const k=i.value.findIndex(f=>f.name===y);k!==-1&&i.value.splice(k,1)},isLoaded:y=>{if(!o.lazy)return!0;const k=i.value.findIndex(f=>f.name===y);return k!==-1?s.current.value?i.value[k].loaded??!1:k===0:!1}};t.provide(_r,s);const c=y=>{const k=i.value.findIndex(f=>f.name===y);k!==-1&&(i.value[k].loaded=!0,t.triggerRef(i))};t.watch([()=>o.modelValue,()=>o.direction],([y,k])=>{s.current.value!==y&&(s.current.value=y??"",c(y??"")),s.direction.value!==k&&(s.direction.value=k)});const u=t.ref(null),p=t.ref(null),d=t.computed(()=>({[e]:!0,[`${o.direction}`]:!0}));let g=!0;const S=t.computed(()=>{const y={},k=i.value.length;if(k<=0)return y;const f=i.value.findIndex(m=>m.name===s.current.value);return s.direction.value==="vertical"?s.tabHeight.value>0&&(y.height=`${k*s.tabHeight.value}px`,f!==-1&&(y.transform=`translate(0, -${f*s.tabHeight.value}px)`)):s.tabWidth.value>0&&(y.width=`${k*s.tabWidth.value}px`,f!==-1&&(y.transform=`translate(-${f*s.tabWidth.value}px, 0)`)),g&&(g=!1,y.transition="transform 0s ease"),y});let b=null;return t.onMounted(()=>{if(!u.value)return;const y=()=>{const k=Nn(u.value);s.tabWidth.value=k.width,s.tabHeight.value=k.height};window.ResizeObserver&&(b=new window.ResizeObserver(y),b.observe(u.value)),y()}),t.onBeforeUnmount(()=>{b&&(b.disconnect(),b=null)}),()=>{const y={class:`${e}__panes`,style:S.value,ref:p},k=t.h("view",y,[r?.default?.()]),f={class:d.value,ref:u};return t.h("view",f,[k])}}}}const{create:tu,componentName:nu,scope:ou}=_("tabs-container"),Mn=tu(eu(nu,ou,!1)),lu={paneKey:{type:[String,Number],required:!0},loaded:{type:[Boolean,String],default:null},emptyIcon:{type:[Object],required:!1},emptyText:{type:[String],required:!1}};function au(e,n,a){return{props:{...lu},setup(o,{emit:l,slots:r}){const i=t.inject(_r);t.onMounted(()=>{i.add(o.paneKey)}),t.onBeforeUnmount(()=>{i.remove(o.paneKey)});const s=t.computed(()=>{const u={};return i.direction.value==="vertical"&&i.tabHeight.value>0?u.height=`${i.tabHeight.value}px`:i.tabWidth.value>0&&(u.width=`${i.tabWidth.value}px`),u}),c=t.computed(()=>o.loaded!=null?be(o.loaded):i.isLoaded(o.paneKey));return()=>{let u=[];if(c.value)u=r?.default?.()??[];else if(r.empty)u=r.empty();else{const d={class:`${e}__empty-icon`},g=o.emptyIcon??a,S=t.h(g,d),b={class:`${e}__empty-text`},y=o.emptyText??"Loading",k=t.h("view",b,[y]),f={class:`${e}__empty`},m=t.h("view",f,[S,k]);u.push(m)}const p={class:`${e}`,style:s.value};return t.h("view",p,u)}}}}const{create:ru,componentName:su,scope:iu}=_("tabs-pane"),Ln=ru(au(su,iu,le.Loading));class es{nodes;config;constructor(n,a){this.config={value:"value",text:"text",children:"children",...a||{}},this.nodes=qn(n,null,this.config)}updateChildren(n,a){a?a.children=qn(n,a,this.config):this.nodes=qn(n,null,this.config)}getNodeByValue(n){let a;return Qr(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:cu,scope:du}=_("cascader-pane"),uu=cu({components:{Loading:le.Loading,Checklist:le.Checklist,TabsBar:Pn,TabsContainer:Mn,TabsPane:Ln},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(du),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),i=t.ref(e.modelValue),s=t.ref(new es([],{})),c=t.ref([]),u=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,h)=>({text:m.selectedNode?m.selectedNode.text:a("select"),value:h}))),d=new Map;let g;const S=async()=>{d.clear(),c.value=[],l.value=0,r.value=!1,g=null;let{options:m}=e;o.value.convertConfig&&(m=Hd(m,o.value.convertConfig)),s.value=new es(m,{value:o.value.valueKey,text:o.value.textKey,children:o.value.childrenKey}),u.value&&!s.value.nodes.length&&await y({root:!0,loading:!0,text:"",value:""}),c.value=[{nodes:s.value.nodes,selectedNode:null}],b(!u.value)},b=async(m=!0)=>{const h=i.value;if(h===void 0||!s.value.nodes.length)return;if(h.length===0){l.value=0,c.value=[{nodes:s.value.nodes,selectedNode:null}];return}let C=h;if(u.value&&Array.isArray(h)&&h.length){C=[];let A=s.value.nodes.find(w=>w.value===h[0]);if(A){C=[A.value],r.value=!0;const w=await h.slice(1).reduce(async(N,T)=>{const $=await N;await y($);const E=$?.children?.find(D=>D.value===T);return E&&C.push(T),Promise.resolve(E)},Promise.resolve(A));await y(w),r.value=!1}}C.length&&h===e.modelValue&&s.value.getPathNodesByValue(C).map((w,N)=>{l.value=N,f.handleNode(w,m)})},y=async m=>{if(!m)return;if(!o.value.lazyLoad){m.leaf=!0;return}if(s.value.isLeaf(m,u.value)||s.value.hasChildren(m,u.value))return;m.loading=!0;const h=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?s.value.updateChildren(A,h):m.leaf=!0,m.loading=!1,d.delete(m)},k=m=>{const h=m.map(C=>C.value);i.value=h,n("change",h,m),n("pathChange",m),n("update:modelValue",h)},f={async handleNode(m,h){const{disabled:C,loading:A}=m;if(!(!h&&C||!c.value[l.value])){if(s.value.isLeaf(m,u.value)){if(m.leaf=!0,c.value[l.value].selectedNode=m,c.value=c.value.slice(0,m.level+1),!h){const w=c.value.map(N=>N.selectedNode);k(w),n("pathChange",w)}return}if(s.value.hasChildren(m,u.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,!h){const N=c.value.map(T=>T.selectedNode);n("pathChange",N)}return}g=m,!A&&(await y(m),g===m&&(c.value[l.value].selectedNode=m,f.handleNode(m,h)))}},handleTabChange(m,h){g=null},formatTabTitle(m){return m.selectedNode?m.selectedNode.text:a("select")},isSelected(m,h){return m.selectedNode&&m.selectedNode.value===h.value}};return t.watch([o,()=>e.options],()=>{S()},{deep:!0,immediate:!0}),t.watch(()=>e.modelValue,m=>{Me(m,i.value)||(i.value=m,b(!u.value))}),t.watch(()=>e.visible,m=>{m&&Array.isArray(i.value)&&i.value.length>0&&b()}),{panes:c,panesTitles:p,initLoading:r,tabsCursor:l,...f}}}),fu={class:"fox-cascader"},mu={role:"menu",class:"fox-cascader__pane"},pu=["aria-checked","aria-disabled","onClick"],hu={class:"fox-cascader__item__title"};function gu(e,n,a,o,l,r){const i=t.resolveComponent("TabsBar"),s=t.resolveComponent("Loading"),c=t.resolveComponent("Checklist"),u=t.resolveComponent("TabsPane"),p=t.resolveComponent("TabsContainer");return t.openBlock(),t.createElementBlock("view",fu,[t.createVNode(i,{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,g)=>(t.openBlock(),t.createBlock(u,{"pane-key":g,key:g},{default:t.withCtx(()=>[t.createElementVNode("view",mu,[(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:b=>e.handleNode(S,!1)},[t.createElementVNode("view",hu,t.toDisplayString(S.text),1),S.loading?(t.openBlock(),t.createBlock(s,{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,pu))),128))])]),_:2},1032,["pane-key"]))),128)):(t.openBlock(),t.createBlock(u,{key:1,"pane-key":0},{default:t.withCtx(()=>n[2]||(n[2]=[t.createElementVNode("view",{class:"fox-cascader__pane"},null,-1)])),_:1}))]),_:1},8,["modelValue"])])}const yu=oe(uu,[["render",gu]]),{create:bu}=_("cascader"),ku=bu({components:{FoxCascaderPane:yu,FoxPopup:me},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(i){n("update:visible",i)}}),l=(i,s)=>{a.value=i,o.value=!1,n("change",i,s),n("update:modelValue",i)},r=i=>{n("pathChange",i)};return t.watch(()=>e.modelValue,i=>{i!==a.value&&(a.value=i)}),{onChange:l,onPathChange:r,innerValue:a,innerVisible:o}}}),Su=["innerHTML"];function Cu(e,n,a,o,l,r){const i=t.resolveComponent("FoxCascaderPane"),s=t.resolveComponent("FoxPopup");return e.poppable?(t.openBlock(),t.createBlock(s,{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,Su)):t.createCommentVNode("",!0),t.createVNode(i,{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(i,{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 zn=oe(ku,[["render",Cu]]);function St(e,n){const a=e.textKey??"text";return n[a]??""}function Ct(e,n){const a=e.valueKey??"value";return n[a]}function ts(e,n){const a=e.childrenKey??"children";return n[a]}function On(e,n=[]){const a={texts:[],values:[]};for(let o=0;o<n.length;o++){const l=n[o],r=St(e,l),i=Ct(e,l);a.texts.push(r),a.values.push(i??"")}return a}function ns(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(St(e,n[i])===r){const c=Ct(e,n[i])??"",u={[e.textKey]:r,[e.valueKey]:c};l.push(u);const p=ts(e,n[i]);Array.isArray(p)&&ns(e,p,a,o+1,l);return}}function os(e,n,a,o,l=[]){if(!a)return;const r=a[o];for(let i=0;i<n.length;i++)if(Ct(e,n[i])===r){const c=St(e,n[i])??"",u={[e.textKey]:c,[e.valueKey]:r};l.push(u);const p=ts(e,n[i]);Array.isArray(p)&&os(e,p,a,o+1,l);return}}function Qo(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=St(e,n[o]),r=St(e,a[o]);if(l!==r)return!1;const i=Ct(e,n[o]),s=Ct(e,a[o]);if(i!==s)return!1}return!0}let wu=class{proxy;constructor(n){this.proxy=n}async load(n,a,o){const l="cascader";if(Array.isArray(n))return n;if(typeof n=="function")return await n(a,o);const r=_e(this.proxy,l);return r===null?(console.error(`${l} component not found api function`),[]):(Ie(a)&&t.isReactive(a)&&(a=t.toRaw(a)),await r(n,a,o))}};function Nu(){const e=t.getCurrentInstance();return new wu(e.proxy)}const ls={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 Bu(e,n,a,o,l,r,i=!1){return{props:{...he,...ye,...ls},emits:["update:modelValue","change","pathChange","blur","focus","clear","update:pathNodes","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Nu(),k=t.ref([]),f=t.ref([]),m=t.computed(()=>{if(Array.isArray(f.value)){if(s.showAllLevels===!1){const F=f.value.length-1;return f.value[F]}return f.value.join(s.separator)}else return f.value}),h=t.ref([]),C=t.ref([]);t.watch([()=>s.modelValue,()=>k.value],async([F,G])=>{if(d("setValue",F),s.lazy===!0){C.value.length==0&&(h.value=Array.isArray(F)?F:[]);return}if(s.valueType==="item"){let Z=F;if(!Qo(s,Z,C.value)){C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values}}else if(s.valueType==="text"){let Z=F,ne=[];if(ns(s,G,Z,0,ne),!Qo(s,ne,C.value)){C.value=ne;let R=On(s,ne);Z.value=R.texts,h.value=R.values}}else{let Z=[];if(os(s,G,F,0,Z),!Qo(s,Z,C.value)){C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values}}}),s.lazy===!0&&(h.value=Array.isArray(s.modelValue)?s.modelValue:[]),t.watch([()=>s.source,()=>s.params],async([F,G])=>{s.lazy||F&&(k.value=await y.load(F,G))},{immediate:!0});const A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":u.value,"is-readonly":p.value})),N=Ve(t.computed(()=>s.textAlign),"textAlign"),T=t.computed(()=>{const F={};return N.value&&(F["text-align"]=N.value),F}),$=t.ref(!1),E=()=>{u.value===!0||p.value===!0||($.value=!0)},D=F=>{$.value=F},P=(F,G)=>{let Z=G.map(R=>{if(R==null)return R;let X={...R};return Reflect.deleteProperty(X,"text"),X[s.textKey]=R.text??"",Reflect.deleteProperty(X,"value"),X[s.valueKey]=R.value??"",X});C.value=Z;let ne=On(s,Z);f.value=ne.texts,h.value=ne.values,s.valueType==="text"?(d("change",f.value,Z),d("update:modelValue",f.value)):s.valueType==="item"?(d("change",Z,Z),d("update:modelValue",Z)):(d("change",h.value,Z),d("update:modelValue",h.value)),d("update:pathNodes",Z)},K=F=>{let G=F.map(Z=>{if(Z==null)return Z;let ne={...Z};return Reflect.deleteProperty(ne,"text"),ne[s.textKey]=Z.text??"",Reflect.deleteProperty(ne,"value"),ne[s.valueKey]=Z.value??"",ne});d("pathChange",G)},V=F=>{b.value=!0,d("focus",h.value,F)},I=F=>{setTimeout(()=>{b.value=!1},0),d("blur",h.value,F)},L=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),x=t.computed(()=>ke(s.unit)>0),W=t.computed(()=>ke(s.unit)>0&&!b.value),j=t.computed(()=>({hidden:!W.value})),O=F=>{C.value=[],f.value=[],h.value=[],d("update:modelValue",[]),d("change",[],F),d("clear",[]),d("update:pathNodes",[])},ee=t.computed(()=>s.clearable&&!u.value&&!p.value),H=t.computed(()=>{let F=h.value&&h.value.length>0;return s.clearable&&F&&b.value}),q=F=>{H.value?O(F):E()},M=t.computed(()=>H.value&&ee.value?o:l),v=t.computed(()=>({action:!0}));let Y=null;const z=()=>typeof Y=="function"?Y:typeof s.lazyLoad=="function"?s.lazyLoad:(Y=async(F,G)=>{const Z=[],ne=[];let R=0;if(!F.root){let Q=F;for(;Q;){const U=St(s,Q),J=Ct(s,Q);ne.splice(0,0,U),Z.splice(0,0,J),Q=Q._parent}R=Z.length}const X=await y.load(s.source,{...F,level:R,pathLabels:ne,pathValues:Z},!0);G(X)},Y);return()=>{const F={class:w.value,style:T.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:m.value,onClick:E,onFocus:V,onBlur:I};i&&(F.disabled=!0);const G=[],Z=t.h("input",F);G.push(Z);const ne=[],R={class:["action-icon"]},X=t.h(M.value,R),Q={class:v.value,onClick:q},U=t.h("view",Q,{default:()=>[X]});if(ne.push(U),x.value){const ft=t.h("view",{class:j.value},[s.unit]);ne.push(ft)}const J={class:L.value},te=t.h("view",J,{default:()=>ne});G.push(te);const ae={default:()=>G};ae.label=c.slots.default,ae.prepend=c.slots.prepend,ae.append=c.slots.append,ae.fixedPreTip=c.slots.fixedPreTip,ae.fixedTip=c.slots.fixedTip;let se={};se.visible=$.value,se["onUpdate:visible"]=D,se.modelValue=h.value,se.onChange=P,se.onPathChange=K,se.title=s.title,se.valueKey=s.valueKey,se.textKey=s.textKey,se.childrenKey=s.childrenKey,se.convertConfig=s.convertConfig,s.lazy?(se.lazy=!0,se.lazyLoad=z()):se.options=k.value;const de=t.h(r,se);ae.hide=()=>[de];const Ne={...rt(s,ls)};return s.prop&&(Ne.prop=`${s.prop}_item`),t.h(a,Ne,ae)}}}}const{componentName:Au,create:Tu,scope:$u}=_("cascader-item"),Go=Tu(Bu(Au,$u,Be,le.CircleClose,le.ArrowRight,zn,!1));var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var as={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){var a=1e3,o=6e4,l=36e5,r="millisecond",i="second",s="minute",c="hour",u="day",p="week",d="month",g="quarter",S="year",b="date",y="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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("_")},h=function(K,V,I){var L=String(K);return!L||L.length>=V?K:""+Array(V+1-L.length).join(I)+K},C={s:h,z:function(K){var V=-K.utcOffset(),I=Math.abs(V),L=Math.floor(I/60),x=I%60;return(V<=0?"+":"-")+h(L,2,"0")+":"+h(x,2,"0")},m:function K(V,I){if(V.date()<I.date())return-K(I,V);var L=12*(I.year()-V.year())+(I.month()-V.month()),x=V.clone().add(L,d),W=I-x<0,j=V.clone().add(L+(W?-1:1),d);return+(-(L+(I-x)/(W?x-j:j-x))||0)},a:function(K){return K<0?Math.ceil(K)||0:Math.floor(K)},p:function(K){return{M:d,y:S,w:p,d:u,D:b,h:c,m:s,s:i,ms:r,Q:g}[K]||String(K||"").toLowerCase().replace(/s$/,"")},u:function(K){return K===void 0}},A="en",w={};w[A]=m;var N=function(K){return K instanceof D},T=function K(V,I,L){var x;if(!V)return A;if(typeof V=="string"){var W=V.toLowerCase();w[W]&&(x=W),I&&(w[W]=I,x=W);var j=V.split("-");if(!x&&j.length>1)return K(j[0])}else{var O=V.name;w[O]=V,x=O}return!L&&x&&(A=x),x||!L&&A},$=function(K,V){if(N(K))return K.clone();var I=typeof V=="object"?V:{};return I.date=K,I.args=arguments,new D(I)},E=C;E.l=T,E.i=N,E.w=function(K,V){return $(K,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var D=function(){function K(I){this.$L=T(I.locale,null,!0),this.parse(I)}var V=K.prototype;return V.parse=function(I){this.$d=function(L){var x=L.date,W=L.utc;if(x===null)return new Date(NaN);if(E.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var j=x.match(k);if(j){var O=j[2]-1||0,ee=(j[7]||"0").substring(0,3);return W?new Date(Date.UTC(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)):new Date(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,ee)}}return new Date(x)}(I),this.$x=I.x||{},this.init()},V.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()},V.$utils=function(){return E},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(I,L){var x=$(I);return this.startOf(L)<=x&&x<=this.endOf(L)},V.isAfter=function(I,L){return $(I)<this.startOf(L)},V.isBefore=function(I,L){return this.endOf(L)<$(I)},V.$g=function(I,L,x){return E.u(I)?this[L]:this.set(x,I)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(I,L){var x=this,W=!!E.u(L)||L,j=E.p(I),O=function(F,G){var Z=E.w(x.$u?Date.UTC(x.$y,G,F):new Date(x.$y,G,F),x);return W?Z:Z.endOf(u)},ee=function(F,G){return E.w(x.toDate()[F].apply(x.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(G)),x)},H=this.$W,q=this.$M,M=this.$D,v="set"+(this.$u?"UTC":"");switch(j){case S:return W?O(1,0):O(31,11);case d:return W?O(1,q):O(0,q+1);case p:var Y=this.$locale().weekStart||0,z=(H<Y?H+7:H)-Y;return O(W?M-z:M+(6-z),q);case u:case b:return ee(v+"Hours",0);case c:return ee(v+"Minutes",1);case s:return ee(v+"Seconds",2);case i:return ee(v+"Milliseconds",3);default:return this.clone()}},V.endOf=function(I){return this.startOf(I,!1)},V.$set=function(I,L){var x,W=E.p(I),j="set"+(this.$u?"UTC":""),O=(x={},x[u]=j+"Date",x[b]=j+"Date",x[d]=j+"Month",x[S]=j+"FullYear",x[c]=j+"Hours",x[s]=j+"Minutes",x[i]=j+"Seconds",x[r]=j+"Milliseconds",x)[W],ee=W===u?this.$D+(L-this.$W):L;if(W===d||W===S){var H=this.clone().set(b,1);H.$d[O](ee),H.init(),this.$d=H.set(b,Math.min(this.$D,H.daysInMonth())).$d}else O&&this.$d[O](ee);return this.init(),this},V.set=function(I,L){return this.clone().$set(I,L)},V.get=function(I){return this[E.p(I)]()},V.add=function(I,L){var x,W=this;I=Number(I);var j=E.p(L),O=function(q){var M=$(W);return E.w(M.date(M.date()+Math.round(q*I)),W)};if(j===d)return this.set(d,this.$M+I);if(j===S)return this.set(S,this.$y+I);if(j===u)return O(1);if(j===p)return O(7);var ee=(x={},x[s]=o,x[c]=l,x[i]=a,x)[j]||1,H=this.$d.getTime()+I*ee;return E.w(H,this)},V.subtract=function(I,L){return this.add(-1*I,L)},V.format=function(I){var L=this,x=this.$locale();if(!this.isValid())return x.invalidDate||y;var W=I||"YYYY-MM-DDTHH:mm:ssZ",j=E.z(this),O=this.$H,ee=this.$m,H=this.$M,q=x.weekdays,M=x.months,v=function(G,Z,ne,R){return G&&(G[Z]||G(L,W))||ne[Z].slice(0,R)},Y=function(G){return E.s(O%12||12,G,"0")},z=x.meridiem||function(G,Z,ne){var R=G<12?"AM":"PM";return ne?R.toLowerCase():R},F={YY:String(this.$y).slice(-2),YYYY:this.$y,M:H+1,MM:E.s(H+1,2,"0"),MMM:v(x.monthsShort,H,M,3),MMMM:v(M,H),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:v(x.weekdaysMin,this.$W,q,2),ddd:v(x.weekdaysShort,this.$W,q,3),dddd:q[this.$W],H:String(O),HH:E.s(O,2,"0"),h:Y(1),hh:Y(2),a:z(O,ee,!0),A:z(O,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:j};return W.replace(f,function(G,Z){return Z||F[G]||j.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(I,L,x){var W,j=E.p(L),O=$(I),ee=(O.utcOffset()-this.utcOffset())*o,H=this-O,q=E.m(this,O);return q=(W={},W[S]=q/12,W[d]=q,W[g]=q/3,W[p]=(H-ee)/6048e5,W[u]=(H-ee)/864e5,W[c]=H/l,W[s]=H/o,W[i]=H/a,W)[j]||H,x?q:E.a(q)},V.daysInMonth=function(){return this.endOf(d).$D},V.$locale=function(){return w[this.$L]},V.locale=function(I,L){if(!I)return this.$L;var x=this.clone(),W=T(I,L,!0);return W&&(x.$L=W),x},V.clone=function(){return E.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},K}(),P=D.prototype;return $.prototype=P,[["$ms",r],["$s",i],["$m",s],["$H",c],["$W",u],["$M",d],["$y",S],["$D",b]].forEach(function(K){P[K[1]]=function(V){return this.$g(V,K[0],K[1])}}),$.extend=function(K,V){return K.$i||(K(V,D,$),K.$i=!0),$},$.locale=T,$.isDayjs=N,$.unix=function(K){return $(1e3*K)},$.en=w[A],$.Ls=w,$.p={},$})})(as);var Vu=as.exports;const Ke=Xe(Vu);var rs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,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?/,i=/\d*[^-_:/,()\s\d]+/,s={},c=function(y){return(y=+y)+(y>68?1900:2e3)},u=function(y){return function(k){this[y]=+k}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(k){if(!k||k==="Z")return 0;var f=k.match(/([+-]|\d\d)/g),m=60*f[1]+(+f[2]||0);return m===0?0:f[0]==="+"?-m:m}(y)}],d=function(y){var k=s[y];return k&&(k.indexOf?k:k.s.concat(k.f))},g=function(y,k){var f,m=s.meridiem;if(m){for(var h=1;h<=24;h+=1)if(y.indexOf(m(h,0,k))>-1){f=h>12;break}}else f=y===(k?"pm":"PM");return f},S={A:[i,function(y){this.afternoon=g(y,!1)}],a:[i,function(y){this.afternoon=g(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[l,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[l,u("day")],Do:[i,function(y){var k=s.ordinal,f=y.match(/\d+/);if(this.day=f[0],k)for(var m=1;m<=31;m+=1)k(m).replace(/\[|\]/g,"")===y&&(this.day=m)}],M:[r,u("month")],MM:[l,u("month")],MMM:[i,function(y){var k=d("months"),f=(d("monthsShort")||k.map(function(m){return m.slice(0,3)})).indexOf(y)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[i,function(y){var k=d("months").indexOf(y)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,u("year")],YY:[l,function(y){this.year=c(y)}],YYYY:[/\d{4}/,u("year")],Z:p,ZZ:p};function b(y){var k,f;k=y,f=s&&s.formats;for(var m=(y=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,E,D){var P=D&&D.toUpperCase();return E||f[D]||a[D]||f[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(K,V,I){return V||I.slice(1)})})).match(o),h=m.length,C=0;C<h;C+=1){var A=m[C],w=S[A],N=w&&w[0],T=w&&w[1];m[C]=T?{regex:N,parser:T}:A.replace(/^\[|\]$/g,"")}return function($){for(var E={},D=0,P=0;D<h;D+=1){var K=m[D];if(typeof K=="string")P+=K.length;else{var V=K.regex,I=K.parser,L=$.slice(P),x=V.exec(L)[0];I.call(E,x),$=$.replace(x,"")}}return function(W){var j=W.afternoon;if(j!==void 0){var O=W.hours;j?O<12&&(W.hours+=12):O===12&&(W.hours=0),delete W.afternoon}}(E),E}}return function(y,k,f){f.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var m=k.prototype,h=m.parse;m.parse=function(C){var A=C.date,w=C.utc,N=C.args;this.$u=w;var T=N[1];if(typeof T=="string"){var $=N[2]===!0,E=N[3]===!0,D=$||E,P=N[2];E&&(P=N[2]),s=this.$locale(),!$&&P&&(s=f.Ls[P]),this.$d=function(L,x,W){try{if(["x","X"].indexOf(x)>-1)return new Date((x==="X"?1e3:1)*L);var j=b(x)(L),O=j.year,ee=j.month,H=j.day,q=j.hours,M=j.minutes,v=j.seconds,Y=j.milliseconds,z=j.zone,F=new Date,G=H||(O||ee?1:F.getDate()),Z=O||F.getFullYear(),ne=0;O&&!ee||(ne=ee>0?ee-1:F.getMonth());var R=q||0,X=M||0,Q=v||0,U=Y||0;return z?new Date(Date.UTC(Z,ne,G,R,X,Q,U+60*z.offset*1e3)):W?new Date(Date.UTC(Z,ne,G,R,X,Q,U)):new Date(Z,ne,G,R,X,Q,U)}catch{return new Date("")}}(A,T,w),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),D&&A!=this.format(T)&&(this.$d=new Date("")),s={}}else if(T instanceof Array)for(var K=T.length,V=1;V<=K;V+=1){N[1]=T[V-1];var I=f.apply(this,N);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}V===K&&(this.$d=new Date(""))}else h.call(this,C)}}})})(rs);var Eu=rs.exports;const Du=Xe(Eu);var ss={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){var r=o.prototype,i=r.format;l.en.ordinal=function(s){var c=["th","st","nd","rd"],u=s%100;return"["+s+(c[(u-20)%10]||c[u]||c[0])+"]"},r.format=function(s){var c=this,u=this.$locale();if(!this.isValid())return i.bind(this)(s);var p=this.$utils(),d=(s||"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(g){switch(g){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return u.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return u.ordinal(c.week(),"W");case"w":case"ww":return p.s(c.week(),g==="w"?1:2,"0");case"W":case"WW":return p.s(c.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return p.s(String(c.$H===0?24:c.$H),g==="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 g}});return i.bind(this)(d)}}})})(ss);var Iu=ss.exports;const xu=Xe(Iu);var is={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){var r=o.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,g,S,b,y){var k=d.name?d:d.$locale(),f=i(k[g]),m=i(k[S]),h=f||m.map(function(A){return A.slice(0,b)});if(!y)return h;var C=k.weekStart;return h.map(function(A,w){return h[(w+(C||0))%7]})},c=function(){return l.Ls[l.locale()]},u=function(d,g){return d.formats[g]||function(S){return S.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,y,k){return y||k.slice(1)})}(d.formats[g.toUpperCase()])},p=function(){var d=this;return{months:function(g){return g?g.format("MMMM"):s(d,"months")},monthsShort:function(g){return g?g.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):s(d,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return u(d.$locale(),g)},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(g){return u(d,g)},meridiem:d.meridiem,ordinal:d.ordinal}},l.months=function(){return s(c(),"months")},l.monthsShort=function(){return s(c(),"monthsShort","months",3)},l.weekdays=function(d){return s(c(),"weekdays",null,null,d)},l.weekdaysShort=function(d){return s(c(),"weekdaysShort","weekdays",3,d)},l.weekdaysMin=function(d){return s(c(),"weekdaysMin","weekdays",2,d)}}})})(is);var vu=is.exports;const qu=Xe(vu);var cs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){var a="week",o="year";return function(l,r,i){var s=r.prototype;s.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=i(this).startOf(o).add(1,o).date(u),d=i(this).endOf(a);if(p.isBefore(d))return 1}var g=i(this).startOf(o).date(u).startOf(a).subtract(1,"millisecond"),S=this.diff(g,a,!0);return S<0?i(this).startOf("week").week():Math.ceil(S)},s.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(cs);var Pu=cs.exports;const Mu=Xe(Pu);var ds={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.weekYear=function(){var l=this.month(),r=this.week(),i=this.year();return r===1&&l===11?i+1:l===0&&r>=52?i-1:i}}})})(ds);var Lu=ds.exports;const zu=Xe(Lu);var us={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o,l){o.prototype.dayOfYear=function(r){var i=Math.round((l(this).startOf("day")-l(this).startOf("year"))/864e5)+1;return r==null?i:this.add(r-i,"day")}}})})(us);var Ou=us.exports;const Fu=Xe(Ou);var fs={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.isSameOrAfter=function(l,r){return this.isSame(l,r)||this.isAfter(l,r)}}})})(fs);var Ru=fs.exports;const Ku=Xe(Ru);var ms={exports:{}};(function(e,n){(function(a,o){e.exports=o()})(Ye,function(){return function(a,o){o.prototype.isSameOrBefore=function(l,r){return this.isSame(l,r)||this.isBefore(l,r)}}})})(ms);var Uu=ms.exports;const Hu=Xe(Uu);Ke.extend(qu),Ke.extend(xu),Ke.extend(Du),Ke.extend(Mu),Ke.extend(zu),Ke.extend(Fu),Ke.extend(Ku),Ke.extend(Hu);const re={format(e,n){return Ke(e).format(n)},parser(e,n){return Ke(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,a){e=e||0;let o=n??new Date;const l=e*(1e3*60*60*24);return o=new Date(o.getTime()+l),a=a??"YYYY-MM-DD",this.format(o,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(),i=l.getDate(),s=6-r;return o!==0&&(r=r==0?7:r,s=7-r),Math.ceil((i+s)/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),i=Math.round((l.valueOf()-r.valueOf())/864e5);let s=l.getDay(),c=6-s;return o!==0&&(s=s==0?7:s,c=7-s),Math.ceil((i+c)/7)},getWeekDate:function(e,n,a,o=0){const l=new Date(Number(e),parseInt(n)-1,Number(a)),r=l.getTime();let i=l.getDay();if(o===0){const c=r-i*864e5,u=r+(6-i)*864e5,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(u));return[p,d]}else{i=i==0?7:i;const s=24*60*60*1e3,c=r-(i-1)*s,u=r+(7-i)*s,p=this.date2Str(new Date(c)),d=this.date2Str(new Date(u));return[p,d]}},formatResultDate:function(e){let n=[...e.split("-")];return n[2]=re.getNumTwoBit(Number(n[2])),n[3]=`${n[0]}-${n[1]}-${n[2]}`,n[4]=re.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(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i},inScope4Month(e,n,a){const o=new Date(new Date(n).setMonth(n.getMonth()+a)),l=e.getTime(),r=o.getTime(),i=n.getTime();return r>i?l>=i&&l<=r:l>=r&&l<=i}},ps=new Date().getFullYear(),Zo={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"},Fn=(e,n,a)=>{let o;if(He(n)?o=n:typeof n=="string"&&ke(n)>0?o=re.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)},Jo=(e,n,a)=>{He(n)||(n=e.minDate);let o=Math.max(n.getTime(),e.minDate.getTime());return o=Math.min(o,e.maxDate.getTime()),re.format(new Date(o),a)};let _o={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(ps-10,0,1),validator:He},maxDate:{type:Date,default:()=>new Date(ps+10,11,31),validator:He},visibleItemCount:{type:[Number,String],default:7},threeDimensional:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:1e3},teleportDisable:{type:Boolean}};const{create:ju,scope:Wu}=_("date-picker"),Yu=ju({components:{Picker:zt},props:{..._o},emits:["click","update:visible","update:modelValue","update:dateIndexs","update:close","cancel","confirm","clear"],setup(e,{emit:n}){const{t:a}=ie.useFoxI18n(Wu),o={day:a("day"),year:a("year"),month:a("month"),hour:a("hour"),minute:a("minute"),seconds:a("seconds"),today:a("today")},l=t.ref(!1);t.watch(()=>e.visible,m=>{l.value=m});function r(m,h){return new Date(m,h,0).getDate()}const i=(m,h)=>{const C=e[`${m}Date`],A=C.getFullYear();let w=1,N=1,T=0,$=0;m==="max"&&(w=12,N=r(h.getFullYear(),h.getMonth()+1),T=23,$=59);const E=$;return h.getFullYear()===A&&(w=C.getMonth()+1,h.getMonth()+1===w&&(N=C.getDate(),h.getDate()===N&&(T=C.getHours(),h.getHours()===T&&($=C.getMinutes())))),{[`${m}Year`]:A,[`${m}Month`]:w,[`${m}Date`]:N,[`${m}Hour`]:T,[`${m}Minute`]:$,[`${m}Seconds`]:E}},s=t.computed(()=>{if(!g.value)return[];const{maxYear:m,maxDate:h,maxMonth:C,maxHour:A,maxMinute:w,maxSeconds:N}=i("max",g.value),{minYear:T,minDate:$,minMonth:E,minHour:D,minMinute:P,minSeconds:K}=i("min",g.value);let V=[{type:"year",range:[T,m]},{type:"month",range:[E,C]},{type:"day",range:[$,h]},{type:"hour",range:[D,A]},{type:"minute",range:[P,w]},{type:"seconds",range:[K,N]}];switch(e.type){case"date":V=V.slice(0,3);break;case"datetime":V=V.slice(0,5);break;case"time":V=V.slice(3,6);break;case"year-month":V=V.slice(0,2);break;case"month-day":V=V.slice(1,3);break;case"datehour":V=V.slice(0,4);break;case"hour-minute":V=V.slice(3,5);break}return V}),c=(m,h,C,A,w)=>{if(!(h>m))return null;const N=[];for(;m<=h;)e.isShowChinese?C==="day"&&A&&m===w?N.push({text:o.today,value:m}):N.push({text:m+o[C],value:m}):N.push({text:`${m}`,value:m}),C==="minute"?m+=e.minuteStep:m++;return N},u=t.computed(()=>{let m=!1;const h=new Date;let C=h.getDate();g.value&&(m=h.getFullYear()===g.value.getFullYear()&&h.getMonth()===g.value.getMonth());let A=[];return s.value.forEach(w=>{let N=c(w.range[0],w.range[1],w.type,m,C);N&&A.push(N)}),A}),p=(m,h)=>m==="year"?h.getFullYear():m==="month"?h.getMonth()+1:m==="day"?h.getDate():m==="hour"?h.getHours():m==="minute"?h.getMinutes():m==="seconds"?h.getSeconds():0,d=t.ref(),g=t.ref(null);t.watch(()=>e.modelValue,m=>{let h;if(typeof m=="string"?m.length==0?h=new Date:e.valueFormat?h=Fn(e,e.modelValue,e.valueFormat):h=Fn(e,m,Zo[e.type]):He(m)?h=m:h=new Date,!!h&&(!g.value||h.getTime()!==g.value.getTime())){g.value=h;let C=[];s.value.forEach(A=>{let w=p(A.type,h);C.push(w)}),d.value=C}},{immediate:!0});const S=m=>{if(e.type==="date"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1));A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A)}else if(e.type==="datetime"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1)),w=m[3],N=m[4];A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A,w,N)}else if(e.type==="time"){const h=m[0],C=m[1],A=m[2],w=g.value??new Date,N=new Date(w.getFullYear(),w.getMonth(),w.getDate(),h,C,A);g.value=N}else if(e.type==="year-month"){const h=m[0],C=m[1]-1;g.value=new Date(h,C)}else if(e.type==="month-day"){const C=(g.value??new Date).getFullYear(),A=m[0]-1,w=Math.min(m[1],r(C,A+1));w!==m[1]&&(m[1]=w);const N=new Date(C,A,w);g.value=N}else if(e.type==="datehour"){const h=m[0],C=m[1]-1,A=Math.min(m[2],r(h,C+1)),w=m[3];A!==m[2]&&(m[2]=A),g.value=new Date(h,C,A,w)}else if(e.type==="hour-minute"){const h=m[0],C=m[1],A=g.value??new Date,w=new Date(A.getFullYear(),A.getMonth(),A.getDate(),h,C);g.value=w}d.value=m};return{columns:u,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 h=g.value??new Date;if(e.valueFormat){let C=Jo(e,h,e.valueFormat);n("update:modelValue",C)}else n("update:modelValue",h);n("update:visible",!1),n("confirm",m)},onClear:()=>{n("clear")}}}});function Xu(e,n,a,o,l,r){const i=t.resolveComponent("Picker");return t.openBlock(),t.createBlock(i,{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 Rn=oe(Yu,[["render",Xu]]),Qu={format:{type:String},placeholder:{type:String},textAlign:{type:String},clearable:{type:Boolean,default:!0}};function Gu(e){let n=e.format;if(!n){let a=e.type??"date";n=Zo[a]}return n}function Zu(e,n,a,o,l,r,i=!1){return{props:{...he,...ye,..._o,...Qu},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),k=Pe(s,"modelValue",q=>q==null?null:typeof q=="string"?q.length==0?null:s.valueFormat?Fn(s,q,s.valueFormat)??q:Fn(s,q,Zo[s.type])??q:He(q)?q:null,d),f=t.computed(()=>{if(!k.value)return"";const q=Gu(s);return Jo(s,k.value,q)}),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const q={};return C.value&&(q["text-align"]=C.value),q}),w=t.ref(!1),N=()=>{w.value=!0},T=()=>{w.value=!1};c.expose({showPicker:N,hidePicker:T});const $=q=>{w.value=q},E=q=>{if(k.value=q,s.valueFormat){let M=Jo(s,q,s.valueFormat);d("update:modelValue",M,{}),d("change",M,{})}else d("update:modelValue",q,{}),d("change",q,{})},D=q=>{let v=q.target.value;b.value=!0,d("focus",v,q)},P=q=>{setTimeout(()=>{b.value=!1},0);let v=q.target.value;s.maxLength&&v.length>Number(s.maxLength)&&(v=v.slice(0,Number(s.maxLength))),d("blur",v,q)},K=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),V=t.computed(()=>ke(s.unit)>0),I=t.computed(()=>ke(s.unit)>0&&!b.value),L=t.computed(()=>({hidden:!I.value})),x=q=>{k.value="",d("update:modelValue","",q),d("change","",q),d("clear",""),T()},W=t.computed(()=>s.clearable&&!u.value&&!p.value),j=t.computed(()=>{let q=ke(k.value)>0;return s.clearable&&q&&b.value}),O=q=>{j.value?x(q):N()},ee=t.computed(()=>j.value&&W.value?o:l),H=t.computed(()=>({action:!0}));return()=>{const q={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P};i&&(q.disabled=!0);const M=[],v=t.h("input",q);M.push(v);const Y=[],z={class:["action-icon"]},F=t.h(ee.value,z),G={class:H.value,onClick:O},Z=t.h("view",G,{default:()=>[F]});if(Y.push(Z),V.value){const de=t.h("view",{class:L.value},[s.unit]);Y.push(de)}const ne={class:K.value},R=t.h("view",ne,{default:()=>Y});M.push(R);const X={default:()=>M};X.label=c.slots.default,X.prepend=c.slots.prepend,X.append=c.slots.append,X.fixedPreTip=c.slots.fixedPreTip,X.fixedTip=c.slots.fixedTip;const Q=Se(s,_o);Q.valueFormat=null,Q.disabled=!1,Q.readonly=u.value||p.value,Q.visible=w.value,Q["onUpdate:visible"]=$,Q.modelValue=k.value,Q["onUpdate:modelValue"]=E,Q.onClear=x;const U={};if(c.slots.top){const de=c.slots.top();U.top=()=>de}if(c.slots.bottom){const de=c.slots.bottom();U.default=()=>de}const J=t.h(r,Q,U);X.hide=()=>[J];const ae={...Se(s,ye,he)};return s.prop&&(ae.prop=`${s.prop}_item`),t.h(a,ae,X)}}}}const{create:Ju,componentName:_u,scope:ef}=_("date-item"),el=Ju(Zu(_u,ef,Be,le.CircleClose,le.Date,Rn,!1)),tf=39,nf=64,{create:of,scope:lf}=_("calendar-pane"),af=of({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:re.getDay(0)},endDate:{type:String,default:re.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(lf),r=o(e,["title","confirmText","startText","endText","today"]),i=JSON.parse(l("weekdays")),s=t.ref([...i.slice(e.firstDayOfWeek,7),...i.slice(0,e.firstDayOfWeek)]),c=t.ref(null),u=t.ref(null),p=t.ref(null),d=t.ref(null),g=t.ref(0),S=t.computed(()=>f.monthsData.slice(f.defaultRange[0],f.defaultRange[1])),b=t.computed(()=>a.btn),y=t.computed(()=>a["top-info"]),k=t.computed(()=>a["bottom-info"]),f=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=z=>z.split("-"),h=z=>re.isEqual(f.currDate[0],z),C=z=>re.isEqual(f.currDate[1],z),A=z=>f.currDate?.length>0?f.currDate?.some(F=>re.isEqual(F,z)):!1,w=(z,F)=>F.curData[0]+"-"+F.curData[1]+"-"+re.getNumTwoBit(+z.day),N=(z,F)=>{const G=w(z,F),{type:Z}=e;return z.type=="curr"?re.isEqual(f.currDate,G)||(Z=="range"||Z=="week")&&(h(G)||C(G))||Z=="multiple"&&A(G)?`${f.dayPrefix}--active`:f.propStartDate&&re.compareDate(G,f.propStartDate)||f.propEndDate&&re.compareDate(f.propEndDate,G)?`${f.dayPrefix}--disabled`:(Z=="range"||Z=="week")&&Array.isArray(f.currDate)&&Object.values(f.currDate).length==2&&re.compareDate(f.currDate[0],G)&&re.compareDate(G,f.currDate[1])?`${f.dayPrefix}--choose`:null:`${f.dayPrefix}--disabled`},T=()=>{const{type:z}=e;if(z=="range"&&f.chooseData.length==2||z!="range"){let F=f.chooseData.slice(0);z=="week"&&(F={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("choose",F),e.poppable&&n("update")}},$=(z,F,G=!1)=>{if(N(z,F)!=`${f.dayPrefix}--disabled`){const{type:Z}=e;let[ne,R]=F.curData,X=[...F.curData];if(X[2]=re.getNumTwoBit(Number(z.day)),X[3]=`${X[0]}-${X[1]}-${X[2]}`,X[4]=re.getWhatDay(+X[0],+X[1],+X[2]),Z=="multiple")if(f.currDate?.length>0){let Q;f.currDate?.forEach((U,J)=>{U==X[3]&&(Q=J)}),G?f.chooseData.push([...X]):Q!==void 0?(f.currDate.splice(Q,1),f.chooseData.splice(Q,1)):(f.currDate.push(X[3]),f.chooseData.push([...X]))}else f.currDate=[X[3]],f.chooseData=[[...X]];else if(Z=="range"){let Q=Object.values(f.currDate).length;Q==2||Q==0?f.currDate=[X[3]]:re.compareDate(f.currDate[0],X[3])?Array.isArray(f.currDate)&&f.currDate.push(X[3]):Array.isArray(f.currDate)&&f.currDate.unshift(X[3]),f.chooseData.length==2||!f.chooseData.length?f.chooseData=[[...X]]:re.compareDate(f.chooseData[0][3],X[3])?f.chooseData=[...f.chooseData,[...X]]:f.chooseData=[[...X],...f.chooseData]}else if(Z=="week"){let Q=re.getWeekDate(ne,R,z.day,e.firstDayOfWeek);f.propStartDate&&re.compareDate(Q[0],f.propStartDate)&&Q.splice(0,1,f.propStartDate),f.propEndDate&&re.compareDate(f.propEndDate,Q[1])&&Q.splice(1,1,f.propEndDate),f.currDate=Q,f.chooseData=[re.formatResultDate(Q[0]),re.formatResultDate(Q[1])]}else f.currDate=X[3],f.chooseData=[...X];if(!G){let Q=f.chooseData;Z=="week"&&(Q={weekDate:[E(f.chooseData[0]),E(f.chooseData[1])]}),n("select",Q),(e.isAutoBackFill||!e.poppable)&&T()}}},E=z=>{let[F,G,Z]=z;return{date:z,monthWeekNum:re.getMonthWeek(F,G,Z,e.firstDayOfWeek),yearWeekNum:re.getYearWeek(F,G,Z,e.firstDayOfWeek)}},D=z=>{const F=f.monthsData[f.monthsData.length-1];let G=parseInt(F.curData[0]),Z=parseInt(F.curData[1].toString().replace(/^0/,""));switch(z){case"prev":Z==1&&(G-=1),Z=Z==1?12:--Z;break;case"next":Z==12&&(G+=1),Z=Z==12?1:++Z;break}return[G+"",re.getNumTwoBit(Z),re.getMonthDays(String(G),String(Z))+""]},P=(z,F,G)=>{let{year:Z,month:ne}=G;return Array.from(Array(z),(R,X)=>({day:String(X+1),type:F,year:Z,month:ne}))},K=(z,F,G,Z)=>{z=z-e.firstDayOfWeek;let{year:ne,month:R}=G;return z>=7&&(z-=7),Array.from(Array(Z),(Q,U)=>({day:String(U+1),type:F,year:ne,month:R})).slice(Z-z)},V=(z,F)=>{const G=re.getMonthPreDay(+z[0],+z[1]);let Z=Number(z[1])-1,ne=Number(z[0]);Z<=0&&(Z=12,ne+=1);const R=re.getMonthDays(String(z[0]),String(z[1])),X=re.getMonthDays(ne+"",Z+""),Q={year:z[0],month:z[1]},U={curData:z,title:l("monthTitle",{year:Q.year,month:Q.month}),monthData:[...K(G,"prev",{month:String(Z),year:String(ne)},X),...P(R,"curr",Q)],cssHeight:0,cssScrollHeight:0},J=U.monthData.length>35?6:5;U.cssHeight=tf+nf*J;let te=0;f.monthsData.length>0&&(te=f.monthsData[f.monthsData.length-1].cssScrollHeight+f.monthsData[f.monthsData.length-1].cssHeight),U.cssScrollHeight=te,(!f.endData||!re.compareDate(`${f.endData[0]}-${f.endData[1]}-${re.getMonthDays(f.endData[0],f.endData[1])}`,`${z[0]}-${z[1]}-${z[2]}`))&&f.monthsData.push(U)},I=()=>{let z=e.startDate?e.startDate:re.getDay(0),F=e.endDate?e.endDate:re.getDay(365);f.propStartDate=z,f.propEndDate=F,f.startData=m(z),f.endData=m(F),(e.defaultValue||Array.isArray(e.defaultValue)&&e.defaultValue.length>0)&&(f.currDate=e.type!=="one"?[...e.defaultValue]:e.defaultValue);const G={year:Number(f.startData[0]),month:Number(f.startData[1])},Z={year:Number(f.endData[0]),month:Number(f.endData[1])};let ne=Z.month-G.month;Z.year-G.year>0&&(ne=ne+12*(Z.year-G.year)),ne<=0&&(ne=1),V(f.startData);let R=1;do V(D("next"));while(R++<ne);if(f.monthsNum=ne,e.type=="range"&&Array.isArray(f.currDate))f.currDate.length>0&&(z&&re.compareDate(f.currDate[0],z)&&f.currDate.splice(0,1,z),F&&re.compareDate(F,f.currDate[1])&&f.currDate.splice(1,1,F),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]);else if(e.type=="multiple"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let X=[],Q={};f.currDate.forEach(U=>{z&&!re.compareDate(U,z)&&F&&!re.compareDate(F,U)&&(Object.hasOwnProperty.call(Q,U)||(X.push(U),Q[U]=U))}),f.currDate=[...X],f.defaultData=[...m(X[0])]}}else if(e.type=="week"&&Array.isArray(f.currDate)){if(f.currDate.length>0){let[X,Q,U]=m(f.currDate[0]),J=re.getWeekDate(X,Q,U,e.firstDayOfWeek);f.currDate=J,z&&re.compareDate(f.currDate[0],z)&&f.currDate.splice(0,1,z),F&&re.compareDate(F,f.currDate[1])&&f.currDate.splice(1,1,F),f.defaultData=[...m(f.currDate[0]),...m(f.currDate[1])]}}else f.currDate&&(z&&re.compareDate(f.currDate,z)?f.currDate=z:F&&!re.compareDate(f.currDate,F)&&(f.currDate=F),f.defaultData=[...m(f.currDate)])};ve({scrollToDate:z=>{re.compareDate(z,f.propStartDate)?z=f.propStartDate:re.compareDate(z,f.propEndDate)||(z=f.propEndDate);let F=m(z);f.monthsData.forEach((G,Z)=>{if(G.title==l("monthTitle",{year:F[0],month:F[1]})&&c.value){let ne=f.monthsData[Z].cssScrollHeight-c.value.scrollTop;if(e.toDateAnimation){let R=0,X=setInterval(()=>{if(R++,c.value){let Q=ne/10;c.value.scrollTop=c.value.scrollTop+Q}R>=10&&(clearInterval(X),c.value&&(c.value.scrollTop=f.monthsData[Z].cssScrollHeight))},40)}else c.value.scrollTop=f.monthsData[Z].cssScrollHeight}})},initPosition:()=>{c?.value&&(c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)},doLayout:()=>{let z=0,F=0;f.defaultData.length>0&&f.monthsData.forEach((ne,R)=>{ne.title==l("monthTitle",{year:f.defaultData[0],month:f.defaultData[1]})&&(z=R),(e.type=="range"||e.type=="week")&&ne.title==l("monthTitle",{year:f.defaultData[3],month:f.defaultData[4]})&&(F=R)}),j(f.monthsNum,z),f.currentIndex=z,f.yearMonthTitle=f.monthsData[f.currentIndex].title,f.defaultData.length>0&&(f.isRange?($({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0),$({day:f.defaultData[5],type:"curr"},f.monthsData[F],!0)):e.type=="week"?$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0):e.type=="multiple"?[...f.currDate].forEach(ne=>{let R=m(ne),X=f.currentIndex;f.monthsData.forEach((Q,U)=>{Q.title==l("monthTitle",{year:R[0],month:R[1]})&&(X=U)}),$({day:R[2],type:"curr"},f.monthsData[X],!0)}):$({day:f.defaultData[2],type:"curr"},f.monthsData[f.currentIndex],!0));let G=f.monthsData[f.monthsData.length-1],Z=G.cssHeight+G.cssScrollHeight;Qe(()=>{c?.value&&u?.value&&d?.value&&(g.value=c.value.clientHeight,u.value.style.height=`${Z}px`,c.value.scrollTop=f.monthsData[f.currentIndex].cssScrollHeight)}),f.avgHeight=Math.floor(Z/(f.monthsNum+1))}});const j=(z,F)=>{z>=3?F>0&&F<z?f.defaultRange=[F-1,F+3]:F==0?f.defaultRange=[F,F+4]:F==z&&(f.defaultRange=[F-2,F+2]):f.defaultRange=[0,z+2];let G=f.monthsData[f.defaultRange[0]].cssScrollHeight;f.translateY=G},O=(z,F)=>(e.type=="range"||e.type=="week")&&z.type=="curr"&&N(z,F)=="fox-calendar__day--active",ee=(z,F)=>O(z,F)&&h(w(z,F)),H=(z,F)=>f.currDate.length>=2&&C(w(z,F))?O(z,F):!1,q=()=>{if(f.currDate.length>=2)return re.isEqual(f.currDate[0],f.currDate[1])},M=z=>{const F=`${z.year}-${z.month}-${Number(z.day)<10?"0"+z.day:z.day}`;return re.isEqual(F,re.date2Str(new Date))},v=z=>{if(f.monthsData.length<=1)return;const F=z.target.scrollTop;let G=Math.floor(F/f.avgHeight);if(G==0)F>=f.monthsData[G+1].cssScrollHeight&&(G+=1);else if(G>0&&G<f.monthsNum-1)F>=f.monthsData[G+1].cssScrollHeight&&(G+=1),F<f.monthsData[G].cssScrollHeight&&(G-=1);else{const Z=Math.round(F+g.value);Z<f.monthsData[G].cssScrollHeight+f.monthsData[G].cssHeight&&F>f.monthsData[G-1].cssScrollHeight&&(G-=1),G+1<=f.monthsNum&&Z>=f.monthsData[G+1].cssScrollHeight+f.monthsData[G+1].cssHeight&&(G+=1),G>=1&&F<f.monthsData[G-1].cssScrollHeight&&(G-=1)}f.currentIndex!==G&&(f.currentIndex=G,j(f.monthsNum,G)),f.yearMonthTitle=f.monthsData[G].title},Y=()=>{f.chooseData.splice(0),f.monthsData.splice(0),I()};return I(),t.watch(()=>e.defaultValue,z=>{z&&e.poppable&&Y()}),{weeks:s,compConthsData:S,showTopBtn:b,topInfo:y,bottomInfo:k,rangeTip:q,mothsViewScroll:v,getClass:N,isStartTip:ee,isEndTip:H,chooseDay:$,isCurrDay:M,confirm:T,months:c,...t.toRefs(f),...t.toRefs(e),...r,monthsPanel:u,weeksPanel:p,viewArea:d}}}),rf={class:"fox-calendar__header"},sf={key:0,class:"fox-calendar__header-title"},cf={key:1,class:"fox-calendar__header-slot"},df={key:2,class:"fox-calendar__header-subtitle"},uf={class:"fox-calendar__weekdays",ref:"weeksPanel"},ff={class:"fox-calendar__panel",ref:"monthsPanel"},mf={class:"fox-calendar__month-title"},pf={class:"fox-calendar__days"},hf=["onClick"],gf={class:"fox-calendar__day-value"},yf={key:0,class:"fox-calendar__day-tips fox-calendar__day-tips--top"},bf={key:1,class:"fox-calendar__day-tips fox-calendar__day-tips--bottom"},kf={key:2,class:"fox-calendar__day-tips--curr"},Sf={key:4,class:"fox-calendar__day-tip"},Cf={key:0,class:"fox-calendar__footer"};function wf(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",rf,[e.showTitle?(t.openBlock(),t.createElementBlock("view",sf,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showTopBtn?(t.openBlock(),t.createElementBlock("view",cf,[t.renderSlot(e.$slots,"btn")])):t.createCommentVNode("",!0),e.showSubTitle?(t.openBlock(),t.createElementBlock("view",df,t.toDisplayString(e.yearMonthTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("view",uf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weeks,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__weekday",key:s},t.toDisplayString(i),1))),128))],512)]),t.createElementVNode("view",{class:"fox-calendar__content",ref:"months",onScroll:n[0]||(n[0]=(...i)=>e.mothsViewScroll&&e.mothsViewScroll(...i))},[t.createElementVNode("view",ff,[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,(i,s)=>(t.openBlock(),t.createElementBlock("view",{class:"fox-calendar__month",key:s},[t.createElementVNode("view",mf,t.toDisplayString(i.title),1),t.createElementVNode("view",pf,[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(i.monthData,(c,u)=>(t.openBlock(),t.createElementBlock("view",{key:u,class:t.normalizeClass(["fox-calendar__day",e.getClass(c,i)]),onClick:p=>e.chooseDay(c,i)},[t.createElementVNode("view",gf,[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",yf,[t.renderSlot(e.$slots,"top-info",{date:c.type=="curr"?c:""})])):t.createCommentVNode("",!0),e.bottomInfo?(t.openBlock(),t.createElementBlock("view",bf,[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",kf,t.toDisplayString(e.today),1)):t.createCommentVNode("",!0),e.isStartTip(c,i)?(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,i)?(t.openBlock(),t.createElementBlock("view",Sf,t.toDisplayString(e.endText),1)):t.createCommentVNode("",!0)],10,hf))),128))],2)])]))),128))],4)],512)],544),e.poppable&&!e.isAutoBackFill?(t.openBlock(),t.createElementBlock("view",Cf,[t.createElementVNode("view",{class:"fox-calendar__confirm",onClick:n[1]||(n[1]=(...i)=>e.confirm&&e.confirm(...i))},t.toDisplayString(e.confirmText),1)])):t.createCommentVNode("",!0)],2)}const hs=oe(af,[["render",wf]]),Nf=e=>!!(!e||typeof e=="string"&&e.length==0||Array.isArray(e)&&e.length==0),Kn={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:Bf}=_("calendar"),Af=Bf({components:{[hs.name]:hs,[me.name]:me},props:{...Kn},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),i=t.computed(()=>a["bottom-info"]),s=t.ref(null),c=y=>{s.value?.scrollToDate(y)},u=()=>{s.value?.initPosition()};t.watch(()=>e.visible,y=>{y&&t.nextTick(()=>{s.value?s.value.doLayout():setTimeout(()=>{s.value&&s.value.doLayout()},250)})}),ve({scrollToDate:c,initPosition:u});const p=()=>{n("update:visible",!1)},d=()=>{n("close"),n("update:visible",!1)};return{closePopup:()=>{d()},update:p,close:d,select:y=>{n("select",y)},choose:y=>{d(),n("choose",y)},calendarRef:s,showTopBtn:o,topInfo:l,dayInfo:r,bottomInfo:i}}});function Tf(e,n,a,o,l,r){const i=t.resolveComponent("fox-calendar-pane"),s=t.resolveComponent("fox-popup");return e.poppable?(t.openBlock(),t.createBlock(s,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(i,{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(i,{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 Un=oe(Af,[["render",Tf]]),gs={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}},tl=(e,n)=>{let a;return He(e)?a=e:typeof e=="string"&&ke(e)>0?a=re.parser(e,n):a=new Date,a},wt=(e,n,a)=>(He(n)||(n=new Date),re.format(n,a)),Nt=e=>{let n=`${e.getFullYear()}`,a=`${e.getMonth()+1}`,o=`${e.getDate()}`,l=re.date2Str(e),r=re.getWhatDay(e.getFullYear(),e.getMonth()+1,e.getDate());return[n,a,o,l,r]};function $f(e,n,a,o,{CloseIcon:l,MarkIcon:r},i=!1){return{props:{...he,...ye,...Kn,...gs},emits:["change","update:modelValue","blur","focus","clear","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=t.computed(()=>s.type==="range"),k=t.reactive({startDate:null,endDate:null,startArray:[],endArray:[]}),f=()=>{k.startDate!==null&&(k.startDate=null,k.endDate=null,k.startArray=[],k.endArray=[])},m=(v,Y="one",z="YYYY-MM-DD")=>{if(Nf(v)){f();return}if(y.value&&Array.isArray(v)&&v.length==2){let F,G;typeof v[0]=="string"?(F=tl(v[0],z),G=tl(v[1],z)):(F=v[0],G=v[1]);let Z=Nt(F),ne=Nt(G);(k.startDate===null||k.startDate.getTime()!==F.getTime()||k.endDate?.getTime()!==G.getTime())&&(k.startDate=F,k.startArray=Z,k.endDate=G,k.endArray=ne)}else{let F;typeof v=="string"?F=tl(v,z):F=v;let G=Nt(F);(k.startDate===null||k.startDate.getTime()!==F.getTime())&&(k.startDate=F,k.startArray=G)}};m(s.modelValue,s.type,s.valueFormat),t.watch(()=>s.modelValue,v=>{m(v,s.type,s.valueFormat),d("setValue",v)});const h=t.computed(()=>{if(k.startDate===null)return"";if(y.value){let v=wt(s,k.startDate,s.format),Y=wt(s,k.endDate,s.format);return`${v} ${s.rangeSeparator} ${Y}`}else{let v=wt(s,k.startDate,s.format);return s.showWeek&&(v=`${v} ${k.startArray[4]}`),v}}),C=t.computed(()=>{if(k.startDate===null)return null;if(y.value){let v=re.date2Str(k.startDate),Y=re.date2Str(k.endDate??new Date);return[v,Y]}else return re.date2Str(k.startDate)}),A="fox-input-item",w=t.computed(()=>({[A]:!0,"is-disabled":u.value,"is-readonly":p.value})),N=Ve(t.computed(()=>s.textAlign),"textAlign"),T=t.computed(()=>{const v={};return N.value&&(v["text-align"]=N.value),v}),$=t.ref(!1),E=()=>{p.value||u.value||($.value=!0)},D=v=>{$.value=v},P=v=>{if(v){if(y.value&&Array.isArray(v)){let Y=v[0],z=pe(Y[0]),F=pe(Y[1]),G=pe(Y[2]),Z=new Date(z,F-1,G),ne=v[1];z=pe(ne[0]),F=pe(ne[1]),G=pe(ne[2]);let R=new Date(z,F-1,G);if(k.startDate=Z,k.startArray=Nt(Z),k.endDate=R,k.endArray=Nt(R),s.valueFormat){let X=wt(s,Z,s.valueFormat),Q=wt(s,R,s.valueFormat);d("update:modelValue",[X,Q],{})}else d("update:modelValue",[Z,R],{})}else{let Y=v,z=pe(Y[0]),F=pe(Y[1]),G=pe(Y[2]),Z=new Date(z,F-1,G);if(k.startDate=Z,k.startArray=Nt(Z),s.valueFormat){let ne=wt(s,Z,s.valueFormat);d("update:modelValue",ne,{})}else d("update:modelValue",Z,{})}d("change",v,{})}},K=v=>{let z=v.target.value;b.value=!0,d("focus",z,v)},V=v=>{setTimeout(()=>{b.value=!1},0);let z=v.target.value;s.maxLength&&z.length>Number(s.maxLength)&&(z=z.slice(0,Number(s.maxLength))),d("blur",z,v)},I=t.computed(()=>({[`${A}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),L=t.computed(()=>ke(s.unit)>0),x=t.computed(()=>ke(s.unit)>0&&!b.value),W=t.computed(()=>({hidden:!x.value})),j=v=>{f(),d("update:modelValue",null,v),d("change","",v),d("clear","")},O=t.computed(()=>s.clearable&&!u.value&&!p.value),ee=t.computed(()=>{let v=ke(h.value)>0;return s.clearable&&v&&b.value}),H=v=>{ee.value?j(v):E()},q=t.computed(()=>ee.value&&O.value?l:r),M=t.computed(()=>({action:!0}));return()=>{const v={class:w.value,style:T.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:h.value,onClick:E,onFocus:K,onBlur:V};i&&(v.disabled=!0);const Y=[],z=t.h("input",v);Y.push(z);const F=[],G={class:["action-icon"]},Z=t.h(q.value,G),ne={class:M.value,onClick:H},R=t.h("view",ne,{default:()=>[Z]});if(F.push(R),L.value){const Ne=t.h("view",{class:W.value},[s.unit]);F.push(Ne)}const X={class:I.value},Q=t.h("view",X,{default:()=>F});Y.push(Q);const U={default:()=>Y};U.label=c.slots.default,U.prepend=c.slots.prepend,U.append=c.slots.append,U.fixedPreTip=c.slots.fixedPreTip,U.fixedTip=c.slots.fixedTip;const J=Se(s,Kn);J.visible=$.value,J["onUpdate:visible"]=D,J["default-value"]=C.value,J.onChoose=P;const te={};if(c.slots.btn){const Ne=c.slots.btn();te.btn=()=>Ne}c.slots.day&&(te.day=c.slots.day),c.slots.topInfo&&(te.topInfo=c.slots.topInfo),c.slots.bottomInfo&&(te.bottomInfo=c.slots.bottomInfo);const ae=t.h(a,J,te);U.hide=()=>[ae];const de={...rt(s,Kn,gs)};return s.prop&&(de.prop=`${s.prop}_item`),t.h(o,de,U)}}}}const{componentName:Vf,create:Ef,scope:Df}=_("calendar-item"),nl=Ef($f(Vf,Df,Un,Be,{CloseIcon:le.CircleClose,MarkIcon:le.Date},!1)),If={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 xf(e,{CheckNormal:n,Checked:a}){return{props:{...If},setup(o,{emit:l,slots:r}){const i=t.inject("parent",null),s=Bn(),c=t.computed(()=>i.label.value===o.label),u=t.computed(()=>i.position),p=()=>{const y=[];if(c.value){if(r.checkedIcon)return r.checkedIcon();{const k=fe(o.iconSize),f=o.checkedIcon??s.radio.Checked??a;return y.push("fox-radio__icon"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:k,height:k,class:y})}}else{if(r.icon)return r.icon();{const k=fe(o.iconSize),f=o.icon??s.radio.CheckNormal??n;return y.push("fox-radio__icon--unchecked"),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h(f,{width:k,height:k,class:y})}}},d=()=>{const y=[`${e}__label`];return o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},g=()=>{const y=[`${e}__button`];return c.value&&y.push(`${e}__button--active`),o.disabled&&y.push("is-disabled"),o.readonly&&y.push("is-readonly"),t.h("view",{class:y},r.default?.())},S=()=>{c.value||o.disabled||o.readonly||i.updateValue(o.label)},b=u.value==="left";return()=>t.h("view",{class:`${e} ${e}--${o.shape} ${b?`${e}--reverse`:""}`,onClick:S},[o.shape=="button"?g():b?[d(),p()]:[p(),d()]])}}}const{componentName:vf,create:qf}=_("radio"),Hn=qf(xf(vf,{CheckNormal:le.CheckNormal,Checked:le.CheckChecked})),{componentName:ys,create:Pf}=_("radio-group"),jn=Pf({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}=gt(),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:`${ys} ${ys}--${e.direction}`,style:l},n.default?.())}}});function bs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(Wn(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Ft(e,r)===a)return l}return-1}function Wn(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ft(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Mf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Lf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let zf=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function Of(){const e=t.getCurrentInstance();return new zf(e.proxy)}function Ff(e){return{text:e,value:e}}const ks={shape:{type:String,default:"round"},icon:{type:[Object]},checkedIcon:{type:[Object]},iconSize:{type:[String,Number],default:""}},Rf={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String}},Kf={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 Uf(e,n,a,o,l){return{props:{...he,...ye,...ks,...Rf,...Kf},emits:["change","update:modelValue","setValue"],setup(r,i){const s=Ee(t.computed(()=>r.readonly)),c=De(t.computed(()=>r.disabled)),u=Ve(t.computed(()=>r.textAlign),"textAlign"),{emitEvent:p}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return c.value}},r.prop??i.attrs.name),d=Of(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await d.load("radio",f,m);if(h.length>0)if(typeof h[0]=="string"){const w=h.map(N=>Ff(N));g.value=w}else g.value=h;else g.value=[]}},{immediate:!0});let S=t.ref(-1);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{S.value=bs(r,m,f,r.valueType),p("setValue",f)},{deep:!0});const b=t.computed(()=>{if(!r.source)return r.modelValue;if(S.value===-1)return null;const f=g.value[S.value];return Ft(r,f)}),y=f=>{let m=null,h=null;if(g.value.length>0){let C=bs(r,g.value,f,"value");S.value=C,C>=0&&(h=g.value[C],r.valueType==="text"?m=Wn(r,h):r.valueType==="item"?m=h:m=Ft(r,h))}else m=f;p("update:modelValue",m),p("change",m,h)},k=()=>{let f=null,m=null;if(g.value.length>0&&S.value!==-1){let h=g.value[S.value];r.valueType==="text"?f=Wn(r,h):r.valueType==="item"?f=h:f=Ft(r,h)}p("update:modelValue",f),p("change",f,m)};if(ve({clear(){S.value!==-1&&(S.value=-1,k())}}),r.source){const f=()=>{const m=[],h=Se(r,ks);return g.value.forEach((C,A)=>{const w=Ft(r,C),N=Mf(r,C);let T={...h,label:w,disabled:N};const $=Lf(r,C,A);T={...T,...$},c.value&&(T.disabled=!0),s.value&&(T.readonly=!0);const E={};if(i.slots.icon&&(E.icon=i.slots.icon),i.slots.checkedIcon&&(E.checkedIcon=i.slots.checkedIcon),typeof i.slots.text=="function"){const P=i.slots.text(C);E.default=()=>[P]}else{const P=Wn(r,C);E.default=()=>P}let D=t.h(l,T,E);m.push(D)}),m};return()=>{const m=f(),h={class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"onUpdate:modelValue":y},C=t.h(o,h,{default:()=>m}),A={default:()=>C};A.label=i.slots.default,A.prepend=i.slots.prepend,A.append=i.slots.append,A.fixedPreTip=i.slots.fixedPreTip,A.fixedTip=i.slots.fixedTip;const N={...Se(r,ye,he)};return r.prop&&(N.prop=`${r.prop}_item`),t.h(a,N,A)}}else return()=>{const f=i.slots.options?.()??[];return t.h(o,{class:`${e}`,direction:r.direction,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"update:modelValue":y},{default:()=>f})}}}}const{componentName:Hf,create:jf,scope:Wf}=_("radio-item"),ol=jf(Uf(Hf,Wf,Be,jn,Hn)),Yf=(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:i}=gt(),s=Bn(),c=t.inject("parent",null),u=t.reactive({partialSelect:l.indeterminate});t.watch(()=>l.indeterminate,h=>{u.partialSelect=h});const p=t.computed(()=>!!c),d=t.computed(()=>p.value?c.value.value.includes(l.label):!!l.modelValue),g=t.computed(()=>p.value?c.position:l.textPosition);let S="";const b=(h,C)=>{S="click",i("update:modelValue",h),i("change",h,C)};t.watch(()=>l.modelValue,h=>{S=="click"?S="":i("change",h)});const y=()=>{const h=[];if(u.partialSelect){if(r.indeterminateIcon)return r.indeterminateIcon();{const C=fe(l.iconSize),A=l.indeterminateIcon??s.checkbox.Indeterminate??o;return h.push("fox-checkbox__icon--indeterminate"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}else if(d.value){if(r.checkedIcon)return r.checkedIcon();{const C=fe(l.iconSize),A=l.checkedIcon??s.checkbox.Checked??a;return h.push("fox-checkbox__icon"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}else{if(r.icon)return r.icon();{const C=fe(l.iconSize),A=l.icon??s.checkbox.CheckNormal??n;return h.push("fox-checkbox__icon--unchecked"),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h(A,{width:C,height:C,class:h})}}},k=()=>{const h=[`${e}__label`];return l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},f=()=>{const h=[`${e}__button`];return d.value&&h.push(`${e}__button--active`),l.disabled&&h.push("is-disabled"),l.readonly&&h.push("is-readonly"),t.h("view",{class:h},r.default?.())},m=h=>{if(!(l.disabled||l.readonly)){if(d.value&&u.partialSelect){u.partialSelect=!1,b(d.value,r.default?.()[0].children);return}if(b(!d.value,r.default?.()[0].children),p.value){const C=c.value.value,A=c.max.value,{label:w}=l,N=C.indexOf(w);N>-1?C.splice(N,1):N<=-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} ${g.value==="left"?`${e}--reverse`:""}`,onClick:m},[l.shape=="button"?f():[y(),k()]])}}),{componentName:Xf,create:Qf}=_("checkbox"),Yn=Qf(Yf(Xf,{CheckNormal:le.CheckNormal,Checked:le.Checked,Indeterminate:le.CheckDisabled})),{create:Gf,componentName:Ss}=_("checkbox-group"),Xn=Gf({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}=gt(),o=t.reactive({children:[]}),l=u=>{u.proxy&&o.children.push(u.proxy)},r=u=>{u.proxy&&(o.children=o.children.filter(p=>p!==u.proxy))},i=u=>{a("update:modelValue",u),a("change",u)},s=u=>{const p=[];u&&o.children.forEach(d=>{d?.disabled||p.push(d?.label)}),a("update:modelValue",p)},c=()=>{const u=o.children.filter(p=>p?.disabled?!1:!e.modelValue.includes(p.label)).map(p=>p.label);a("update:modelValue",u)};return t.provide("parent",{value:t.computed(()=>Array.isArray(e.modelValue)?e.modelValue:[]),position:e.textPosition,max:t.computed(()=>e.max),updateValue:i,link:l,unlink:r}),t.watch(()=>e.modelValue,u=>{a("change",u)}),ve({toggleAll:s,toggleReverse:c}),()=>{const u={};return e.textAlign&&(u["text-align"]=e.textAlign),t.h("view",{class:`${Ss} ${Ss}--${e.direction}`,style:u},n.default?.())}}});function Cs(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(ll(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if(Qn(e,r)===a)return l}return-1}function ll(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Qn(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Zf(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Jf(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let _f=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}};function em(){const e=t.getCurrentInstance();return new _f(e.proxy)}function tm(e){return{text:e,value:e}}const nm={direction:{type:String,default:"vertical"},textPosition:{type:String,default:"right"},textAlign:{type:String},max:{type:Number,default:0}},ws={icon:{type:[Object]},checkedIcon:{type:[Object]},indeterminateIcon:{type:[Object]},iconSize:{type:[String,Number],default:""},shape:{type:String,default:"round"}},om={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 lm(e,n,a,o,l){return{props:{...he,...ye,...nm,...ws,...om},emits:["change","update:modelValue","setValue"],setup(r,i){const s=De(t.computed(()=>r.disabled)),c=Ee(t.computed(()=>r.readonly)),u=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 s.value}},r.prop??i.attrs.name),d=em(),g=t.ref([]);t.watch([()=>r.source,()=>r.params],async([f,m])=>{if(f){const h=await d.load("checkbox",f,m);if(h.length>0)if(typeof h[0]=="string"){const w=h.map(N=>tm(N));g.value=w}else g.value=h;else g.value=[]}},{immediate:!0});const S=t.ref([]);t.watch([()=>r.modelValue,()=>g.value],async([f,m])=>{const h=[];Array.isArray(f)&&f.forEach(C=>{let A=Cs(r,m,C,r.valueType);A!==-1&&h.push(A)}),!Me(h,S.value)&&(S.value=h,p("setValue",h))},{deep:!0});const b=t.computed(()=>{if(!r.source)return r.modelValue;let f=[];return S.value.forEach(m=>{let h=g.value[m];f.push(Qn(r,h))}),f}),y=f=>{let m=[],h=[];if(g.value.length>0){const C=[];Array.isArray(f)&&f.forEach(A=>{let w=Cs(r,g.value,A,"value");w!==-1&&C.push(w);const N=g.value[w];h.push(N),r.valueType==="text"?m.push(ll(r,N)):r.valueType==="item"?m.push(N):m.push(Qn(r,N))}),S.value=C}else m=f;p("update:modelValue",m),p("change",m,h)},k=t.ref();if(ve({toggleAll:f=>{k.value.toggleAll(f)},toggleReverse:()=>{k.value.toggleReverse()}}),r.source){const f=()=>{const m=[],h=Se(r,ws);return g.value.forEach((C,A)=>{const w=Qn(r,C),N=Zf(r,C);let T={...h,label:w,disabled:N};const $=Jf(r,C,A);T={...T,...$},s.value&&(T.disabled=!0),c.value&&(T.readonly=!0);const E={};if(i.slots.icon&&(E.icon=i.slots.icon),i.slots.checkedIcon&&(E.checkedIcon=i.slots.checkedIcon),i.slots.indeterminateIcon&&(E.indeterminateIcon=i.slots.indeterminateIcon),typeof i.slots.text=="function"){const P=i.slots.text(C);E.default=()=>[P]}else{const P=ll(r,C);E.default=()=>P}let D=t.h(l,T,E);m.push(D)}),m};return()=>{const m=f(),h={class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,modelValue:b.value,"onUpdate:modelValue":y},C=t.h(o,h,{default:()=>m}),A={default:()=>C};A.label=i.slots.default,A.prepend=i.slots.prepend,A.append=i.slots.append,A.fixedPreTip=i.slots.fixedPreTip,A.fixedTip=i.slots.fixedTip;const N={...Se(r,ye,he)};return r.prop&&(N.prop=`${r.prop}_item`),t.h(a,N,A)}}else return()=>{const f=i.slots.options?.()??[];return t.h("view",{class:`${e}`,ref:k,direction:r.direction,max:r.max,textPosition:r.textPosition,textAlign:u.value,modelValue:b,"onUpdate:modelValue":y},{default:()=>f})}}}}const{componentName:am,create:rm,scope:sm}=_("checkbox-item"),al=rm(lm(am,sm,Be,Xn,Yn)),rl={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:im,create:cm}=_("switch"),dm=cm({components:{Loading1:le.Loading1},props:{...rl},emits:["change","update:modelValue","update:loading"],setup(e,{emit:n}){const a=t.computed(()=>e.modelValue===e.activeValue),o=t.computed(()=>{const s=im;return{[s]:!0,[a.value?"fox-switch-open":"fox-switch-close"]:!0,[`${s}-base`]:!0,"is-disabled":e.disabled}}),l=t.computed(()=>({backgroundColor:a.value?e.activeColor:e.inactiveColor}));let r="";const i=s=>{if(e.disabled||e.loading)return;r="click";const c=a.value?e.inactiveValue:e.activeValue;n("update:modelValue",c),n("change",c,s)};return t.watch(()=>e.modelValue,s=>{r=="click"?r="":n("change",s)}),{classes:o,style:l,isActive:a,onClick:i}}}),um={class:"fox-switch-button"};function fm(e,n,a,o,l,r){const i=t.resolveComponent("Loading1");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onClick:n[0]||(n[0]=(...s)=>e.onClick&&e.onClick(...s)),style:t.normalizeStyle(e.style)},[t.createElementVNode("view",um,[e.loading?t.renderSlot(e.$slots,"icon",{key:0},()=>[t.createVNode(i,{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 Gn=oe(dm,[["render",fm]]);function mm(e,n,a,o){return{props:{...he,...ye,...rl},emits:["change","update:modelValue","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const S={...Se(l,rl),disabled:i.value||s.value,value:p.value,"onUpdate:modelValue":d},b=[],y=t.h(o,S);b.push(y);const k={default:()=>b};k.label=r.slots.default,k.fixedPreTip=r.slots.fixedPreTip,k.fixedTip=r.slots.fixedTip;const m={...Se(l,ye,he)};return l.prop&&(m.prop=`${l.prop}_item`),m["content-class"]=u,t.h(a,m,k)}}}}const{componentName:pm,create:hm,scope:gm}=_("switch-item"),sl=hm(mm(pm,gm,Be,Gn));function ym(e,n,a,o){return{props:{...he,...ye,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 i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["change"],validateResetEvents:["focus"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),{toLocaleRefs:u}=ie.useFoxI18n(n),p=u(l,["placeholder"]),d=t.ref(l.modelValue);t.watch(()=>l.modelValue,P=>{d.value=P,c("change",P)});const g=t.computed(()=>({[`${e}`]:!0})),S=t.computed(()=>({[`${e}__main`]:!0,[`${e}__placeholder`]:!i.value&&ue(d.value),"is-disabled":i.value,"is-readonly":s.value})),b=Ve(t.computed(()=>l.textAlign),"textAlign"),y=t.computed(()=>{const P={};return b.value&&(P["text-align"]=b.value),P}),k=t.computed(()=>!ue(l.modelValue)||r.slots.main?!0:!!ue(l.desc)),f=t.computed(()=>ue(d.value)?p.placeholder.value:d.value),m=t.computed(()=>!ue(l.desc)||r.slots.sub),h=t.computed(()=>({[`${e}__sub`]:!0})),C=t.computed(()=>{const P={};return b.value&&(P["text-align"]=b.value),P}),A=()=>{c("focus",d.value)},w=()=>{c("blur",d.value)},N=t.computed(()=>({[`${e}__append`]:!0,"is-disabled":i.value,"is-readonly":s.value})),T=t.computed(()=>ke(l.unit)>0),$=P=>{i.value==!0||s.value==!0||c("click")},E=t.computed(()=>l.icon??a),D=t.computed(()=>({action:!0}));return()=>{const P=[];if(typeof r.slots.content=="function"){const M=r.slots.content();P.push(M)}else{const M=[];if(k.value){const z={tabIndex:0,class:S.value,style:y.value,onFocus:A,onBlur:w};let F=null;r.slots.main?F=t.h("view",z,[r.slots.main(f.value)]):F=t.h("view",z,[f.value]),M.push(F)}if(m.value){const z={tabIndex:0,class:h.value,style:C.value,onFocus:A,onBlur:w};let F=null;r.slots.sub?F=t.h("view",z,[r.slots.sub(l.desc)]):F=t.h("view",z,[l.desc]),M.push(F)}const v={class:g.value,onClick:$},Y=t.h("view",v,M);P.push(Y)}const K=[],V=fe(l.iconSize);let I=r.slots.icon;if(!I){const M={width:V,height:V,class:["action-icon"]};I=t.h(E.value,M)}const L={class:D.value,onClick:$},x=t.h("view",L,{default:()=>[I]});if(K.push(x),T.value){const M=t.h("view",{},[l.unit]);K.push(M)}const W={class:N.value},j=t.h("view",W,{default:()=>K});P.push(j);const O={default:()=>P};O.label=r.slots.default,O.prepend=r.slots.prepend,O.append=r.slots.append,O.fixedPreTip=r.slots.fixedPreTip,O.fixedTip=r.slots.fixedTip;const H={...Se(l,ye,he)};return l.prop&&(H.prop=`${l.prop}_item`),t.h(o,H,O)}}}}const{componentName:bm,create:km,scope:Sm}=_("link-item"),il=km(ym(bm,Sm,le.ArrowRight,Be)),cl={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:Cm,componentName:wm}=_("rate"),Nm=Cm({props:{...cl},emits:["update:modelValue","change"],setup(e,{emit:n,slots:a}){const o=t.ref([]),l=t.computed(()=>({[wm]:!0})),r=S=>{n("update:modelValue",S),n("change",S)},i=(S,b)=>{if(e.disabled||e.readonly)return;let y=0;b===1&&e.modelValue===b||(y=b,e.allowHalf&&S==2&&(y-=.5)),r(y)},s=(S,b,y)=>{let k=0;for(let f=b.value.length-1;f>=0;f--){const m=b.value[f];if(S>m.offsetLeft){y?k=f+(S>m.offsetLeft+m.clientWidth/2?1:.5):k=f+1;break}}return k},c=tt(),u={onTouchStart(S){!e.touchable||e.readonly||c.start(S)},onTouchMove(S){e.touchable&&(c.move(S),c.isHorizontal()&&o.value&&(S.preventDefault(),r(s(c.moveX.value,o,e.allowHalf))))}},p=Math.random().toString(36).slice(-8),d=t.computed(()=>e.customIcon??le.StarFillN);return{classes:l,...u,onClick:i,toPxDesc:ge,renderIcon:(S,b)=>t.h(S,b),rateRefs:o,refRandomId:p,slots:a,customIcon:d}}}),Bm=["id"],Am={class:"fox-rate-item__icon--full"},Tm={key:0,class:"fox-rate-item__icon--half"},$m={key:1,class:"fox-rate-item__icon--half"};function Vm(e,n,a,o,l,r){return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),onTouchstart:n[0]||(n[0]=(...i)=>e.onTouchStart&&e.onTouchStart(...i)),onTouchmove:n[1]||(n[1]=(...i)=>e.onTouchMove&&e.onTouchMove(...i))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Number(e.count),i=>(t.openBlock(),t.createElementBlock("view",{class:"fox-rate-item",key:i,ref_for:!0,ref:"rateRefs",id:"rateRefs-"+e.refRandomId+i,style:t.normalizeStyle(i<Number(e.count)?{marginRight:e.toPxDesc(e.spacing)}:{})},[t.createElementVNode("view",Am,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=e.modelValue?e.activeColor:e.voidColor})),{class:t.normalizeClass(["fox-rate-item__icon",{"fox-rate-item__icon--disabled":e.disabled||i>e.modelValue}]),onClick:s=>e.onClick(1,i)},null,8,["class","onClick"]))]),e.allowHalf&&Number(e.modelValue)+1>i?(t.openBlock(),t.createElementBlock("view",Tm,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.renderIcon(e.customIcon,{width:e.size,height:e.size,size:e.size,color:i<=Number(e.modelValue)+1?e.activeColor:e.voidColor})),{class:"fox-rate-item__icon",onClick:s=>e.onClick(2,i)},null,8,["onClick"]))])):e.allowHalf&&Number(e.modelValue)+1<i?(t.openBlock(),t.createElementBlock("view",$m,[(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:s=>e.onClick(2,i)},null,8,["onClick"]))])):t.createCommentVNode("",!0)],12,Bm))),128))],34)}const Bt=oe(Nm,[["render",Vm]]);function Em(e,n,a,o){return{props:{...he,...ye,...cl},emits:["change","update:modelValue","setValue"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue"],validateResetEvents:["focus","setValue"],get readonly(){return s.value},get disabled(){return i.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=g=>{p.value=g,c("update:modelValue",g,{}),c("change",g,{})};return()=>{const S={...Se(l,cl),disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":d},b=[],y=t.h(o,S);b.push(y);const k={default:()=>b};if(r.slots.default){const h=r.slots.default();k.label=()=>h}const f=Se(l,ye,he);return l.prop&&(f.prop=`${l.prop}_item`),f["content-class"]=u,t.h(a,f,k)}}}}const{componentName:Dm,create:Im,scope:xm}=_("rate-item"),dl=Im(Em(Dm,xm,Be,Bt)),vm=/scroll|auto|overlay/i,Ns=window;function qm(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ul(e,n=Ns){let a=e;for(;a&&a!==n&&qm(a);){const{overflowY:o}=window.getComputedStyle(a);if(vm.test(o))return a;a=a.parentNode}return n}function Bs(e,n=Ns){const a=t.ref();return t.onMounted(()=>{e.value&&(a.value=ul(e.value,n))}),a}const As=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Pm={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 Mm(e,n,a){return{props:{...Pm},emits:["scroll-change","load-more","update:modelValue"],setup(o,{emit:l,slots:r}){const{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["pullText","loadText","loadMoreText"]),c=t.ref(),u=Bs(c),p=t.reactive({beforeScrollTop:0,isInfiniting:!1,y:0,x:0,distance:0}),d=t.computed(()=>({[e]:!0})),g=m=>m?m.offsetTop+g(m.offsetParent):0,S=()=>{let m=0,h=0,C="down";if(u.value==window){const A=As();c.value&&(m=g(c.value)+c.value.offsetHeight-A-window.innerHeight),h=A}else{const{scrollHeight:A,clientHeight:w,scrollTop:N}=u.value;m=A-w-N,h=N}return p.beforeScrollTop>h?C="up":C="down",p.beforeScrollTop=h,l("scroll-change",h),m<=o.threshold&&C=="down"},b=()=>{Qe(()=>{if(!S()||!o.hasMore||p.isInfiniting)return!1;p.isInfiniting=!0,l("update:modelValue",!0),t.nextTick(()=>l("load-more"))})},y=()=>{u.value&&u.value.addEventListener("scroll",b,o.useCapture)},k=()=>{u.value&&u.value.removeEventListener("scroll",b,o.useCapture)};t.onMounted(()=>{y(),o.immediate&&b()}),t.onUnmounted(()=>{k()});const f=t.ref(!1);return t.onActivated(()=>{f.value&&(f.value=!1,y())}),t.onDeactivated(()=>{f.value=!0,k()}),t.watch(()=>o.modelValue,m=>{m||(p.isInfiniting=!1)}),()=>{const m={class:"fox-infinite__container"},h=t.h("view",m,[r?.default?.()]),C=[];if(p.isInfiniting){let T=r?.loading?.()??null;if(!T){let D=r?.loadingIcon?.()??null;if(!D){const V={class:["fox-infinite__bottom-box__img"]};D=t.h(a,V)}const P={class:"fox-infinite__bottom-box__text"},K=t.h("view",P,[s.loadText.value]);T=[D,K]}const $={class:"fox-infinite__bottom-box"},E=t.h("view",$,T);C.push(E)}else if(!o.hasMore){let T=r?.finished?.()??null;if(!T){const $={class:"fox-infinite__bottom-tips"};T=t.h("view",$,[s.loadMoreText.value]),C.push(T)}}const A={class:"fox-infinite__bottom"},w=t.h("view",A,C),N={class:d.value,ref:c};return t.h("view",N,[h,w])}}}}const{componentName:Lm,create:zm,scope:Om}=_("infinite-loading"),Zn=zm(Mm(Lm,Om,le.Loading)),{componentName:Fm,create:Rm}=_("button"),Km=Rm({components:{Loading:le.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:i,loading:s,color:c,plain:u,block:p}=t.toRefs(e),d=b=>{!s.value&&!i.value&&n("click",b)},g=t.computed(()=>{const b=Fm;return{[b]:!0,[`${b}--${o.value}`]:o.value,[`${b}--${l.value}`]:l.value,[`${b}--${r.value}`]:r.value,[`${b}--plain`]:u.value,[`${b}--block`]:p.value,[`${b}--disabled`]:i.value,[`${b}--loading`]:s.value}}),S=t.computed(()=>{const b={};return c?.value&&(u.value?(b.color=c.value,b.background="#fff",c.value?.includes("gradient")||(b.borderColor=c.value)):(b.color="#fff",b.background=c.value)),b});return{handleClick:d,classes:g,getStyle:S}}}),Um={class:"fox-button__wrap"};function Hm(e,n,a,o,l,r){const i=t.resolveComponent("Loading");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.getStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.createElementVNode("view",Um,[e.loading?(t.openBlock(),t.createBlock(i,{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 ze=oe(Km,[["render",Hm]]),jm={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"}},Wm=(e,n,a)=>({props:{...jm},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}=gt(),{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["placeholder"]),c=t.reactive({active:!1}),u=t.computed(()=>({background:o.background})),p=t.computed(()=>({background:o.inputBackground})),d=$=>{let D=$.target.value;o.maxLength&&D.length>Number(o.maxLength)&&(D=D.slice(0,Number(o.maxLength))),r("update:modelValue",D,$),r("change",D,$)},g=t.ref({}),S=$=>{let D=$.target.value;c.active=!0,g.value=o.focusStyle,r("focus",D,$)},b=$=>{setTimeout(()=>{c.active=!1},0);let D=$.target.value;o.maxLength&&D.length>Number(o.maxLength)&&(D=D.slice(0,Number(o.maxLength))),g.value={},r("blur",D,$)},y=$=>{r("update:modelValue","",$),r("change","",$),r("clear","")},k=t.computed(()=>String(o.modelValue).length>0),f=t.computed(()=>{const $={};return k.value||($.display="none"),$}),m=$=>{o.autoblur&&N.value?.blur(),(typeof $.cancelable!="boolean"||$.cancelable)&&$.preventDefault(),r("search",o.modelValue)},h=$=>{r("keyup-input",$)},C=$=>{r("click-input",$)},A=$=>{r("click-left-icon",o.modelValue,$)},w=t.computed(()=>({textAlign:o.inputAlign})),N=t.ref(null);t.onMounted(()=>{o.autofocus&&N.value.focus()});const T=()=>{const $=[];if(l.leftin){const L={class:[`${e}__search-icon`,`${e}__input-left-search-icon`],onClick:A},x=t.h("view",L,[l.leftin()]);$.push(x)}const E={class:`${e}__input-inner-input`,ref:N,style:w.value,type:o.inputType,maxlengt:o.maxLength,placeholder:s.placeholder.value,value:o.modelValue,disabled:o.disabled,readonly:o.readonly,onClick:C,onInput:d,onFocus:S,onBlur:b,onkeyup:h},D=t.h("input",E),P={class:[`${e}__input-inner`],action:"#",onSubmit:m},K=t.h("form",P,[D]);$.push(K);const V=[];if(o.clearable){const L={class:[`${e}__search-icon`,`${e}__input-clear-icon`],style:f.value,onClick:y},x=l?.clear?.()??o.clearIcon??a,W=t.h("view",L,[t.h(x)]);V.push(W)}if(l.rightin){const L={class:[`${e}__search-icon`,`${e}__input-right-search-icon`]},x=t.h("view",L,[l.rightin()]);V.push(x)}if(V.length>0){const L={class:`${e}__input-inner-right`},x=t.h("view",L,V);$.push(x)}const I={class:[`${e}__search-input`,`${o.shape}`],style:{...p.value,...g.value}};return t.h("view",I,$)};return()=>{const $=[];if(o.label){const P={class:`${e}__search-label`},K=t.h("span",P,[o.label]);$.push(K)}if(l.leftout){const P={class:[`${e}__search-icon`,`${e}__left-search-icon`]},K=t.h("view",P,[l.leftout()]);$.push(K)}const E=T();if($.push(E),l.rightout){const P={class:[`${e}__search-icon`,`${e}__right-search-icon`]},K=t.h("view",P,[l.rightout()]);$.push(K)}const D={class:`${e}`,style:u.value};return t.h("view",D,$)}}}),{componentName:Ym,create:Xm,scope:Qm}=_("searchbar"),Jn=Xm(Wm(Ym,Qm,le.CircleClose)),_n={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 Gm(e,n,a,o="value"){for(let l=0;l<n.length;l++){let r=n[l];if(o==="text"){if(eo(e,r)===a)return l}else if(o==="item"){if(Me(a,r))return l}else if($s(e,r)===a)return l}return-1}function eo(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Ts(e,n){return typeof e.subTextKey=="string"&&e.subTextKey.length>0?n[e.subTextKey]:n.text}function $s(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Zm(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Jm(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let _m=class{proxy;constructor(n){this.proxy=n}async load(n,a,o,l,r,i,s){if(Array.isArray(a)){let u=a;typeof s=="function"&&(u=u.filter(s));let p=(o-1)*l,d=p+l;d>u.length&&(d=u.length);const g=u.slice(p,d);return{totalSize:u.length,page:g}}if(typeof a=="function")return await Reflect.apply(a,null,[o,l,r,i]);const c=_e(this.proxy,n);return c===null?(console.error(`${n} component not found api function`),{totalSize:0,page:[]}):(Ie(r)&&t.isReactive(r)&&(r=t.toRaw(r)),await Reflect.apply(c,null,[a,o,l,r]))}};function ep(){const e=t.getCurrentInstance();return new _m(e.proxy)}function tp(e,n,a,o,l,r,i,s,c,u,p){return{props:{..._n},emits:["change","update:modelValue","update:text","loaded-data","update:visible"],setup(d,{slots:g}){const{emitEvent:S}=gt(),{toLocaleRefs:b}=ie.useFoxI18n(n),y=b(d,["title","loadText","loadMoreText","seachPlaceholder","confirmText"]),k=ep(),f=t.ref([]),m=t.ref(0),h=t.ref(""),C=t.shallowRef(null),A=t.computed(()=>{const R={};return d.params&&Object.assign(R,d.params),ue(h.value)||(R[`${d.searchKey}`]=h.value),C.value&&Object.assign(R,C.value),R});let w=!0;const N=async(R,X,Q)=>{try{if($.value===!1)return;let U=null;ue(h.value)||(U=te=>{const ae=eo(d,te);if(typeof ae=="string"&&ae.includes(h.value))return!0;const se=Ts(d,te);return!!(typeof se=="string"&&se.includes(h.value))});const J=await k.load("actionsheet",R,X,Q,A.value,w,U??void 0);w=!1,Array.isArray(J)?(f.value=J,m.value=1,$.value=!1):!Array.isArray(J.page)||J.page.length===0?(console.warn("[FoxUI] can not load more data"),$.value=!1):(Reflect.apply([].push,f.value,J.page),m.value=Math.ceil(f.value.length/d.pageSize),(J.totalSize&&f.value.length>=J.totalSize||Q<J.page.length)&&($.value=!1)),T.value=!1}catch(U){console.error("[FoxUI] ActionSheet load more data fail",U),$.value=!0,m.value=0,f.value=[]}setTimeout(()=>{S("loaded-data")},250)},T=t.ref(!1),$=t.ref(!0),E=async()=>{if(!d.source){T.value=!1;return}await N(d.source,m.value+1,d.pageSize)};let D=null;t.watch(h,(R,X)=>{D&&(clearTimeout(D),D=null),ue(R)&&!ue(X)&&(D=setTimeout(()=>{K()},d.searchDelayTriggerClear))});const P=()=>{$.value=!0,m.value=0,f.value=[],d.source&&E()},K=()=>{P()};t.watch([()=>d.source,()=>d.pageSize,()=>d.params],async([R,X,Q])=>{d.source&&P()},{immediate:!0});const V=t.computed(()=>!d.multiple&&d.isAutoBackFill),I=t.ref([]);let L=null;const x=t.ref(d.visible);t.watch(()=>d.visible,R=>{x.value!==R&&(x.value=R),R?L=[...I.value]:L=null});const W=(R,X)=>{const Q=[];return Array.isArray(R)||(R=[R]),R.forEach(U=>{let J=Gm(d,X,U,d.valueType);J!==-1&&Q.push(J)}),Me(Q,I.value)?!1:(I.value=Q,!0)};t.watch([()=>d.modelValue,()=>f.value],([R,X],[Q,U])=>{if(W(R,X)){const te=j();O(te)}},{deep:!0});const j=()=>{const R=[],X=[],Q=[];for(let ae of I.value){const se=f.value[ae];X.push(se);const de=eo(d,se);if(Q.push(de),d.valueType==="item")R.push(se);else if(d.valueType==="text")R.push(de);else{const $e=$s(d,se);R.push($e)}}let U=null,J=null,te=null;return d.multiple?(U=R,J=Q,te=X):(U=R[0]??null,J=Q[0]??null,te=X[0]??null),{value:U,text:J,item:te}},O=R=>{S("update:modelValue",R.value),S("update:text",R.text),S("change",R.value,R.item,R.text)},ee=()=>{L&&(I.value=L)},H=R=>{const X=I.value.indexOf(R);d.multiple?X===-1?I.value.push(R):I.value.splice(X,1):X===-1?I.value=[R]:I.value=[],(V.value||!d.poppable&&!d.showFooter)&&v()},q=R=>{x.value=R,S("update:visible",R)},M=()=>{const R=()=>{ee(),q(!1)},X=d.beforeMethod??d.beforeClose;if(typeof X=="function"){const Q=X("close");mt(Q)?Q.then(U=>{U!==!1&&R()}).catch(()=>{R()}):Q!==!1&&R()}else R()},v=()=>{const R=j(),X=()=>{O(R),q(!1)},Q=d.beforeMethod??d.beforeClose;if(typeof Q=="function"){const U=Q("confirm",R.value,R.item,R.text);mt(U)?U.then(J=>{J!==!1&&X()}).catch(()=>{X()}):U!==!1&&X()}else X()},Y=()=>{let R=y.title.value??"";g.title&&(R=g.title());const X=t.h("view",{class:["fox-actionsheet__header-title"]},[R]),Q=t.h(c,{class:["fox-actionsheet__header-icon"],onClick:M});return t.h("view",{class:["fox-actionsheet__header"]},[X,Q])},z=()=>{let R=null;if(g.search)R=g.search();else{const X={onSearch:P,placeholder:y.seachPlaceholder.value,disabled:d.disabled,modelValue:h.value,"onUpdate:modelValue":Q=>{h.value=Q}};R=t.h(r,X,{leftin:()=>t.h(u)})}return t.h("view",{class:["fox-actionsheet__searchbar"]},[R])},F=(R,X,Q,U,J)=>{if(g.optionLabel)return g.optionLabel({text:R,checked:X,disabled:Q,subText:U,item:J});const te=[],ae=t.h("view",{class:"fox-actionsheet__list-item-text"},[R]);if(te.push(ae),U){const se=t.h("view",{class:"fox-actionsheet__list-item-subtext"},[U]);te.push(se)}return t.h("view",{class:["fox-actionsheet__list-item-label"]},te)},G=(R,X,Q,U)=>{if(g.optionIcon)return g.optionIcon({checked:R,disabled:X,iconSize:Q,item:U});if(R){if(g.checkedIcon)return g.checkedIcon({disabled:X,item:U});{const J=d.checkedIcon??s;return t.h(J,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}else{if(g.icon)return g.icon({disabled:X,item:U});{const J=d.icon??i;return t.h(J,{width:Q,height:Q,class:["fox-actionsheet__list-item-icon"]})}}},Z=()=>{const R=[];for(let X=0;X<f.value.length;X++){const Q=f.value[X],U=eo(d,Q),J=Ts(d,Q),te=["fox-actionsheet__list-item"],ae={};let se=Zm(d,Q),de=d.iconSize?fe(d.iconSize):null;const $e=Jm(d,Q,X);$e&&(se=se||$e.disabled,$e.class&&te.push($e.class),$e.style&&Object.assign(ae,$e.style)),se=!!(d.disabled||se);const Ne=I.value.includes(X);se&&te.push("is-disabled"),Ne&&te.push("is-checked");const ao={class:te,style:ae,key:`${X}`,onClick:()=>{se||H(X)}};let ft=[];if(g.option)ft.push(g.option({item:Q,checked:Ne,disabled:se}));else{const u2=F(U,Ne,se,J,Q);ft.push(u2);const f2=G(Ne,se,de,Q);ft.push(f2),d.textPosition==="right"&&ft.reverse()}const d2=t.h("view",ao,ft);R.push(d2)}return R},ne=()=>{let R=[];if(g.buttons)R=g.buttons();else{const Q=t.h(l,{type:"primary",block:"block",onClick:v,disabled:d.disabled},{default:()=>y.confirmText.value});R.push(Q)}return t.h("view",{class:"fox-actionsheet__footer"},[R])};return ve({search:async(R=null,X=!0)=>{C.value=R&&t.toRaw(R),t.triggerRef(C),X&&($.value=!0,m.value=0,f.value=[]),t.nextTick(()=>{E()})},clear:()=>{$.value=!0,m.value=0,f.value=[]},confirm:()=>{v()},cancel:()=>{M()}}),()=>{const R=[];if(d.showHeader){const de=Y();R.push(de)}if(d.showSearchbar){const de=z();R.push(de)}let X=null;if(g.content)X=g.content();else{const de=Z(),$e={hasMore:$.value,loadText:y.loadText.value,loadMoreText:y.loadMoreText.value,modelValue:T.value,"onUpdate:modelValue":Ne=>{T.value=Ne},onLoadMore:E};X=t.h(o,$e,{default:()=>de})}const Q={};d.optionsHeight&&(Q.height=d.optionsHeight);const U={"fox-actionsheet__list":!0};d.poppable||(U["fox-actionsheet__list--inner"]=!0);const J=t.h("view",{class:U,style:Q},[X]);if(R.push(J),d.showFooter&&!V.value){const de=ne();R.push(de)}const te=t.h("view",{class:"fox-actionsheet"},R);if(!d.poppable)return te;const ae=["fox-actionsheet__popup"];d.popClass&&ae.push(d.popClass);const se={popClass:ae.join(" "),visible:x.value,closeable:!1,"onUpdate:visible":q,position:d.position,round:"round",onClickOverlay:M,closeOnClickOverlay:d.closeOnClickOverlay};return t.h(a,se,{default:()=>te})}}}}const{componentName:np,create:op,scope:lp}=_("actionsheet-pane"),to=op(tp(np,lp,me,Zn,ze,Jn,le.CheckNormal,le.Checked,le.Close,le.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 ap(e,n,a,o,l,r,i){return{props:{...he,...ye,...Vs,..._n},emits:["change","update:modelValue","blur","focus","clear","update:text","setValue"],setup(s,c){const u=De(t.computed(()=>s.disabled)),p=Ee(t.computed(()=>s.readonly)),{emitEvent:d}=Te({componentName:e,validateCheckEvents:["blur","clear","change"],validateResetEvents:["focus","setValue"],get readonly(){return p.value},get disabled(){return u.value}},s.prop??c.attrs.name),{toLocaleRefs:g}=ie.useFoxI18n(n),S=g(s,["placeholder"]),b=t.ref(!1),y=Pe(s,"modelValue",null,d),k=t.ref(""),f=t.computed(()=>Array.isArray(k.value)?k.value.join(s.separator):k.value),m="fox-input-item",h=t.computed(()=>({[m]:!0,"is-disabled":u.value,"is-readonly":p.value})),C=Ve(t.computed(()=>s.textAlign),"textAlign"),A=t.computed(()=>{const v={};return C.value&&(v["text-align"]=C.value),v}),w=t.ref(!1),N=()=>{w.value=!0},T=v=>{w.value=v},$=v=>{y.value=v,d("update:modelValue",v)},E=(v,Y)=>{d("change",v,Y)},D=v=>{let z=v.target.value;b.value=!0,d("focus",z,v)},P=v=>{setTimeout(()=>{b.value=!1},0);let z=v.target.value;s.maxLength&&z.length>Number(s.maxLength)&&(z=z.slice(0,Number(s.maxLength))),d("blur",z,v)},K=v=>{k.value=v,d("update:text",v)},V=t.computed(()=>({[`${m}__append`]:!0,"is-disabled":u.value,"is-readonly":p.value})),I=t.computed(()=>ke(s.unit)>0),L=t.computed(()=>ke(s.unit)>0&&!b.value),x=t.computed(()=>({hidden:!L.value})),W=v=>{y.value="",d("update:modelValue","",v),d("change","",v),d("clear","")},j=t.computed(()=>s.clearable&&!u.value&&!p.value),O=t.computed(()=>ke(y.value)>0&&b.value),ee=v=>{O.value?W(v):N()},H=t.computed(()=>O.value&&j.value?o:l),q=t.computed(()=>({action:!0})),M=t.ref(null);return ve({search:v=>{M.value&&M.value.search(v)},clear:()=>{M.value&&M.value.clear},confirm:v=>{M.value&&M.value.confirm()},cancel:()=>{M.value&&M.value.cancel()}}),()=>{const v={class:h.value,style:A.value,type:"text",maxlength:s.maxLength,placeholder:S.placeholder.value,readonly:!0,unselectable:"on",value:f.value,onClick:N,onFocus:D,onBlur:P},Y=[],z=t.h("input",v);Y.push(z);const F=[],G={class:["action-icon"]},Z=t.h(H.value,G),ne={class:q.value,onClick:ee},R=t.h("view",ne,{default:()=>[Z]});if(F.push(R),I.value){const Ne=t.h("view",{class:x.value},[s.unit]);F.push(Ne)}const X={class:V.value},Q=t.h("view",X,{default:()=>F});Y.push(Q);const U={default:()=>Y};U.label=c.slots.default,U.prepend=c.slots.prepend,U.append=c.slots.append,U.fixedPreTip=c.slots.fixedPreTip,U.fixedTip=c.slots.fixedTip;const J=Se(s,_n);J.ref=M,J.class=s.actionsheetProps,J.disabled=u.value||p.value,J.visible=w.value,J["onUpdate:visible"]=T,J.modelValue=y.value,J["onUpdate:modelValue"]=$,J.text=k.value,J["onUpdate:text"]=K,J.onChange=E,J.poppable=!0,J["text-position"]=s.textPosition;const te={title:c.slots.title,search:c.slots.search,option:c.slots.option,optionLabel:c.slots.optionLabel,optionIcon:c.slots.optionIcon,buttons:c.slots.buttons},ae=t.h(r,J,te);U.hide=()=>[ae];const de={...rt(s,Vs,_n)};return s.prop&&(de.prop=`${s.prop}_item`),t.h(a,de,U)}}}}const{componentName:rp,create:sp,scope:ip}=_("actionsheet-item"),fl=sp(ap(rp,ip,Be,le.CircleClose,le.ArrowRight,to)),ml={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:cp,create:dp}=_("input-number"),up=dp({components:{Minus:le.Minus,Plus:le.Plus},props:{...ml},emits:["update:modelValue","change","blur","focus","reduce","add","overlimit"],setup(e,{emit:n}){const a=t.computed(()=>{const S=cp;return{[S]:!0,[`${S}--disabled`]:e.disabled}}),o=S=>Number(S).toFixed(Number(e.decimalPlaces)),l=S=>{const b=S.target;n("update:modelValue",b.valueAsNumber,S)},r=(S,b)=>{let y=o(S);n("update:modelValue",y,b),n("change",y,b)},i=(S=Number(e.modelValue))=>S<Number(e.max)&&!e.disabled,s=(S=Number(e.modelValue))=>S>Number(e.min)&&!e.disabled,c=S=>{if(n("reduce",S),s()){let b=Number(e.modelValue)-Number(e.step);r(b,S)}else n("overlimit",S,"reduce")},u=S=>{if(n("add",S),i()){let b=Number(e.modelValue)+Number(e.step);r(b,S)}else n("overlimit",S,"add")},p=S=>{e.disabled||e.readonly||n("focus",S)},d=S=>{if(e.disabled||e.readonly)return;let y=S.target.valueAsNumber;y<Number(e.min)?y=Number(e.min):y>Number(e.max)&&(y=Number(e.max)),r(y,S),n("blur",S)},g=S=>{let b=Number(S);return b<Number(e.min)?b=Number(e.min):b>Number(e.max)&&(b=Number(e.max)),b};return t.watch(()=>[e.max,e.min],()=>{Number(e.min)>Number(e.max)&&console.warn("[FoxUI] <InputNumber>","props.max < props.min");const S=g(e.modelValue);S!==Number(e.modelValue)&&r(S,{})}),{classes:a,change:l,blur:d,focus:p,add:u,addAllow:i,reduce:c,reduceAllow:s,toPxDesc:ge}}}),fp=["min","max","disabled","readonly","value"];function mp(e,n,a,o,l,r){const i=t.resolveComponent("Minus"),s=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(i,{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,fp),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(s,{width:e.toPxDesc(e.buttonSize),height:e.toPxDesc(e.buttonSize)},null,8,["width","height"])])],2)],2)}const nt=oe(up,[["render",mp]]);function pp(e,n,a,o){return{props:{...he,...ye,...ml},emits:["change","update:modelValue","setValue","add","reduce"],setup(l,r){const i=De(t.computed(()=>l.disabled)),s=Ee(t.computed(()=>l.readonly)),{emitEvent:c}=Te({componentName:e,validateCheckEvents:["blur","update:modelValue","add","reduce"],validateResetEvents:["focus","setValue"],get validate(){return!i.value&&!s.value}},l.prop??r.attrs.name),u=e,p=Pe(l,"modelValue",null,c),d=b=>{p.value=b,c("update:modelValue",b,{}),c("change",b,{})},g=b=>{c("add",b)},S=b=>{c("reduce",b)};return()=>{const b={"left-icon":r.slots["left-icon"],"right-icon":r.slots["right-icon"]},y=Se(l,ml),f={...r.attrs,...y,disabled:i.value,readonly:s.value,value:p.value,"onUpdate:modelValue":d,onAdd:g,onReduce:S},m=t.h(o,f,b),h=[];h.push(m);const C={default:()=>h};C.label=r.slots.default,C.fixedPreTip=r.slots.fixedPreTip,C.fixedTip=r.slots.fixedTip;const w={...Se(l,ye,he)};return l.prop&&(w.prop=`${l.prop}_item`),w["content-class"]=u,t.h(a,w,C)}}}}const{componentName:hp,create:gp,scope:yp}=_("inputnumber-item"),pl=gp(pp(hp,yp,Be,nt)),bp={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:[Object]},iconSize:{type:[String,Number]},markIcon:{type:[Object]},markIconSize:{type:[String,Number]},layout:{type:[Array],default:()=>["head","main","sub"]},scroll:{type:[Boolean]}};function kp(e,n){return typeof e.textKey=="string"&&e.textKey.length>0?n[e.textKey]:n.text}function Es(e,n){return typeof e.valueKey=="string"&&e.valueKey.length>0?n[e.valueKey]:n.value}function Ds(e,n){return typeof e.disabledKey=="string"&&e.disabledKey.length>0?n[e.disabledKey]:n.disabled??null}function Sp(e,n){return typeof e.visibleKey=="string"&&e.visibleKey.length>0?n[e.visibleKey]:n.visible??null}function hl(e,n){return typeof e.statusKey=="string"&&e.statusKey.length>0?n[e.statusKey]:n.statusKey??null}function Is(e,n){return typeof e.doitKey=="string"&&e.doitKey.length>0?n[e.doitKey]:n.doitKey??null}function xs(e,n){return typeof e.labelKey=="string"&&e.labelKey.length>0?n[e.labelKey]:n.labelKey??null}function gl(e,n,a){return typeof e.itemOptions=="function"?e.itemOptions(n,a):e.itemOptions}let Cp=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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await Reflect.apply(l,null,[a,o]))}};function wp(){const e=t.getCurrentInstance();return new Cp(e.proxy)}function Np(e,n,a,o){return{props:{...bp},emits:["update:modelValue","change","loaded-data","click"],setup(l,{slots:r,emit:i}){const s=e,c=wp(),u=t.ref([]),p=t.computed(()=>u.value.filter(q=>Sp(l,q)!==!1)),d=t.ref(-1),g=()=>{const q=l.modelValue,M=p.value.findIndex(v=>Es(l,v)===q);d.value!==M&&(d.value=M,l.scroll&&ee(M))};t.watch([()=>l.modelValue,p],()=>{g()});const S=q=>d.value===q,b=q=>{if(q<0&&q>=p.value.length)return!1;const M=p.value[q],Y=(gl(l,M,q)??{}).status??hl(l,M);return S(q)||Y},y=t.computed(()=>{const q={[s]:!0};return l.mode?q[`is-${l.mode}`]=!0:l.direction&&(q[`is-${l.direction}`]=!0),l.scroll&&(q["is-scroll"]=!0),q}),k=t.computed(()=>({})),f=(q,M,v,Y,z)=>{const F={[`${s}__step`]:!0};return z&&(F[`${z}`]=!0),F[`${m.value}`]=!0,Y&&(F["is-doit"]=!0),q===d.value?F["is-active"]=!0:M==="done"?F["is-done"]=!0:M==="error"?F["is-error"]=!0:M==="half"?F["is-half"]=!0:v?F["is-disabled"]=!0:F["is-normal"]=!0,F},m=t.computed(()=>{if(l.mode==="simple")return"start";let q=l.align;return q||(l.direction==="vertical"?q="start":q="center"),q}),h=(q,M={})=>{const v={...M};return m.value==="start"&&q===p.value.length-1?v.flex="0 0 auto":l.step?l.direction==="vertical"?v.height=l.step:v.width=l.step:v.flex="1 1 100%",v},C=(q,M)=>{let v={};if(M<p.value.length-1){const Y=M+1;b(M)&&b(Y)?l.direction==="vertical"?v.height="100%":v.width="100%":v.opacity="0"}return v},A=q=>p.value.length-1===q,w=(q,M)=>{if(l.clickNavigatePolicy==="disabled"||(l.clickNavigatePolicy==="only-back"||l.clickNavigatePolicy==="only-back-reset")&&M>d.value||d.value===M)return;const v=d.value,Y=M;d.value=M,l.scroll&&ee(M);const z=Es(l,q);i("update:modelValue",z);const F={fromIndex:v,currentIndex:Y,item:q,items:p.value,clickNavigatePolicy:l.clickNavigatePolicy};i("change",z,F)},N=t.ref(!0),T=async(q,M)=>{try{const v=await c.load("stesbar",q,M);Array.isArray(v)&&(u.value=v),N.value=!1}catch(v){console.error("[FoxUI] Load StepsBar Data Fail",v),u.value=[]}setTimeout(()=>{i("loaded-data")},250)};t.watch([()=>l.data,()=>l.params],async([q,M])=>{q&&T(q,M)},{immediate:!0});const $=(q,M,v,Y,z)=>{let F=null;if(r.icon)F=r.icon({item:q,index:M,status:Y});else if(Y==="done"){const Z={};l.iconSize&&(Z.width=l.iconSize,Z.height=l.iconSize);const ne=l.icon??a;F=t.h(ne,Z)}else{const Z=v??`${M+1}`;F=t.h("span",{},[Z])}const G={class:"fox-steps-bar__icon",onClick:()=>{i("click",{item:q,index:M}),!z&&w(q,M)}};return t.h("view",G,[F])},E=(q,M,v)=>{const Y=t.h("i",{class:"fox-steps-bar__line-inner",style:C(q,M)});return t.h("view",{class:"fox-steps-bar__line"},[Y])},D=()=>{let q=null;if(r.markIcon)q=r.markIcon();else{const v={};l.iconSize&&(v.width=l.markIconSize,v.height=l.markIconSize);const Y=l.markIcon??o;q=t.h(Y,v)}return t.h("view",{class:"fox-steps-bar__mark"},[q])},P=(q,M,v,Y,z)=>{const F=[];if(!A(M)){const ne=E(q,M);F.push(ne)}const G=$(q,M,v,Y,z);F.push(G);const Z={class:"fox-steps-bar__head"};return t.h("view",Z,F)},K=(q,M,v,Y)=>{let z=null;r.main?z=r.main({item:q,index:M,status:v}):z=kp(l,q);const F={class:"fox-steps-bar__main",onClick:()=>{i("click",{item:q,index:M}),!Y&&w(q,M)}};return t.h("view",F,[z])},V=(q,M,v)=>{let Y=null;if(r.sub){Y=r.sub({item:q,index:M,status:v});const z={class:"fox-steps-bar__sub"};return t.h("view",z,[Y])}return null},I=(q,M)=>{const v=gl(l,q,M)??{},Y=v.status??hl(l,q);let z=Ds(l,q);v.disabled===!0&&(z=!0),l.disabled===!0&&(z=!0);const F=v.label??xs(l,q),G=[],Z=$(q,M,F,Y,z);Z&&G.push(Z);const ne=K(q,M,Y,z);if(ne&&G.push(ne),!A(M)){const te=E(q,M);te&&G.push(te)}const R=t.h("view",{class:"fox-steps-bar__head"},G),X=v.class,Q=v.style??{};let U=Is(l,q);v.doit===!0&&(U=!0);const J={ref:O(M),class:f(M,Y,z,U,X),style:h(M,Q)};return t.h("view",J,[R])},L=(q,M)=>{const v=gl(l,q,M)??{},Y=v.status??hl(l,q);let z=Ds(l,q);v.disabled===!0&&(z=!0),l.disabled===!0&&(z=!0);const F=v.label??xs(l,q),G=[],Z=l.layout;for(let U of Z)if(U==="head"){const J=P(q,M,F,Y,z);G.push(J)}else if(U==="main"){const J=K(q,M,Y,z);G.push(J)}else if(U==="sub"){const J=V(q,M,Y);G.push(J)}else if(U==="mark"){const J=D();G.push(J)}const ne=v.class,R=v.style??{};let X=Is(l,q);v.doit===!0&&(X=!0);const Q={ref:O(M),class:f(M,Y,z,X,ne),style:h(M,R)};return t.h("view",Q,G)},x=t.ref(),W=t.ref([]),j=(q,M)=>{W.value[M]=q},O=q=>M=>{j(M,q)},ee=(q,M)=>{const v=x.value,Y=W.value;if(!v||!Y||!Y[q])return;const z=Y[q];let F=0;l.direction==="vertical"?F=z.offsetTop-(v.offsetHeight-z.offsetHeight)/2:F=z.offsetLeft-(v.offsetWidth-z.offsetWidth)/2,H(v,F,.3,l.direction)},H=(q,M,v,Y)=>{let z=0;const F=Y==="horizontal"?q.scrollLeft:q.scrollTop,G=Math.round(v*1e3/16);function Z(){Y==="horizontal"?q.scrollLeft+=(M-F)/G:q.scrollTop+=(M-F)/G,++z<G&&Ue(Z)}Z()};return()=>{const q=[];if(l.mode==="simple")for(let v=0;v<p.value.length;v++){const Y=p.value[v],z=I(Y,v);q.push(z)}else for(let v=0;v<p.value.length;v++){const Y=p.value[v],z=L(Y,v);q.push(z)}const M={ref:x,class:y.value,style:k.value};return t.h("view",M,q)}}}}const{componentName:Bp,create:Ap,scope:Tp}=_("steps-bar"),yl=Ap(Np(Bp,Tp,le.Checklist,le.ArrowRight));function $p(e){e.stopPropagation()}class Vp{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=Ho()}open(n){Array.isArray(n)||(n=[n]),this.els=n;const a=jo(),o=(l,r,i,s)=>{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),$p(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 Ep(e,n){return new Vp(e,n)}const Dp={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]}},Ip=(e,n,a,o=!1)=>({props:{...Dp},emits:["click"],setup(l,{slots:r,emit:i}){const s=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}),u=t.computed(()=>{const m={};return ue(s.top)||(m.top=s.top),ue(s.right)||(m.right=s.right),ue(s.bottom)||(m.bottom=s.bottom),ue(s.left)||(m.left=s.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=()=>{i("click")},g=t.ref(null),S=()=>{s.top=null,s.right=null,s.bottom=null,s.left=null},b={x:0,y:0},f=Ep(m=>{if(!g.value)return;const h=g.value;S(),s.left=h.offsetLeft,s.top=h.offsetTop,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`,h.style.right=null,h.style.bottom=null,b.x=s.left,b.y=s.top},m=>{if(!g.value)return;const h=g.value;S(),s.left=b.x+m.x,s.top=b.y+m.y,h.style.left=`${s.left}px`,h.style.top=`${s.top}px`});return t.onMounted(()=>{if(l.draggable&&g.value){const m=[g.value];f.open(m)}}),t.onBeforeUnmount(()=>{l.draggable&&g.value&&f.close()}),()=>{let m=[];const h=typeof r.default=="function"?r.default():[];if(h&&h.length>0)m=h;else{const A=t.h(a,{class:p.value});m.push(A)}const C={ref:A=>{g.value=A},class:c.value,style:u.value,onClick:d};return t.h("view",C,m)}}}),{componentName:xp,create:vp,scope:qp}=_("floating-button"),bl=vp(Ip(xp,qp,le.Uploader,!1)),Pp={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 Mp(e,n,a){return{props:{...Pp},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}),i=Pe(o,"modelValue"),s=t.computed(()=>i.value?o.expandText??"":o.collapseText??""),c=t.computed(()=>({[`${e}__text`]:!0})),u=t.computed(()=>({[`${e}__icon`]:!0,"is-expand":!i.value,"is-collapse":i.value})),p=()=>{l("update:modelValue",!i.value)};return()=>{const d=[];if(s.value){const k={class:c.value},f=t.h("span",k,[s.value]);d.push(f)}const g={class:u.value},S=o.icon??a,b=t.h(S,g);return d.push(b),o.textPosition==="right"&&d.reverse(),t.h("view",{class:r.value,onClick:p},d)}}}}const{componentName:Lp,create:zp,scope:Op}=_("more-button"),kl=zp(Mp(Lp,Op,le.RectUp)),Fp={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}},Rp=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0);function Kp(e,n,a){return{props:{...Fp},setup(o,{attrs:l,slots:r}){const{toLocaleRefs:i}=ie.useFoxI18n(n),s=i(o,["confirmText","cancelText"]),c=e,u=t.ref(!0),p=C=>{u.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)}},g=()=>{d("confirm")},S=()=>{d("cancel")},b=()=>{o.closeOnClickOverlay!==!1&&d("close")},y=(C,A)=>Rp(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`]},N=y(o.icon,w);C.push(N)}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:b},N=y(o.closeIcon,w);C.push(N)}const A={class:[`${c}__header`]};return t.h("view",A,C)},f=(C,A)=>{const w=[];if(A){const T={class:`${c}__group-title`},$=t.h("view",T,[A]);w.push($)}if(C){const T=[];Array.isArray(C)||(C=[C]);for(let $ of C){const E={class:`${c}__group-row`,innerHTML:$},D=t.h("view",E);T.push(D)}if(T.length>0){const $={class:`${c}__group-rows`},E=t.h("view",$,T);w.push(E)}}if(w.length===0)return null;const N={class:`${c}__group`};return t.h("view",N,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 N=f(w);C.push(N)}else{const N=f(w.content,w.title);C.push(N)}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)},h=()=>{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 N=t.h("button",w,[o.cancelButtonText??s.cancelText.value]);C.push(N)}if(o.showConfirmButton){const w={class:[`${c}__footer-button`],style:{},onClick:g};o.confirmButtonClass&&w.class.push(o.confirmButtonClass),o.confirmButtonStyle&&typeof o.confirmButtonStyle=="object"&&Object.assign(w.style,o.confirmButtonStyle);const N=t.h("button",w,[o.confirmButtonText??s.confirmText.value]);C.push(N)}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 N=h();N&&C.push(N);const T={class:{[`${c}`]:!0,[`${c}--${o.type||"info"}`]:!0}},$=t.h("view",T,C),E=[`${c}__popup`];o.popClass&&E.push(o.popClass);const D={};o.width&&(D.width=typeof o.width=="number"?`${o.width}px`:o.width),o.height&&(D.height=typeof o.height=="number"?`${o.height}px`:o.height);const P={popClass:E.join(" "),style:D,visible:u.value,teleportDisable:!0,closeable:!1,"onUpdate:visible":p,position:o.position,round:"round",onClickOverlay:b,closeOnClickOverlay:o.closeOnClickOverlay};return t.h(a,P,{default:()=>$})}}}}const{componentName:Up,create:Hp,scope:jp}=_("messagebox"),Wp=Hp(Kp(Up,jp,me)),Yp="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",Xp="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",Qp="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",Gp="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",Zp=new In,Jp={showCancelButton:!0,cancelText:"取消",showConfirmButton:!0,confirmText:"确认"},_p=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-${Zp.get()}`;o.id=l,o.classList.add("fox-messagebox__root"),e.zIndex&&(o.style.zIndex=`${e.zIndex}`),e.unmount=()=>{const i=document.querySelector(`#${l}`);i&&i.parentNode?.removeChild(i)};const r=t.createVNode(Wp,e);n.appendChild(o),t.render(r,o)},ut={show:(e,n,a,o)=>{const l={...Jp};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=Qp:r==="warning"?l.icon=Gp:r==="error"?l.icon=Yp:l.icon=Xp),e==="alert"?(l.showCancelButton=!1,l.showConfirmButton=!0):e==="confirm"&&(l.showCancelButton=!0,l.showConfirmButton=!0),l.showClose&&!l.closeIcon&&(l.closeIcon=le.Close),new Promise((i,s)=>{const c=l.callback;l.callback=u=>{if(typeof c=="function")try{c(u)}catch(p){console.error(p)}i({action:u})},_p(l)})},alert:(e,n,a)=>ut.show("alert",e,n,a),confirm:(e,n,a)=>ut.show("confirm",e,n,a),install(e){e.config.globalProperties.$alert=ut.alert,e.config.globalProperties.$confirm=ut.confirm}},eh=(e,n,a)=>{n=n??{bubbles:!1,cancelable:!1,detail:void 0};const o=document.createEvent("Events");let l=!0,r=!0;for(let s in n)s==="bubbles"?l=!!n[s]:s==="cancelable"?r=!!n[s]:o[s]=n[s];o.initEvent(e,l,r),(a??document).dispatchEvent(o)},th=new In,nh=e=>typeof e=="string"&&(e.indexOf("/")===0||e.indexOf("./")===0||e.indexOf("data:image/")===0),oh=e=>`${e}-${th.get()}`,lh=Symbol.for("InnerPageScopeKey"),ah=Symbol.for("PageWrapperKey"),rh="FoxLeave",sh="FoxLeaveEnd",ih={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 ch(e,n,a,o){return{props:{...Fe,...ih},emits:["update:visible"],setup(l,{attrs:r,slots:i,emit:s}){t.provide(lh,!0);const c={};t.provide(ah,c);const u=w=>(typeof c.beforeClose=="function"&&c.beforeClose(),!1),p=()=>{u()},d=e,g=w=>{S.value=w,s("update:visible",w)},S=t.ref(!1),b=(w,N)=>nh(w)?(N.src=w,t.h("img",N)):typeof w=="string"?(Array.isArray(N.class)?N.class.push(w):N.class&&typeof N.class=="object"?N[`${w}`]=!0:typeof N.class=="string"?N.class=`${N.class}, ${w}`:N.class=w,t.h(l.tag,N)):t.h(w,N),y=()=>{if(!l.showHeader)return null;const w=[];if(i.header){const T=i.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 N={class:[`${d}__header`]};return t.h("view",N,w)},k=()=>{if(!l.showClose)return null;const w={class:[`${d}__close-icon`],onClick:p},N=l.closeIcon??o;return b(N,w)};let f=null;const m=w=>{eh(sh,{},f)},h=oh(e),C=()=>{g(!0)},A=()=>{if(!f)return;const w=f.querySelector(".fox-overlay");w&&(w.classList.add("overlay-fade-leave-active"),w.classList.add("overlay-fade-leave-to"));const N=f.querySelector(".fox-popup");N&&(N.classList.add(`fox-popup-slide-${l.position}-leave-active`),N.classList.add(`fox-popup-slide-${l.position}-leave-to`),N.addEventListener("animationend",m,{once:!0}),N.addEventListener("transitionend",m,{once:!0})),document.body.classList.remove("fox-overflow-hidden")};return t.onMounted(()=>{f=document.querySelector(`.${h}`),f?.addEventListener(rh,A,{once:!0}),C()}),()=>{const w=[],N=y();N&&w.push(N);const T=k();T&&w.push(T);const $=i.default?i.default():[];Reflect.apply([].push,w,$);const E={[`${d}`]:!0};l.mode&&(E[`${d}--${l.mode}`]=!0);const D={class:E},P=t.h("view",D,w),K=[`${d}__popup`,h];l.popClass&&K.push(l.popClass),l.position&&K.push(`${d}__popup--${l.position}`);const V={};l.width&&(V.width=typeof l.width=="number"?`${l.width}px`:l.width),l.height&&(V.height=typeof l.height=="number"?`${l.height}px`:l.height);const L={...Se(l,Fe),popClass:K.join(" "),style:V,visible:S.value,teleportDisable:!0,closeable:!1,position:l.position,closeOnClickOverlay:l.closeOnClickOverlay,onClickOverlay:p,"onUpdate:visible":g},x=t.h(a,L,{default:()=>P});return t.h("div",{class:[`${d}__root`,h]},[x])}}}}const{componentName:dh,create:uh,scope:fh}=_("popup-wrapper"),Sl=uh(ch(dh,fh,me,le.Close)),mh={visible:{type:Boolean},zIndex:{type:Number,default:1},popClass:{type:String},popStyle:{type:Object},closeOnClickOverlay:{type:Boolean,default:!0}};function ph(e,n,a,o){return{props:{...mh},emits:["update:visible"],setup(l,{emit:r,slots:i}){const s=c=>{r("update:visible",c)};return()=>{const c=[`${e}__popup`];l.popClass&&c.push(l.popClass);const u={popClass:c,style:l.popStyle??{},position:"top",zIndex:l.zIndex,closeOnClickOverlay:l.closeOnClickOverlay,teleportDisable:!0,visible:l.visible,"onUpdate:visible":s},p=t.h(a,u,i),d={class:`${e}`};return t.h("view",d,[p])}}}}const{componentName:hh,create:gh,scope:yh}=_("dropdown"),Cl=gh(ph(hh,yh,me)),bh={visible:{type:Boolean},reference:{type:Object},referenceInset:{type:Object},width:{type:String},offset:{type:Number,default:()=>6},placement:{type:String,default:()=>"top-start"},autoFit:{type:Boolean,default:()=>!0},title:{type:String},effect:{type:String},showArrow:{type:Boolean,default:()=>!0},arrowSize:{type:Number,default:()=>14},arrowOffset:{type:Number,default:()=>20},showOverlay:{type:Number,default:()=>!0},closeOnClick:{type:Boolean,default:()=>!0},zIndex:{type:[String,Number]},customClass:{type:[String]},customStyle:{type:[Object]},leaveHide:{type:[Boolean]}};function kh(e,n,a=!1){return{props:{...bh},emits:["update:visible"],setup(o,{emit:l,slots:r,expose:i}){const s=t.ref({top:null,right:null,bottom:null,left:null}),c=t.ref(0),u=t.ref(0),p=t.ref(0),d=t.ref(0),g=t.ref(o.placement),S=t.ref(!1),b=t.ref(!1),y=t.ref(null),k=()=>typeof o.reference=="string"?document.querySelector(o.reference):o.reference,f=(O,ee,H,q,M,v,Y,z=!0)=>{const F=document.documentElement.clientWidth||document.body.clientWidth,G=document.documentElement.clientHeight||document.body.clientHeight,Z=O.split("-");let ne=[];z?Z[0]==="top"?ne=["top","bottom","right","left"]:Z[0]==="bottom"?ne=["bottom","top","right","left"]:Z[0]==="left"?ne=["left","top","bottom","right"]:Z[0]==="right"&&(ne=["right","top","bottom","left"]):ne=[O[0]];const R={top:null,right:null,bottom:null,left:null},X=[];for(let Q=0;Q<ne.length;Q++){const U=ne[Q];if(X[0]=U,Z[1]&&(X[1]=Z[1]),U==="top"){const J=H-Y-o.arrowSize/2-o.offset;if(J>=0){R.top=J;let te=0;Z[1]==="start"?te=ee:Z[1]==="end"?te=ee+q-v:te=ee+q/2-v/2;const ae=F-te-v;ae<0?(te+=ae,h.value=-ae):h.value=0,R.left=te<0?0:te;break}}else if(U==="bottom"){const J=H+M+o.arrowSize/2+o.offset;if(J+Y<=G){R.top=J;let te=0;Z[1]==="start"?te=ee:Z[1]==="end"?te=ee+q-v:te=ee+q/2-v/2;const ae=F-te-v;ae<0?(te+=ae,h.value=-ae):h.value=0,R.left=te<0?0:te;break}}else if(U==="left"){const J=ee-v-o.arrowSize/2-o.offset;if(J>=0){R.left=J;let te=0;Z[1]==="start"?te=H:Z[1]==="end"?te=H+M-Y:te=H+M/2-Y/2,R.top=te<0?0:te;break}}else if(U==="right"){const J=ee+q+o.arrowSize/2+o.offset;if(J+v<=F){R.left=J;let te=0;Z[1]==="start"?te=H:Z[1]==="end"?te=H+M-Y:te=H+M/2-Y/2,R.top=te<0?0:te;break}}}return{bestPlacement:X.join("-"),bestInsetRect:R}},m=()=>{const O=o.visible,ee=o.autoFit;if(!Ge||O===!1)return;if(o.reference){const Y=k(),z=Po(Y);c.value=z.x,u.value=z.y,p.value=Y.offsetWidth,d.value=Y.offsetHeight}else o.referenceInset&&(c.value=o.referenceInset.left,u.value=o.referenceInset.top,p.value=o.referenceInset.right-o.referenceInset.left,d.value=o.referenceInset.bottom-o.referenceInset.top);const H=y.value.offsetWidth,q=y.value.offsetHeight,{bestPlacement:M,bestInsetRect:v}=f(o.placement,c.value,u.value,p.value,d.value,H,q,ee);g.value=M,s.value=v},h=t.ref(0),C=Ze(()=>{m()},10),A=t.ref(o.visible);t.watch([()=>o.visible],([O])=>{A.value=O,O?(S.value=O,setTimeout(()=>{m(),b.value=!0},0)):b.value=!1});const w=t.computed(()=>A.value&&N.value),N=t.ref(!0),T=Ze(O=>{const ee=O[0];ee&&(N.value=ee.isIntersecting)},10),$=new IntersectionObserver(T);t.watch([()=>o.reference,()=>o.referenceInset],([O,ee],[H,q])=>{!O&&!ee||(setTimeout(()=>{m()},0),o.autoFit&&(H&&(Mt.unwatch(H,C),$.unobserve(H)),O&&(Mt.watch(O,C),$.observe(O))))},{immediate:!0}),t.onBeforeUnmount(()=>{o.reference&&(Mt.unwatch(o.reference,C),$.unobserve(o.reference),$.disconnect())});const E=t.computed(()=>{const O={[e]:!0};return g.value.startsWith("top")?O["is-top"]=!0:g.value.startsWith("right")?O["is-right"]=!0:g.value.startsWith("bottom")?O["is-bottom"]=!0:g.value.startsWith("left")&&(O["is-left"]=!0),O[`is-${o.effect}`]=!0,!b.value&&w.value&&(O["is-opacity"]=!0),b.value&&w.value&&(O["is-show"]=!0),w.value||(O["is-hide"]=!0),o.customClass&&typeof o.customClass=="string"&&(O[`${o.customClass}`]=!0),O}),D=t.computed(()=>{const O={};return s.value.top!==null&&(O.top=`${s.value.top}px`),s.value.right!==null&&(O.right=`${s.value.right}px`),s.value.bottom!==null&&(O.bottom=`${s.value.bottom}px`),s.value.left!==null&&(O.left=`${s.value.left}px`),o.width&&(O.width=o.width),o.zIndex&&(O["z-index"]=`${o.zIndex}`),o.customStyle&&typeof o.customStyle=="object"&&Object.assign(O,o.customStyle),O}),P=()=>{A.value=!1,l("update:visible",!1)},K=()=>{if(!o.showOverlay)return null;const O={class:`${e}__overlay`,onClick:P};return t.h("div",O)},V=()=>{let O=null;return r.title?O=t.h("div",{class:`${e}__title`},{default:r.title}):o.title&&(O=t.h("div",{class:`${e}__title`},[o.title])),O},I=t.computed(()=>({[`${e}__arrow`]:!0})),L=t.computed(()=>{const O={};return o.showArrow?(O.width=`${o.arrowSize}px`,O.height=`${o.arrowSize}px`,g.value==="top"?(O.left="50%",O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="top-start"?(O.left=`${o.arrowOffset+h.value}px`,O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="top-end"?(O.right=`${o.arrowOffset-h.value}px`,O.bottom="0",O.transform="translate(-50%, 50%)"):g.value==="right"?(O.left="0",O.top="50%",O.transform="translate(-50%, -50%)"):g.value==="right-start"?(O.left="0",O.top=`${o.arrowOffset}px`,O.transform="translate(-50%, 50%)"):g.value==="right-end"?(O.left="0",O.bottom=`-${o.arrowOffset}px`,O.transform="translate(-50%, 50%)"):g.value==="bottom"?(O.left="50%",O.top="0",O.transform="translate(-50%, -50%)"):g.value==="bottom-start"?(O.left=`${o.arrowOffset+h.value}px`,O.top="0",O.transform="translate(-50%, -50%)"):g.value==="bottom-end"?(O.right=`${o.arrowOffset-h.value}px`,O.top="0",O.transform="translate(-50%, -50%)"):g.value==="left"?(O.right="0",O.top="50%",O.transform="translate(50%, -50%)"):g.value==="left-start"?(O.right="0",O.top=`${o.arrowOffset}px`,O.transform="translate(50%, -50%)"):g.value==="left-end"&&(O.right="0",O.bottom=`-${o.arrowOffset}px`,O.transform="translate(50%, -50%)"),O):{display:"none"}}),x=()=>{const O={class:I.value,style:L.value};return t.h("div",O)},W=()=>{A.value===!1&&(S.value=!1)},j=O=>{if(!y.value||A.value===!1)return;const{relatedTarget:ee}=O;y.value.contains(ee)||(A.value=!1,l("update:visible",!1))};return i({doLayout:m}),()=>{if(!S.value)return null;const O=[],ee=K();ee&&O.push(ee);const H=[],q=V();if(q&&H.push(q),r.default){const z=r.default();H.push(z)}const M=x();M&&H.push(M);const v={ref:y,class:E.value,style:D.value,onAnimationend:W};o.leaveHide&&(v.onMouseleave=j);const Y=t.h("div",v,{default:()=>H});return O.push(Y),O}}}}const{componentName:Sh,create:Ch,scope:wh}=_("popover-dialog"),wl=Ch(kh(Sh,wh,!1));function Nh(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 Bh={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 Ah(e,n,a,o=!1){return{props:{...Bh},emits:["click"],setup(l,r){const i=t.ref(null),s=t.computed(()=>{const h={[`${e}`]:!0,"is-truncated":l.truncated};return l.type&&(h[`${e}--${l.type??"default"}`]=!0),l.size&&(h[`${e}--${l.size}`]=!0),h}),c=t.computed(()=>{const h={},C=l.textColor??l.color;return C&&(h.color=C),h}),u=(h,C)=>{let A=null;if(typeof l.highlightFilter=="string"&&l.highlightFilter.length>0){const w=l.highlightFilter;if(h.indexOf(w)!==-1){const T=h.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(h);w&&(C.innerHTML=w,C.class["is-highlight"]=!0,A=t.h(l.tag,C))}return A},p=h=>{r.emit("click",h)};let d="";const g=()=>{const h=i.value;if(!h)return;const C=h.clientWidth;Nh(h,A=>{const w=h.innerHTML??"";ue(w)||A<C||(d?a?.show(h,w,{type:"text",id:d,showArrow:l.showArrow},!0):d=a?.show(h,w,{type:"text",showArrow:l.showArrow},!0)??"")})},S=()=>{d&&a?.hide(d)};let b=null;const y=h=>{b||(b=setTimeout(()=>{g(),b=null},l.showAfter??0))},k=h=>{b&&(clearTimeout(b),b=null),setTimeout(()=>{S()},l.hideAfter??0)},f=()=>{const h=i.value;h&&(h.addEventListener("mouseover",y),h.addEventListener("mouseleave",k))},m=()=>{const h=i.value;h&&(h.removeEventListener("mouseover",y),h.removeEventListener("mouseleave",k))};return t.onMounted(()=>{!be(l.showOverflowTooltip)||!a||f()}),t.onBeforeUnmount(()=>{!be(l.showOverflowTooltip)||!a||m()}),()=>{const h={onClick:p,class:s.value,style:c.value,ref:i};let C=null;if(be(l.numberFormat)&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const $=T[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=pe(l.digits),D=pe(l.decimalLength),P=be(l.autoPadding);let K=`${T[0].children}`,V=K.split("").reverse().join("");V=on(V,D,P,E,l.separator),K=V.split("").reverse().join(""),l.highlightFilter!==void 0&&(C=u(K,h)),C||(h.innerHTML=K,C=t.h(l.tag,h))}}}else{if(l.highlightFilter!==void 0&&typeof r.slots.default=="function"){const T=r.slots.default();if(Array.isArray(T)&&T.length===1){const $=T[0].type.toString();if($==="Symbol(Text)"||$==="Symbol(v-txt)"){const E=`${T[0].children}`;C=u(E,h),C||(h.innerHTML=E,C=t.h(l.tag,h))}}}C||(C=t.h(l.tag,h,{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 $={},E=l.color;E&&($.color=E);const D={class:T,style:$};w=t.h("view",D,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 $={},E=l.color;E&&($.color=E);const D={class:T,style:$};w=t.h("view",D,{default:r.slots.mark})}else{const T={[`${e}__mark`]:!0};l.type&&(T[`${e}__mark--${l.type??"default"}`]=!0);const $={},E=l.color;E&&($["background-color"]=E);const D={class:T,style:$};w=t.h("view",D)}const N={class:{"fox-text__wrap":!0,"text-left":l.textPosition==="left","text-right":l.textPosition==="right"}};return t.h("view",N,[w,C])}}}}const{componentName:Th,create:$h,scope:Vh}=_("text"),Nl=$h(Ah(Th,Vh,kt,!1));function Eh(e,n,a,o,l){let r=[];Array.isArray(e)?r=e:r=[e];const i=[],s=n[0];if(Array.isArray(e)&&!Array.isArray(s)&&!s[l]){let c=n;for(let u=0;c&&u<r.length;u++){let p=r[u],d=c.find(g=>g[o]===p);if(!d)break;i.push(d[a])}return i}if(Array.isArray(s))for(let c=0;c<n.length&&c<r.length;c++){let u=n[c],p=r[c];const d=u.find(g=>g[o]===p);if(!d)break;i.push(d[a])}else{let c=n;for(let u=0;c&&u<r.length;u++){let p=r[u],d=c.find(g=>g[o]===p);if(!d)break;i.push(d[a]),c=d[l]}}return i}class Dh{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=_e(this.proxy,n);return l===null?(console.error(`${n} component not found api function`),[]):(Ie(o)&&t.isReactive(o)&&(o=t.toRaw(o)),await l(a,o))}}function Ih(){const e=t.getCurrentInstance();return new Dh(e.proxy)}const xh={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 vh(e,n,a=!1){return{props:{...xh},setup(o,{attrs:l,slots:r}){const i=Ih(),s=t.ref([]);t.watch([()=>o.source,()=>o.params],async([p,d])=>{s.value=await i.load(o.sourceType,p,d)},{immediate:!0});const c=t.computed(()=>{if(!Array.isArray(s.value)||s.value.length===0)return"";let p=Eh(o.modelValue,s.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)}),u=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(u,p,{default:()=>c.value}):t.h(u,p,c.value)}}}}const{componentName:qh,create:Ph,scope:Mh}=_("mapping"),Bl=Ph(vh(qh,Mh,!1));function Lh(e,n){return{inheritAttrs:!1,props:{name:{type:[String],required:!1,default:""},config:{type:[Object],required:!1,default:{}}},setup(a,{slots:o}){return gr(a.name,()=>a.config),()=>typeof o.default=="function"?o.default():null}}}const{componentName:y2,create:zh,scope:b2}=_("domain-provider"),Al=zh(Lh()),Oh={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 Fh(e,n){return{inheritAttrs:!1,props:Oh,setup(a,{slots:o}){if(Ge&&window.IntersectionObserver){const l=new WeakMap;let r=new Map;const i=(g,S)=>{if(p===null){r.set(g,{visible:null,callback:S});return}l.has(g)&&p.unobserve(g),l.set(g,{visible:null,callback:S}),p.observe(g)},s=g=>{if(p===null){r.delete(g);return}l.has(g)&&(l.delete(g),p.unobserve(g))};let c=a.initialVisibleObserverSize;Qi({acquire:()=>{const g=c>0;return c--,g},get disabled(){return a.disabled},get initialHeight(){return a.initialInvisibleObserverHeight},observe:i,unobserve:s});let p=null;const d=(g,S,b)=>{p=new IntersectionObserver(y=>{for(let k of y){let f=!1;k.intersectionRatio>0&&(f=!0);const m=l.get(k.target);if(m)try{if(a.loadPolicy==="lazy"&&!f&&m.visible!==null)return;m.visible=f,m.callback(f)}catch(h){console.error(h)}}},{root:g,rootMargin:S,threshold:b}),r.forEach((y,k)=>{l.set(k,y),p?.observe(k)}),r.clear()};t.watch([()=>a.root,()=>a.disabled],([g,S])=>{if(S||!g||p)return;let b=null;typeof g=="string"?b=document.querySelector(g):b=g,b&&d(b,a.rootMargin,a.threshold)},{immediate:!0}),t.onUnmounted(()=>{p&&(p.disconnect(),p=null)})}return()=>typeof o.default=="function"?o.default():null}}}const{componentName:k2,create:Rh,scope:S2}=_("rolling-provider"),Tl=Rh(Fh()),{componentName:Kh,create:Uh}=_("cell"),Hh=Uh({components:{Right:le.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=Kh;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}}}),jh={key:0,class:"fox-cell__icon"},Wh={key:1,class:"fox-cell__title"},Yh={class:"title"},Xh={class:"fox-cell__title-desc"};function Qh(e,n,a,o,l,r){const i=t.resolveComponent("Right");return t.openBlock(),t.createElementBlock("view",{class:t.normalizeClass(e.classes),style:t.normalizeStyle(e.baseStyle),onClick:n[0]||(n[0]=(...s)=>e.handleClick&&e.handleClick(...s))},[t.renderSlot(e.$slots,"default",{},()=>[e.$slots.icon?(t.openBlock(),t.createElementBlock("view",jh,[t.renderSlot(e.$slots,"icon")])):t.createCommentVNode("",!0),e.title||e.subTitle||e.$slots.title?(t.openBlock(),t.createElementBlock("view",Wh,[e.subTitle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(e.$slots,"title",{},()=>[t.createElementVNode("view",Yh,t.toDisplayString(e.title),1)]),t.createElementVNode("view",Xh,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(i,{key:0,class:"fox-cell__link"})):t.createCommentVNode("",!0)])])],6)}const $l=oe(Hh,[["render",Qh]]),{componentName:Gh,create:Zh}=_("cell-group"),Jh=Zh({props:{title:{type:String,default:""},desc:{type:String,default:""}},setup(){return{classes:t.computed(()=>({[Gh]:!0}))}}}),_h={key:1,class:"fox-cell-group__title"},eg={key:3,class:"fox-cell-group__desc"},tg={class:"fox-cell-group__wrap"};function ng(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",_h,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",eg,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.createElementVNode("view",tg,[t.renderSlot(e.$slots,"default")])],2)}const Vl=oe(Jh,[["render",ng]]),{componentName:og,create:lg}=_("image"),ag=lg({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:le.Image,ImageError:le.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=og;return{[S]:!0,[`${S}-round`]:e.round}}),l=t.ref(null),r=t.ref(!1),i=t.ref(null),s=()=>{const S={threshold:[0],rootMargin:"0px"};l.value=new IntersectionObserver(b=>{b.forEach(y=>{y.isIntersecting&&(r.value=!0,l.value.disconnect())})},S),i.value&&l.value.observe(i.value)};t.onMounted(()=>{e.lazyLoad&&s()}),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}),u=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")},g=S=>{n("click",S)};return{...t.toRefs(a),imageClick:g,classes:o,styles:u,stylebox:c,error:d,load:p,show:r,imgRef:i}}}),rg=["src","date-src","alt"],sg={key:0,class:"fox-img-loading"},ig={key:1,class:"fox-img-error"};function cg(e,n,a,o,l,r){const i=t.resolveComponent("Image"),s=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,rg),e.loading?(t.openBlock(),t.createElementBlock("div",sg,[e.slotLoding?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(i,{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",ig,[e.slotError?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(s,{key:0,width:"16px",height:"20px",name:"imageError"})),t.renderSlot(e.$slots,"error")])):t.createCommentVNode("",!0)],6)}const El=oe(ag,[["render",cg]]),{create:dg}=_("layout"),Dl=dg({}),{componentName:ug,create:fg}=_("col"),mg=fg({props:{span:{type:[String,Number],default:"24"},offset:{type:[String,Number],default:"0"}},setup(e){const n=ug,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 pg(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 Il=oe(mg,[["render",pg]]),{componentName:hg,create:gg}=_("row"),yg=gg({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=hg;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)}