xc-workflow-ui
Version:
基于vant二次封装工作流组件库
1 lines • 118 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("lamejs"),require("xczg-map")):"function"==typeof define&&define.amd?define(["vue",,],e):"object"==typeof exports?exports["xc-workflow-ui"]=e(require("vue"),require("lamejs"),require("xczg-map")):t["xc-workflow-ui"]=e(t.Vue,t.lamejs,t["xczg-map"])}(self,((t,e,r)=>(()=>{var n={5291:(t,e,r)=>{var n={"./add_pic.png":9573,"./audio.png":2796,"./audio_icon.png":745,"./location-text-prefix.png":8909,"./location_blue.png":1407,"./voice1.png":9844,"./voice2.png":1285,"./voice_play.png":392};function o(t){var e=i(t);return r(e)}function i(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}o.keys=function(){return Object.keys(n)},o.resolve=i,t.exports=o,o.id=5291},6568:t=>{"use strict";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e,r=1;r<arguments.length;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},e.apply(this,arguments)}var r=["attrs","props","domProps"],n=["class","style","directives"],o=["on","nativeOn"],i=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!==r.indexOf(s))t[s]=e({},t[s],a[s]);else if(-1!==n.indexOf(s)){var c=t[s]instanceof Array?t[s]:[t[s]],u=a[s]instanceof Array?a[s]:[a[s]];t[s]=[].concat(c,u)}else if(-1!==o.indexOf(s))for(var l in a[s])if(t[s][l]){var A=t[s][l]instanceof Array?t[s][l]:[t[s][l]],h=a[s][l]instanceof Array?a[s][l]:[a[s][l]];t[s][l]=[].concat(A,h)}else t[s][l]=a[s][l];else if("hook"===s)for(var f in a[s])t[s][f]=t[s][f]?i(t[s][f],a[s][f]):a[s][f];else t[s]=a[s];else t[s]=a[s];return t}),{})}},8219:(t,e,r)=>{"use strict";function n(t){return n="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},n(t)}function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(i=o.key,a=void 0,a=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===n(a)?a:String(a)),o)}var i,a}function i(t,e,r){!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,r)}function a(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,c(t,e,"get"))}function s(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,c(t,e,"set"),r),r}function c(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}r.d(e,{Q:()=>A});var u=new WeakMap,l=new WeakMap,A=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,u,{writable:!0,value:void 0}),i(this,l,{writable:!0,value:function(t,e){var r=t.data,n=t.code,o=t.success,i=t.msg,a=!0;return 200===n&&o||(a=!a),!a&&console.warn(i||"response parse error while using default response handle!"),a?r:e}})}var e,r,n;return e=t,(r=[{key:"registerCustomHandle",value:function(t){var e=!1;return"function"==typeof t&&(e=!0,s(this,u,t)),e}},{key:"handleResponse",value:function(t,e){return"function"==typeof a(this,u)?a(this,u).call(this,t):a(this,l).call(this,t,e)}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4592:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.d(e,{Hl:()=>h,Ih:()=>a,JT:()=>l,Jx:()=>A,TD:()=>i,ey:()=>c,kl:()=>f,u7:()=>u,xd:()=>s});var i=function(t){return function(e){e.component(t.name,t)}},a=function(t){return{type:String,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||""}},s=function(t){return{type:Boolean,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||!1}},c=function(t){return{type:Function,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||function(){}}},u=function(t){return{type:Array,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||[]}},l=function(t){return t.sort((function(t,e){return t.propertyOrder?e.propertyOrder?t.propertyOrder-e.propertyOrder:-1:1}))},A=function(t){var e=[];return t.forEach((function(t,r){var o=n(t,1)[0],i=o.groupOrder,a=o.groupName;e.push({groupOrder:i,groupName:a})})),e.sort((function(t,e){return t.groupOrder?e.groupOrder?t.groupOrder-e.groupOrder:-1:1})).map((function(e){var r=e.groupName;return[r,l(t.get(r))]}))},h="其他信息",f="基本信息"},5891:(t,e,r)=>{"use strict";r.d(e,{EX:()=>o,JR:()=>n});r(4130);var n=function(t){t=Math.round(t);var e=parseInt(t/60/60%24);e=e<10?"0"+e:e;var r=parseInt(t/60%60);r=r<10?"0"+r:r;var n=parseInt(t%60);return e+":"+r+":"+(n=n<10?"0"+n:n)},o=","},6618:(t,e,r)=>{"use strict";r.d(e,{BP:()=>c,Io:()=>A,X9:()=>l,ak:()=>h});var n=r(4592);function o(t){return o="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},o(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c="暂无数据",u={title:{type:String,default:""},propertyName:{type:String,default:""},componentType:{type:String,default:""},formValue:{type:String,default:""}},l=(a(a({},u),{},{fieldName:(0,n.Ih)(""),fromStorage:(0,n.xd)(!1)}),a(a({},u),{},{dictCode:{type:String,default:""}}),a(a({},u),{},{mediaType:(0,n.Ih)("",!0),formValue:(0,n.u7)([],!0)})),A=a(a({},u),{},{formValue:(0,n.u7)([],!0)}),h=a(a({},u),{},{center:(0,n.u7)([]),mobileMapSource:(0,n.Ih)(),gridName:(0,n.Ih)(),districtName:(0,n.Ih)(),townName:(0,n.Ih)(),villageName:(0,n.Ih)(),regionName:(0,n.Ih)(),gridCode:(0,n.Ih)()})},9899:(t,e,r)=>{"use strict";r.d(e,{default:()=>N});var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return"1"===t.mediaType?r("base-image",{attrs:{images:t.mediaSource}}):"2"===t.mediaType?r("base-video",{attrs:{videos:t.mediaSource}}):"3"===t.mediaType?r("base-file",{attrs:{files:t.mediaSource}}):r("van-empty",{attrs:{image:"https://img01.yzcdn.cn/vant/custom-empty-image.png",description:"暂无数据","image-size":"50"}})};n._withStripped=!0;r(6629);var o=r(5976),i=r(216),a="van-empty-network-";const s={render:function(){var t=arguments[0],e=function(e,r,n){return t("stop",{attrs:{"stop-color":e,offset:r+"%","stop-opacity":n}})};return t("svg",{attrs:{viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{id:a+"1",x1:"64.022%",y1:"100%",x2:"64.022%",y2:"0%"}},[e("#FFF",0,.5),e("#F2F3F5",100)]),t("linearGradient",{attrs:{id:a+"2",x1:"50%",y1:"0%",x2:"50%",y2:"84.459%"}},[e("#EBEDF0",0),e("#DCDEE0",100,0)]),t("linearGradient",{attrs:{id:a+"3",x1:"100%",y1:"0%",x2:"100%",y2:"100%"}},[e("#EAEDF0",0),e("#DCDEE0",100)]),t("linearGradient",{attrs:{id:a+"4",x1:"100%",y1:"100%",x2:"100%",y2:"0%"}},[e("#EAEDF0",0),e("#DCDEE0",100)]),t("linearGradient",{attrs:{id:a+"5",x1:"0%",y1:"43.982%",x2:"100%",y2:"54.703%"}},[e("#EAEDF0",0),e("#DCDEE0",100)]),t("linearGradient",{attrs:{id:a+"6",x1:"94.535%",y1:"43.837%",x2:"5.465%",y2:"54.948%"}},[e("#EAEDF0",0),e("#DCDEE0",100)]),t("radialGradient",{attrs:{id:a+"7",cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54835 0 .5 -.5)"}},[e("#EBEDF0",0),e("#FFF",100,0)])]),t("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[t("g",{attrs:{opacity:".8"}},[t("path",{attrs:{d:"M0 124V46h20v20h14v58H0z",fill:"url(#"+a+"1)",transform:"matrix(-1 0 0 1 36 7)"}}),t("path",{attrs:{d:"M121 8h22.231v14H152v77.37h-31V8z",fill:"url(#"+a+"1)",transform:"translate(2 7)"}})]),t("path",{attrs:{fill:"url(#"+a+"7)",d:"M0 139h160v21H0z"}}),t("path",{attrs:{d:"M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",fill:"url(#"+a+"2)","fill-rule":"nonzero",transform:"translate(43 36)"}}),t("g",{attrs:{opacity:".6","stroke-linecap":"round","stroke-width":"7"}},[t("path",{attrs:{d:"M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+a+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+a+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+a+"4)",transform:"rotate(-180 76.483 42.257)"}}),t("path",{attrs:{d:"M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+a+"4)",transform:"rotate(-180 89.791 42.146)"}})]),t("g",{attrs:{transform:"translate(31 105)","fill-rule":"nonzero"}},[t("rect",{attrs:{fill:"url(#"+a+"5)",width:"98",height:"34",rx:"2"}}),t("rect",{attrs:{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.114"}}),t("rect",{attrs:{fill:"url(#"+a+"6)",x:"15",y:"12",width:"18",height:"6",rx:"1.114"}})])])])}};var c=(0,o.d)("empty"),u=c[0],l=c[1],A=["error","search","default"];const h=u({props:{imageSize:[Number,String],description:String,image:{type:String,default:"default"}},methods:{genImageContent:function(){var t=this.$createElement,e=this.slots("image");if(e)return e;if("network"===this.image)return t(s);var r=this.image;return-1!==A.indexOf(r)&&(r="https://img01.yzcdn.cn/vant/empty-image-"+r+".png"),t("img",{attrs:{src:r}})},genImage:function(){var t=this.$createElement,e={width:(0,i.N)(this.imageSize),height:(0,i.N)(this.imageSize)};return t("div",{class:l("image"),style:e},[this.genImageContent()])},genDescription:function(){var t=this.$createElement,e=this.slots("description")||this.description;if(e)return t("p",{class:l("description")},[e])},genBottom:function(){var t=this.$createElement,e=this.slots();if(e)return t("div",{class:l("bottom")},[e])}},render:function(){return(0,arguments[0])("div",{class:l()},[this.genImage(),this.genDescription(),this.genBottom()])}});var f=r(6618),d=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"base-image__container"},t._l(t.images,(function(e,n){return r("van-image",{key:n,attrs:{src:e,fit:"cover",radius:"4"},on:{click:function(e){return t.handleImgClick(t.images,n)}}})})),1)};d._withStripped=!0;r(6799),r(1383),r(2293),r(8010),r(677),r(5388),r(9415),r(2254),r(6018);var p=r(2685);const m={name:"BaseImage",components:{VanImage:r(4951).Z},props:{images:{type:Array,required:!0}},methods:{handleImgClick:function(t,e){(0,p.Z)({images:t,closeable:!0,startPosition:e})}}};var v=r(1900);const g=(0,v.Z)(m,d,[],!1,null,"858e04ea",null).exports;var y=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"base-video__container"},t._l(t.videos,(function(t,e){return r("video",{key:e,attrs:{src:t,controls:""}})})),0)};y._withStripped=!0;const w={name:"BaseVideo",props:{videos:{type:Array,required:!0}}};const b=(0,v.Z)(w,y,[],!1,null,null,null).exports;var B=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"base-file__container"},t._l(t.wrapperFiles,(function(e,n){var o=e.fileName,i=e.fileUrl,a=e.iconName;return r("div",{key:n},[r("van-icon",{attrs:{name:a+"-o"}}),t._v(" "),r("a",{attrs:{href:i,download:"fileName"}},[t._v(t._s(o))])],1)})),0)};B._withStripped=!0;r(3307);var S=r(1392),x=["xbm","tif","pjp","svgz","jpg","jpeg","ico","tiff","gif","svg","jfif","webp","png","bmp","pjpeg","avif"],E=["mpg","mpeg","avi","rm","rmvb","mov","wmv","asf","dat","asx","wvx","mpe","mpa","mp4"];function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const j={name:"BaseFile",components:{VanIcon:S.Z},props:{files:{type:Array,required:!0}},computed:{wrapperFiles:function(){return this.files.map((function(t){var e=C(t.split("/").reverse(),1)[0],r=C(e.split("."),2),n=(r[0],r[1]);return{fileUrl:t,fileName:e,iconName:E.includes(n)?"video":x.includes(n)?"photo":"orders"}}))}}};const k={name:"XcAttachment",components:{BaseImage:g,BaseVideo:b,BaseFile:(0,v.Z)(j,B,[],!1,null,null,null).exports,VanEmpty:h},props:f.X9,computed:{mediaSource:function(){return this.formValue.map((function(t){return t.link}))}}};const O=(0,v.Z)(k,n,[],!1,null,"0a755320",null).exports;var I=r(4592);O.install=(0,I.TD)(O);const N=O},9952:(t,e,r)=>{"use strict";r.d(e,{default:()=>h});var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"xc-audio__content"},t._l(t.list,(function(e,o){return n("div",{key:e.url,staticClass:"xc-audio__content__item",on:{click:function(r){return t.audionPlay(e)}}},[n("audio",{ref:"audio-Show_"+o,refInFor:!0,attrs:{controls:"",src:e.url,hidden:"false"}}),t._v(" "),e.text?n("van-popover",{attrs:{placement:"top-start",theme:"dark"},scopedSlots:t._u([{key:"reference",fn:function(){return[n("img",{staticStyle:{"margin-top":"3.75vw"},attrs:{src:r(5291)("./"+(e.underway?"voice_play":"audio_icon")+".png")},on:{click:function(r){return t.showVoiceText(e)}}})]},proxy:!0}],null,!0),model:{value:e.showText,callback:function(r){t.$set(e,"showText",r)},expression:"item.showText"}},[n("div",{staticClass:"voice-text"},[t._v(t._s(e.text))])]):n("img",{attrs:{src:r(5291)("./"+(e.underway?"voice_play":"audio_icon")+".png")}}),t._v(" "),n("span",{ref:"audio-time_"+o,refInFor:!0},[t._v("\n "+t._s(e.time)+"\n ")])],1)})),0)};n._withStripped=!0;var o=r(6618),i=r(5891);function a(t){return a="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},a(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function A(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{A({},"")}catch(t){A=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),s=new N(n||[]);return o(a,"_invoke",{value:j(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function y(){}function w(){}function b(){}var B={};A(B,c,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(M([])));x&&x!==r&&n.call(x,c)&&(B=x);var E=b.prototype=y.prototype=Object.create(B);function C(t){["next","throw","return"].forEach((function(e){A(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function r(o,i,s,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,A=l.value;return A&&"object"==a(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(A).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=d;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=k(s,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?v:p,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=A(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,A(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(D.prototype),A(D.prototype,u,(function(){return this})),e.AsyncIterator=D,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new D(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),A(E,l,"Generator"),A(E,c,(function(){return this})),A(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,N.prototype={constructor:N,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(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function c(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}const u={name:"XcAudio",inject:["isElder"],props:o.Io,data:function(){return{list:[],countDown:null,startTimeStamp:0}},methods:{audionPlay:function(t){var e=this;console.log("开始播放录音"),this.list.forEach((function(r,n){var o=e.$refs["audio-Show_"+n][0];t.url===r.url?r.underway?(e.commence(o.duration,!1,"audio-time_".concat(n)),o.load(),r.underway=!1):(o.play(),r.underway=!0,e.commence(o.duration,r.underway,"audio-time_".concat(n)),o.onended=function(){r.underway=!1}):(e.$refs["audio-time_".concat(n)][0].innerText=(0,i.JR)(o.duration),o.load(),r.underway=!1)})),this.showVoiceText(t)},commence:function(t,e,r){var n=this,o=t;if(e){var a=!1;clearInterval(this.countDown),this.countDown=setInterval((function(){(t-=1)<-1&&(t=0,clearInterval(n.countDown),a=!0),n.$refs["".concat(r)][0].innerText=a?(0,i.JR)(o):(0,i.JR)(t)}),1e3)}else clearInterval(this.countDown),this.countDown=null,this.$refs["".concat(r)][0].innerText=(0,i.JR)(t)},showVoiceText:function(t){this.$set(t,"showText",!0)}},mounted:function(){var t=this;this.list=this.formValue.map((function(t){return{url:t.link,time:"0",underway:!1,text:t.voiceText}})),this.$nextTick((function(){t.list.forEach((function(e,r){var n=t.$refs["audio-Show_"+r][0];n.oncanplay=function(){var t=function(){var t,r=(t=s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!isNaN(n.duration)&&n.duration!==1/0){t.next=6;break}return t.next=3,new Promise((function(t){return setTimeout(t,200)}));case 3:n.currentTime=1e7*Math.random(),t.next=0;break;case 6:console.log("音频的总时长:",n.duration),e.time=(0,i.JR)(n.duration);case 8:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,s,"next",t)}function s(t){c(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(){return r.apply(this,arguments)}}();t()}}))}))}};const l=(0,r(1900).Z)(u,n,[],!1,null,"0460339b",null).exports;var A=r(4592);l.install=(0,A.TD)(l);const h=l},1924:(t,e,r)=>{"use strict";r.d(e,{default:()=>m});var n=r(4592),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"xc-location__container"},[n("xdh-map",{ref:"map",staticClass:"xc-location__map",attrs:{center:t.center,"wms-map-source":t.mobileMapSource?[t.mobileMapSource]:[],zoom:14,minZoom:7,maxZoom:18.25,type:"TDT"},on:{click:t.openMap}},[t.coordinates.length?n("xdh-map-polygon",{attrs:{coordinates:t.coordinates,"stroke-width":3,"stroke-line-dash":[4,5],fill:"rgb(139 207 246 / 60%)","stroke-color":"rgb(64, 158, 255)","stroke-line-cap":"square","stroke-line-join":"miter"}}):t._e(),t._v(" "),n("xdh-map-image",t._b({},"xdh-map-image",t.options,!1)),t._v(" "),t.center.length?n("xdh-map-html",{attrs:{position:t.center}},[n("div",{staticClass:"cur-pos-dot"})]):t._e()],1),t._v(" "),n("div",{staticClass:"floating-info"},[n("div",[n("div",[n("span",[t._v("区县:")]),t._v(" "),n("span",[t._v(t._s(t.districtName||t.emptyText))])]),t._v(" "),n("div",[n("span",[t._v("街镇:")]),t._v(" "),n("span",[t._v(t._s(t.townName||t.emptyText))])])]),t._v(" "),n("div",[n("div",[n("span",[t._v("乡村:")]),t._v(" "),n("span",[t._v(t._s(t.regionName||t.villageName||t.emptyText))])]),t._v(" "),n("div",[n("span",[t._v("网格:")]),t._v(" "),n("span",[t._v(t._s(t.gridName||t.emptyText))])])])]),t._v(" "),n("van-popup",{staticClass:"xc-location__content--inner",attrs:{"get-container":"body",closeable:""},model:{value:t.innerDisplay,callback:function(e){t.innerDisplay=e},expression:"innerDisplay"}},[n("van-cell",{attrs:{title:t.title,label:t.formValue}}),t._v(" "),n("xdh-map",{ref:"map1",staticClass:"xc-location__map--inner",attrs:{"wms-map-source":t.mobileMapSource?[t.mobileMapSource]:[],center:t.defaultCenter,zoom:14,minZoom:7,maxZoom:18.25,type:"TDT"}},[t.coordinates.length?n("xdh-map-polygon",{attrs:{coordinates:t.coordinates,"stroke-width":3,"stroke-line-dash":[4,5],fill:"rgb(139 207 246 / 60%)","stroke-color":"rgb(64, 158, 255)","stroke-line-cap":"square","stroke-line-join":"miter"}}):t._e(),t._v(" "),n("xdh-map-image",t._b({},"xdh-map-image",t.options,!1)),t._v(" "),t.center.length?n("xdh-map-html",{attrs:{position:t.center}},[n("div",{staticClass:"cur-pos-dot"})]):t._e()],1)],1),t._v(" "),n("div",{staticClass:"xc-location__field"},[n("img",{attrs:{src:r(8909)}}),t._v(" "),n("span",{staticClass:"xc-location__field",class:t.isElder&&"xc-location__field--elder"},[t._v(t._s(t.formValue))])])],1)};o._withStripped=!0;r(3474);var i=r(4755),a=r(1359),s=r(6618),c=r(8219);function u(t){return u="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},u(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function A(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{A({},"")}catch(t){A=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),s=new N(n||[]);return o(a,"_invoke",{value:j(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function y(){}function w(){}function b(){}var B={};A(B,a,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(M([])));x&&x!==r&&n.call(x,a)&&(B=x);var E=b.prototype=y.prototype=Object.create(B);function C(t){["next","throw","return"].forEach((function(e){A(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function r(o,i,a,s){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,A=l.value;return A&&"object"==u(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=d;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=k(s,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?v:p,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function O(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=A(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,A(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},C(D.prototype),A(D.prototype,s,(function(){return this})),e.AsyncIterator=D,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new D(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(E),A(E,c,"Generator"),A(E,a,(function(){return this})),A(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,N.prototype={constructor:N,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(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function A(t){return function(t){if(Array.isArray(t))return h(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 h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(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 h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}const d={name:"XcEchoLocation",components:{VanPopup:i.Z,XdhMap:a.XdhMap,XdhMapHtml:a.XdhMapHtml,XdhMapImage:a.XdhMapImage,XdhMapPolygon:a.XdhMapPolygon},inject:["isElder","getGridBoundary"],props:s.ak,data:function(){return{innerDisplay:!1,defaultCenter:[],coordinates:[],emptyText:s.BP}},computed:{options:function(){return{position:this.center,opacity:1,src:r(1407)}}},methods:{openMap:function(){var t=this;this.innerDisplay=!0,this.$nextTick((function(){t.$refs.map1&&t.center&&t.$refs.map1.moveTo(t.center)}))}},mounted:function(){var t,e=this;return(t=l().mark((function t(){var r,n,o,i;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.defaultCenter=2===e.center.length?e.center:localStorage.getItem("CENTER_POINT")&&localStorage.getItem("CENTER_POINT").split(",").map((function(t){return Number(t)})),e.$refs.map.moveTo(e.defaultCenter),n=e.getGridBoundary,o=e.gridCode){t.next=5;break}return t.abrupt("return");case 5:return t.t0=new c.Q,t.next=8,n(o);case 8:if(t.t1=t.sent,(i=t.t0.handleResponse.call(t.t0,t.t1))&&i.rs){t.next=12;break}return t.abrupt("return");case 12:e.coordinates=null===(r=i.rs)||void 0===r?void 0:r.gridGeometry.split(",").reduce((function(t,e){return[].concat(A(t),[e.split(" ")])}),[]);case 13:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){f(i,n,o,a,s,"next",t)}function s(t){f(i,n,o,a,s,"throw",t)}a(void 0)}))})()}};const p=(0,r(1900).Z)(d,o,[],!1,null,"477d472e",null).exports;p.install=(0,n.TD)(p);const m=p},2293:()=>{},6018:()=>{},8010:()=>{},1383:()=>{},5388:()=>{},6799:()=>{},677:()=>{},6629:()=>{},2254:()=>{},9415:()=>{},1392:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(6568),o=r.n(n),i=r(5976),a=r(216),s=r(6122),c=r(7937),u=(0,i.d)("icon"),l=u[0],A=u[1];var h={medel:"medal","medel-o":"medal-o","calender-o":"calendar-o"};function f(t,e,r,n){var i,u=function(t){return t&&h[t]||t}(e.name),l=function(t){return!!t&&-1!==t.indexOf("/")}(u);return t(e.tag,o()([{class:[e.classPrefix,l?"":e.classPrefix+"-"+u],style:{color:e.color,fontSize:(0,a.N)(e.size)}},(0,s.ED)(n,!0)]),[r.default&&r.default(),l&&t("img",{class:A("image"),attrs:{src:u}}),t(c.Z,{attrs:{dot:e.dot,info:null!=(i=e.badge)?i:e.info}})])}f.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:A()}};const d=l(f)},3307:(t,e,r)=>{"use strict";r(6629),r(1383),r(2293)},2685:(t,e,r)=>{"use strict";r.d(e,{Z:()=>L});var n=r(9592),o=r(1895),i=r.n(o),a=r(5976),s=(0,a.d)("image-preview"),c=s[0],u=s[1],l=r(9339),A=r(4611),h=r(9045),f=r(1392),d=r(591),p=r(5566),m=r(2036),v=r(8169),g=r(9345),y=(0,a.d)("swipe"),w=y[0],b=y[1];const B=w({mixins:[A.D,(0,g.G)("vanSwipe"),(0,h.X)((function(t,e){t(window,"resize",this.resize,!0),t(window,"orientationchange",this.resize,!0),t(window,"visibilitychange",this.onVisibilityChange),e?this.initialize():this.clear()}))],props:{width:[Number,String],height:[Number,String],autoplay:[Number,String],vertical:Boolean,lazyRender:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:[Number,String],default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:[Number,String],default:0},showIndicators:{type:Boolean,default:!0},stopPropagation:{type:Boolean,default:!0}},data:function(){return{rect:null,offset:0,active:0,deltaX:0,deltaY:0,swiping:!1,computedWidth:0,computedHeight:0}},watch:{children:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t>0?this.autoPlay():this.clear()}},computed:{count:function(){return this.children.length},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t={transitionDuration:(this.swiping?0:this.duration)+"ms",transform:"translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)"};if(this.size){var e=this.vertical?"height":"width",r=this.vertical?"width":"height";t[e]=this.trackSize+"px",t[r]=this[r]?this[r]+"px":""}return t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){return(this.vertical?this.rect.height:this.rect.width)-this.size*this.count}},mounted:function(){this.bindTouchEvent(this.$refs.track)},methods:{initialize:function(t){if(void 0===t&&(t=+this.initialSwipe),this.$el&&!(0,d.x)(this.$el)){clearTimeout(this.timer);var e={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=e,this.swiping=!0,this.active=t,this.computedWidth=+this.width||e.width,this.computedHeight=+this.height||e.height,this.offset=this.getTargetOffset(t),this.children.forEach((function(t){t.offset=0})),this.autoPlay()}},resize:function(){this.initialize(this.activeIndicator)},onVisibilityChange:function(){document.hidden?this.clear():this.autoPlay()},onTouchStart:function(t){this.touchable&&(this.clear(),this.touchStartTime=Date.now(),this.touchStart(t),this.correctPosition())},onTouchMove:function(t){this.touchable&&this.swiping&&(this.touchMove(t),this.isCorrectDirection&&((0,p.PF)(t,this.stopPropagation),this.move({offset:this.delta})))},onTouchEnd:function(){if(this.touchable&&this.swiping){var t=this.size,e=this.delta,r=e/(Date.now()-this.touchStartTime);if((Math.abs(r)>.25||Math.abs(e)>t/2)&&this.isCorrectDirection){var n=this.vertical?this.offsetY:this.offsetX,o=0;o=this.loop?n>0?e>0?-1:1:0:-Math[e>0?"ceil":"floor"](e/t),this.move({pace:o,emitChange:!0})}else e&&this.move({pace:0});this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var e=this.active,r=this.count,n=this.maxCount;return t?this.loop?(0,v.w6)(e+t,-1,r):(0,v.w6)(e+t,0,n):e},getTargetOffset:function(t,e){void 0===e&&(e=0);var r=t*this.size;this.loop||(r=Math.min(r,-this.minOffset));var n=e-r;return this.loop||(n=(0,v.w6)(n,this.minOffset,0)),n},move:function(t){var e=t.pace,r=void 0===e?0:e,n=t.offset,o=void 0===n?0:n,i=t.emitChange,a=this.loop,s=this.count,c=this.active,u=this.children,l=this.trackSize,A=this.minOffset;if(!(s<=1)){var h=this.getTargetActive(r),f=this.getTargetOffset(h,o);if(a){if(u[0]&&f!==A){var d=f<A;u[0].offset=d?l:0}if(u[s-1]&&0!==f){var p=f>0;u[s-1].offset=p?-l:0}}this.active=h,this.offset=f,i&&h!==c&&this.$emit("change",this.activeIndicator)}},prev:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),(0,m.d1)((function(){t.swiping=!1,t.move({pace:-1,emitChange:!0})}))},next:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),(0,m.d1)((function(){t.swiping=!1,t.move({pace:1,emitChange:!0})}))},swipeTo:function(t,e){var r=this;void 0===e&&(e={}),this.correctPosition(),this.resetTouchStatus(),(0,m.d1)((function(){var n;n=r.loop&&t===r.count?0===r.active?0:t:t%r.count,e.immediate?(0,m.d1)((function(){r.swiping=!1})):r.swiping=!1,r.move({pace:n-r.active,emitChange:!0})}))},correctPosition:function(){this.swiping=!0,this.active<=-1&&this.move({pace:this.count}),this.active>=this.count&&this.move({pace:-this.count})},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,e=this.autoplay;e>0&&this.count>1&&(this.clear(),this.timer=setTimeout((function(){t.next(),t.autoPlay()}),e))},genIndicator:function(){var t=this,e=this.$createElement,r=this.count,n=this.activeIndicator,o=this.slots("indicator");return o||(this.showIndicators&&r>1?e("div",{class:b("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(r)).map((function(r,o){return e("i",{class:b("indicator",{active:o===n}),style:o===n?t.indicatorStyle:null})}))]):void 0)}},render:function(){var t=arguments[0];return t("div",{class:b()},[t("div",{ref:"track",style:this.trackStyle,class:b("track",{vertical:this.vertical})},[this.slots()]),this.genIndicator()])}});var S=r(4951),x=r(3432),E=(0,a.d)("swipe-item"),C=E[0],D=E[1];const j=C({mixins:[(0,g.j)("vanSwipe")],data:function(){return{offset:0,inited:!1,mounted:!1}},mounted:function(){var t=this;this.$nextTick((function(){t.mounted=!0}))},computed:{style:function(){var t={},e=this.parent,r=e.size,n=e.vertical;return r&&(t[n?"height":"width"]=r+"px"),this.offset&&(t.transform="translate"+(n?"Y":"X")+"("+this.offset+"px)"),t},shouldRender:function(){var t=this.index,e=this.inited,r=this.parent,n=this.mounted;if(!r.lazyRender||e)return!0;if(!n)return!1;var o=r.activeIndicator,i=r.count-1,a=0===o&&r.loop?i:o-1,s=o===i&&r.loop?0:o+1,c=t===o||t===a||t===s;return c&&(this.inited=!0),c}},render:function(){return(0,arguments[0])("div",{class:D(),style:this.style,on:(0,n.Z)({},this.$listeners)},[this.shouldRender&&this.slots()])}});function k(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}const O={mixins:[A.D],props:{src:String,show:Boolean,active:Number,minZoom:[Number,String],maxZoom:[Number,String],rootWidth:Number,rootHeight:Number},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}},computed:{vertical:function(){var t=this.rootWidth,e=this.rootHeight/t;return this.imageRatio>e},imageStyle:function(){var t=this.scale,e={transitionDuration:this.zooming||this.moving?"0s":".3s"};if(1!==t){var r=this.moveX/t,n=this.moveY/t;e.transform="scale("+t+", "+t+") translate("+r+"px, "+n+"px)"}return e},maxMoveX:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight/this.imageRatio:this.rootWidth;return Math.max(0,(this.scale*t-this.rootWidth)/2)}return 0},maxMoveY:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight:this.rootWidth*this.imageRatio;return Math.max(0,(this.scale*t-this.rootHeight)/2)}return 0}},watch:{active:"resetScale",show:function(t){t||this.resetScale()}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{resetScale:function(){this.setScale(1),this.moveX=0,this.moveY=0},setScale:function(t){(t=(0,v.w6)(t,+this.minZoom,+this.maxZoom))!==this.scale&&(this.scale=t,this.$emit("scale",{scale:this.scale,index:this.active}))},toggleScale:function(){var t=this.scale>1?1:2;this.setScale(t),this.moveX=0,this.moveY=0},onTouchStart:function(t){var e=t.touches,r=this.offsetX,n=void 0===r?0:r;this.touchStart(t),this.touchStartTime=new Date,this.fingerNum=e.length,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.moving=1===this.fingerNum&&1!==this.scale,this.zooming=2===this.fingerNum&&!n,this.zooming&&(this.startScale=this.scale,this.startDistance=k(t.touches))},onTouchMove:function(t){var e=t.touches;if(this.touchMove(t),(this.moving||this.zooming)&&(0,p.PF)(t,!0),this.moving){var r=this.deltaX+this.startMoveX,n=this.deltaY+this.startMoveY;this.moveX=(0,v.w6)(r,-this.maxMoveX,this.maxMoveX),this.moveY=(0,v.w6)(n,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&2===e.length){var o=k(e),i=this.startScale*o/this.startDistance;this.setScale(i)}},onTouchEnd:function(t){var e=!1;(this.moving||this.zooming)&&(e=!0,this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(e=!1),t.touches.length||(this.zooming&&(this.moveX=(0,v.w6)(this.moveX,-this.maxMoveX,this.maxMoveX),this.moveY=(0,v.w6)(this.moveY,-this.maxMoveY,this.maxMoveY),this.zooming=!1),this.moving=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale())),(0,p.PF)(t,e),this.checkTap(),this.resetTouchStatus()},checkTap:function(){var t=this;if(!(this.fingerNum>1)){var e=this.offsetX,r=void 0===e?0:e,n=this.offsetY,o=void 0===n?0:n,i=new Date-this.touchStartTime;r<5&&o<5&&i<250&&(this.doubleTapTimer?(clearTimeout(this.doubleTapTimer),this.doubleTapTimer=null,this.toggleScale()):this.doubleTapTimer=setTimeout((function(){t.$emit("close"),t.doubleTapTimer=null}),250))}},onLoad:function(t){var e=t.target,r=e.naturalWidth,n=e.naturalHeight;this.imageRatio=n/r}},render:function(){var t=arguments[0],e={loading:function(){return t(x.Z,{attrs:{type:"spinner"}})}};return t(j,{class:u("swipe-item")},[t(S.Z,{attrs:{src:this.src,fit:"contain"},class:u("image",{vertical:this.vertical}),style:this.imageStyle,scopedSlots:e,on:{load:this.onLoad}})])}},I=c({mixins:[A.D,(0,l.e)({skipToggleEvent:!0}),(0,h.X)((function(t){t(window,"resize",this.resize,!0),t(window,"orientationchange",this.resize,!0)}))],props:{className:null,closeable:Boolean,asyncClose:Boolean,overlayStyle:Object,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},minZoom:{type:[Number,String],default:1/3},maxZoom:{type:[Number,String],default:3},transition:{type:String,default:"van-fade"},showIndex:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:300},startPosition:{type:[Number,String],default:0},overlayClass:{type:String,default:u("overlay")},closeIcon:{type:String,default:"clear"},closeOnPopstate:{type:Boolean,default:!0},closeIconPosition:{type:String,default:"top-right"}},data:function(){return{active:0,rootWidth:0,rootHeight:0,doubleClickTimer:null}},mounted:function(){this.resize()},watch:{startPosition:"setActive",value:function(t){var e=this;t?(this.setActive(+this.startPosition),this.$nextTick((function(){e.resize(),e.$refs.swipe.swipeTo(+e.startPosition,{immediate:!0})}))):this.$emit("close",{index:this.active,url:this.images[this.active]})}},methods:{resize:function(){if(this.$el&&this.$el.getBoundingClientRect){var t=this.$el.getBoundingClientRect();this.rootWidth=t.width,this.rootHeight=t.height}},emitClose:function(){this.asyncClose||this.$emit("input",!1)},emitScale:function(t){this.$emit("scale",t)},setActive:function(t){t!==this.active&&(this.active=t,this.$emit("change",t))},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:u("index")},[this.slots("index",{index:this.active})||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,e=this.slots("cover");if(e)return t("div",{class:u("cover")},[e])},genImages:function(){var t=this,e=this.$createElement;return e(B,{ref:"swipe",attrs:{lazyRender:!0,loop:this.loop,duration:this.swipeDuration,initialSw