xc-workflow-ui
Version:
基于vant二次封装工作流组件库
1 lines • 49.4 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):"object"==typeof exports?exports["xc-workflow-ui"]=e(require("vue")):t["xc-workflow-ui"]=e(t.Vue)}(self,(t=>(()=>{"use strict";var e={6568:t=>{function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e,n=1;n<arguments.length;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],r=["class","style","directives"],i=["on","nativeOn"],o=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,a){for(var s in a)if(t[s])if(-1!==n.indexOf(s))t[s]=e({},t[s],a[s]);else if(-1!==r.indexOf(s)){var l=t[s]instanceof Array?t[s]:[t[s]],c=a[s]instanceof Array?a[s]:[a[s]];t[s]=[].concat(l,c)}else if(-1!==i.indexOf(s))for(var u in a[s])if(t[s][u]){var f=t[s][u]instanceof Array?t[s][u]:[t[s][u]],d=a[s][u]instanceof Array?a[s][u]:[a[s][u]];t[s][u]=[].concat(f,d)}else t[s][u]=a[s][u];else if("hook"===s)for(var h in a[s])t[s][h]=t[s][h]?o(t[s][h],a[s][h]):a[s][h];else t[s]=a[s];else t[s]=a[s];return t}),{})}},8219:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,a=void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(a)?a:String(a)),i)}var o,a}function o(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}function a(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,l(t,e,"get"))}function s(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,l(t,e,"set"),n),n}function l(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}n.d(e,{Q:()=>f});var c=new WeakMap,u=new WeakMap,f=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,c,{writable:!0,value:void 0}),o(this,u,{writable:!0,value:function(t,e){var n=t.data,r=t.code,i=t.success,o=t.msg,a=!0;return 200===r&&i||(a=!a),!a&&console.warn(o||"response parse error while using default response handle!"),a?n:e}})}var e,n,r;return e=t,(n=[{key:"registerCustomHandle",value:function(t){var e=!1;return"function"==typeof t&&(e=!0,s(this,c,t)),e}},{key:"handleResponse",value:function(t,e){return"function"==typeof a(this,c)?a(this,c).call(this,t):a(this,u).call(this,t,e)}}])&&i(e.prototype,n),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4592:(t,e,n)=>{n.d(e,{Ih:()=>i,TD:()=>r,an:()=>o,u7:()=>s,xd:()=>a});var r=function(t){return function(e){e.component(t.name,t)}},i=function(t){return{type:String,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||""}},o=function(t){return{type:Number,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||0}},a=function(t){return{type:Boolean,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||!1}},s=function(t){return{type:Array,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||[]}}},4054:(t,e,n)=>{n.d(e,{o:()=>r});var r={prop:"text",event:"change"}},3456:(t,e,n)=>{n.d(e,{m7:()=>c});var r=n(4592);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={required:(0,r.xd)(),placeholder:(0,r.Ih)(),label:(0,r.Ih)(),border:(0,r.xd)(!0),rules:(0,r.u7)(),name:(0,r.Ih)(),dictCode:(0,r.Ih)(),defaultValue:(0,r.Ih)(),editable:(0,r.xd)(!0,!1),text:[String,Number]},c=(a(a({},l),{},{maxLength:(0,r.an)(200),rows:(0,r.an)(3),showWordLimit:(0,r.xd)(),visible:(0,r.xd)(),type:(0,r.Ih)(),min:(0,r.an)(-1/0),max:(0,r.an)(1/0),storageKey:(0,r.Ih)(""),fromStorage:(0,r.xd)(!1),readonly:(0,r.xd)(!1)}),a(a({},l),{},{linkComponents:(0,r.Ih)(),refer:(0,r.Ih)(),description:(0,r.Ih)(),hideSearch:(0,r.xd)()}));a(a({},l),{},{selectCount:(0,r.an)()}),a(a({},l),{},{accept:(0,r.Ih)("*"),breakChar:(0,r.Ih)(","),visible:(0,r.xd)(),maxSize:(0,r.an)(5242880),id:[String,Number],maxCount:{type:[String,Number],default:9},text:[String,Array]}),a(a({},l),{},{type:(0,r.Ih)("date"),title:(0,r.Ih)(),format:(0,r.Ih)(),visible:(0,r.xd)(),linkComponents:(0,r.Ih)(""),calcType:(0,r.Ih)("")}),a(a({},l),{},{title:(0,r.Ih)(),parentId:(0,r.Ih)(),refer:(0,r.Ih)(),companion:(0,r.Ih)(),visible:(0,r.xd)(),selectType:(0,r.xd)(),queryParam:(0,r.Ih)(),regionId:(0,r.Ih)()}),a(a({},l),{},{latfield:(0,r.Ih)("wd"),lngfield:(0,r.Ih)("jd"),visible:(0,r.xd)(),jd:(0,r.Ih)(),wd:(0,r.Ih)(),mode:(0,r.Ih)("locate"),category:(0,r.Ih)("cateNode"),subcategory:(0,r.Ih)("subCategory"),outGridTip:(0,r.Ih)("")}),a(a({},l),{},{companion:(0,r.Ih)(),visible:(0,r.xd)()}),a(a({},l),{},{visible:(0,r.xd)()})},8789:(t,e,n)=>{n.d(e,{s:()=>r});var r=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"value";if(!t.length||!e)return"";var i=t.findIndex((function(t){return t[n]===e}));return i<0?(console.warn("dict key: ".concat(e," value not found")),{result:""}):{result:t[i][r],curDict:t[i],curIndex:i}}},2391:()=>{},2293:()=>{},1383:()=>{},5388:()=>{},6799:()=>{},677:()=>{},6629:()=>{},9233:(t,e,n)=>{n.d(e,{Z:()=>m});var r=n(9592),i=n(6568),o=n.n(i),a=n(5976),s=n(8546),l=n(6122),c=n(7692),u=n(806),f=n(1392),d=(0,a.d)("cell"),h=d[0],p=d[1];function v(t,e,n,r){var i,a=e.icon,u=e.size,d=e.title,h=e.label,v=e.value,m=e.isLink,y=n.title||(0,s.Xq)(d);function g(){if(n.label||(0,s.Xq)(h))return t("div",{class:[p("label"),e.labelClass]},[n.label?n.label():h])}var b=null!=(i=e.clickable)?i:m,S={clickable:b,center:e.center,required:e.required,borderless:!e.border};return u&&(S[u]=u),t("div",o()([{class:p(S),attrs:{role:b?"button":null,tabindex:b?0:null},on:{click:function(t){(0,l.j8)(r,"click",t),(0,c.fz)(r)}}},(0,l.ED)(r)]),[n.icon?n.icon():a?t(f.Z,{class:p("left-icon"),attrs:{name:a,classPrefix:e.iconPrefix}}):void 0,function(){if(y)return t("div",{class:[p("title"),e.titleClass],style:e.titleStyle},[n.title?n.title():t("span",[d]),g()])}(),function(){if(n.default||(0,s.Xq)(v))return t("div",{class:[p("value",{alone:!y}),e.valueClass]},[n.default?n.default():t("span",[v])])}(),function(){var r=n["right-icon"];if(r)return r();if(m){var i=e.arrowDirection;return t(f.Z,{class:p("right-icon"),attrs:{name:i?"arrow-"+i:"arrow"}})}}(),null==n.extra?void 0:n.extra()])}v.props=(0,r.Z)({},u.T,c.g2);const m=h(v)},806:(t,e,n)=>{n.d(e,{T:()=>r});var r={icon:String,size:String,center:Boolean,isLink:Boolean,required:Boolean,iconPrefix:String,titleStyle:null,titleClass:null,valueClass:null,labelClass:null,title:[Number,String],value:[Number,String],label:[Number,String],arrowDirection:String,border:{type:Boolean,default:!0},clickable:{type:Boolean,default:null}}},7132:(t,e,n)=>{n.d(e,{Z:()=>b});var r=n(6568),i=n.n(r),o=n(9592),a=n(8546);var s=n(1750),l=!a.sk&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());var c=n(8169),u=n(5566),f=n(5976),d=n(216),h=n(1392),p=n(9233),v=n(806),m=(0,f.d)("field"),y=m[0],g=m[1];const b=y({inheritAttrs:!1,provide:function(){return{vanField:this}},inject:{vanForm:{default:null}},props:(0,o.Z)({},v.T,{name:String,rules:Array,disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},autosize:[Boolean,Object],leftIcon:String,rightIcon:String,clearable:Boolean,formatter:Function,maxlength:[Number,String],labelWidth:[Number,String],labelClass:null,labelAlign:String,inputAlign:String,placeholder:String,errorMessage:String,errorMessageAlign:String,showWordLimit:Boolean,value:{type:[Number,String],default:""},type:{type:String,default:"text"},error:{type:Boolean,default:null},colon:{type:Boolean,default:null},clearTrigger:{type:String,default:"focus"},formatTrigger:{type:String,default:"onChange"}}),data:function(){return{focused:!1,validateFailed:!1,validateMessage:""}},watch:{value:function(){this.updateValue(this.value),this.resetValidation(),this.validateWithTrigger("onChange"),this.$nextTick(this.adjustSize)}},mounted:function(){this.updateValue(this.value,this.formatTrigger),this.$nextTick(this.adjustSize),this.vanForm&&this.vanForm.addField(this)},beforeDestroy:function(){this.vanForm&&this.vanForm.removeField(this)},computed:{showClear:function(){var t=this.getProp("readonly");if(this.clearable&&!t){var e=(0,a.Xq)(this.value)&&""!==this.value,n="always"===this.clearTrigger||"focus"===this.clearTrigger&&this.focused;return e&&n}},showError:function(){return null!==this.error?this.error:!!(this.vanForm&&this.vanForm.showError&&this.validateFailed)||void 0},listeners:function(){return(0,o.Z)({},this.$listeners,{blur:this.onBlur,focus:this.onFocus,input:this.onInput,click:this.onClickInput,keypress:this.onKeypress})},labelStyle:function(){var t=this.getProp("labelWidth");if(t)return{width:(0,d.N)(t)}},formValue:function(){return this.children&&(this.$scopedSlots.input||this.$slots.input)?this.children.value:this.value}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},runValidator:function(t,e){return new Promise((function(n){var r=e.validator(t,e);if((0,a.tI)(r))return r.then(n);n(r)}))},isEmptyValue:function(t){return Array.isArray(t)?!t.length:0!==t&&!t},runSyncRule:function(t,e){return(!e.required||!this.isEmptyValue(t))&&!(e.pattern&&!e.pattern.test(t))},getRuleMessage:function(t,e){var n=e.message;return(0,a.mf)(n)?n(t,e):n},runRules:function(t){var e=this;return t.reduce((function(t,n){return t.then((function(){if(!e.validateFailed){var t=e.formValue;return n.formatter&&(t=n.formatter(t,n)),e.runSyncRule(t,n)?n.validator?e.runValidator(t,n).then((function(r){!1===r&&(e.validateFailed=!0,e.validateMessage=e.getRuleMessage(t,n))})):void 0:(e.validateFailed=!0,void(e.validateMessage=e.getRuleMessage(t,n)))}}))}),Promise.resolve())},validate:function(t){var e=this;return void 0===t&&(t=this.rules),new Promise((function(n){t||n(),e.resetValidation(),e.runRules(t).then((function(){e.validateFailed?n({name:e.name,message:e.validateMessage}):n()}))}))},validateWithTrigger:function(t){if(this.vanForm&&this.rules){var e=this.vanForm.validateTrigger===t,n=this.rules.filter((function(n){return n.trigger?n.trigger===t:e}));n.length&&this.validate(n)}},resetValidation:function(){this.validateFailed&&(this.validateFailed=!1,this.validateMessage="")},updateValue:function(t,e){void 0===e&&(e="onChange"),t=(0,a.Xq)(t)?String(t):"";var n=this.maxlength;if((0,a.Xq)(n)&&t.length>n&&(t=this.value&&this.value.length===+n?this.value:t.slice(0,n)),"number"===this.type||"digit"===this.type){var r="number"===this.type;t=(0,c.uf)(t,r,r)}this.formatter&&e===this.formatTrigger&&(t=this.formatter(t));var i=this.$refs.input;i&&t!==i.value&&(i.value=t),t!==this.value&&this.$emit("input",t)},onInput:function(t){t.target.composing||this.updateValue(t.target.value)},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.$nextTick(this.adjustSize),this.getProp("readonly")&&this.blur()},onBlur:function(t){this.getProp("readonly")||(this.focused=!1,this.updateValue(this.value,"onBlur"),this.$emit("blur",t),this.validateWithTrigger("onBlur"),this.$nextTick(this.adjustSize),l&&(0,s.kn)((0,s.oD)()))},onClick:function(t){this.$emit("click",t)},onClickInput:function(t){this.$emit("click-input",t)},onClickLeftIcon:function(t){this.$emit("click-left-icon",t)},onClickRightIcon:function(t){this.$emit("click-right-icon",t)},onClear:function(t){(0,u.PF)(t),this.$emit("input",""),this.$emit("clear",t)},onKeypress:function(t){13===t.keyCode&&(this.getProp("submitOnEnter")||"textarea"===this.type||(0,u.PF)(t),"search"===this.type&&this.blur());this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if("textarea"===this.type&&this.autosize&&t){var e=(0,s.oD)();t.style.height="auto";var n=t.scrollHeight;if((0,a.Kn)(this.autosize)){var r=this.autosize,i=r.maxHeight,o=r.minHeight;i&&(n=Math.min(n,i)),o&&(n=Math.max(n,o))}n&&(t.style.height=n+"px",(0,s.kn)(e))}},genInput:function(){var t=this.$createElement,e=this.type,n=this.getProp("disabled"),r=this.getProp("readonly"),a=this.slots("input"),s=this.getProp("inputAlign");if(a)return t("div",{class:g("control",[s,"custom"]),on:{click:this.onClickInput}},[a]);var l={ref:"input",class:g("control",s),domProps:{value:this.value},attrs:(0,o.Z)({},this.$attrs,{name:this.name,disabled:n,readonly:r,placeholder:this.placeholder}),on:this.listeners,directives:[{name:"model",value:this.value}]};if("textarea"===e)return t("textarea",i()([{},l]));var c,u=e;return"number"===e&&(u="text",c="decimal"),"digit"===e&&(u="tel",c="numeric"),t("input",i()([{attrs:{type:u,inputmode:c}},l]))},genLeftIcon:function(){var t=this.$createElement;if(this.slots("left-icon")||this.leftIcon)return t("div",{class:g("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(h.Z,{attrs:{name:this.leftIcon,classPrefix:this.iconPrefix}})])},genRightIcon:function(){var t=this.$createElement,e=this.slots;if(e("right-icon")||this.rightIcon)return t("div",{class:g("right-icon"),on:{click:this.onClickRightIcon}},[e("right-icon")||t(h.Z,{attrs:{name:this.rightIcon,classPrefix:this.iconPrefix}})])},genWordLimit:function(){var t=this.$createElement;if(this.showWordLimit&&this.maxlength){var e=(this.value||"").length;return t("div",{class:g("word-limit")},[t("span",{class:g("word-num")},[e]),"/",this.maxlength])}},genMessage:function(){var t=this.$createElement;if(!this.vanForm||!1!==this.vanForm.showErrorMessage){var e=this.errorMessage||this.validateMessage;if(e){var n=this.getProp("errorMessageAlign");return t("div",{class:g("error-message",n)},[e])}}},getProp:function(t){return(0,a.Xq)(this[t])?this[t]:this.vanForm&&(0,a.Xq)(this.vanForm[t])?this.vanForm[t]:void 0},genLabel:function(){var t=this.$createElement,e=this.getProp("colon")?":":"";return this.slots("label")?[this.slots("label"),e]:this.label?t("span",[this.label+e]):void 0}},render:function(){var t,e=arguments[0],n=this.slots,r=this.getProp("disabled"),i=this.getProp("labelAlign"),o={icon:this.genLeftIcon},a=this.genLabel();a&&(o.title=function(){return a});var s=this.slots("extra");return s&&(o.extra=function(){return s}),e(p.Z,{attrs:{icon:this.leftIcon,size:this.size,center:this.center,border:this.border,isLink:this.isLink,required:this.required,clickable:this.clickable,titleStyle:this.labelStyle,valueClass:g("value"),titleClass:[g("label",i),this.labelClass],arrowDirection:this.arrowDirection},scopedSlots:o,class:g((t={error:this.showError,disabled:r},t["label-"+i]=i,t["min-height"]="textarea"===this.type&&!this.autosize,t)),on:{click:this.onClick}},[e("div",{class:g("body")},[this.genInput(),this.showClear&&e(h.Z,{attrs:{name:"clear"},class:g("clear"),on:{touchstart:this.onClear}}),this.genRightIcon(),n("button")&&e("div",{class:g("button")},[n("button")])]),this.genWordLimit(),this.genMessage()])}})},8735:(t,e,n)=>{n(6629),n(1383),n(2293),n(2391)},1392:(t,e,n)=>{n.d(e,{Z:()=>p});var r=n(6568),i=n.n(r),o=n(5976),a=n(216),s=n(6122),l=n(7937),c=(0,o.d)("icon"),u=c[0],f=c[1];var d={medel:"medal","medel-o":"medal-o","calender-o":"calendar-o"};function h(t,e,n,r){var o,c=function(t){return t&&d[t]||t}(e.name),u=function(t){return!!t&&-1!==t.indexOf("/")}(c);return t(e.tag,i()([{class:[e.classPrefix,u?"":e.classPrefix+"-"+c],style:{color:e.color,fontSize:(0,a.N)(e.size)}},(0,s.ED)(r,!0)]),[n.default&&n.default(),u&&t("img",{class:f("image"),attrs:{src:c}}),t(l.Z,{attrs:{dot:e.dot,info:null!=(o=e.badge)?o:e.info}})])}h.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],badge:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:f()}};const p=u(h)},7937:(t,e,n)=>{n.d(e,{Z:()=>d});var r=n(6568),i=n.n(r),o=n(5976),a=n(8546),s=n(6122),l=(0,o.d)("info"),c=l[0],u=l[1];function f(t,e,n,r){var o=e.dot,l=e.info,c=(0,a.Xq)(l)&&""!==l;if(o||c)return t("div",i()([{class:u({dot:o})},(0,s.ED)(r,!0)]),[o?"":e.info])}f.props={dot:Boolean,info:[Number,String]};const d=c(f)},3432:(t,e,n)=>{n.d(e,{Z:()=>p});var r=n(6568),i=n.n(r),o=n(5976),a=n(216),s=n(6122),l=(0,o.d)("loading"),c=l[0],u=l[1];function f(t,e){if("spinner"===e.type){for(var n=[],r=0;r<12;r++)n.push(t("i"));return n}return t("svg",{class:u("circular"),attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function d(t,e,n){if(n.default){var r,i={fontSize:(0,a.N)(e.textSize),color:null!=(r=e.textColor)?r:e.color};return t("span",{class:u("text"),style:i},[n.default()])}}function h(t,e,n,r){var o=e.color,l=e.size,c=e.type,h={color:o};if(l){var p=(0,a.N)(l);h.width=p,h.height=p}return t("div",i()([{class:u([c,{vertical:e.vertical}])},(0,s.ED)(r,!0)]),[t("span",{class:u("spinner",c),style:h},[f(t,e)]),d(t,e,n)])}h.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],textColor:String,type:{type:String,default:"circular"}};const p=c(h)},9045:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(5566),i=0;function o(t){var e="binded_"+i++;function n(){this[e]||(t.call(this,r.on,!0),this[e]=!0)}function o(){this[e]&&(t.call(this,r.S1,!1),this[e]=!1)}return{mounted:n,activated:n,deactivated:o,beforeDestroy:o}}},9339:(t,e,n)=>{n.d(e,{e:()=>P,M:()=>C});var r={zIndex:2e3,lockCount:0,stack:[],find:function(t){return this.stack.filter((function(e){return e.vm===t}))[0]},remove:function(t){var e=this.find(t);if(e){e.vm=null,e.overlay=null;var n=this.stack.indexOf(e);this.stack.splice(n,1)}}},i=n(9592),o=n(6568),a=n.n(o),s=n(5976),l=n(8546),c=n(6122),u=n(5566),f=(0,s.d)("overlay"),d=f[0],h=f[1];function p(t){(0,u.PF)(t,!0)}function v(t,e,n,r){var o=(0,i.Z)({zIndex:e.zIndex},e.customStyle);return(0,l.Xq)(e.duration)&&(o.animationDuration=e.duration+"s"),t("transition",{attrs:{name:"van-fade"}},[t("div",a()([{directives:[{name:"show",value:e.show}],style:o,class:[h(),e.className],on:{touchmove:e.lockScroll?p:l.ZT}},(0,c.ED)(r,!0)]),[null==n.default?void 0:n.default()])])}v.props={show:Boolean,zIndex:[Number,String],duration:[Number,String],className:null,customStyle:Object,lockScroll:{type:Boolean,default:!0}};const m=d(v);var y=n(4042),g={className:"",customStyle:{}};function b(t){return(0,c.LI)(m,{on:{click:function(){t.$emit("click-overlay"),t.closeOnClickOverlay&&(t.onClickOverlay?t.onClickOverlay():t.close())}}})}function S(t){var e=r.find(t);if(e){var n=t.$el,o=e.config,a=e.overlay;n&&n.parentNode&&n.parentNode.insertBefore(a.$el,n),(0,i.Z)(a,g,o,{show:!0})}}function w(t){var e=r.find(t);e&&(e.overlay.show=!1)}var x=n(1750),k=n(4611);function O(t){var e=void 0===t?{}:t,n=e.ref,r=e.afterPortal;return{props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var t,e,i=this.getContainer,o=n?this.$refs[n]:this.$el;i?t="string"==typeof(e=i)?document.querySelector(e):e():this.$parent&&(t=this.$parent.$el),t&&t!==o.parentNode&&t.appendChild(o),r&&r.call(this)}}}}var I={mixins:[(0,n(9045).X)((function(t,e){this.handlePopstate(e&&this.closeOnPopstate)}))],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{onPopstate:function(){this.close(),this.shouldReopen=!1},handlePopstate:function(t){this.$isServer||this.bindStatus!==t&&(this.bindStatus=t,(t?u.on:u.S1)(window,"popstate",this.onPopstate))}}},C={transitionAppear:Boolean,value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}};function P(t){return void 0===t&&(t={}),{mixins:[k.D,I,O({afterPortal:function(){this.overlay&&S()}})],provide:function(){return{vanPopup:this}},props:C,data:function(){return this.onReopenCallback=[],{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(e){var n=e?"open":"close";this.inited=this.inited||this.value,this[n](),t.skipToggleEvent||this.$emit(n)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.shouldReopen&&(this.$emit("input",!0),this.shouldReopen=!1)},beforeDestroy:function(){var t,e;t=this,(e=r.find(t))&&((0,y.Z)(e.overlay.$el),r.remove(t)),this.opened&&this.removeLock(),this.getContainer&&(0,y.Z)(this.$el)},deactivated:function(){this.value&&(this.close(),this.shouldReopen=!0)},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(r.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.addLock(),this.onReopenCallback.forEach((function(t){t()})))},addLock:function(){this.lockScroll&&((0,u.on)(document,"touchstart",this.touchStart),(0,u.on)(document,"touchmove",this.onTouchMove),r.lockCount||document.body.classList.add("van-overflow-hidden"),r.lockCount++)},removeLock:function(){this.lockScroll&&r.lockCount&&(r.lockCount--,(0,u.S1)(document,"touchstart",this.touchStart),(0,u.S1)(document,"touchmove",this.onTouchMove),r.lockCount||document.body.classList.remove("van-overflow-hidden"))},close:function(){this.opened&&(w(this),this.opened=!1,this.removeLock(),this.$emit("input",!1))},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",n=(0,x.Ob)(t.target,this.$el),r=n.scrollHeight,i=n.offsetHeight,o=n.scrollTop,a="11";0===o?a=i>=r?"00":"01":o+i>=r&&(a="10"),"11"===a||"vertical"!==this.direction||parseInt(a,2)&parseInt(e,2)||(0,u.PF)(t,!0)},renderOverlay:function(){var t=this;!this.$isServer&&this.value&&this.$nextTick((function(){t.updateZIndex(t.overlay?1:0),t.overlay?function(t,e){var n=r.find(t);if(n)n.config=e;else{var i=b(t);r.stack.push({vm:t,config:e,overlay:i})}S(t)}(t,{zIndex:r.zIndex++,duration:t.duration,className:t.overlayClass,customStyle:t.overlayStyle}):w(t)}))},updateZIndex:function(t){void 0===t&&(t=0),this.$el.style.zIndex=++r.zIndex+t},onReopen:function(t){this.onReopenCallback.push(t)}}}}},4611:(t,e,n)=>{n.d(e,{D:()=>i});var r=n(5566);var i={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var e=t.touches[0];this.deltaX=e.clientX<0?0:e.clientX-this.startX,this.deltaY=e.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY);var n,r;(!this.direction||this.offsetX<10&&this.offsetY<10)&&(this.direction=(n=this.offsetX,r=this.offsetY,n>r?"horizontal":r>n?"vertical":""))},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},bindTouchEvent:function(t){var e=this.onTouchStart,n=this.onTouchMove,i=this.onTouchEnd;(0,r.on)(t,"touchstart",e),(0,r.on)(t,"touchmove",n),i&&((0,r.on)(t,"touchend",i),(0,r.on)(t,"touchcancel",i))}}}},4755:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(5976),i=n(8546),o=n(9339),a=n(1392),s=(0,r.d)("popup"),l=s[0],c=s[1];const u=l({mixins:[(0,o.e)()],props:{round:Boolean,duration:[Number,String],closeable:Boolean,transition:String,safeAreaInsetBottom:Boolean,closeIcon:{type:String,default:"cross"},closeIconPosition:{type:String,default:"top-right"},position:{type:String,default:"center"},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},beforeCreate:function(){var t=this,e=function(e){return function(n){return t.$emit(e,n)}};this.onClick=e("click"),this.onOpened=e("opened"),this.onClosed=e("closed")},methods:{onClickCloseIcon:function(t){this.$emit("click-close-icon",t),this.close()}},render:function(){var t,e=arguments[0];if(this.shouldRender){var n=this.round,r=this.position,o=this.duration,s="center"===r,l=this.transition||(s?"van-fade":"van-popup-slide-"+r),u={};if((0,i.Xq)(o))u[s?"animationDuration":"transitionDuration"]=o+"s";return e("transition",{attrs:{appear:this.transitionAppear,name:l},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[e("div",{directives:[{name:"show",value:this.value}],style:u,class:c((t={round:n},t[r]=r,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&e(a.Z,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:c("close-icon",this.closeIconPosition),on:{click:this.onClickCloseIcon}})])])}}})},5976:(t,e,n)=>{function r(t,e){return e?"string"==typeof e?" "+t+"--"+e:Array.isArray(e)?e.reduce((function(e,n){return e+r(t,n)}),""):Object.keys(e).reduce((function(n,i){return n+(e[i]?r(t,i):"")}),""):""}function i(t){return function(e,n){return e&&"string"!=typeof e&&(n=e,e=""),""+(e=e?t+"__"+e:t)+r(e,n)}}n.d(e,{d:()=>b});var o=n(8546),a=n(4873),s={methods:{slots:function(t,e){void 0===t&&(t="default");var n=this.$slots,r=this.$scopedSlots[t];return r?r(e):n[t]}}},l=n(1895),c=n.n(l);function u(t){var e=this.name;t.component(e,this),t.component((0,a._)("-"+e),this)}function f(t){return{functional:!0,props:t.props,model:t.model,render:function(e,n){return t(e,n.props,function(t){var e=t.scopedSlots||t.data.scopedSlots||{},n=t.slots();return Object.keys(n).forEach((function(t){e[t]||(e[t]=function(){return n[t]})})),e}(n),n)}}}function d(t){return function(e){return(0,o.mf)(e)&&(e=f(e)),e.functional||(e.mixins=e.mixins||[],e.mixins.push(s)),e.name=t,e.install=u,e}}var h=Object.prototype.hasOwnProperty;function p(t,e){return Object.keys(e).forEach((function(n){!function(t,e,n){var r=e[n];(0,o.Xq)(r)&&(h.call(t,n)&&(0,o.Kn)(r)?t[n]=p(Object(t[n]),e[n]):t[n]=r)}(t,e,n)})),t}var v=c().prototype,m=c().util.defineReactive;m(v,"$vantLang","zh-CN"),m(v,"$vantMessages",{"zh-CN":{name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",nameInvalid:"请输入正确的姓名",confirmDelete:"确定要删除吗",telInvalid:"请输入正确的手机号",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:function(t,e){return t+"年"+e+"月"},rangePrompt:function(t){return"选择天数不能超过 "+t+" 天"}},vanCascader:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:function(t){return t+"折"},condition:function(t){return"满"+t+"元可用"}},vanCouponCell:{title:"优惠券",tips:"暂无可用",count:function(t){return t+"张可用"}},vanCouponList:{empty:"暂无优惠券",exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码格式不正确",defaultAddress:"设为默认收货地址",telPlaceholder:"收货人手机号",namePlaceholder:"收货人姓名",areaPlaceholder:"选择省 / 市 / 区"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌、楼层房间号等信息"},vanAddressList:{add:"新增地址"}}});const y={messages:function(){return v.$vantMessages[v.$vantLang]},use:function(t,e){var n;v.$vantLang=t,this.add(((n={})[t]=e,n))},add:function(t){void 0===t&&(t={}),p(v.$vantMessages,t)}};function g(t){var e=(0,a._)(t)+".";return function(t){for(var n=y.messages(),r=(0,o.U2)(n,e+t)||(0,o.U2)(n,t),i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return(0,o.mf)(r)?r.apply(void 0,a):r}}function b(t){return[d(t="van-"+t),i(t),g(t)]}},5566:(t,e,n)=>{n.d(e,{PF:()=>l,S1:()=>s,on:()=>a});var r=n(8546),i=!1;if(!r.sk)try{var o={};Object.defineProperty(o,"passive",{get:function(){i=!0}}),window.addEventListener("test-passive",null,o)}catch(t){}function a(t,e,n,o){void 0===o&&(o=!1),r.sk||t.addEventListener(e,n,!!i&&{capture:!1,passive:o})}function s(t,e,n){r.sk||t.removeEventListener(e,n)}function l(t,e){("boolean"!=typeof t.cancelable||t.cancelable)&&t.preventDefault(),e&&function(t){t.stopPropagation()}(t)}},4042:(t,e,n)=>{function r(t){var e=t.parentNode;e&&e.removeChild(t)}n.d(e,{Z:()=>r})},1750:(t,e,n)=>{n.d(e,{Ob:()=>i,kn:()=>s,oD:()=>a});var r=/scroll|auto|overlay/i;function i(t,e){void 0===e&&(e=window);for(var n=t;n&&"HTML"!==n.tagName&&"BODY"!==n.tagName&&1===n.nodeType&&n!==e;){var i=window.getComputedStyle(n).overflowY;if(r.test(i))return n;n=n.parentNode}return e}function o(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)}function a(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function s(t){o(window,t),o(document.body,t)}},8169:(t,e,n)=>{function r(t,e,n){var r=t.indexOf(e),i="";return-1===r?t:"-"===e&&0!==r?t.slice(0,r):("."===e&&t.match(/^(\.|-\.)/)&&(i=r?"-0":"0"),i+t.slice(0,r+1)+t.slice(r).replace(n,""))}function i(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!0),t=e?r(t,".",/\./g):t.split(".")[0];var i=e?/[^-0-9.]/g:/[^-0-9]/g;return(t=n?r(t,"-",/-/g):t.replace(/-/,"")).replace(i,"")}n.d(e,{uf:()=>i})},4873:(t,e,n)=>{n.d(e,{_:()=>i});var r=/-(\w)/g;function i(t){return t.replace(r,(function(t,e){return e.toUpperCase()}))}},216:(t,e,n)=>{n.d(e,{N:()=>o});var r=n(8546),i=n(139);function o(t){if((0,r.Xq)(t))return t=String(t),(0,i.k)(t)?t+"px":t}},6122:(t,e,n)=>{n.d(e,{ED:()=>l,LI:()=>u,j8:()=>c});var r=n(9592),i=n(1895),o=n.n(i),a=["ref","key","style","class","attrs","refInFor","nativeOn","directives","staticClass","staticStyle"],s={nativeOn:"on"};function l(t,e){var n=a.reduce((function(e,n){return t.data[n]&&(e[s[n]||n]=t.data[n]),e}),{});return e&&(n.on=n.on||{},(0,r.Z)(n.on,t.data.on)),n}function c(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=t.listeners[e];o&&(Array.isArray(o)?o.forEach((function(t){t.apply(void 0,r)})):o.apply(void 0,r))}function u(t,e){var n=new(o())({el:document.createElement("div"),props:t.props,render:function(n){return n(t,(0,r.Z)({props:this.$props},e))}});return document.body.appendChild(n.$el),n}},8546:(t,e,n)=>{n.d(e,{Kn:()=>l,U2:()=>u,Xq:()=>a,ZT:()=>o,mf:()=>s,sk:()=>i,tI:()=>c});var r=n(1895),i=n.n(r)().prototype.$isServer;function o(){}function a(t){return null!=t}function s(t){return"function"==typeof t}function l(t){return null!==t&&"object"==typeof t}function c(t){return l(t)&&s(t.then)&&s(t.catch)}function u(t,e){var n=e.split("."),r=t;return n.forEach((function(t){var e;r=l(r)&&null!=(e=r[t])?e:""})),r}},7692:(t,e,n)=>{function r(t){!function(t,e){var n=e.to,r=e.url,i=e.replace;if(n&&t){var o=t[i?"replace":"push"](n);o&&o.catch&&o.catch((function(t){if(t&&!function(t){return"NavigationDuplicated"===t.name||t.message&&-1!==t.message.indexOf("redundant navigation")}(t))throw t}))}else r&&(i?location.replace(r):location.href=r)}(t.parent&&t.parent.$router,t.props)}n.d(e,{fz:()=>r,g2:()=>i});var i={url:String,replace:Boolean,to:[String,Object]}},139:(t,e,n)=>{function r(t){return/^\d+(\.\d+)?$/.test(t)}n.d(e,{k:()=>r})},1900:(t,e,n)=>{function r(t,e,n,r,i,o,a,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,l):[l]}return{exports:t,options:c}}n.d(e,{Z:()=>r})},1895:e=>{e.exports=t},9592:(t,e,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:()=>r})}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};return(()=>{r.d(i,{default:()=>D});var t=r(4592),e=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-field",{staticClass:"xc-collect-field",class:{"xc-collect-field--elder":t.isElder},attrs:{value:t.result,label:t.label,placeholder:t.placeholder,required:t.required,border:t.border,rules:t.rules,name:t.name,"label-class":"xc-collect-field__label",readonly:""},on:{click:t.selectData}}),t._v(" "),n("van-action-sheet",{style:t.responsiveStyle,attrs:{actions:t.filterActions,description:t.description||t.placeholder,"cancel-text":"取消","close-on-click-action":"",round:""},on:{select:t.onSelect},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[t.hideSearch?t._e():n("van-search",{attrs:{slot:"description",placeholder:"搜索"+t.label,shape:"round"},on:{input:t.handleSearchAction,clear:t.handleSearchAction},slot:"description",model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}}),t._v(" "),t.filterActions.length||t.hideSearch?t._e():n("van-empty",{attrs:{image:"search",description:"没有找到对应的选项"}})],1)],1)};e._withStripped=!0;r(6629),r(6799),r(1383),r(2293),r(677),r(5388);var n=r(9592),o=r(6568),a=r.n(o),s=r(1895),l=r.n(s),c=r(5976),u=r(6122),f=r(9339),d=r(1392),h=r(4755),p=r(3432),v=(0,c.d)("action-sheet"),m=v[0],y=v[1];function g(t,e,n,r){var i=e.title,o=e.cancelText,s=e.closeable;function c(){(0,u.j8)(r,"input",!1),(0,u.j8)(r,"cancel")}return t(h.Z,a()([{class:y(),attrs:{position:"bottom",round:e.round,value:e.value,overlay:e.overlay,duration:e.duration,lazyRender:e.lazyRender,lockScroll:e.lockScroll,getContainer:e.getContainer,closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay,safeAreaInsetBottom:e.safeAreaInsetBottom}},(0,u.ED)(r,!0)]),[function(){if(i)return t("div",{class:y("header")},[i,s&&t(d.Z,{attrs:{name:e.closeIcon},class:y("close"),on:{click:c}})])}(),function(){var r=(null==n.description?void 0:n.description())||e.description;if(r)return t("div",{class:y("description")},[r])}(),t("div",{class:y("content")},[e.actions&&e.actions.map((function(n,i){var o=n.disabled,a=n.loading,s=n.callback;return t("button",{attrs:{type:"button"},class:[y("item",{disabled:o,loading:a}),n.className],style:{color:n.color},on:{click:function(t){t.stopPropagation(),o||a||(s&&s(n),e.closeOnClickAction&&(0,u.j8)(r,"input",!1),l().nextTick((function(){(0,u.j8)(r,"select",n,i)})))}}},[a?t(p.Z,{class:y("loading-icon")}):[t("span",{class:y("name")},[n.name]),n.subname&&t("div",{class:y("subname")},[n.subname])]])})),null==n.default?void 0:n.default()]),function(){if(o)return[t("div",{class:y("gap")}),t("button",{attrs:{type:"button"},class:y("cancel"),on:{click:c}},[o])]}()])}g.props=(0,n.Z)({},f.M,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnPopstate:Boolean,closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});const b=m(g);r(8735);var S=r(7132),w=r(3456),x=r(8789),k=r(4054),O=r(8219);function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}var C=["dictValue"];function P(){P=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new L(r||[]);return i(a,"_invoke",{value:j(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",m={};function y(){}function g(){}function b(){}var S={};c(S,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(A([])));x&&x!==n&&r.call(x,a)&&(S=x);var k=b.prototype=y.prototype=Object.create(S);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,o,a,s){var l=f(t[i],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==I(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function j(e,n,r){var i=d;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=E(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=f(e,n,r);if("normal"===c.type){if(i=r.done?v:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=v,r.method="throw",r.arg=c.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(I(e)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=c(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(C.prototype),c(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(k),c(k,l,"Generator"),c(k,a,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),$(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;$(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function j(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return E(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){L(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function L(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==I(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===I(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function N(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function B(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){N(o,r,i,a,s,"next",t)}function s(t){N(o,r,i,a,s,"throw",t)}a(void 0)}))}}const _={name:"XcActionSheet",components:{VanField:S.Z,VanActionSheet:b},model:k.o,props:w.m7,inject:["loadDict","isElder"],data:function(){return{visible:!1,actions:[],result:"",chosenItemIndex:-1,filterActions:[],filterText:"",responsiveStyle:{"max-height":"80%"}}},watch:{text:function(t,e){var n=this.actions,r=n.find((function(t){return t.color}));(r&&(r.color=""),t)?n.find((function(e){return e.dictKey===t})).color="#428FFC":(this.result="",this.chosenItemIndex=-1)}},methods:{handleSearchAction:function(t){var e=this.filterText;this.filterActions=this.actions.filter((function(t){return t.dictValue.includes(e)}))},onSelect:function(t){var e=t.dictValue,n=t.dictKey;this.result=e,this.$emit("change",n)},onChoose:function(t,e){this.chosenItemIndex=e,this.onSelect(t)},selectData:function(){this.editable&&(this.visible=!0)},loadData:function(){var t=this;return B(P().mark((function e(){var n,r,i,o,a,s,l,c;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dictCode,r=t.loadDict,i=t.defaultValue,e.t0=new O.Q,e.next=4,r(n);case 4:e.t1=e.sent,o=e.t0.handleResponse.call(e.t0,e.t1),a=(0,x.s)(o,i,"dictKey","dictValue"),s=a.result,l=a.curDict,c=a.curIndex,s&&o.length<=8&&t.onChoose(l,c),t.actions=o.map((function(t){var e=t.dictValue;return $($({},A(t,C)),{},{dictValue:e,name:e,color:""})})),t.filterActions=j(t.actions);case 10:case"end":return e.stop()}}),e)})))()},handleScrollToView:function(){var t=this;if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){var e=window.innerHeight-window.visualViewport.height;this.$nextTick((function(){t.responsiveStyle={"max-height":"calc(80% - ".concat(e,"px)"),bottom:"".concat(e,"px")}}))}}},mounted:function(){var t=this;return B(P().mark((function e(){var n,r,i,o,a,s;return P().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.visualViewport.addEventListener("scroll",t.handleScrollToView),e.next=3,t.loadData();case 3:if(n=t.text,r=t.actions,n){e.next=6;break}return e.abrupt("return");case 6:if(-1!==(i=r.findIndex((function(t){return t.dictKey===n})))){e.next=11;break}return t.$emit("change",""),console.warn("字典匹配失败!"),e.abrupt("return");case 11:o=r[i],a=o.dictValue,s=o.dictKey,r[i].color="#428FFC",t.result=a,t.chosenItemIndex=i,t.$emit("change",s);case 16:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){window.visualViewport.removeEventListener("scroll",this.handleScrollToView)}};const F=(0,r(1900).Z)(_,e,[],!1,null,"4701e2a1",null).exports;F.install=(0,t.TD)(F);const D=F})(),i=i.default})()));