zartui 3.1.63 → 3.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/multiple-picker/MultiplePicker.mjs +4 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/multiple-picker/MultiplePicker.js +4 -5
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +5 -6
- package/lib/zartui.es.js +5 -6
- package/lib/zartui.js +5 -6
- package/lib/zartui.min.js +1 -1
- package/package.json +4 -4
package/lib/zartui.min.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
function rc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ic(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rc(Object(o),!0).forEach((function(t){sc(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rc(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function lc(e){return(lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sc(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function cc(){return cc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},cc.apply(this,arguments)}function uc(e,t){if(null==e)return{};var o,n,a=function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}function dc(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var fc=dc(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),pc=dc(/Edge/i),hc=dc(/firefox/i),vc=dc(/safari/i)&&!dc(/chrome/i)&&!dc(/android/i),mc=dc(/iP(ad|od|hone)/i),gc=dc(/chrome/i)&&dc(/android/i),yc={capture:!1,passive:!1};function wc(e,t,o){e.addEventListener(t,o,!fc&&yc)}function bc(e,t,o){e.removeEventListener(t,o,!fc&&yc)}function Lc(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(o){return!1}return!1}}function xc(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Cc(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&Lc(e,t):Lc(e,t))||n&&e===o)return e;if(e===o)break}while(e=xc(e))}return null}var Nc,Vc=/\s+/g;function kc(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(Vc," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(Vc," ")}}function Ac(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function Sc(e,t){var o="";if("string"==typeof e)o=e;else do{var n=Ac(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(o)}function Tc(e,t,o){if(e){var n=e.getElementsByTagName(t),a=0,r=n.length;if(o)for(;a<r;a++)o(n[a],a);return n}return[]}function Oc(){var e=document.scrollingElement;return e||document.documentElement}function Mc(e,t,o,n,a){if(e.getBoundingClientRect||e===window){var r,i,l,s,c,u,d;if(e!==window&&e.parentNode&&e!==Oc()?(i=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,d=r.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||o)&&e!==window&&(a=a||e.parentNode,!fc))do{if(a&&a.getBoundingClientRect&&("none"!==Ac(a,"transform")||o&&"static"!==Ac(a,"position"))){var f=a.getBoundingClientRect();i-=f.top+parseInt(Ac(a,"border-top-width")),l-=f.left+parseInt(Ac(a,"border-left-width")),s=i+r.height,c=l+r.width;break}}while(a=a.parentNode);if(n&&e!==window){var p=Sc(a||e),h=p&&p.a,v=p&&p.d;p&&(s=(i/=v)+(u/=v),c=(l/=h)+(d/=h))}return{top:i,left:l,bottom:s,right:c,width:d,height:u}}}function Pc(e,t,o){for(var n=zc(e,!0),a=Mc(e)[t];n;){var r=Mc(n)[o];if(!("top"===o||"left"===o?a>=r:a<=r))return n;if(n===Oc())break;n=zc(n,!1)}return!1}function Ic(e,t,o,n){for(var a=0,r=0,i=e.children;r<i.length;){if("none"!==i[r].style.display&&i[r]!==Ru.ghost&&(n||i[r]!==Ru.dragged)&&Cc(i[r],o.draggable,e,!1)){if(a===t)return i[r];a++}r++}return null}function Bc(e,t){for(var o=e.lastElementChild;o&&(o===Ru.ghost||"none"===Ac(o,"display")||t&&!Lc(o,t));)o=o.previousElementSibling;return o||null}function Dc(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ru.clone||t&&!Lc(e,t)||o++;return o}function Ec(e){var t=0,o=0,n=Oc();if(e)do{var a=Sc(e),r=a.a,i=a.d;t+=e.scrollLeft*r,o+=e.scrollTop*i}while(e!==n&&(e=e.parentNode));return[t,o]}function zc(e,t){if(!e||!e.getBoundingClientRect)return Oc();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var a=Ac(o);if(o.clientWidth<o.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!o.getBoundingClientRect||o===document.body)return Oc();if(n||t)return o;n=!0}}}while(o=o.parentNode);return Oc()}function _c(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function jc(e,t){return function(){if(!Nc){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),Nc=setTimeout((function(){Nc=void 0}),t)}}}function Fc(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function Rc(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function Hc(e,t,o){var n={};return Array.from(e.children).forEach((function(a){var r,i,l,s;if(Cc(a,t.draggable,e,!1)&&!a.animated&&a!==o){var c=Mc(a);n.left=Math.min(null!==(r=n.left)&&void 0!==r?r:1/0,c.left),n.top=Math.min(null!==(i=n.top)&&void 0!==i?i:1/0,c.top),n.right=Math.max(null!==(l=n.right)&&void 0!==l?l:-1/0,c.right),n.bottom=Math.max(null!==(s=n.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var $c="Sortable"+(new Date).getTime();function Uc(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==Ac(e,"display")&&e!==Ru.ghost){t.push({target:e,rect:Mc(e)});var o=ic({},t[t.length-1].rect);if(e.thisAnimationDuration){var n=Sc(e,!0);n&&(o.top-=n.f,o.left-=n.e)}e.fromRect=o}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(t,{target:e}),1)},animateAll:function(o){var n=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof o&&o());var a=!1,r=0;t.forEach((function(e){var t=0,o=e.target,i=o.fromRect,l=Mc(o),s=o.prevFromRect,c=o.prevToRect,u=e.rect,d=Sc(o,!0);d&&(l.top-=d.f,l.left-=d.e),o.toRect=l,o.thisAnimationDuration&&_c(s,l)&&!_c(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(t=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(u,s,c,n.options)),_c(l,i)||(o.prevFromRect=i,o.prevToRect=l,t||(t=n.options.animation),n.animate(o,u,l,t)),t&&(a=!0,r=Math.max(r,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),t),o.thisAnimationDuration=t)})),clearTimeout(e),a?e=setTimeout((function(){"function"==typeof o&&o()}),r):"function"==typeof o&&o(),t=[]},animate:function(e,t,o,n){if(n){Ac(e,"transition",""),Ac(e,"transform","");var a=Sc(this.el),r=a&&a.a,i=a&&a.d,l=(t.left-o.left)/(r||1),s=(t.top-o.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,Ac(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),Ac(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Ac(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){Ac(e,"transition",""),Ac(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}}var Zc=[],Wc={initializeByDefault:!0},Yc={mount:function(e){for(var t in Wc)Wc.hasOwnProperty(t)&&!(t in e)&&(e[t]=Wc[t]);Zc.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Zc.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var a=e+"Global";Zc.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][a]&&t[n.pluginName][a](ic({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](ic({sortable:t},o)))}))},initializePlugins:function(e,t,o,n){for(var a in Zc.forEach((function(n){var a=n.pluginName;if(e.options[a]||n.initializeByDefault){var r=new n(e,t,e.options);r.sortable=e,r.options=e.options,e[a]=r,cc(o,r.defaults)}})),e.options)if(e.options.hasOwnProperty(a)){var r=this.modifyOption(e,a,e.options[a]);void 0!==r&&(e.options[a]=r)}},getEventProperties:function(e,t){var o={};return Zc.forEach((function(n){"function"==typeof n.eventProperties&&cc(o,n.eventProperties.call(t[n.pluginName],e))})),o},modifyOption:function(e,t,o){var n;return Zc.forEach((function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(n=a.optionListeners[t].call(e[a.pluginName],o))})),n}};var qc=["evt"],Gc=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,a=uc(o,qc);Yc.pluginEvent.bind(Ru)(e,t,ic({dragEl:Kc,parentEl:Qc,ghostEl:Jc,rootEl:eu,nextEl:tu,lastDownEl:ou,cloneEl:nu,cloneHidden:au,dragStarted:gu,putSortable:uu,activeSortable:Ru.active,originalEvent:n,oldIndex:ru,oldDraggableIndex:lu,newIndex:iu,newDraggableIndex:su,hideGhostForTarget:zu,unhideGhostForTarget:_u,cloneNowHidden:function(){au=!0},cloneNowShown:function(){au=!1},dispatchSortableEvent:function(e){Xc({sortable:t,name:e,originalEvent:n})}},a))};function Xc(e){!function(e){var t=e.sortable,o=e.rootEl,n=e.name,a=e.targetEl,r=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,h=e.extraEventProperties;if(t=t||o&&o[$c]){var v,m=t.options,g="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||fc||pc?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=i||o,v.from=l||o,v.item=a||o,v.clone=r,v.oldIndex=s,v.newIndex=c,v.oldDraggableIndex=u,v.newDraggableIndex=d,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var y=ic(ic({},h),Yc.getEventProperties(n,t));for(var w in y)v[w]=y[w];o&&o.dispatchEvent(v),m[g]&&m[g].call(t,v)}}(ic({putSortable:uu,cloneEl:nu,targetEl:Kc,rootEl:eu,oldIndex:ru,oldDraggableIndex:lu,newIndex:iu,newDraggableIndex:su},e))}var Kc,Qc,Jc,eu,tu,ou,nu,au,ru,iu,lu,su,cu,uu,du,fu,pu,hu,vu,mu,gu,yu,wu,bu,Lu,xu=!1,Cu=!1,Nu=[],Vu=!1,ku=!1,Au=[],Su=!1,Tu=[],Ou="undefined"!=typeof document,Mu=mc,Pu=pc||fc?"cssFloat":"float",Iu=Ou&&!gc&&!mc&&"draggable"in document.createElement("div"),Bu=function(){if(Ou){if(fc)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Du=function(e,t){var o=Ac(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),a=Ic(e,0,t),r=Ic(e,1,t),i=a&&Ac(a),l=r&&Ac(r),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Mc(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Mc(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=n&&"none"===o[Pu]||r&&"none"===o[Pu]&&s+c>n)?"vertical":"horizontal"},Eu=function(e){function t(e,o){return function(n,a,r,i){var l=n.options.group.name&&a.options.group.name&&n.options.group.name===a.options.group.name;if(null==e&&(o||l))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,a,r,i),o)(n,a,r,i);var s=(o?n:a).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},n=e.group;n&&"object"==lc(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},zu=function(){!Bu&&Jc&&Ac(Jc,"display","none")},_u=function(){!Bu&&Jc&&Ac(Jc,"display","")};Ou&&!gc&&document.addEventListener("click",(function(e){if(Cu)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Cu=!1,!1}),!0);var ju=function(e){if(Kc){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,r=e.clientY,Nu.some((function(e){var t=e[$c].options.emptyInsertThreshold;if(t&&!Bc(e)){var o=Mc(e),n=a>=o.left-t&&a<=o.right+t,l=r>=o.top-t&&r<=o.bottom+t;return n&&l?i=e:void 0}})),i);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[$c]._onDragOver(o)}}var a,r,i},Fu=function(e){Kc&&Kc.parentNode[$c]._isOutsideThisEl(e.target)};function Ru(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=cc({},t),e[$c]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Du(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ru.supportPointer&&"PointerEvent"in window&&(!vc||mc),emptyInsertThreshold:5};for(var n in Yc.initializePlugins(this,e,o),o)!(n in t)&&(t[n]=o[n]);for(var a in Eu(t),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&Iu,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?wc(e,"pointerdown",this._onTapStart):(wc(e,"mousedown",this._onTapStart),wc(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(wc(e,"dragover",this),wc(e,"dragenter",this)),Nu.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),cc(this,Uc())}function Hu(e,t,o,n,a,r,i,l){var s,c,u=e[$c],d=u.options.onMove;return!window.CustomEvent||fc||pc?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=n,s.related=a||t,s.relatedRect=r||Mc(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),d&&(c=d.call(u,s,i)),c}function $u(e){e.draggable=!1}function Uu(){Su=!1}function Zu(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Wu(e){return setTimeout(e,0)}function Yu(e){return clearTimeout(e)}Ru.prototype={constructor:Ru,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(yu=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Kc):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,a=n.preventOnFilter,r=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=n.filter;if(function(e){Tu.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var n=t[o];n.checked&&Tu.push(n)}}(o),!Kc&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!vc||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=Cc(l,n.draggable,o,!1))&&l.animated||ou===l)){if(ru=Dc(l),lu=Dc(l,n.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Xc({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),Gc("filter",t,{evt:e}),void(a&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=Cc(s,n.trim(),o,!1))return Xc({sortable:t,rootEl:n,name:"filter",targetEl:l,fromEl:o,toEl:o}),Gc("filter",t,{evt:e}),!0}))))return void(a&&e.preventDefault());n.handle&&!Cc(s,n.handle,o,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,o){var n,a=this,r=a.el,i=a.options,l=r.ownerDocument;if(o&&!Kc&&o.parentNode===r){var s=Mc(o);if(eu=r,Qc=(Kc=o).parentNode,tu=Kc.nextSibling,ou=o,cu=i.group,Ru.dragged=Kc,du={target:Kc,clientX:(t||e).clientX,clientY:(t||e).clientY},vu=du.clientX-s.left,mu=du.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Kc.style["will-change"]="all",n=function(){Gc("delayEnded",a,{evt:e}),Ru.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!hc&&a.nativeDraggable&&(Kc.draggable=!0),a._triggerDragStart(e,t),Xc({sortable:a,name:"choose",originalEvent:e}),kc(Kc,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){Tc(Kc,e.trim(),$u)})),wc(l,"dragover",ju),wc(l,"mousemove",ju),wc(l,"touchmove",ju),i.supportPointer?(wc(l,"pointerup",a._onDrop),!this.nativeDraggable&&wc(l,"pointercancel",a._onDrop)):(wc(l,"mouseup",a._onDrop),wc(l,"touchend",a._onDrop),wc(l,"touchcancel",a._onDrop)),hc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Kc.draggable=!0),Gc("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(pc||fc))n();else{if(Ru.eventCanceled)return void this._onDrop();i.supportPointer?(wc(l,"pointerup",a._disableDelayedDrag),wc(l,"pointercancel",a._disableDelayedDrag)):(wc(l,"mouseup",a._disableDelayedDrag),wc(l,"touchend",a._disableDelayedDrag),wc(l,"touchcancel",a._disableDelayedDrag)),wc(l,"mousemove",a._delayedDragTouchMoveHandler),wc(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&wc(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(n,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Kc&&$u(Kc),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bc(e,"mouseup",this._disableDelayedDrag),bc(e,"touchend",this._disableDelayedDrag),bc(e,"touchcancel",this._disableDelayedDrag),bc(e,"pointerup",this._disableDelayedDrag),bc(e,"pointercancel",this._disableDelayedDrag),bc(e,"mousemove",this._delayedDragTouchMoveHandler),bc(e,"touchmove",this._delayedDragTouchMoveHandler),bc(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?wc(document,"pointermove",this._onTouchMove):wc(document,t?"touchmove":"mousemove",this._onTouchMove):(wc(Kc,"dragend",this),wc(eu,"dragstart",this._onDragStart));try{document.selection?Wu((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(xu=!1,eu&&Kc){Gc("dragStarted",this,{evt:t}),this.nativeDraggable&&wc(document,"dragover",Fu);var o=this.options;!e&&kc(Kc,o.dragClass,!1),kc(Kc,o.ghostClass,!0),Ru.active=this,e&&this._appendGhost(),Xc({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(fu){this._lastX=fu.clientX,this._lastY=fu.clientY,zu();for(var e=document.elementFromPoint(fu.clientX,fu.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(fu.clientX,fu.clientY))!==t;)t=e;if(Kc.parentNode[$c]._isOutsideThisEl(e),t)do{if(t[$c]){if(t[$c]._onDragOver({clientX:fu.clientX,clientY:fu.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=xc(t));_u()}},_onTouchMove:function(e){if(du){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,a=e.touches?e.touches[0]:e,r=Jc&&Sc(Jc,!0),i=Jc&&r&&r.a,l=Jc&&r&&r.d,s=Mu&&Lu&&Ec(Lu),c=(a.clientX-du.clientX+n.x)/(i||1)+(s?s[0]-Au[0]:0)/(i||1),u=(a.clientY-du.clientY+n.y)/(l||1)+(s?s[1]-Au[1]:0)/(l||1);if(!Ru.active&&!xu){if(o&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(Jc){r?(r.e+=c-(pu||0),r.f+=u-(hu||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Ac(Jc,"webkitTransform",d),Ac(Jc,"mozTransform",d),Ac(Jc,"msTransform",d),Ac(Jc,"transform",d),pu=c,hu=u,fu=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Jc){var e=this.options.fallbackOnBody?document.body:eu,t=Mc(Kc,!0,Mu,!0,e),o=this.options;if(Mu){for(Lu=e;"static"===Ac(Lu,"position")&&"none"===Ac(Lu,"transform")&&Lu!==document;)Lu=Lu.parentNode;Lu!==document.body&&Lu!==document.documentElement?(Lu===document&&(Lu=Oc()),t.top+=Lu.scrollTop,t.left+=Lu.scrollLeft):Lu=Oc(),Au=Ec(Lu)}kc(Jc=Kc.cloneNode(!0),o.ghostClass,!1),kc(Jc,o.fallbackClass,!0),kc(Jc,o.dragClass,!0),Ac(Jc,"transition",""),Ac(Jc,"transform",""),Ac(Jc,"box-sizing","border-box"),Ac(Jc,"margin",0),Ac(Jc,"top",t.top),Ac(Jc,"left",t.left),Ac(Jc,"width",t.width),Ac(Jc,"height",t.height),Ac(Jc,"opacity","0.8"),Ac(Jc,"position",Mu?"absolute":"fixed"),Ac(Jc,"zIndex","100000"),Ac(Jc,"pointerEvents","none"),Ru.ghost=Jc,e.appendChild(Jc),Ac(Jc,"transform-origin",vu/parseInt(Jc.style.width)*100+"% "+mu/parseInt(Jc.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,a=o.options;Gc("dragStart",this,{evt:e}),Ru.eventCanceled?this._onDrop():(Gc("setupClone",this),Ru.eventCanceled||((nu=Rc(Kc)).removeAttribute("id"),nu.draggable=!1,nu.style["will-change"]="",this._hideClone(),kc(nu,this.options.chosenClass,!1),Ru.clone=nu),o.cloneId=Wu((function(){Gc("clone",o),Ru.eventCanceled||(o.options.removeCloneOnHide||eu.insertBefore(nu,Kc),o._hideClone(),Xc({sortable:o,name:"clone"}))})),!t&&kc(Kc,a.dragClass,!0),t?(Cu=!0,o._loopId=setInterval(o._emulateDragOver,50)):(bc(document,"mouseup",o._onDrop),bc(document,"touchend",o._onDrop),bc(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",a.setData&&a.setData.call(o,n,Kc)),wc(document,"drop",o),Ac(Kc,"transform","translateZ(0)")),xu=!0,o._dragStartId=Wu(o._dragStarted.bind(o,t,e)),wc(document,"selectstart",o),gu=!0,window.getSelection().removeAllRanges(),vc&&Ac(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,a,r=this.el,i=e.target,l=this.options,s=l.group,c=Ru.active,u=cu===s,d=l.sort,f=uu||c,p=this,h=!1;if(!Su){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=Cc(i,l.draggable,r,!0),T("dragOver"),Ru.eventCanceled)return h;if(Kc.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||p._ignoreWhileAnimating===i)return M(!1);if(Cu=!1,c&&!l.disabled&&(u?d||(n=Qc!==eu):uu===this||(this.lastPutMode=cu.checkPull(this,c,Kc,e))&&s.checkPut(this,c,Kc,e))){if(a="vertical"===this._getDirection(e,i),t=Mc(Kc),T("dragOverValid"),Ru.eventCanceled)return h;if(n)return Qc=eu,O(),this._hideClone(),T("revert"),Ru.eventCanceled||(tu?eu.insertBefore(Kc,tu):eu.appendChild(Kc)),M(!0);var v=Bc(r,l.draggable);if(!v||function(e,t,o){var n=Mc(Bc(o.el,o.options.draggable)),a=Hc(o.el,o.options,Jc),r=10;return t?e.clientX>a.right+r||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>a.bottom+r||e.clientX>n.right&&e.clientY>n.top}(e,a,this)&&!v.animated){if(v===Kc)return M(!1);if(v&&r===e.target&&(i=v),i&&(o=Mc(i)),!1!==Hu(eu,r,Kc,t,i,o,e,!!i))return O(),v&&v.nextSibling?r.insertBefore(Kc,v.nextSibling):r.appendChild(Kc),Qc=r,P(),M(!0)}else if(v&&function(e,t,o){var n=Mc(Ic(o.el,0,o.options,!0)),a=Hc(o.el,o.options,Jc),r=10;return t?e.clientX<a.left-r||e.clientY<n.top&&e.clientX<n.right:e.clientY<a.top-r||e.clientY<n.bottom&&e.clientX<n.left}(e,a,this)){var m=Ic(r,0,l,!0);if(m===Kc)return M(!1);if(o=Mc(i=m),!1!==Hu(eu,r,Kc,t,i,o,e,!1))return O(),r.insertBefore(Kc,m),Qc=r,P(),M(!0)}else if(i.parentNode===r){o=Mc(i);var g,y,w,b=Kc.parentNode!==r,L=!function(e,t,o){var n=o?e.left:e.top,a=o?e.right:e.bottom,r=o?e.width:e.height,i=o?t.left:t.top,l=o?t.right:t.bottom,s=o?t.width:t.height;return n===i||a===l||n+r/2===i+s/2}(Kc.animated&&Kc.toRect||t,i.animated&&i.toRect||o,a),x=a?"top":"left",C=Pc(i,"top","top")||Pc(Kc,"top","top"),N=C?C.scrollTop:void 0;if(yu!==i&&(y=o[x],Vu=!1,ku=!L&&l.invertSwap||b),g=function(e,t,o,n,a,r,i,l){var s=n?e.clientY:e.clientX,c=n?o.height:o.width,u=n?o.top:o.left,d=n?o.bottom:o.right,f=!1;if(!i)if(l&&bu<c*a){if(!Vu&&(1===wu?s>u+c*r/2:s<d-c*r/2)&&(Vu=!0),Vu)f=!0;else if(1===wu?s<u+bu:s>d-bu)return-wu}else if(s>u+c*(1-a)/2&&s<d-c*(1-a)/2)return function(e){return Dc(Kc)<Dc(e)?1:-1}(t);if((f=f||i)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(e,i,o,a,L?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ku,yu===i),0!==g){var V=Dc(Kc);do{V-=g,w=Qc.children[V]}while(w&&("none"===Ac(w,"display")||w===Jc))}if(0===g||w===i)return M(!1);yu=i,wu=g;var k=i.nextElementSibling,A=!1,S=Hu(eu,r,Kc,t,i,o,e,A=1===g);if(!1!==S)return 1!==S&&-1!==S||(A=1===S),Su=!0,setTimeout(Uu,30),O(),A&&!k?r.appendChild(Kc):i.parentNode.insertBefore(Kc,A?k:i),C&&Fc(C,0,N-C.scrollTop),Qc=Kc.parentNode,void 0===y||ku||(bu=Math.abs(y-Mc(i)[x])),P(),M(!0)}if(r.contains(Kc))return M(!1)}return!1}function T(l,s){Gc(l,p,ic({evt:e,isOwner:u,axis:a?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:f,target:i,completed:M,onMove:function(o,n){return Hu(eu,r,Kc,t,o,Mc(o),e,n)},changed:P},s))}function O(){T("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function M(t){return T("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(p),p!==f&&(kc(Kc,uu?uu.options.ghostClass:c.options.ghostClass,!1),kc(Kc,l.ghostClass,!0)),uu!==p&&p!==Ru.active?uu=p:p===Ru.active&&uu&&(uu=null),f===p&&(p._ignoreWhileAnimating=i),p.animateAll((function(){T("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(i===Kc&&!Kc.animated||i===r&&!i.animated)&&(yu=null),l.dragoverBubble||e.rootEl||i===document||(Kc.parentNode[$c]._isOutsideThisEl(e.target),!t&&ju(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function P(){iu=Dc(Kc),su=Dc(Kc,l.draggable),Xc({sortable:p,name:"change",toEl:r,newIndex:iu,newDraggableIndex:su,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){bc(document,"mousemove",this._onTouchMove),bc(document,"touchmove",this._onTouchMove),bc(document,"pointermove",this._onTouchMove),bc(document,"dragover",ju),bc(document,"mousemove",ju),bc(document,"touchmove",ju)},_offUpEvents:function(){var e=this.el.ownerDocument;bc(e,"mouseup",this._onDrop),bc(e,"touchend",this._onDrop),bc(e,"pointerup",this._onDrop),bc(e,"pointercancel",this._onDrop),bc(e,"touchcancel",this._onDrop),bc(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;iu=Dc(Kc),su=Dc(Kc,o.draggable),Gc("drop",this,{evt:e}),Qc=Kc&&Kc.parentNode,iu=Dc(Kc),su=Dc(Kc,o.draggable),Ru.eventCanceled||(xu=!1,ku=!1,Vu=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Yu(this.cloneId),Yu(this._dragStartId),this.nativeDraggable&&(bc(document,"drop",this),bc(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vc&&Ac(document.body,"user-select",""),Ac(Kc,"transform",""),e&&(gu&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),Jc&&Jc.parentNode&&Jc.parentNode.removeChild(Jc),(eu===Qc||uu&&"clone"!==uu.lastPutMode)&&nu&&nu.parentNode&&nu.parentNode.removeChild(nu),Kc&&(this.nativeDraggable&&bc(Kc,"dragend",this),$u(Kc),Kc.style["will-change"]="",gu&&!xu&&kc(Kc,uu?uu.options.ghostClass:this.options.ghostClass,!1),kc(Kc,this.options.chosenClass,!1),Xc({sortable:this,name:"unchoose",toEl:Qc,newIndex:null,newDraggableIndex:null,originalEvent:e}),eu!==Qc?(iu>=0&&(Xc({rootEl:Qc,name:"add",toEl:Qc,fromEl:eu,originalEvent:e}),Xc({sortable:this,name:"remove",toEl:Qc,originalEvent:e}),Xc({rootEl:Qc,name:"sort",toEl:Qc,fromEl:eu,originalEvent:e}),Xc({sortable:this,name:"sort",toEl:Qc,originalEvent:e})),uu&&uu.save()):iu!==ru&&iu>=0&&(Xc({sortable:this,name:"update",toEl:Qc,originalEvent:e}),Xc({sortable:this,name:"sort",toEl:Qc,originalEvent:e})),Ru.active&&(null!=iu&&-1!==iu||(iu=ru,su=lu),Xc({sortable:this,name:"end",toEl:Qc,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Gc("nulling",this),eu=Kc=Qc=Jc=tu=nu=ou=au=du=fu=gu=iu=su=ru=lu=yu=wu=uu=cu=Ru.dragged=Ru.ghost=Ru.clone=Ru.active=null,Tu.forEach((function(e){e.checked=!0})),Tu.length=pu=hu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Kc&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,a=o.length,r=this.options;n<a;n++)Cc(e=o[n],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Zu(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach((function(e,t){var a=n.children[t];Cc(a,this.options.draggable,n,!1)&&(o[e]=a)}),this),t&&this.captureAnimationState(),e.forEach((function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Cc(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=Yc.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Eu(o)},destroy:function(){Gc("destroy",this);var e=this.el;e[$c]=null,bc(e,"mousedown",this._onTapStart),bc(e,"touchstart",this._onTapStart),bc(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(bc(e,"dragover",this),bc(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Nu.splice(Nu.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!au){if(Gc("hideClone",this),Ru.eventCanceled)return;Ac(nu,"display","none"),this.options.removeCloneOnHide&&nu.parentNode&&nu.parentNode.removeChild(nu),au=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(au){if(Gc("showClone",this),Ru.eventCanceled)return;Kc.parentNode!=eu||this.options.group.revertClone?tu?eu.insertBefore(nu,tu):eu.appendChild(nu):eu.insertBefore(nu,Kc),this.options.group.revertClone&&this.animate(Kc,nu),Ac(nu,"display",""),au=!1}}else this._hideClone()}},Ou&&wc(document,"touchmove",(function(e){(Ru.active||xu)&&e.cancelable&&e.preventDefault()})),Ru.utils={on:wc,off:bc,css:Ac,find:Tc,is:function(e,t){return!!Cc(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:jc,closest:Cc,toggleClass:kc,clone:Rc,index:Dc,nextTick:Wu,cancelNextTick:Yu,detectDirection:Du,getChild:Ic,expando:$c},Ru.get=function(e){return e[$c]},Ru.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ru.utils=ic(ic({},Ru.utils),e.utils)),Yc.mount(e)}))},Ru.create=function(e,t){return new Ru(e,t)},Ru.version="1.15.6";var qu,Gu,Xu,Ku,Qu,Ju,ed=[],td=!1;function od(){ed.forEach((function(e){clearInterval(e.pid)})),ed=[]}function nd(){clearInterval(Ju)}var ad=jc((function(e,t,o,n){if(t.scroll){var a,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=Oc(),u=!1;Gu!==o&&(Gu=o,od(),qu=t.scroll,a=t.scrollFn,!0===qu&&(qu=zc(o,!0)));var d=0,f=qu;do{var p=f,h=Mc(p),v=h.top,m=h.bottom,g=h.left,y=h.right,w=h.width,b=h.height,L=void 0,x=void 0,C=p.scrollWidth,N=p.scrollHeight,V=Ac(p),k=p.scrollLeft,A=p.scrollTop;p===c?(L=w<C&&("auto"===V.overflowX||"scroll"===V.overflowX||"visible"===V.overflowX),x=b<N&&("auto"===V.overflowY||"scroll"===V.overflowY||"visible"===V.overflowY)):(L=w<C&&("auto"===V.overflowX||"scroll"===V.overflowX),x=b<N&&("auto"===V.overflowY||"scroll"===V.overflowY));var S=L&&(Math.abs(y-r)<=l&&k+w<C)-(Math.abs(g-r)<=l&&!!k),T=x&&(Math.abs(m-i)<=l&&A+b<N)-(Math.abs(v-i)<=l&&!!A);if(!ed[d])for(var O=0;O<=d;O++)ed[O]||(ed[O]={});ed[d].vx==S&&ed[d].vy==T&&ed[d].el===p||(ed[d].el=p,ed[d].vx=S,ed[d].vy=T,clearInterval(ed[d].pid),0==S&&0==T||(u=!0,ed[d].pid=setInterval(function(){n&&0===this.layer&&Ru.active._onTouchMove(Qu);var t=ed[this.layer].vy?ed[this.layer].vy*s:0,o=ed[this.layer].vx?ed[this.layer].vx*s:0;"function"==typeof a&&"continue"!==a.call(Ru.dragged.parentNode[$c],o,t,e,Qu,ed[this.layer].el)||Fc(ed[this.layer].el,o,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=zc(f,!1)));td=u}}),30),rd=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,a=e.activeSortable,r=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=o||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function id(){}function ld(){}id.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=Ic(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:rd},cc(id,{pluginName:"revertOnSpill"}),ld.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:rd},cc(ld,{pluginName:"removeOnSpill"}),Ru.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?wc(document,"dragover",this._handleAutoScroll):this.options.supportPointer?wc(document,"pointermove",this._handleFallbackAutoScroll):t.touches?wc(document,"touchmove",this._handleFallbackAutoScroll):wc(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?bc(document,"dragover",this._handleAutoScroll):(bc(document,"pointermove",this._handleFallbackAutoScroll),bc(document,"touchmove",this._handleFallbackAutoScroll),bc(document,"mousemove",this._handleFallbackAutoScroll)),nd(),od(),clearTimeout(Nc),Nc=void 0},nulling:function(){Qu=Gu=qu=td=Ju=Xu=Ku=null,ed.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(n,a);if(Qu=e,t||this.options.forceAutoScrollFallback||pc||fc||vc){ad(e,this.options,r,t);var i=zc(r,!0);!td||Ju&&n===Xu&&a===Ku||(Ju&&nd(),Ju=setInterval((function(){var r=zc(document.elementFromPoint(n,a),!0);r!==i&&(i=r,od()),ad(e,o.options,r,t)}),10),Xu=n,Ku=a)}else{if(!this.options.bubbleScroll||zc(r,!0)===Oc())return void od();ad(e,this.options,zc(r,!1),!1)}}},cc(e,{pluginName:"scroll",initializeByDefault:!0})}),Ru.mount(ld,id);var sd=(e,t,o)=>new Promise(((n,a)=>{var r=e=>{try{l(o.next(e))}catch(t){a(t)}},i=e=>{try{l(o.throw(e))}catch(t){a(t)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,i);l((o=o.apply(e,t)).next())}));const[cd,ud]=Se("media-picker"),fd={sortable:{type:Boolean,default:!1},disabled:Boolean,showTitle:Boolean,useFileNameAsLabel:Boolean,title:N("添加附件"),mediaList:L(),maxImageSideLength:x(1920),maxImageFileSize:x(1024),maxFileSize:x(102400),watermarkOptions:{type:Object,default:()=>null},maxMediaCount:x(Number.MAX_VALUE),maxImageCount:x(Number.MAX_VALUE),maxAudioCount:x(Number.MAX_VALUE),maxVideoCount:x(Number.MAX_VALUE),allowTakePhoto:w,allowPickPhoto:w,allowTakeVideo:Boolean,allowPickVideo:Boolean,allowTakeAudio:Boolean,allowPickAudio:Boolean,allowPickFile:Boolean,preview:Function,mediaPick:Function,beforeRead:Function,afterRead:Function,beforeDelete:Function,useWx:Boolean,imageSizeType:N("compressed"),mediaPlayerProps:Object};const pd=je(t.defineComponent({name:cd,props:fd,emits:["update:mediaList","delete","processing"],setup(e,{emit:n,slots:a}){const r=t.ref(!1),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),u=t.ref("file"),d=t.ref(""),f=t.ref(),p=t.ref(),h=t.ref(),v=t.ref(),m=t.ref(),g=t.ref(),y=t.ref(),w=t.ref(),b=t.ref([]),L=t.ref();t.watch((()=>e.mediaList.length),(()=>{var t;!L.value&&e.sortable&&(L.value=Ru.create(null==(t=w.value)?void 0:t.$el,{animation:200,handle:".zt-grid-item",onEnd:t=>{const o=x(e.mediaList,t.oldIndex,t.newIndex);n("update:mediaList",o)}}))}));const x=(e,t,o)=>{const n=[...e],a=n[t];return n.splice(t,1),n.splice(o,0,a),[...n]},C=e=>{e&&e.click()},N=(t,o)=>{if(!e.disabled&&(t=>e.mediaList.length===e.maxMediaCount?(qo("已达到文件最大数量限制"),!1):"photo"===t&&e.mediaList.filter((e=>"photo"===e.type)).length>e.maxImageCount?(qo("已达到图片最大数量限制"),!1):"video"===t&&e.mediaList.filter((e=>"video"===e.type)).length>e.maxVideoCount?(qo("已达到视频最大数量限制"),!1):!("audio"===t&&e.mediaList.filter((e=>"audio"===e.type)).length>e.maxAudioCount&&(qo("已达到录音最大数量限制"),1)))(t)&&(!e.mediaPick||!e.mediaPick(t,o)))if("photo"===t)if(e.useWx&&c()&&window.wx){ac("take"===o?"camera":"album").then((t=>{n("update:mediaList",[...e.mediaList,...t])}))}else"take"===o?C(f.value):"pick"===o&&C(p.value);else"video"===t?"take"===o?C(h.value):"pick"===o?C(v.value):"take_and_pick"===o&&(l.value=!0,r.value=!0,i.value=!1):"audio"===t?"take"===o?C(m.value):"pick"===o?C(g.value):"take_and_pick"===o&&(l.value=!0,r.value=!1,i.value=!0):"file"===t&&C(y.value)},V=(e,t)=>{"photo"===e?"take"===t&&f.value instanceof HTMLInputElement?f.value.value="":"pick"===t&&p.value instanceof HTMLInputElement&&(p.value.value=""):"video"===e?"take"===t&&h.value instanceof HTMLInputElement?h.value.value="":"pick"===t&&v.value&&(v.value.value=""):"audio"===e?"take"===t&&m.value instanceof HTMLInputElement?m.value.value="":"pick"===t&&g.value instanceof HTMLInputElement&&(g.value.value=""):"file"===e&&y.value instanceof HTMLInputElement&&(y.value.value="")},k=t.computed((()=>e.mediaList.filter((e=>"photo"===e.type)))),A=t.computed((()=>r.value?[{name:"拍摄",callback:()=>{N("video","take")}},{name:"视频文件",callback:()=>{N("video","pick")}}]:i.value?[{name:"录音",callback:()=>{N("audio","take")}},{name:"音频文件",callback:()=>{N("audio","pick")}}]:void 0)),S=t=>e.mediaList.some((e=>e.uniqueCode===es(t))),T=t=>{const n=[],a=new tc(e.maxImageSideLength),r=new oc(e.maxImageFileSize);for(let o=0;o<t.length;o++){const i=t[o],l=e.watermarkOptions&&e.watermarkOptions.watermarkConfigString&&Xs(e.watermarkOptions.watermarkConfigString);let s;s=l?{enabled:!0,watermarkConfigString:l?e.watermarkOptions.watermarkConfigString:"",context:{address:e.watermarkOptions.address||"",humanName:e.watermarkOptions.humanName||"",projectName:e.watermarkOptions.projectName||"",watermarkTime:new Date}}:{enabled:!1};const c=new nc(i,a,s,r).process().then((e=>e?os(e).then((t=>{const o=ts(e,"jpg"),n={showSrc:t,type:"photo",file:new File([e],o,{lastModified:e.lastModified,type:e.type}),uniqueCode:es(i),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,deletable:!0,message:"",originalName:i.name,originalSize:i.size};return Promise.resolve(n)})):Promise.resolve(null)));n.push(c)}return Promise.all(n).then((e=>{const t=[];return e.forEach((e=>{o(e)&&t.push(e)})),t})).finally((()=>{}))},O=t=>{n("processing",!0),b.value=t.map((e=>{let t;return t=Ql(e)?"audio":Jl(e)?"video":Kl(e)?"photo":"file",{file:e,message:"处理中...",status:"processing",type:t}}));const a=t.filter((e=>!Kl(e))).map((e=>(e=>{let t,o="";Ql(e)?(t="audio",o="mp3"):Jl(e)?(t="video",o="mp4"):t="file";const n=ts(e,o);return{type:t,file:new File([e],n,{lastModified:e.lastModified,type:e.type}),uniqueCode:es(e),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,originalName:e.name,originalSize:e.size,originalFile:e,deletable:!0,message:""}})(e)));let r=[];a.length>0&&(r=r.concat(a));const i=t.filter((e=>Kl(e)));let l;l=0===i.length?Promise.resolve([]):"original"===e.imageSizeType?(e=>{const t=e.map((e=>os(e).then((t=>({showSrc:t,type:"photo",file:e,uniqueCode:es(e),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,deletable:!0,message:"",originalName:e.name,originalSize:e.size,originalFile:e})))));return Promise.all(t).then((e=>{const t=[];return e.forEach((e=>{o(e)&&t.push(e)})),t})).finally((()=>{}))})(i):T(i),l.then((e=>{e&&e.length>0&&(r=r.concat(e))})).finally((()=>{e.useFileNameAsLabel&&r.forEach((e=>{e.label=e.originalName})),b.value=[],n("processing",!1),n("update:mediaList",[...e.mediaList,...r]),e.afterRead&&e.afterRead(r)}))},M=t=>sd(this,null,(function*(){const o=t.target.files;if(!o||0===o.length)return;const n=(t=>{const o=[];for(let n=0;n<t.length;n++){const a=t[n];if(a.size>1024*e.maxFileSize)return qo(`请勿添加大于${e.maxFileSize}K的文件`),o;if(S(a))return qo("请勿重复添加文件"),o;o.push(a)}return o})(o);if(0!==n.length&&(t=>e.mediaList.length+t.length>e.maxMediaCount?(qo(`最多只能上传${e.maxMediaCount}个文件`),!1):e.mediaList.filter((e=>"photo"===e.type)).length+t.filter((e=>Kl(e))).length>e.maxImageCount?(qo(`最多只能上传${e.maxImageCount}张图片`),!1):e.mediaList.filter((e=>"video"===e.type)).length+t.filter((e=>Jl(e))).length>e.maxVideoCount?(qo(`最多只能上传${e.maxVideoCount}个视频`),!1):!(e.mediaList.filter((e=>"audio"===e.type)).length+t.filter((e=>Ql(e))).length>e.maxAudioCount&&(qo(`最多只能上传${e.maxAudioCount}个录音`),1)))(n))if(e.beforeRead)try{const t=yield e.beforeRead(n);if(!t)return;if(Array.isArray(t)){const e=t.filter((e=>!!e));O(e)}else O(n)}catch(a){return void qo(null==a?void 0:a.message)}else O(n)})),P=(e,o)=>{if("photo"===e){if("take"===o)return t.createVNode(Wl,{class:ud("icon")},null);if("pick"===o)return t.createVNode(Yl,{class:ud("icon")},null)}else{if("video"===e)return t.createVNode(ql,{class:ud("icon")},null);if("audio"===e)return t.createVNode(Gl,{class:ud("icon")},null);if("file"===e)return t.createVNode(Xl,{class:ud("icon")},null)}},I=(e,o)=>{let n="";return"photo"===e?"take"===o?n="拍照":"pick"===o&&(n="照片"):"video"===e?n="摄像":"audio"===e?n="录音":"file"===e&&(n="文档"),t.createVNode("div",{class:ud("box")},[t.createVNode("div",{class:ud("button"),onClick:()=>N(e,o)},[P(e,o)]),t.createVNode("div",{class:ud("label")},[n])])},B=()=>{const t=[];if(e.allowTakePhoto&&t.push(I("photo","take")),e.allowPickPhoto&&t.push(I("photo","pick")),e.allowTakeVideo||e.allowPickVideo){let o="take_and_pick";e.allowTakeVideo?e.allowPickVideo||(o="take"):o="pick",t.push(I("video",o))}if(e.allowTakeAudio||e.allowPickAudio){let o="take_and_pick";e.allowTakeAudio?e.allowPickAudio||(o="take"):o="pick",t.push(I("audio",o))}return e.allowPickFile&&t.push(I("file","pick")),t},D=e=>{const{status:n,message:a}=e;if("processing"===n||"uploading"===n||"failed"===n){const e="failed"===n?t.createVNode(it,{name:"close",class:ud("mask-icon")},null):t.createVNode(It,{class:ud("loading")},null),r=o(a)&&""!==a;return t.createVNode("div",{class:ud("mask")},[e,r&&t.createVNode("div",{class:ud("mask-message")},[a])])}},E=e=>{if(a.thumbnail)return a.thumbnail({file:e});if("video"===e.type)return t.createVNode($l,{class:ud("thumbnail")},null);if("audio"===e.type)return t.createVNode(Ul,{class:ud("thumbnail")},null);if("file"===e.type)return t.createVNode(Zl,{class:ud("thumbnail")},null);if("photo"===e.type){const o=e.showSrc||e.url;return t.createVNode(eo,{src:o,fit:"cover",radius:"4"},null)}return t.createVNode(Zl,{class:ud("thumbnail")},null)},z=e=>a["preview-cover"]?a["preview-cover"]({file:e}):Xn(e.label)?void 0:t.createVNode("div",{class:ud("thumbnail-label")},[e.label]),_=(t,o)=>sd(this,null,(function*(){if(e.beforeDelete){if(!(yield e.beforeDelete(t)))return}((t,o)=>{const a=e.mediaList.slice(0);a.splice(o,1),n("update:mediaList",a),n("delete",t,o)})(t,o)})),j=t=>sd(this,null,(function*(){var o;if(e.preview&&(yield e.preview(e.mediaList,t)))return;const n=e.mediaList[t];if("photo"===n.type){const e=k.value.indexOf(n);bl({images:k.value.map((e=>({url:e.url||e.showSrc||""}))),startPosition:e,closeable:!0})}else if("audio"===n.type||"video"===n.type)n.file||n.url?(u.value=n.type,d.value=n.url||(URL||webkitURL).createObjectURL(n.file),s.value=!0):qo("文件参数缺失");else if("file"===n.type){try{let e=yield Promise.resolve().then((()=>zL));if(e&&e.getJSI&&n.url){let t=null==(o=e.getJSI())?void 0:o.file;if(t&&t.download&&t.openDocument)return Wo({message:"打开中...",forbidClick:!0,duration:0}),void t.download({url:n.url}).then((({tempFilePath:e})=>{t&&t.openDocument?t.openDocument({localFilePath:e}).finally((()=>{Go()})):Go()})).catch((()=>{Go(),qo("下载失败")}))}}catch(a){console.log(a.message)}qo("暂不支持此类文件的预览")}})),F=e=>{l.value=!1,e.func&&e.func()};return ct({mediaPickAction:N,handleInputFiles:M,transformImageFiles:T,resetInput:V,previewMedia:j}),()=>{const o=e.showTitle&&t.createVNode("div",{class:ud("title")},[e.title]),n=e.allowTakePhoto||e.allowPickPhoto||e.allowTakeVideo||e.allowPickVideo||e.allowTakeAudio||e.allowPickAudio||e.allowPickFile;return t.createVNode("div",{class:ud()},[o,[t.createVNode("input",{type:"file",accept:"image/*",ref:f,multiple:!0,onChange:M,class:ud("hidden"),onClick:()=>V("photo","take"),capture:"environment"},null),t.createVNode("input",{type:"file",accept:"image/*,image/exact",ref:p,multiple:!0,onChange:M,class:ud("hidden"),onClick:()=>V("photo","pick")},null),t.createVNode("input",{type:"file",accept:"video/*",ref:h,onChange:M,class:ud("hidden"),onClick:()=>V("video","take"),capture:"environment"},null),t.createVNode("input",{type:"file",accept:"video/*",ref:v,onChange:M,class:ud("hidden"),onClick:()=>V("video","pick")},null),t.createVNode("input",{type:"file",accept:"audio/*",ref:m,onChange:M,class:ud("hidden"),onClick:()=>V("audio","take"),capture:"nonce"},null),t.createVNode("input",{type:"file",accept:"audio/*",ref:g,onChange:M,class:ud("hidden"),onClick:()=>V("audio","pick")},null),t.createVNode("input",{type:"file",accept:"*/*",ref:y,onChange:M,class:ud("hidden"),onClick:()=>V("file","pick")},null)],t.createVNode(Hl,t.mergeProps({show:s.value,"onUpdate:show":e=>s.value=e,mediaType:u.value,mediaUrl:d.value},e.mediaPlayerProps),null),t.createVNode(jt,{show:l.value,"onUpdate:show":e=>l.value=e,actions:A.value,description:"请选择","cancel-text":"取消","close-on-click-action":!0,onSelect:F},null),t.withDirectives(t.createVNode("div",{class:ud("line")},[B(),a.extend?a.extend():""]),[[t.vShow,n]]),t.withDirectives(t.createVNode(Gi,{ref:w,"column-num":"3",border:!1,square:!0,gutter:"4",class:ud("grid")},{default:()=>[e.mediaList.map(((e,o)=>{const n=e.deletable&&"uploading"!==e.status&&t.createVNode(zl,{class:ud("delete"),onClick:t=>{t.stopPropagation(),_(e,o)}},null);return t.createVNode(el,{key:e.uniqueCode,onClick:()=>j(o)},{default:()=>[E(e),z(e),D(e),n]})}))]}),[[t.vShow,e.mediaList.length]]),t.withDirectives(t.createVNode(Gi,{"column-num":"3",border:!1,square:!0,gutter:"4",class:ud("grid")},{default:()=>[b.value.map((e=>t.createVNode(el,{key:e.uniqueCode},{default:()=>[E(e),z(e),D(e)]})))]}),[[t.vShow,b.value.length]])])}}})),[hd,vd]=Se("multiple-picker-options"),md={textKey:N(""),readonly:Boolean,allowHtml:Boolean,itemHeight:x(0),columnCounts:x(3),initialOptions:L([]),currentIndexes:L([])};var gd=t.defineComponent({name:hd,props:md,emits:["change","update:currentIndexes"],setup(e,{emit:o,slots:n}){const r=t.computed((()=>e.initialOptions)),i=t.reactive({confirmed:!1}),l=t.computed((()=>e.currentIndexes)),s=t.ref(e.columnCounts),c=()=>{s.value=Number(e.columnCounts),s.value&&s.value>3&&(s.value=3),s.value&&s.value<1&&(s.value=1);const i={height:`${e.itemHeight+8}px`,width:1/s.value*100+"%"};return r.value.map(((r,c)=>{const u=(t=>a(t)&&e.textKey in t?t[e.textKey]:t)(r),d=(t=>e.readonly||a(t)&&t.disabled)(r),f={class:"zt-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:u};return t.createVNode("div",{role:"button",style:i,tabindex:d?-1:0,onClick:()=>(t=>{if(e.readonly)return;let n=!1;l.value.forEach(((e,o)=>{e===t&&(n=!0,l.value.splice(o,1))})),n||l.value.push(t),o("update:currentIndexes",l.value),o("change")})(c),class:[vd("item",{disabled:d,selected:l.value.indexOf(c)>-1,"disabled-selected":d&&l.value.indexOf(c)>-1,last:(c+1)%s.value==0})]},[n.options?n.options(r):t.createVNode("div",f,null)])}))};return ct({setConfirmIndex:e=>{const t=hi(e);i.confirmed=!0;const o=Object.keys(t);l.value.length=0,o.forEach((e=>{l.value.push(t[e])}))}}),()=>t.createVNode("div",{class:vd()},[t.createVNode("div",{ref:"wrapper",class:vd("wrapper")},[c()])])}});const[yd,wd]=Se("multiple-picker"),bd={title:String,loading:Boolean,readonly:Boolean,itemHeight:C(0),cancelButtonText:String,confirmButtonText:String,otherButtonText:String,showPicker:Boolean,allowHtml:w,closeOnPopstate:w,closeOnClickOverlay:w,showToolbar:w,showTitle:w,options:L(),toolbarPosition:N("bottom"),textKey:N("text"),columnCounts:x(3),selectedIndex:L([]),selectedValue:L([]),popup:w,showSelectAll:Boolean};const Ld=je(t.defineComponent({name:yd,props:bd,emits:["cancel","confirm","change","update:showPicker","update:selectedIndex","update:selectedValue"],setup(e,{emit:o,slots:n}){const a=t.ref(e.options),r=t.computed((()=>e.selectedIndex)),i=t.computed((()=>e.selectedValue)),l=t.ref(e.selectedIndex),s=t.ref(e.selectedValue),c=t.computed((()=>l.value.length>0&&l.value.length<a.value.length)),u=t.computed((()=>l.value.length>0&&l.value.length===a.value.length)),d=e=>{l.value=e,e.length>0?p():s.value=[],p(),o("update:selectedValue",s.value)},f=()=>{var e;s.value&&s.value.length>0&&(l.value.splice(0,l.value.length),null==(e=a.value)||e.forEach(((e,t)=>{e.value&&s.value.includes(e.value)&&l.value.push(t)})))};f();const p=()=>{l.value&&l.value.length>0&&(s.value.splice(0,s.value.length),l.value.forEach((e=>{e>-1&&e<a.value.length&&s.value.push(a.value[e].value)})))},h=t.ref(),v=t.ref(e.showPicker);t.ref(36);t.watch(v,(t=>{t!==e.showPicker&&o("update:showPicker",t),a.value=hi(e.options),l.value=hi(r.value),s.value=hi(i.value),f()})),t.watch((()=>e.showPicker),(e=>{var t;e!==v.value&&(v.value=e),null==(t=h.value)||t.setConfirmIndex(l.value)}));const m=t.computed((()=>{e.itemHeight&&ue(Number(e.itemHeight))})),g=()=>{o("update:showPicker",!1),o("cancel")},y=e=>o("update:showPicker",e),w=()=>{const t=l.value,o=[];return null==t||t.forEach((t=>{t>-1&&t<a.value.length&&a.value[t]&&o.push({[e.textKey]:a.value[t][e.textKey],value:a.value[t].value,initialIndex:t})})),o},b=()=>o("change",w()),L=()=>{const e=w();o("confirm",e)},x=()=>{if(e.showTitle)return n.title?n.title():t.createVNode("div",{class:["zt-ellipsis",wd("title")]},[e.title?e.title:"请选择"])},C=()=>{const o=e.otherButtonText||"其他";return t.createVNode(ho,{class:wd("select-other"),size:"medium",style:{marginLeft:"12px",marginRight:"8px"},onClick:T},{default:()=>[n.selectOther?n.selectOther():o]})},N=()=>{const o=e.cancelButtonText||"取消";return t.createVNode(ho,t.mergeProps({class:[e.showSelectAll?wd("in-select-all"):""],size:e.showSelectAll?"medium":"normal"},!0!==e.showSelectAll?{block:!0}:{},{style:{marginRigth:"4px"},onClick:g}),{default:()=>[n.cancel?n.cancel():o]})},V=()=>{const o=e.confirmButtonText||"确定";return t.createVNode(ho,t.mergeProps({type:"primary",class:[e.showSelectAll?wd("in-select-all"):""],size:e.showSelectAll?"medium":"normal"},!0!==e.showSelectAll?{block:!0}:{},{style:{marginLeft:"8px"},onClick:L}),{default:()=>[n.confirm?n.confirm():o]})},k=()=>{if(e.showToolbar){const o=e.showSelectAll?[A(),C(),N(),V()]:[N(),V()];return t.createVNode("div",{class:wd("toolbar")},[n.toolbar?n.toolbar():o])}},A=()=>t.createVNode("div",{class:wd("toolbar-select-all")},[t.createVNode(La,{class:wd("toolbar-checkbox"),shape:"square",modelValue:u.value,"onUpdate:modelValue":e=>u.value=e,indeterminate:c.value,onClick:S},{default:()=>[t.createTextVNode("全选")]}),t.createVNode("div",{class:wd("toolbar-divider")},null),t.createVNode("span",{class:wd("toolbar-checkbox-text")},[t.createTextVNode("已选 "),l.value.length])]),S=()=>{l.value=u.value?[]:a.value.map(((e,t)=>t))},T=()=>{const e=Array();a.value.forEach(((t,o)=>{l.value.includes(o)||e.push(o)})),l.value=e},O=t.computed((()=>{let o=[];return o=a.value&&a.value[0]&&"object"!=typeof a.value[0]?a.value.map((e=>({value:e,text:e}))):a.value,t.createVNode(gd,{ref:h,currentIndexes:l.value,"onUpdate:currentIndexes":[e=>l.value=e,d],columnCounts:e.columnCounts,initialOptions:o,allowHtml:e.allowHtml,textKey:e.textKey,readonly:e.readonly,itemHeight:Number(m),onChange:b},{option:n.option})})),M=()=>t.createVNode("div",{class:wd()},[x(),e.loading?t.createVNode(It,{class:wd("loading")},null):"",t.createVNode("div",{class:wd("options")},[O.value]),"bottom"===e.toolbarPosition?k():""]);return ct({resetOptions:e=>{a.value=e.options,l.value=e.selectedIndex,l.value.length>0?p():s.value=[],o("update:selectedValue",s.value)}}),()=>e.popup?t.createVNode(kt,{show:v.value,"onUpdate:show":[e=>v.value=e,y],round:!0,position:"bottom",closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay},{default:M}):M()}}));function xd(e,o){const n=Ko(e,!0);return e=>t.createVNode("div",{class:o("placeholder"),style:{height:n.value?`${n.value}px`:void 0}},[e()])}const[Cd,Nd]=Se("nav-bar"),Vd={title:String,fixed:Boolean,zIndex:y,border:w,leftText:Boolean,leftIcon:Boolean,multiIcon:Boolean,rightText:String,rightIcon:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,color:String,navBarBackground:String,leftBtnStyle:Object};const kd=je(t.defineComponent({name:Cd,props:Vd,emits:["clickLeft","clickRight"],setup(e,{emit:o,slots:n}){const a=t.ref(),r=xd(a,Nd),i=e=>o("clickLeft",e),l=e=>o("clickRight",e),s=()=>{const{color:t,navBarBackground:o}=e,n={};if(t&&(n.color=t),o&&(n.background=o),Object.keys(n).length>0)return n},c=()=>{const{title:o,fixed:r}=e,c=e.leftText||e.leftIcon||n.left,u=e.rightIcon||e.rightText||n.right;return t.createVNode("div",{ref:a,style:s(),class:[Nd({fixed:r}),{"zt-safe-area-top":e.safeAreaInsetTop}]},[t.createVNode("div",{class:Nd("content")},[c&&t.createVNode("div",{class:[Nd("left")],onClick:i},[n.left?n.left():t.createVNode("div",{class:Nd("bar-btn","left")},[e.leftIcon?t.createVNode(rt,{class:Nd("icon"),name:"back"},null):"",e.leftText?t.createVNode("span",{class:Nd("text",e.leftIcon?"left-text":"")},["返回"]):""])]),t.createVNode("div",{class:[Nd("title"),"zt-ellipsis"]},[n.title?n.title():o]),u&&t.createVNode("div",{class:[Nd("right",e.multiIcon?"multi-icon":"")],onClick:l},[n.right?n.right():t.createVNode("div",{class:Nd("bar-btn","right")},[e.rightIcon?t.createVNode(rt,{class:Nd("icon"),name:"more"},null):"",e.rightText?t.createVNode("span",{class:Nd("text")},[e.rightText||"更多"]):""]),n.extra?n.extra():null])])])};return()=>e.fixed&&e.placeholder?r(c):c()}})),[Ad,Sd]=Se("notice-bar"),Td={text:String,mode:String,color:String,delay:C(1),speed:C(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};const Od=je(t.defineComponent({name:Ad,props:Td,emits:["close","replay"],setup(e,{emit:n,slots:a}){let r,i=0,l=0;const s=t.ref(),c=t.ref(),u=t.reactive({show:!0,offset:0,duration:0}),d=t=>{"closeable"===e.mode&&(u.show=!1,n("close",t))},f=()=>{if(a["right-icon"])return a["right-icon"]();const o="closeable"===e.mode?"clear-r":"link"===e.mode?"arrow-right":void 0;return o?t.createVNode(it,{name:o,class:Sd("right-icon"),onClick:d},null):void 0},p=()=>{u.offset=i,u.duration=0,k((()=>{A((()=>{u.offset=-l,u.duration=(l+i)/+e.speed,n("replay")}))}))},h=()=>{const o=!1===e.scrollable&&!e.wrapable,n={transform:u.offset?`translateX(${u.offset}px)`:"",transitionDuration:`${u.duration}s`};return t.createVNode("div",{ref:s,role:"marquee",class:Sd("wrap")},[t.createVNode("div",{ref:c,style:n,class:[Sd("content"),{"zt-ellipsis":o}],onTransitionend:p},[a.default?a.default():e.text])])},v=()=>{const{delay:t,speed:n,scrollable:a}=e,d=o(t)?1e3*+t:0;i=0,l=0,u.offset=0,u.duration=0,clearTimeout(r),r=setTimeout((()=>{if(!s.value||!c.value||!1===a)return;const e=P(s).width,t=P(c).width;(a||t>e)&&A((()=>{i=e,l=t,u.offset=-l,u.duration=l/+n}))}),d)};return vt(v),E(v),z("pageshow",v),ct({reset:v}),t.watch((()=>[e.text,e.scrollable]),v),()=>{const{color:o,wrapable:n,background:r}=e;return t.withDirectives(t.createVNode("div",{role:"alert",class:Sd({wrapable:n}),style:{color:o,background:r}},[a["left-icon"]?a["left-icon"]():e.leftIcon?t.createVNode(it,{class:Sd("left-icon"),name:e.leftIcon},null):void 0,h(),f()]),[[t.vShow,u.show]])}}})),[Md,Pd]=Se("notify"),Id=d({},lt,{type:N("danger"),color:String,message:y,position:N("top"),className:g,background:String,lockScroll:Boolean});var Bd=t.defineComponent({name:Md,props:Id,emits:["update:show"],setup(e,{emit:o,slots:n}){const a=e=>o("update:show",e);return()=>t.createVNode(Vt,{show:e.show,class:[Pd([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,position:e.position,duration:.2,lockScroll:e.lockScroll,"onUpdate:show":a},{default:()=>[n.default?n.default():e.message]})}});let Dd,Ed;let zd={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0};const _d=()=>{Ed&&Ed.toggle(!1)};const jd=je(Bd),[Fd,Rd]=Se("key"),Hd=t.createVNode(it,{name:"keyboard-shrink",size:"40"},null),$d=t.createVNode(it,{name:"backspace",size:"40"},null);var Ud=t.defineComponent({name:Fd,props:{type:String,text:y,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(e,{emit:o,slots:n}){const a=t.ref(!1),r=ut(),i=e=>{r.start(e),a.value=!0},l=e=>{r.move(e),r.direction.value&&(a.value=!1)},s=t=>{a.value&&(n.default||ee(t),a.value=!1,o("press",e.text,e.type))},c=()=>{if(e.loading)return t.createVNode(Pt,{class:Rd("loading-icon")},null);const o=n.default?n.default():e.text;switch(e.type){case"delete":return o||$d;case"extra":return o||Hd;default:return o}};return()=>t.createVNode("div",{class:Rd("wrapper",{wider:e.wider}),onTouchstartPassive:i,onTouchmovePassive:l,onTouchend:s,onTouchcancel:s},[t.createVNode("div",{role:"button",tabindex:0,class:Rd([e.color,{large:e.large,active:a.value,delete:"delete"===e.type}])},[c()])])}});const[Zd,Wd]=Se("number-keyboard"),Yd={show:Boolean,title:String,theme:N("default"),zIndex:y,teleport:[String,Object],maxlength:C(1/0),modelValue:N(""),transition:w,blurOnClose:w,showDeleteKey:w,randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,hideOnClickOutside:w,safeAreaInsetBottom:w,extraKey:{type:[String,Array],default:""}};const qd=je(t.defineComponent({name:Zd,props:Yd,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),r=()=>{const t=Array(9).fill("").map(((e,t)=>({text:t+1})));return e.randomKeyOrder&&function(e){for(let t=e.length-1;t>0;t--){const o=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[o],e[o]=n}}(t),t},i=t.computed((()=>"custom"===e.theme?(()=>{const t=r(),{extraKey:o}=e,n=Array.isArray(o)?o:[o];return 1===n.length?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):2===n.length&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t})():[...r(),{text:e.extraKey,type:"extra"},{text:0},{text:e.showDeleteKey?e.deleteButtonText:"",type:e.showDeleteKey?"delete":""}])),l=()=>{e.show&&o("blur")},s=()=>o(e.show?"show":"hide"),c=(t,n)=>{if(""===t)return void("extra"===n&&l());const a=e.modelValue;"delete"===n?(o("delete"),o("update:modelValue",a.slice(0,a.length-1))):"close"===n?(o("close"),e.blurOnClose&&l()):a.length<+e.maxlength?(o("input",t),o("update:modelValue",a+t)):a.length>=+e.maxlength&&Uo(`最大长度为${e.maxlength}`)},u=()=>{if("custom"===e.theme)return t.createVNode("div",{class:Wd("sidebar")},[e.showDeleteKey&&t.createVNode(Ud,{large:!0,text:e.deleteButtonText,type:"delete",onPress:c},{delete:n.delete}),t.createVNode(Ud,{large:!0,text:e.closeButtonText,type:"close",color:"blue",loading:e.closeButtonLoading,onPress:c},null)])};return t.watch((()=>e.show),(t=>{e.transition||o(t?"show":"hide")})),e.hideOnClickOutside&&_(a,l,{eventName:"touchstart"}),()=>{const o=(()=>{const{title:o}=e,a=n["title-left"];if(o||a)return t.createVNode("div",{class:Wd("header")},[a&&t.createVNode("span",{class:Wd("title-left")},[a()]),o&&t.createVNode("div",{class:Wd("title")},[o])])})(),{title:r}=e,l=t.createVNode(t.Transition,{name:e.transition?"zt-slide-up":""},{default:()=>[t.withDirectives(t.createVNode("div",{ref:a,style:le(e.zIndex),class:[Wd({unfit:!e.safeAreaInsetBottom,"with-title":!!o}),r?Wd("no-title"):""],onAnimationend:s,onTouchstartPassive:J},[r&&o,t.createVNode("div",{class:[Wd("body"),r?"":Wd("body-no-title")]},[t.createVNode("div",{class:Wd("keys")},[i.value.map((e=>{const o={};return"delete"===e.type&&(o.default=n.delete),"extra"===e.type&&(o.default=n["extra-key"]),t.createVNode(Ud,{key:e.text,text:e.text,type:e.type,wider:e.wider,color:e.color,onPress:c},o)}))]),u()])]),[[t.vShow,e.show]])]});return e.teleport?t.createVNode(t.Teleport,{to:e.teleport},{default:()=>[l]}):l}}})),[Gd,Xd]=Se("password-input"),Kd={info:String,mask:w,value:N(""),gutter:y,length:C(6),focused:Boolean,errorInfo:String};const Qd=je(t.defineComponent({name:Gd,props:Kd,emits:["focus"],setup(e,{emit:o}){const n=e=>{e.stopPropagation(),o("focus",e)},a=()=>{const o=[],{mask:n,value:a,gutter:r,focused:i}=e,l=+e.length;for(let e=0;e<l;e++){const l=a[e],s=0!==e&&!r,c=i&&e===a.length;let u;0!==e&&r&&(u={marginLeft:re(r)}),o.push(t.createVNode("li",{class:[{[Me]:s},Xd("item",{focus:c})],style:u},[n?t.createVNode("i",{style:{visibility:l?"visible":"hidden"}},null):l,c&&t.createVNode("div",{class:Xd("cursor")},null)]))}return o};return()=>{const o=e.errorInfo||e.info;return t.createVNode("div",{class:Xd()},[t.createVNode("ul",{class:[Xd("security"),{[Ie]:!e.gutter}],onTouchstartPassive:n},[a()]),o&&t.createVNode("div",{class:Xd(e.errorInfo?"error-info":"info")},[o])])}}})),Jd=["top","right","bottom","left"],ef=Math.min,tf=Math.max,of=Math.round,nf=Math.floor,af=e=>({x:e,y:e}),rf={left:"right",right:"left",bottom:"top",top:"bottom"},lf={start:"end",end:"start"};function sf(e,t,o){return tf(e,ef(t,o))}function cf(e,t){return"function"==typeof e?e(t):e}function uf(e){return e.split("-")[0]}function df(e){return e.split("-")[1]}function ff(e){return"x"===e?"y":"x"}function pf(e){return"y"===e?"height":"width"}function hf(e){return["top","bottom"].includes(uf(e))?"y":"x"}function vf(e){return ff(hf(e))}function mf(e){return e.replace(/start|end/g,(e=>lf[e]))}function gf(e){return e.replace(/left|right|bottom|top/g,(e=>rf[e]))}function yf(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function wf(e){const{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function bf(e,t,o){let{reference:n,floating:a}=e;const r=hf(t),i=vf(t),l=pf(i),s=uf(t),c="y"===r,u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,f=n[l]/2-a[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-a.width,y:d};break;default:p={x:n.x,y:n.y}}switch(df(t)){case"start":p[i]-=f*(o&&c?-1:1);break;case"end":p[i]+=f*(o&&c?-1:1)}return p}async function Lf(e,t){var o;void 0===t&&(t={});const{x:n,y:a,platform:r,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cf(t,e),h=yf(p),v=l[f?"floating"===d?"reference":"floating":d],m=wf(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),w=await(null==r.isElement?void 0:r.isElement(y))&&await(null==r.getScale?void 0:r.getScale(y))||{x:1,y:1},b=wf(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:s}):g);return{top:(m.top-b.top+h.top)/w.y,bottom:(b.bottom-m.bottom+h.bottom)/w.y,left:(m.left-b.left+h.left)/w.x,right:(b.right-m.right+h.right)/w.x}}function xf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cf(e){return Jd.some((t=>e[t]>=0))}function Nf(){return"undefined"!=typeof window}function Vf(e){return Sf(e)?(e.nodeName||"").toLowerCase():"#document"}function kf(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Af(e){var t;return null==(t=(Sf(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Sf(e){return!!Nf()&&(e instanceof Node||e instanceof kf(e).Node)}function Tf(e){return!!Nf()&&(e instanceof Element||e instanceof kf(e).Element)}function Of(e){return!!Nf()&&(e instanceof HTMLElement||e instanceof kf(e).HTMLElement)}function Mf(e){return!(!Nf()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kf(e).ShadowRoot)}function Pf(e){const{overflow:t,overflowX:o,overflowY:n,display:a}=_f(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(a)}function If(e){return["table","td","th"].includes(Vf(e))}function Bf(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(o){return!1}}))}function Df(e){const t=Ef(),o=Tf(e)?_f(e):e;return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function Ef(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function zf(e){return["html","body","#document"].includes(Vf(e))}function _f(e){return kf(e).getComputedStyle(e)}function jf(e){return Tf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ff(e){if("html"===Vf(e))return e;const t=e.assignedSlot||e.parentNode||Mf(e)&&e.host||Af(e);return Mf(t)?t.host:t}function Rf(e){const t=Ff(e);return zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Of(t)&&Pf(t)?t:Rf(t)}function Hf(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const a=Rf(e),r=a===(null==(n=e.ownerDocument)?void 0:n.body),i=kf(a);if(r){const e=$f(i);return t.concat(i,i.visualViewport||[],Pf(a)?a:[],e&&o?Hf(e):[])}return t.concat(a,Hf(a,[],o))}function $f(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uf(e){const t=_f(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Of(e),r=a?e.offsetWidth:o,i=a?e.offsetHeight:n,l=of(o)!==r||of(n)!==i;return l&&(o=r,n=i),{width:o,height:n,$:l}}function Zf(e){return Tf(e)?e:e.contextElement}function Wf(e){const t=Zf(e);if(!Of(t))return af(1);const o=t.getBoundingClientRect(),{width:n,height:a,$:r}=Uf(t);let i=(r?of(o.width):o.width)/n,l=(r?of(o.height):o.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Yf=af(0);function qf(e){const t=kf(e);return Ef()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Yf}function Gf(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const a=e.getBoundingClientRect(),r=Zf(e);let i=af(1);t&&(n?Tf(n)&&(i=Wf(n)):i=Wf(e));const l=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==kf(e))&&t}(r,o,n)?qf(r):af(0);let s=(a.left+l.x)/i.x,c=(a.top+l.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(r){const e=kf(r),t=n&&Tf(n)?kf(n):n;let o=e,a=$f(o);for(;a&&n&&t!==o;){const e=Wf(a),t=a.getBoundingClientRect(),n=_f(a),r=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,o=kf(a),a=$f(o)}}return wf({width:u,height:d,x:s,y:c})}function Xf(e,t){const o=jf(e).scrollLeft;return t?t.left+o:Gf(Af(e)).left+o}function Kf(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=kf(e),n=Af(e),a=o.visualViewport;let r=n.clientWidth,i=n.clientHeight,l=0,s=0;if(a){r=a.width,i=a.height;const e=Ef();(!e||e&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:r,height:i,x:l,y:s}}(e,o);else if("document"===t)n=function(e){const t=Af(e),o=jf(e),n=e.ownerDocument.body,a=tf(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=tf(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-o.scrollLeft+Xf(e);const l=-o.scrollTop;return"rtl"===_f(n).direction&&(i+=tf(t.clientWidth,n.clientWidth)-a),{width:a,height:r,x:i,y:l}}(Af(e));else if(Tf(t))n=function(e,t){const o=Gf(e,!0,"fixed"===t),n=o.top+e.clientTop,a=o.left+e.clientLeft,r=Of(e)?Wf(e):af(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:a*r.x,y:n*r.y}}(t,o);else{const o=qf(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return wf(n)}function Qf(e,t){const o=Ff(e);return!(o===t||!Tf(o)||zf(o))&&("fixed"===_f(o).position||Qf(o,t))}function Jf(e,t,o){const n=Of(t),a=Af(t),r="fixed"===o,i=Gf(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const s=af(0);if(n||!n&&!r)if(("body"!==Vf(t)||Pf(a))&&(l=jf(t)),n){const e=Gf(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Xf(a));let c=0,u=0;if(a&&!n&&!r){const e=a.getBoundingClientRect();u=e.top+l.scrollTop,c=e.left+l.scrollLeft-Xf(a,e)}return{x:i.left+l.scrollLeft-s.x-c,y:i.top+l.scrollTop-s.y-u,width:i.width,height:i.height}}function ep(e){return"static"===_f(e).position}function tp(e,t){if(!Of(e)||"fixed"===_f(e).position)return null;if(t)return t(e);let o=e.offsetParent;return Af(e)===o&&(o=o.ownerDocument.body),o}function op(e,t){const o=kf(e);if(Bf(e))return o;if(!Of(e)){let t=Ff(e);for(;t&&!zf(t);){if(Tf(t)&&!ep(t))return t;t=Ff(t)}return o}let n=tp(e,t);for(;n&&If(n)&&ep(n);)n=tp(n,t);return n&&zf(n)&&ep(n)&&!Df(n)?o:n||function(e){let t=Ff(e);for(;Of(t)&&!zf(t);){if(Df(t))return t;if(Bf(t))return null;t=Ff(t)}return null}(e)||o}const np={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e;const r="fixed"===a,i=Af(n),l=!!t&&Bf(t.floating);if(n===i||l&&r)return o;let s={scrollLeft:0,scrollTop:0},c=af(1);const u=af(0),d=Of(n);if((d||!d&&!r)&&(("body"!==Vf(n)||Pf(i))&&(s=jf(n)),Of(n))){const e=Gf(n);c=Wf(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-s.scrollLeft*c.x+u.x,y:o.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:Af,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e;const r=[..."clippingAncestors"===o?Bf(t)?[]:function(e,t){const o=t.get(e);if(o)return o;let n=Hf(e,[],!1).filter((e=>Tf(e)&&"body"!==Vf(e))),a=null;const r="fixed"===_f(e).position;let i=r?Ff(e):e;for(;Tf(i)&&!zf(i);){const t=_f(i),o=Df(i);o||"fixed"!==t.position||(a=null),(r?!o&&!a:!o&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||Pf(i)&&!o&&Qf(e,i))?n=n.filter((e=>e!==i)):a=t,i=Ff(i)}return t.set(e,n),n}(t,this._c):[].concat(o),n],i=r[0],l=r.reduce(((e,o)=>{const n=Kf(t,o,a);return e.top=tf(n.top,e.top),e.right=ef(n.right,e.right),e.bottom=ef(n.bottom,e.bottom),e.left=tf(n.left,e.left),e}),Kf(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:op,getElementRects:async function(e){const t=this.getOffsetParent||op,o=this.getDimensions,n=await o(e.floating);return{reference:Jf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Uf(e);return{width:t,height:o}},getScale:Wf,isElement:Tf,isRTL:function(e){return"rtl"===_f(e).direction}};function ap(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Zf(e),u=a||r?[...c?Hf(c):[],...Hf(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",o,{passive:!0}),r&&e.addEventListener("resize",o)}));const d=c&&l?function(e,t){let o,n=null;const a=Af(e);function r(){var e;clearTimeout(o),null==(e=n)||e.disconnect(),n=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-nf(u)+"px "+-nf(a.clientWidth-(c+d))+"px "+-nf(a.clientHeight-(u+f))+"px "+-nf(c)+"px",threshold:tf(0,ef(1,s))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return i();t?i(!1,t):o=setTimeout((()=>{i(!1,1e-7)}),1e3)}h=!1}try{n=new IntersectionObserver(v,{...p,root:a.ownerDocument})}catch(m){n=new IntersectionObserver(v,p)}n.observe(e)}(!0),r}(c,o):null;let f,p=-1,h=null;i&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),o()})),c&&!s&&h.observe(c),h.observe(t));let v=s?Gf(e):null;return s&&function t(){const n=Gf(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||o();v=n,f=requestAnimationFrame(t)}(),o(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",o),r&&e.removeEventListener("resize",o)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(f)}}const rp=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:a,y:r,placement:i,middlewareData:l}=t,s=await async function(e,t){const{placement:o,platform:n,elements:a}=e,r=await(null==n.isRTL?void 0:n.isRTL(a.floating)),i=uf(o),l=df(o),s="y"===hf(o),c=["left","top"].includes(i)?-1:1,u=r&&s?-1:1,d=cf(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(o=l.offset)?void 0:o.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:i}}}}},ip=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=cf(e,t),c={x:o,y:n},u=await Lf(t,s),d=hf(uf(a)),f=ff(d);let p=c[f],h=c[d];if(r){const e="y"===f?"bottom":"right";p=sf(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=sf(h+u["y"===d?"top":"left"],h,h-u[e])}const v=l.fn({...t,[f]:p,[d]:h});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[f]:r,[d]:i}}}}}},lp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:a,middlewareData:r,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...m}=cf(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=uf(a),y=hf(l),w=uf(l)===l,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),L=f||(w||!v?[gf(l)]:function(e){const t=gf(e);return[mf(e),t,mf(t)]}(l)),x="none"!==h;!f&&x&&L.push(...function(e,t,o,n){const a=df(e);let r=function(e,t,o){const n=["left","right"],a=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?a:n:t?n:a;case"left":case"right":return t?r:i;default:return[]}}(uf(e),"start"===o,n);return a&&(r=r.map((e=>e+"-"+a)),t&&(r=r.concat(r.map(mf)))),r}(l,v,h,b));const C=[l,...L],N=await Lf(t,m),V=[];let k=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&V.push(N[g]),d){const e=function(e,t,o){void 0===o&&(o=!1);const n=df(e),a=vf(e),r=pf(a);let i="x"===a?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=gf(i)),[i,gf(i)]}(a,i,b);V.push(N[e[0]],N[e[1]])}if(k=[...k,{placement:a,overflows:V}],!V.every((e=>e<=0))){var A,S;const e=((null==(A=r.flip)?void 0:A.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let o=null==(S=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!o)switch(p){case"bestFit":{var T;const e=null==(T=k.filter((e=>{if(x){const t=hf(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(o=e);break}case"initialPlacement":o=l}if(a!==o)return{reset:{placement:o}}}return{}}}},sp=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o}=t,{strategy:n="referenceHidden",...a}=cf(e,t);switch(n){case"referenceHidden":{const e=xf(await Lf(t,{...a,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cf(e)}}}case"escaped":{const e=xf(await Lf(t,{...a,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:Cf(e)}}}default:return{}}}}},cp=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:a,rects:r,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=cf(e,t)||{};if(null==c)return{};const d=yf(u),f={x:o,y:n},p=vf(a),h=pf(p),v=await i.getDimensions(c),m="y"===p,g=m?"top":"left",y=m?"bottom":"right",w=m?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[p]-f[p]-r.floating[h],L=f[p]-r.reference[p],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let C=x?x[w]:0;C&&await(null==i.isElement?void 0:i.isElement(x))||(C=l.floating[w]||r.floating[h]);const N=b/2-L/2,V=C/2-v[h]/2-1,k=ef(d[g],V),A=ef(d[y],V),S=k,T=C-v[h]-A,O=C/2-v[h]/2+N,M=sf(S,O,T),P=!s.arrow&&null!=df(a)&&O!==M&&r.reference[h]/2-(O<S?k:A)-v[h]/2<0,I=P?O<S?O-S:O-T:0;return{[p]:f[p]+I,data:{[p]:M,centerOffset:O-M-I,...P&&{alignmentOffset:I}},reset:P}}}),up=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:a,rects:r,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=cf(e,t),u={x:o,y:n},d=hf(a),f=ff(d);let p=u[f],h=u[d];const v=cf(l,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===f?"height":"width",t=r.reference[f]-r.floating[e]+m.mainAxis,o=r.reference[f]+r.reference[e]-m.mainAxis;p<t?p=t:p>o&&(p=o)}if(c){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(uf(a)),o=r.reference[d]-r.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),n=r.reference[d]+r.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<o?h=o:h>n&&(h=n)}return{[f]:p,[d]:h}}}},dp=(e,t,o)=>{const n=new Map,a={platform:np,...o},r={...a.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:a="absolute",middleware:r=[],platform:i}=o,l=r.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=bf(c,n,s),f=n,p={},h=0;for(let v=0;v<l.length;v++){const{name:o,fn:r}=l[v],{x:m,y:g,data:y,reset:w}=await r({x:u,y:d,initialPlacement:n,placement:f,strategy:a,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=g?g:d,p={...p,[o]:{...p[o],...y}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:u,y:d}=bf(c,f,s))),v=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:p}})(e,t,{...a,platform:r})};function fp(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pp(e){return e instanceof fp(e).Element||e instanceof Element}function hp(e){return e instanceof fp(e).HTMLElement||e instanceof HTMLElement}function vp(e){return"undefined"!=typeof ShadowRoot&&(e instanceof fp(e).ShadowRoot||e instanceof ShadowRoot)}var mp=Math.round;function gp(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function yp(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var n=e.getBoundingClientRect(),a=1,r=1;t&&hp(e)&&(a=e.offsetWidth>0&&mp(n.width)/e.offsetWidth||1,r=e.offsetHeight>0&&mp(n.height)/e.offsetHeight||1);var i=(pp(e)?fp(e):window).visualViewport,l=!!/^((?!chrome|android).)*safari/i.test(gp())&&o,s=(n.left+(l&&i?i.offsetLeft:0))/a,c=(n.top+(l&&i?i.offsetTop:0))/r,u=n.width/a,d=n.height/r;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function wp(e){var t=fp(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bp(e){return e?(e.nodeName||"").toLowerCase():null}function Lp(e){return((pp(e)?e.ownerDocument:e.document)||window.document).documentElement}function xp(e){return fp(e).getComputedStyle(e)}function Cp(e){var t=xp(e),o=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+a+n)}function Np(e,t,o){void 0===o&&(o=!1);var n,a,r=hp(t),i=hp(t)&&function(e){var t=e.getBoundingClientRect(),o=mp(t.width)/e.offsetWidth||1,n=mp(t.height)/e.offsetHeight||1;return 1!==o||1!==n}(t),l=Lp(t),s=yp(e,i,o),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!o)&&(("body"!==bp(t)||Cp(l))&&(c=(n=t)!==fp(n)&&hp(n)?{scrollLeft:(a=n).scrollLeft,scrollTop:a.scrollTop}:wp(n)),hp(t)?((u=yp(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=function(e){return yp(Lp(e)).left+wp(e).scrollLeft}(l))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function Vp(e){return"html"===bp(e)?e:e.assignedSlot||e.parentNode||(vp(e)?e.host:null)||Lp(e)}function kp(e){return["html","body","#document"].indexOf(bp(e))>=0?e.ownerDocument.body:hp(e)&&Cp(e)?e:kp(Vp(e))}function Ap(e,t){var o;void 0===t&&(t=[]);var n=kp(e),a=n===(null==(o=e.ownerDocument)?void 0:o.body),r=fp(n),i=a?[r].concat(r.visualViewport||[],Cp(n)?n:[]):n,l=t.concat(i);return a?l:l.concat(Ap(Vp(i)))}function Sp(e){return["table","td","th"].indexOf(bp(e))>=0}function Tp(e){return hp(e)&&"fixed"!==xp(e).position?e.offsetParent:null}function Op(e){for(var t=fp(e),o=Tp(e);o&&Sp(o)&&"static"===xp(o).position;)o=Tp(o);return o&&("html"===bp(o)||"body"===bp(o)&&"static"===xp(o).position)?t:o||function(e){var t=/firefox/i.test(gp());if(/Trident/i.test(gp())&&hp(e)&&"fixed"===xp(e).position)return null;var o=Vp(e);for(vp(o)&&(o=o.host);hp(o)&&["html","body"].indexOf(bp(o))<0;){var n=xp(o);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return o;o=o.parentNode}return null}(e)||t}var Mp="top",Pp="bottom",Ip="right",Bp="left",Dp="start",Ep="end",zp=[].concat([Mp,Pp,Ip,Bp],["auto"]).reduce((function(e,t){return e.concat([t,t+"-"+Dp,t+"-"+Ep])}),[]),_p=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function jp(e){var t=new Map,o=new Set,n=[];function a(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!o.has(e)){var n=t.get(e);n&&a(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||a(e)})),n}function Fp(e){return e.split("-")[0]}function Rp(e){return e.split("-")[1]}var Hp={placement:"bottom",modifiers:[],strategy:"absolute"};function $p(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Up(e){void 0===e&&(e={});var t=e,o=t.defaultModifiers,n=void 0===o?[]:o,a=t.defaultOptions,r=void 0===a?Hp:a;return function(e,t,o){void 0===o&&(o=r);var a,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Hp,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(o){var a="function"==typeof o?o(l.options):o;d(),l.options=Object.assign({},r,l.options,a),l.scrollParents={reference:pp(e)?Ap(e):e.contextElement?Ap(e.contextElement):[],popper:Ap(t)};var i,c,f=function(e){var t=jp(e);return _p.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}((i=[].concat(n,l.options.modifiers),c=i.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=f.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,o=e.options,n=void 0===o?{}:o,a=e.effect;if("function"==typeof a){var r=a({state:l,name:t,instance:u,options:n}),i=function(){};s.push(r||i)}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,o=e.popper;if($p(t,o)){var n,a,r,i;l.rects={reference:Np(t,Op(o),"fixed"===l.options.strategy),popper:(n=o,a=yp(n),r=n.offsetWidth,i=n.offsetHeight,Math.abs(a.width-r)<=1&&(r=a.width),Math.abs(a.height-i)<=1&&(i=a.height),{x:n.offsetLeft,y:n.offsetTop,width:r,height:i})},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var s=0;s<l.orderedModifiers.length;s++)if(!0!==l.reset){var d=l.orderedModifiers[s],f=d.fn,p=d.options,h=void 0===p?{}:p,v=d.name;"function"==typeof f&&(l=f({state:l,options:h,name:v,instance:u})||l)}else l.reset=!1,s=-1}}},update:(a=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),c=!0}};if(!$p(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(o).then((function(e){!c&&o.onFirstUpdate&&o.onFirstUpdate(e)})),u}}var Zp={passive:!0};var Wp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yp(e){var t,o=e.popper,n=e.popperRect,a=e.placement,r=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=i.x,p=void 0===f?0:f,h=i.y,v=void 0===h?0:h,m="function"==typeof u?u({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),w=Bp,b=Mp,L=window;if(c){var x=Op(o),C="clientHeight",N="clientWidth";if(x===fp(o)&&"static"!==xp(x=Lp(o)).position&&"absolute"===l&&(C="scrollHeight",N="scrollWidth"),a===Mp||(a===Bp||a===Ip)&&r===Ep)b=Pp,v-=(d&&x===L&&L.visualViewport?L.visualViewport.height:x[C])-n.height,v*=s?1:-1;if(a===Bp||(a===Mp||a===Pp)&&r===Ep)w=Ip,p-=(d&&x===L&&L.visualViewport?L.visualViewport.width:x[N])-n.width,p*=s?1:-1}var V,k=Object.assign({position:l},c&&Wp),A=!0===u?function(e,t){var o=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:mp(o*a)/a||0,y:mp(n*a)/a||0}}({x:p,y:v},fp(o)):{x:p,y:v};return p=A.x,v=A.y,s?Object.assign({},k,((V={})[b]=y?"0":"",V[w]=g?"0":"",V.transform=(L.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",V)):Object.assign({},k,((t={})[b]=y?v+"px":"",t[w]=g?p+"px":"",t.transform="",t))}var qp=Up({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,n=e.options,a=n.scroll,r=void 0===a||a,i=n.resize,l=void 0===i||i,s=fp(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach((function(e){e.addEventListener("scroll",o.update,Zp)})),l&&s.addEventListener("resize",o.update,Zp),function(){r&&c.forEach((function(e){e.removeEventListener("scroll",o.update,Zp)})),l&&s.removeEventListener("resize",o.update,Zp)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=function(e){var t,o=e.reference,n=e.element,a=e.placement,r=a?Fp(a):null,i=a?Rp(a):null,l=o.x+o.width/2-n.width/2,s=o.y+o.height/2-n.height/2;switch(r){case Mp:t={x:l,y:o.y-n.height};break;case Pp:t={x:l,y:o.y+o.height};break;case Ip:t={x:o.x+o.width,y:s};break;case Bp:t={x:o.x-n.width,y:s};break;default:t={x:o.x,y:o.y}}var c=r?function(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}(r):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Dp:t[c]=t[c]-(o[u]/2-n[u]/2);break;case Ep:t[c]=t[c]+(o[u]/2-n[u]/2)}}return t}({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,n=o.gpuAcceleration,a=void 0===n||n,r=o.adaptive,i=void 0===r||r,l=o.roundOffsets,s=void 0===l||l,c={placement:Fp(t.placement),variation:Rp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Yp(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yp(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},n=t.attributes[e]||{},a=t.elements[e];hp(a)&&bp(a)&&(Object.assign(a.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],a=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{});hp(n)&&bp(n)&&(Object.assign(n.style,r),Object.keys(a).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});var Gp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,n=e.name,a=o.offset,r=void 0===a?[0,0]:a,i=zp.reduce((function(e,o){return e[o]=function(e,t,o){var n=Fp(e),a=[Bp,Mp].indexOf(n)>=0?-1:1,r="function"==typeof o?o(Object.assign({},t,{placement:e})):o,i=r[0],l=r[1];return i=i||0,l=(l||0)*a,[Bp,Ip].indexOf(n)>=0?{x:l,y:i}:{x:i,y:l}}(o,t.rects,r),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};const[Xp,Kp]=Se("popover"),Qp=["overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],Jp={show:Boolean,theme:N("light"),overlay:Boolean,actions:L(),trigger:N("click"),duration:y,showArrow:w,placement:N("bottom"),iconPrefix:String,overlayClass:g,overlayStyle:Object,closeOnClickAction:w,closeOnClickOverlay:w,closeOnClickOutside:w,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"},autoAdjustOverflow:{type:Boolean,default:!1}};const eh=je(t.defineComponent({name:Xp,props:Jp,emits:["select","touchstart","update:show"],setup(e,{emit:o,slots:n,attrs:a}){let r;const i=t.ref(),l=t.ref(),s=t.ref(),c=t.ref(),u=rl((()=>e.show),(e=>o("update:show",e))),p=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},d({},Gp,{options:{offset:e.offset}})]}),v=()=>{t.nextTick((()=>{u.value&&(r?r.setOptions(p()):(r=l.value&&s.value?qp(l.value,s.value.popupRef.value,p()):null,f&&(window.addEventListener("animationend",v),window.addEventListener("transitionend",v))))}))},m=e=>{u.value=e},g=()=>{"click"===e.trigger&&(u.value=!u.value)},y=(o,a)=>n.action?n.action({action:o,index:a}):[o.icon&&t.createVNode(rt,{name:o.icon,classPrefix:e.iconPrefix,class:Kp("action-icon")},null),t.createVNode("div",{class:[Kp("action-text"),Pe]},[o.text])],w=(n,a)=>{const{icon:r,color:i,disabled:l,className:s,selected:c}=n;return t.createVNode("div",{role:"menuitem",class:[Kp("action",{disabled:l,"with-icon":r}),s],style:c?{color:"var(--zt-primary-color)"}:{color:i},tabindex:l?void 0:0,"aria-disabled":l||void 0,onClick:()=>((t,n)=>{t.disabled||(e.actions.forEach((e=>{e.selected=!1})),t.selected=!0,o("select",t,n),e.closeOnClickAction&&(u.value=!1))})(n,a)},[y(n,a)])};function b(){return o=this,n=null,a=function*(){var o,n;if(l.value&&i.value&&c.value){const a=i.value,r=l.value,{x:s,y:u,placement:d,middlewareData:f}=yield dp(r,a,{placement:e.placement,middleware:[rp(8),ip({padding:4,crossAxis:!1,limiter:up()}),lp(),sp(),(n={element:c.value,padding:6},{name:"arrow",options:n,fn(e){const o=function(e){var t;return null!=(t=null==e?void 0:e.$el)?t:e}(t.unref(n.element));return null==o?{}:cp({element:o,padding:n.padding}).fn(e)}})]});let p=u;const h={top:"bottom",right:"left",bottom:"top",left:"right"}[d.split("-")[0]];u<0?p=0:u>0&&u+a.offsetHeight>document.body.clientHeight&&(p=document.body.clientHeight-a.offsetHeight),Object.assign(i.value.style,{left:`${s}px`,top:`${p}px`}),i.value.setAttribute("data-popper-placement",d);const{x:v,y:m}=null!=(o=f.arrow)?o:{};Object.assign(c.value.style,{left:null!=v?`${v}px`:"",top:null!=m?`${m}px`:"",margin:0,[h]:"calc(var(--zt-popover-arrow-size) * -1)"})}},new Promise(((e,t)=>{var r=e=>{try{l(a.next(e))}catch(o){t(o)}},i=e=>{try{l(a.throw(e))}catch(o){t(o)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,i);l((a=a.apply(o,n)).next())}));var o,n,a}return t.onMounted((()=>{v(),t.watchEffect((()=>{var t;i.value=null==(t=s.value)?void 0:t.popupRef.value,l.value&&i.value&&e.autoAdjustOverflow&&ap(l.value,i.value,b,{elementResize:"undefined"!=typeof ResizeObserver})}))})),t.onBeforeUnmount((()=>{r&&(f&&(window.removeEventListener("animationend",v),window.removeEventListener("transitionend",v)),r.destroy(),r=null)})),t.watch((()=>[u.value,e.offset,e.placement]),v),_(l,(()=>{u.value&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&(u.value=!1)}),{eventName:"touchstart"}),()=>{var o;return t.createVNode(t.Fragment,null,[t.createVNode("span",{ref:l,class:Kp("wrapper"),onClick:g},[null==(o=n.reference)?void 0:o.call(n)]),t.createVNode(Vt,t.mergeProps({ref:s,show:u.value,class:Kp([e.theme,u.value?"show":"hidden"]),position:"",transition:"zt-popover-zoom",lockScroll:!1,"onUpdate:show":m},a,mt(),h(e,Qp)),{default:()=>[e.showArrow&&t.createVNode("div",{class:Kp("arrow"),ref:c},null),t.createVNode("div",{role:"menu",class:Kp("content")},[n.default?n.default():e.actions.map(w)])]})])}}})),[th,oh,nh]=Se("pull-refresh"),ah=["pulling","loosing","success"],rh={disabled:Boolean,modelValue:Boolean,headHeight:C(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:y,successDuration:C(500),animationDuration:C(300),scrollElement:null};const ih=je(t.defineComponent({name:th,props:rh,emits:["change","refresh","update:modelValue"],setup(e,{emit:o,slots:n}){let a;const r=t.ref(),i=t.ref(),l=$(r),s=t.computed((()=>{if(e.scrollElement){const t=(e=>{if(e){if("string"==typeof e)return document.querySelectorAll(e)[0];if("function"==typeof e)return e();if("object"==typeof e&&e instanceof window.HTMLElement)return e}return document.body})(e.scrollElement);return t||console.warn("请检查props scroll-element元素是否存在!"),null!=t?t:l.value}return l.value})),c=t.reactive({status:"normal",distance:0,duration:0}),u=ut(),d=()=>{if(50!==e.headHeight)return{height:`${e.headHeight}px`}},f=()=>"loading"!==c.status&&"success"!==c.status&&!e.disabled,p=(t,n)=>{const a=+(e.pullDistance||e.headHeight);c.distance=t,c.status=n?"loading":0===t?"normal":t<a?"pulling":"loosing",o("change",{status:c.status,distance:t})},h=()=>{const{status:t}=c;return"normal"===t?"":e[`${t}Text`]||nh(t)},v=()=>{const{status:e,distance:o}=c;if(n[e])return n[e]({distance:o});const a=[];return ah.includes(e)&&a.push(t.createVNode("div",{class:oh("text")},[h()])),"loading"===e&&a.push(t.createVNode(Pt,{color:"#969799","text-color":"#969799",class:oh("loading")},{default:h})),a},m=e=>{a=0===W(s.value),a&&(c.duration=0,u.start(e))},g=e=>{f()&&m(e)},y=t=>{if(f()){a||m(t);const{deltaY:o}=u;u.move(t),a&&o.value>=0&&u.isVertical()&&(ee(t),p((t=>{const o=+(e.pullDistance||e.headHeight);return t>o&&(t=t<2*o?o+(t-o)/2:1.5*o+(t-2*o)/4),Math.round(t)})(o.value)))}};z("touchmove",y,{target:i});const w=()=>{a&&u.deltaY.value&&f()&&(c.duration=+e.animationDuration,"loosing"===c.status?(p(+e.headHeight,!0),o("update:modelValue",!0),t.nextTick((()=>o("refresh")))):p(0))};return t.watch((()=>e.modelValue),(t=>{c.duration=+e.animationDuration,t?p(+e.headHeight,!0):n.success||e.successText?(c.status="success",setTimeout((()=>{p(0)}),+e.successDuration)):p(0,!1)})),()=>{var e;const o={transitionDuration:`${c.duration}ms`,transform:c.distance?`translate3d(0,${c.distance}px, 0)`:""};return t.createVNode("div",{ref:r,class:oh()},[t.createVNode("div",{ref:i,class:oh("track"),style:o,onTouchstartPassive:g,onTouchmove:y,onTouchend:w,onTouchcancel:w},[t.createVNode("div",{class:oh("head"),style:d()},[v()]),null==(e=n.default)?void 0:e.call(n)])])}}})),[lh,sh]=Se("radio-group"),ch={disabled:Boolean,iconSize:y,direction:N("vertical"),modelValue:g,checkedColor:String},uh=Symbol(lh);var dh=t.defineComponent({name:lh,props:ch,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const{linkChildren:a}=D(uh);return t.watch((()=>e.modelValue),(e=>o("change",e))),a({props:e,updateValue:e=>o("update:modelValue",e)}),Z((()=>e.modelValue)),()=>{var o;return t.createVNode("div",{class:sh([e.direction]),role:"radiogroup"},[null==(o=n.default)?void 0:o.call(n)])}}});const[fh,ph]=Se("radio");var hh=t.defineComponent({name:fh,props:va,emits:["update:modelValue"],setup(e,{emit:o,slots:n}){const{parent:a}=I(uh),r=()=>{a?a.updateValue(e.name):o("update:modelValue",e.name)};return()=>t.createVNode(ma,t.mergeProps({bem:ph,role:"radio",parent:a,checked:(a?a.props.modelValue:e.modelValue)===e.name,onToggle:r},e),h(n,["default","icon"]))}});const vh=je(hh),mh=je(dh),[gh,yh,wh]=Se("radio-picker"),bh=e=>e.find((e=>!e.disabled))||e[0];function Lh(e,t){for(let o=t=he(t,0,e.length);o<e.length;o++)if(!e[o].disabled)return o;for(let o=t-1;o>=0;o--)if(!e[o].disabled)return o;return 0}const xh=(e,t,o)=>void 0!==t&&!!e.find((e=>e[o.value]===t));function Ch(e,t,o){const n=e.findIndex((e=>e[o.value]===t));return e[Lh(e,n)]}const[Nh,Vh]=Se("radio-picker-column"),kh=Symbol(Nh);var Ah=t.defineComponent({name:Nh,props:{value:y,unit:N(""),fields:b(Object),options:L(),readonly:Boolean,allowHtml:Boolean,wrapHeight:b(Number),swipeDuration:b(y),autoSearchVal:N("")},emits:["change","clickOption"],setup(e,{emit:o,slots:n}){let a,r,i,l,s;const c=t.ref(),u=t.ref(),d=t.ref(0),f=t.ref(0),p=ut(),h=t=>{const o=u.value.clientHeight-e.wrapHeight;d.value=he(t,-o,0)},v=t.computed((()=>!e.options.some((t=>{const o=t[e.fields.text];return null==o?void 0:o.includes(e.autoSearchVal)}))));t.watch((()=>e.autoSearchVal),(()=>{d.value=0}),{immediate:!0});const m=()=>e.readonly||!e.options.length,g=t=>{a||m()||(s=null,f.value=200,(t=>{const n=Lh(e.options,t),r=()=>{const t=e.options[n][e.fields.value];t!==e.value&&o("change",t)};a?s=r:r()})(t),o("clickOption",e.options[t]))},y=()=>{a=!1,f.value=0,s&&(s(),s=null)},w=e=>{if(!m()){if(p.start(e),a&&u.value){const e=function(e){const{transform:t}=window.getComputedStyle(e),o=t.slice(7,t.length-1).split(", ")[5];return Number(o)}(u.value);h(Math.min(0,e-0))}f.value=0,r=d.value,i=Date.now(),l=r,s=null}},b=()=>{if(m())return;const t=d.value-l,o=Date.now()-i;o<300&&Math.abs(t)>15?((t,o)=>{const n=Math.abs(t/o);t=d.value+n/.003*(t<0?-1:1),h(t),f.value=+e.swipeDuration})(t,o):(f.value=200,setTimeout((()=>{a=!1}),0))},L=()=>e.options.map(((o,a)=>{let r=o[e.fields.text];const{disabled:i}=o,l=o[e.fields.value],s=null==r?void 0:r.includes(e.autoSearchVal);let c=!1;s&&e.autoSearchVal&&(r=(t=>{if(!t)return t;const o=new RegExp(e.autoSearchVal,"gi");return t.replace(o,"<span style='color: var(--zt-radio-picker-search-radio-label-match-color);'>$&</span>")})(r),c=!0);const u={tabindex:i?-1:0,class:[Vh("item",{"not-match":!s}),o.className],disabled:i,onClick:()=>{if(!i)return g(a)},name:l},d={[e.allowHtml||c?"innerHTML":"textContent"]:r};return t.createVNode(hh,u,{default:()=>[n.option?n.option({option:o,searchValue:e.autoSearchVal}):t.createVNode("div",d,null)]})}));I(kh),ct({stopMomentum:y}),z("touchmove",(e=>{if(m())return;p.move(e),p.isVertical()&&(a=!0,ee(e,!0)),h(r+p.deltaY.value);const t=Date.now();t-i>300&&(i=t,l=d.value)}),{target:c});const x=()=>{var e;if(v.value)return n.searchEmpty?null==(e=n.searchEmpty)?void 0:e.call(n):t.createVNode(Bi,{class:Vh("search-empty"),image:"no-search-result"},{description:()=>t.createVNode("span",null,[t.createTextVNode("暂无搜索结果")])})};return()=>t.createVNode("div",{ref:c,class:Vh(),onTouchstartPassive:w,onTouchend:b,onTouchcancel:b},[t.createVNode("ul",{ref:u,style:{transform:`translate3d(0, ${d.value+0}px, 0)`,transitionDuration:`${f.value}ms`,transitionProperty:f.value?"all":"none"},class:Vh("wrapper"),onTransitionend:y},[t.createVNode(dh,{modelValue:e.value},{default:()=>[L()]})]),x()])}});const[Sh]=Se("picker-toolbar"),Th={cancelButtonText:String,confirmButtonText:String},Oh=["cancel","confirm","title","toolbar"],Mh=Object.keys(Th);var Ph=t.defineComponent({name:Sh,props:Th,emits:["confirm","cancel"],setup(e,{emit:o,slots:n}){const a=()=>o("cancel"),r=()=>o("confirm"),i=()=>{const o=e.cancelButtonText||wh("cancel");return t.createVNode(po,{type:"default",hairline:!0,class:yh("cancel"),onClick:a},{default:()=>[n.cancel?n.cancel():o]})},l=()=>{const o=e.confirmButtonText||wh("confirm");return t.createVNode(po,{type:"primary",class:[yh("confirm"),De],onClick:r},{default:()=>[n.confirm?n.confirm():o]})};return()=>t.createVNode("div",{class:yh("toolbar")},[n.toolbar?n.toolbar():[i(),l()]])}});function Ih(e){return"function"==typeof e?e():t.unref(e)}function Bh(e,t=200,o={}){return function(e,t){return function(...o){return new Promise(((n,a)=>{Promise.resolve(e((()=>t.apply(this,o)),{fn:t,thisArg:this,args:o})).then(n).catch(a)}))}}(function(e,t={}){let o,n,a=u;const r=e=>{clearTimeout(e),a(),a=u};return i=>{const l=Ih(e),s=Ih(t.maxWait);return o&&r(o),l<=0||void 0!==s&&s<=0?(n&&(r(n),n=null),Promise.resolve(i())):new Promise(((e,c)=>{a=t.rejectOnCancel?c:e,s&&!n&&(n=setTimeout((()=>{o&&r(o),n=null,e(i())}),s)),o=setTimeout((()=>{n&&r(n),n=null,e(i())}),l)}))}}(t,o),e)}const Dh=d({loading:Boolean,readonly:Boolean,allowHtml:Boolean,showToolbar:w,showTitle:w,swipeDuration:C(1e3),title:N("请选择")},Th),Eh=d({},Dh,{columns:L(),modelValue:L(),columnsFieldNames:Object,wrapHeight:C("40vh"),showPicker:Boolean,popup:w,searchable:Boolean,autoSearch:w,searchPlaceholder:N("请搜索")});const zh=je(t.defineComponent({name:gh,props:Eh,emits:["confirm","cancel","change","clickOption","update:modelValue","update:showPicker"],setup(e,{emit:n,slots:a}){const r=t.ref(),i=t.ref(e.modelValue.slice(0)),l=t.ref(e.showPicker),{children:s,linkChildren:c}=D(kh),u=t.ref(""),f=t.ref("");c();const p=t.computed((()=>function(e){return d({text:"text",value:"value",children:"children"},e)}(e.columnsFieldNames))),m=t.computed((()=>{const t=ue(e.wrapHeight);let o=t;return e.showTitle?e.searchable&&(o=t-60):(o=t+44,e.searchable&&(o-=60)),o})),g=t.computed((()=>function(e,t){const o=e[0];if(o){if(Array.isArray(o))return"multiple";if(t.children in o)return"cascade"}return"default"}(e.columns,p.value))),y=t.computed((()=>{const{columns:t}=e;switch(g.value){case"multiple":return t;case"cascade":return function(e,t,n){const a=[];let r={[t.children]:e},i=0;for(;r&&r[t.children];){const e=r[t.children],l=n.value[i];r=o(l)?Ch(e,l,t):void 0,!r&&e.length&&(r=Ch(e,bh(e)[t.value],t)),i++,a.push(e)}return a}(t,p.value,i);default:return[t]}})),w=t.computed((()=>y.value.some((e=>e.length)))),b=t.computed((()=>y.value.map(((e,t)=>Ch(e,i.value[t],p.value)))));t.watch(l,(t=>{t!==e.showPicker&&n("update:showPicker",t)})),t.watch((()=>e.showPicker),(e=>{e!==l.value&&(l.value=e)}));const L=(e,t)=>{if(i.value[e]!==t){const o=i.value.slice(0);o[e]=t,i.value=o}},x=()=>({selectedValues:i.value.slice(0),selectedOptions:b.value}),C=()=>{s.forEach((e=>e.stopMomentum()));const e=x();return n("confirm",e),e},N=()=>{n("update:showPicker",!1),n("cancel",x())},V=e=>n("update:showPicker",e),k=()=>y.value.map(((o,r)=>t.createVNode(Ah,{value:i.value[r],fields:p.value,options:o,readonly:e.readonly,allowHtml:e.allowHtml,wrapHeight:m.value,swipeDuration:e.swipeDuration,autoSearchVal:f.value,onChange:e=>((e,o)=>{L(o,e),"cascade"===g.value&&i.value.forEach(((e,t)=>{const o=y.value[t];xh(o,e,p.value)||L(t,o.length?o[0][p.value.value]:void 0)})),t.nextTick((()=>{n("change",d({columnIndex:o},x()))}))})(e,r),onClickOption:e=>((e,t)=>n("clickOption",d({columnIndex:t,currentOption:e},x())))(e,r)},{option:a.option,searchEmpty:a["search-empty"]}))),A=e=>{if(w.value){const o={backgroundSize:`100% ${(e-m.value)/2}px`};return[t.createVNode("div",{class:yh("mask"),style:o},null)]}},S=()=>{e.autoSearch||(f.value=u.value)},T=()=>{if(e.searchable)return t.createVNode("div",{class:yh("search")},[t.createVNode(li,{"show-action":!e.autoSearch,modelValue:u.value,placeholder:e.searchPlaceholder,"onUpdate:modelValue":e.autoSearch?Bh((e=>{u.value=e,f.value=u.value}),500):e=>{u.value=e},onSearch:S,onClear:S},null)])},O=()=>{const e={height:`${m.value}px`};return t.createVNode("div",{ref:r,class:yh("columns"),style:e},[k(),A(m.value)])},M=()=>{if(e.showToolbar)return t.createVNode(Ph,t.mergeProps(h(e,Mh),{onConfirm:C,onCancel:N}),h(a,Oh))},P=()=>{if(e.showTitle)return a.title?a.title():t.createVNode("div",{class:[yh("title"),De]},[e.title])};let I;t.watch(y,(e=>{e.forEach(((e,t)=>{e.length&&!xh(e,i.value[t],p.value)&&L(t,bh(e)[p.value.value])}))}),{immediate:!0}),t.watch((()=>e.modelValue),(e=>{v(e,i.value)||v(e,I)||(i.value=e.slice(0),I=e.slice(0))}),{deep:!0}),t.watch(i,(t=>{v(t,e.modelValue)||(I=t.slice(0),n("update:modelValue",I))}),{immediate:!0}),z("touchmove",ee,{target:r});ct({confirm:C,getSelectedOptions:()=>b.value});const B=()=>{var o,n;return t.createVNode("div",{class:yh()},[P(),e.loading?t.createVNode(Pt,{class:yh("loading")},null):null,e.showTitle?t.createVNode(Un,{style:"margin: 0"},null):null,T(),null==(o=a["columns-top"])?void 0:o.call(a),O(),null==(n=a["columns-bottom"])?void 0:n.call(a),e.showToolbar?t.createVNode(Un,{style:"margin: 0"},null):null,M()])};return()=>e.popup?t.createVNode(kt,{show:l.value,"onUpdate:show":[e=>l.value=e,V],round:!0,position:"bottom"},{default:B}):B()}})),[_h,jh]=Se("rate");const Fh={size:y,icon:N("star"),color:String,count:C(5),gutter:y,readonly:Boolean,disabled:Boolean,voidIcon:N("star"),allowHalf:Boolean,voidColor:String,touchable:w,iconPrefix:String,modelValue:x(0),disabledColor:String};const Rh=je(t.defineComponent({name:_h,props:Fh,emits:["change","update:modelValue"],setup(e,{emit:o}){const n=ut(),[a,r]=So(),i=t.ref(),l=()=>e.readonly||e.disabled||!e.touchable,s=t.computed((()=>Array(+e.count).fill("").map(((t,o)=>function(e,t,o,n){if(e>=t)return{status:"full",value:1};if(e+.5>=t&&o&&!n)return{status:"half",value:.5};if(e+1>=t&&o&&n){const o=10**10;return{status:"half",value:Math.round((e-t+1)*o)/o}}return{status:"void",value:0}}(e.modelValue,o+1,e.allowHalf,e.readonly)))));let c,u,d=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;const p=()=>{u=P(i);const t=a.value.map(P);c=[],t.forEach(((t,o)=>{d=Math.min(t.top,d),f=Math.max(t.top,f),e.allowHalf?c.push({score:o+.5,left:t.left,top:t.top,height:t.height},{score:o+1,left:t.left+t.width/2,top:t.top,height:t.height}):c.push({score:o+1,left:t.left,top:t.top,height:t.height})}))},h=(t,o)=>{for(let e=c.length-1;e>0;e--)if(o>=u.top&&o<=u.bottom){if(t>c[e].left&&o>=c[e].top&&o<=c[e].top+c[e].height)return c[e].score}else{const n=o<u.top?d:f;if(t>c[e].left&&c[e].top===n)return c[e].score}return e.allowHalf?.5:1},v=t=>{e.disabled||e.readonly||t===e.modelValue||(o("update:modelValue",t),o("change",t))},m=e=>{l()||(n.start(e),p())},g=e=>{if(!l()&&(n.move(e),n.isHorizontal())){const{clientX:t,clientY:o}=e.touches[0];ee(e),v(h(t,o))}},y=(o,n)=>{const{icon:a,size:i,color:l,count:s,gutter:c,voidIcon:u,disabled:d,voidColor:f,allowHalf:m,iconPrefix:g,disabledColor:y}=e,w=n+1,b="full"===o.status,L="void"===o.status,x=m&&o.value>0&&o.value<1;let C;c&&w!==+s&&(C={paddingRight:re(c)});return t.createVNode("div",{key:n,ref:r(n),role:"radio",style:C,class:jh("item"),tabindex:d?void 0:0,"aria-setsize":s,"aria-posinset":w,"aria-checked":!L,onClick:e=>{p(),v(m?h(e.clientX,e.clientY):w)}},[t.createVNode(rt,{size:i,name:b?a:u,class:jh("icon",{disabled:d,full:b}),color:d?y:b?l:f,classPrefix:g},null),x&&t.createVNode(rt,{size:i,style:{width:o.value+"em"},name:L?u:a,class:jh("icon",["half",{disabled:d,full:!L}]),color:d?y:L?f:l,classPrefix:g},null)])};return Z((()=>e.modelValue)),()=>t.createVNode("div",{ref:i,role:"radiogroup",class:jh({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:m,onTouchmove:g},[s.value.map(y)])}})),Hh=je(Aa),$h=(e,t,o)=>{const n={width:"",height:"",transform:"",transformOrigin:""},{clientWidth:a}=document.documentElement,r=e,{clientHeight:i}=document.documentElement,l=a-r,s=i-t,c=Math.max(l,s),u=Math.min(l,s);return null==window.orientation||180===window.orientation||0===window.orientation?l<s?o?(console.debug("竖屏打开,强制横屏"),n.transform="rotate(90deg)",n.width=`${c}px`,n.height=`${u}px`,n.transformOrigin=u/2+"px center"):(console.debug("竖屏打开,保持竖屏"),n.transform="rotate(0deg)",n.width=`${u}px`,n.height=`${c}px`):o?(console.debug("横屏旋转到强制横屏"),n.transform="rotate(90deg)",n.width=`${c}px`,n.height=`${u}px`,n.transformOrigin=u/2+"px center"):(console.debug("横屏旋转到竖屏"),n.transform="rotate(0deg)",n.width=`${u}px`,n.height=`${c}px`):(l>s?console.debug("横屏打开"):console.debug("竖屏旋转到横屏"),n.transform="rotate(0deg)",n.width=`${c}px`,n.height=`${u}px`),n},[Uh,Zh]=Se("signature"),Wh="#FFF",Yh="#000",qh=oe(Zh("stroke"),Yh),Gh=oe(Zh("canvas"),Wh),Xh={customClass:N(""),lineWidth:C(2),strokeStyle:N(qh),backgroundStyle:N(Gh),imageType:N("png"),resultTypes:L(["file","dataUrl"]),unSupportTpl:N("对不起,当前浏览器不支持Canvas,无法使用签名组件"),allowPortrait:Boolean};const Kh=je(t.defineComponent({name:Uh,props:Xh,emits:["clear","cancel","confirm"],setup(e,{emit:o}){const n=t.ref(),a=t.ref(),r=t.ref(0),i=t.ref(0),l=t.ref(),s=t.ref("ontouchstart"in window?["touchstart","touchmove","touchend","touchleave"]:["mousedown","mousemove","mouseup","mouseleave"]),c=t.ref(!0),u=t.ref(!1),d=t.ref("ontouchstart"in window),f=t.computed((()=>{const e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))})),p=()=>{var t,o;if(!n.value)return void console.error("container is empty");const a=$h((null==(t=n.value)?void 0:t.offsetLeft)||0,(null==(o=n.value)?void 0:o.offsetTop)||0,!e.allowPortrait);n.value.style.transform=a.transform,n.value.style.width=a.width,n.value.style.height=a.height,n.value.style.transformOrigin=a.transformOrigin,r.value=si(a.width),i.value=si(a.height)},h=()=>{var t,o,n,r;if("jpg"===e.imageType){let n=e.backgroundStyle;"transparent"===n&&(n="#fff"),l.value&&(l.value.fillStyle=n,l.value.fillRect(0,0,(null==(t=a.value)?void 0:t.width)||0,(null==(o=a.value)?void 0:o.height)||0))}else{const t=e.backgroundStyle;"transparent"!==t&&l.value&&(l.value.fillStyle=t,l.value.fillRect(0,0,(null==(n=a.value)?void 0:n.width)||0,(null==(r=a.value)?void 0:r.height)||0))}},v=t=>{var o,n;t.preventDefault(),u.value=!0,c.value=!1;const r=d.value?t.touches[0]:t;if(a.value){const t=((e,t,o)=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,r=e.clientY-n.top;if(o&&(null==window.orientation||180===window.orientation||0===window.orientation)){const{clientWidth:e}=document.documentElement;return{x:r,y:e-0-a}}return{x:a,y:r}})(r,a.value,!e.allowPortrait);null==(o=l.value)||o.lineTo(t.x,t.y),null==(n=l.value)||n.stroke()}},m=e=>{var t,o;e.preventDefault(),null==(t=a.value)||t.removeEventListener(s.value[1],v,!1),null==(o=a.value)||o.removeEventListener(s.value[2],m,!1)},g=e=>{var t,o;e.preventDefault(),null==(t=a.value)||t.removeEventListener(s.value[1],v,!1),null==(o=a.value)||o.removeEventListener(s.value[2],m,!1)},y=t=>{var o,n,r;t.preventDefault(),l.value&&(l.value.beginPath(),l.value.lineWidth=+e.lineWidth,l.value.strokeStyle=e.strokeStyle),null==(o=a.value)||o.addEventListener(s.value[1],v,!1),null==(n=a.value)||n.addEventListener(s.value[2],m,!1),null==(r=a.value)||r.addEventListener(s.value[3],g,!1)},w=(e=!1)=>{var t,n,r,i,d;null==(t=a.value)||t.addEventListener(s.value[2],m,!1),null==(i=l.value)||i.clearRect(0,0,(null==(n=a.value)?void 0:n.width)||0,(null==(r=a.value)?void 0:r.height)||0),null==(d=l.value)||d.closePath(),h(),u.value=!1,c.value=!0,e||o("clear")},b=()=>{var t;a.value&&(t=a.value,Promise.all(e.resultTypes.map((o=>{if("dataUrl"===o.trim()){let o;return o="png"===e.imageType?t.toDataURL("image/png"):t.toDataURL("image/jpeg",.8),Promise.resolve(o)}if("file"===o.trim()){const o=(new Date).getTime();return"png"===e.imageType?ns(t,o+".png",o,"image/png"):ns(t,o+".jpg",o)}return Promise.resolve(null)}))).then((e=>{w(!0),o("confirm",e)})))},L=()=>{w(!0),o("cancel")},x=()=>{var e;f.value&&(l.value=null==(e=a.value)?void 0:e.getContext("2d"),p(),(()=>{var e;null==(e=a.value)||e.addEventListener(s.value[0],y,!1),f.value&&window.addEventListener("resize",(()=>{setTimeout((()=>{p(),c.value||(Uo("旋转屏幕或者改变屏幕大小触发重新绘制"),w(!0))}),100)}))})(),setTimeout((()=>{h()}),50))};return()=>t.createVNode(t.Transition,{appear:!0,onAfterEnter:x},{default:()=>[t.createVNode("div",{class:[Zh(""),e.customClass?e.customClass:""],ref:n},[t.withDirectives(t.createVNode("label",{class:Zh("placeholder")},[f.value?"请在此签名":e.unSupportTpl]),[[t.vShow,!u.value]]),t.createVNode("div",{class:Zh("canvasWrapper"),ref:"canvasWrapper"},[t.withDirectives(t.createVNode("canvas",{class:Zh("canvas"),ref:a,width:r.value,height:i.value},null),[[t.vShow,f.value]])]),t.createVNode("div",{class:Zh("actions")},[t.createVNode(ho,{plain:!0,type:"warning",onClick:()=>w(),class:Zh("button-again")},{default:()=>[t.createTextVNode("重签")]}),t.createVNode(ho,{type:"default",onClick:L,class:Zh("button-cancel")},{default:()=>[t.createTextVNode("取消")]}),t.createVNode(ho,{block:!0,type:"primary",disabled:c.value,onClick:b,class:Zh("button-complete")},{default:()=>[t.createTextVNode("完成")]})])])]})}})),[Qh,Jh]=Se("skeleton"),ev="100%",tv={row:C(0),title:Boolean,round:Boolean,avatar:Boolean,field:Boolean,textarea:Boolean,loading:w,animate:w,avatarSize:y,titleWidth:y,avatarShape:N("round"),rowWidth:{type:[Number,String,Array],default:ev}};const ov=je(t.defineComponent({name:Qh,inheritAttrs:!1,props:tv,setup(e,{slots:o,attrs:n}){const a=()=>{if(e.avatar)return t.createVNode("div",{class:Jh("avatar",e.avatarShape),style:ie(e.avatarSize)},null)},r=()=>{if(e.title&&!e.field)return t.createVNode("h3",{class:Jh("title"),style:{width:re(e.titleWidth)}},null)};function i(){const o=[],{rowWidth:n}=e;function a(t){return n===ev&&t===+e.row-1?"60%":Array.isArray(n)?n[t]:n}for(let r=0;r<+e.row;r++)e.field?o.push(t.createVNode("div",{class:Jh("field")},[t.createVNode("span",{class:Jh("field-title"),style:{width:re(e.titleWidth)}},null),t.createVNode("span",{class:Jh("field-value"),style:{width:re(a(r))}},null)])):e.textarea?o.push(t.createVNode("div",{class:Jh("textarea"),style:{width:re(a(r))}},null)):o.push(t.createVNode("div",{class:Jh("row"),style:{width:re(a(r))}},null));return o}return()=>{var l;return e.loading?t.createVNode("div",t.mergeProps({class:Jh({animate:e.animate,round:e.round})},n),[a(),t.createVNode("div",{class:Jh("content")},[r(),i()])]):null==(l=o.default)?void 0:l.call(o)}}}));function nv(e,o=""){const n=t.ref([]),a=t.ref();return navigator.mediaDevices||(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia||(navigator.mediaDevices.getUserMedia=function(e){const t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(((o,n)=>t.call(navigator,e,o,n))):(qo("浏览器不支持getUserMedia"),Promise.reject(new Error("您的浏览器暂不支持 getUserMedia !")))}),{startRecording:function(){return t=this,r=null,i=function*(){const t=yield navigator.mediaDevices.getUserMedia({audio:!0});a.value=new MediaRecorder(t),n.value=[],a.value.ondataavailable=t=>{if(t.data&&t.data.size>0){if(n.value.push(t.data),"raw"===o)return void e("change",n.value);!function(t){const o=new FileReader;o.onloadend=()=>{var t;const n=null==(t=o.result)?void 0:t.split(",")[1];e("change",n)},o.readAsDataURL(t)}(new Blob(n.value,{type:"audio/wav"}))}},a.value.start()},new Promise(((e,o)=>{var n=e=>{try{l(i.next(e))}catch(t){o(t)}},a=e=>{try{l(i.throw(e))}catch(t){o(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);l((i=i.apply(t,r)).next())}));var t,r,i},stopRecording:function(){var e,t;null==(e=a.value)||e.stop(),null==(t=a.value)||t.stream.getTracks().forEach((e=>e.stop())),a.value=void 0},recordedBlobs:n}}const[av,rv]=Se("speech-recognizer"),iv={title:String,value:String,type:String,show:Boolean,closeOnPopstate:w,closeOnClickOverlay:w};const lv=je(t.defineComponent({name:av,props:iv,emits:["change","confirm","close","update:show","update:value","onTouchstart","onTouchend"],setup(e,{emit:o,slots:n}){const a=t.ref(e.show),r=t.ref(!1),{startRecording:i,stopRecording:l}=nv(o,e.type),s=t.computed({get:()=>e.value,set:e=>{o("update:value",e)}});t.watch(a,(t=>{t!==e.show&&o("update:show",t)})),t.watch((()=>e.show),(e=>{e!==a.value&&(a.value=e)}));const c=e=>o("update:show",e),u=()=>{a.value=!1,o("close")},d=()=>{o("update:value","")},f=()=>{a.value=!1,o("confirm")},p=e=>{e.preventDefault()},h=()=>{o("onTouchstart"),r.value=!0,i()},v=()=>{r.value=!1,l(),o("onTouchend")},m=()=>{const o=e.value?e.value:"请说话";return t.createVNode("div",{class:rv("text")},[o,t.createVNode("div",{class:rv("loading")},[t.createVNode("div",null,null),t.createVNode("div",null,null),t.createVNode("div",null,null)])])},g=e=>{s.value=e},y=()=>t.createVNode("div",{class:rv()},[n.title?n.title():t.createVNode("div",{class:[rv("header"),"zt-hairline--bottom"]},[t.createVNode("div",{class:["zt-ellipsis",rv("title")]},[e.title?e.title:"语音输入"]),t.createVNode("div",{class:rv("close"),onClick:u},[t.createVNode(it,{name:"clear",size:"24"},null)])]),t.createTextVNode(" "),t.createVNode("div",{class:rv("body")},[r.value?m():e.value?t.createVNode("div",{class:rv("text")},[t.createVNode(oi,{modelValue:s.value,type:"textarea",rows:"12",label:"",placeholder:"","onUpdate:modelValue":g},null)]):t.createVNode("div",{class:rv("empty")},[t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 164 164",class:"design-iconfont"},[t.createVNode("g",{"fill-rule":"nonzero",fill:"none"},[t.createVNode("path",{fill:"#F5F7FA",d:"M19.8391025 68.2073963L19.8593465 77.2801141 19.9200784 77.745901 20.0820303 78.049675 20.2844701 78.2319394 24.3737545 80.6013769 24.1713147 80.4191124 24.0296068 80.1153384 23.9486309 79.6698032 23.9283869 70.5970854z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{d:"M7.30807756,78.4952102 L1.53854264,75.1536959 L1.133663,74.8499218 L0.789515304,74.4651414 L0.485855572,73.9791029 L0.28341575,73.4323097 L0.161951857,72.7842584 L0.101219911,72.0349491 L5.87075483,75.3764635 L5.93148677,76.1460244 L6.05295067,76.773824 L6.27563447,77.3206173 L6.55905022,77.8269074 L6.90319792,78.2116878 L7.30807756,78.4952102 Z M5.87075483,75.3764635 L0.101219911,72.0349491 L0,34.873259 L5.76953492,38.2147734 L5.87075483,75.3764635 Z",fill:"#DDE1EB",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#F5F7FA",d:"M58.7075483 3.66554L58.2419367 3.46302398 57.7358371 3.34151437 57.1487616 3.34151437 56.5616862 3.44277238 55.9341227 3.66554 55.2255833 4.00981724 10.6685786 29.7698553 4.8787997 26.4283409 49.4560484 0.668302874 50.1645878 0.324025636 50.7921512 0.101258011 51.3792267 0 51.9460582 0 52.4521578 0.121509613 52.9177694 0.324025636z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#DDE1EB",d:"M5.76953492 38.2147734L0 34.873259 0.161951857 33.2936341 0.384635661 32.4633184 1.01219911 30.8634418 1.41707875 30.0736293 1.90293432 29.3040684 2.97586538 27.9472111 3.58318484 27.3599146 4.8787997 26.4080893 10.6483346 29.7698553 9.37296374 30.701429 8.74540029 31.308977 7.67246924 32.6658344 7.20685765 33.4151437 6.78173402 34.2049562 6.15417058 35.8048327 5.81002288 37.4452125z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#E9ECF2",d:"M55.2255833 4.00981724L55.9543667 3.66554 56.6021741 3.44277238 57.1892496 3.34151437 57.7155931 3.36176597 58.2419367 3.46302398 58.7075483 3.66554 59.1124279 3.96931404 59.4565756 4.37434608 59.7399914 4.84013293 59.9424312 5.38692619 60.0638951 6.03497746 60.124627 6.82478995 60.2258469 43.98648 60.0638951 45.5458534 59.5780395 47.1862332 58.8290122 48.7658582 57.857301 50.2239735 56.6629061 51.4795729 56.0353426 51.9858629 55.3672912 52.4313982 37.8764906 62.5369477 26.2362009 79.730558 25.5479055 80.4191124 25.2240018 80.6013769 24.8798541 80.7026349 24.5964383 80.6823833 24.3332666 80.5811253 24.1510707 80.3988608 24.0093628 80.0950868 23.9486309 79.6698032 23.9283869 70.5970854 10.7900425 78.1711846 10.0815031 78.5357134 9.43369569 78.7382295 8.86686419 78.8394875 8.32027667 78.8192359 7.79393313 78.7179779 7.32832154 78.5154618 6.9234419 78.2116878 6.55905022 77.8066558 6.27563447 77.3611205 6.07319465 76.8143273 5.93148677 76.166276 5.87075483 75.3764635 5.76953492 38.2147734 5.93148677 36.6554 6.43758633 34.9947687 7.20685765 33.4151437 8.19881277 31.9570283 9.37296374 30.701429 10.6483346 29.7698553z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{d:"M48.6462891,27.0156374 L48.5450692,27.1979018 L48.5248252,27.5826822 L48.5450692,37.1616901 L48.5855572,37.3642061 L48.767753,37.4857157 L48.9904368,37.4249609 L49.2131206,37.2426965 L49.3750725,36.9794257 L49.4560484,36.6351484 L49.4155605,26.9548826 L49.3750725,26.7321149 L49.2738526,26.6511085 L49.1321447,26.6308569 L48.808241,26.8131214 L48.6462891,27.0156374 Z M46.540915,27.4004178 L46.4599391,27.6029338 L46.4194511,28.0079659 L46.4396951,38.9033279 L46.480183,39.1058439 L46.6826229,39.2273535 L46.8850627,39.1665987 L47.1279905,38.9640827 L47.2899423,38.7008119 L47.3709183,38.3767862 L47.3304303,27.3194114 L47.2899423,27.137147 L47.1887224,27.035889 L47.0470145,26.9953858 L46.7231108,27.1573986 L46.540915,27.4004178 Z M36.0545322,21.7299692 L35.9735563,21.8312272 L35.9330683,22.195756 L35.9128244,23.2893426 L36.0140443,57.0487635 L36.1355082,57.3525375 L36.4594119,57.3120343 L36.7023397,57.1095183 L36.8642915,56.8462475 L36.9250235,56.5222218 L36.8238035,21.6489628 L36.7833156,21.4464468 L36.6820957,21.3451887 L36.5606318,21.3249371 L36.2164841,21.5072016 L36.0545322,21.7299692 Z M52.7558175,26.2258249 L52.6545976,26.4688441 L52.6343536,26.8941278 L52.6545976,32.9088536 L52.6950856,33.1113696 L52.8975254,33.2328793 L53.0999652,33.1721245 L53.322649,32.98986 L53.5048448,32.7063376 L53.5655768,32.382312 L53.5453328,26.1448185 L53.5048448,25.9423025 L53.4238689,25.8410444 L53.282161,25.8207928 L52.9582573,25.9828057 L52.7558175,26.2258249 Z M40.1438166,30.0533777 L40.1843046,44.2497509 L40.3057685,44.5535249 L40.6296722,44.5130217 L40.852356,44.3307573 L41.0143079,44.0674864 L41.0952838,43.7232092 L41.0547958,29.526836 L40.9333319,29.223062 L40.6094282,29.2635652 L40.3665004,29.4458296 L40.2045486,29.7091005 L40.1438166,30.0533777 Z M38.1801504,33.2126277 L38.0789304,33.4151437 L38.0384425,33.7999241 L38.0789304,43.1359127 L38.1194184,43.3384288 L38.3218582,43.4599384 L38.5242981,43.3991836 L38.7469819,43.1966676 L38.9291777,42.9333967 L38.9899096,42.6093711 L38.9696657,33.1316212 L38.9291777,32.9291052 L38.8279578,32.8480988 L38.6862499,32.8278472 L38.3421022,33.0101116 L38.1801504,33.2126277 Z M29.8396297,24.8487159 L29.7586538,24.9702255 L29.7181658,25.3347544 L29.6979218,26.4283409 L29.8193857,60.1877618 L29.8598737,60.3902778 L30.0420695,60.5117875 L30.2445093,60.4510327 L30.4874371,60.2485166 L30.649389,59.9852458 L30.7101209,59.6612202 L30.629145,24.7879611 L30.5684131,24.5651935 L30.4874371,24.4841871 L30.3457293,24.4639355 L30.0015816,24.6461999 L29.8396297,24.8487159 Z M44.3343209,29.9723713 L44.3545649,39.6526372 L44.4760288,39.9564112 L44.7999325,39.915908 L45.0226163,39.7336436 L45.2048122,39.4703727 L45.2655441,39.1260955 L45.2453001,29.4458296 L45.1238362,29.1420556 L44.7999325,29.1623072 L44.5570047,29.3648232 L44.3950529,29.6280941 L44.3343209,29.9723713 Z M34.00989,18.9757513 L33.9086701,19.3605317 L33.8884261,22.1755044 L34.00989,62.0509092 L34.050378,62.2534253 L34.2528178,62.3749349 L34.4552576,62.3141801 L34.6779414,62.1319156 L34.8398933,61.8483932 L34.9208692,61.5243676 L34.7994053,18.9149965 L34.7589174,18.6922289 L34.6576975,18.6112224 L34.5159896,18.5909708 L34.1718419,18.7732353 L34.00989,18.9757513 Z M50.6706873,26.6713601 L50.5694674,26.9143794 L50.5289795,27.4206694 L50.5492235,35.0960267 L50.5897114,35.2985427 L50.7921512,35.4200523 L51.014835,35.3592975 L51.2375188,35.1770331 L51.3994707,34.9137622 L51.4804466,34.569485 L51.4602027,26.5903537 L51.3994707,26.3878377 L51.3184948,26.3068313 L51.1767869,26.2865797 L50.8326392,26.4688441 L50.6706873,26.6713601 Z M42.3504107,27.339663 L42.2694348,27.5219274 L42.2289468,27.8459531 L42.2087028,28.6965204 L42.2694348,43.6422028 L42.3099227,43.8447188 L42.4111426,43.9459768 L42.5326065,43.9662284 L42.7148024,43.9054736 L43.0387061,43.5611964 L43.1804139,43.1156611 L43.139926,27.2586566 L43.099438,27.0561406 L42.9982181,26.9751342 L42.8565102,26.934631 L42.5326065,27.0966438 L42.3504107,27.339663 Z M31.9247599,25.5170188 L31.8640279,25.65878 L31.82354,26.0030573 L31.803296,27.0156374 L31.9045159,58.0613436 L31.9450038,58.2638596 L32.0259798,58.3651176 L32.1676877,58.3853692 L32.5320793,58.1828532 L32.7750071,57.7778212 L32.8154951,57.5348019 L32.7142752,25.4360124 L32.6737872,25.253748 L32.5928113,25.15249 L32.4511034,25.1322384 L32.1271997,25.2942512 L31.9247599,25.5170188 Z M56.9463218,25.760038 L56.8451019,26.0435605 L56.8248579,26.4485925 L56.8248579,28.5345075 L56.8653459,28.7370236 L57.0677857,28.8585332 L57.2702255,28.7977784 L57.5131533,28.6155139 L57.6751052,28.3522431 L57.7560811,28.0079659 L57.7358371,25.6790316 L57.6953492,25.4765156 L57.5941292,25.3752576 L57.4524214,25.355006 L57.1487616,25.5170188 L56.9463218,25.760038 Z M54.8611917,26.5093473 L54.7599717,26.8131214 L54.7194838,27.3801662 L54.7397278,31.0254546 L54.8611917,31.3292286 L55.1850954,31.2887254 L55.4280232,31.106461 L55.589975,30.8229386 L55.650707,30.498913 L55.650707,26.4485925 L55.589975,26.2258249 L55.4887551,26.1245669 L55.3470472,26.1043153 L55.0231435,26.3068313 L54.8611917,26.5093473 Z M25.6896134,35.9870972 L25.6086374,36.14911 L25.5479055,36.4933872 L25.5479055,37.4452125 L25.6086374,54.780584 L25.7301013,55.0843581 L26.054005,55.0438549 L26.2766888,54.8615904 L26.4386407,54.5983196 L26.5196166,54.2540424 L26.4588847,35.9060908 L26.4183967,35.7238263 L26.3374208,35.6225683 L26.1957129,35.5820651 L25.8718092,35.7440779 L25.6896134,35.9870972 Z M27.7544995,27.9472111 L27.6735236,28.0687207 L27.6330356,28.4332495 L27.6127917,29.4458296 L27.7140116,60.4915359 L27.7544995,60.6940519 L27.9569394,60.8155615 L28.1593792,60.7548067 L28.382063,60.5725423 L28.5642588,60.2890198 L28.6249908,59.9649942 L28.5440148,27.8662047 L28.4832829,27.6636886 L28.402307,27.5624306 L28.2605991,27.542179 L27.9366954,27.7041918 L27.7544995,27.9472111 Z M19.4342229,47.044472 L19.312759,47.348246 L19.292515,47.8950393 L19.292515,51.5605793 L19.4139789,51.8643533 L19.7581266,51.8238501 L19.9808104,51.6415857 L20.1427622,51.3783149 L20.2237382,51.0340376 L20.2034942,46.9837172 L20.1630062,46.7812011 L20.0617863,46.6799431 L19.9200784,46.6596915 L19.5961747,46.841956 L19.4342229,47.044472 Z M11.1341902,52.9174366 L11.0127263,53.1807075 L10.9924823,53.5654879 L11.0329703,55.8944222 L11.2354101,56.0159318 L11.4378499,55.955177 L11.6807777,55.7729125 L11.8427296,55.4893901 L11.9034615,55.1653645 L11.9034615,52.8364302 L11.8629735,52.6339142 L11.7617536,52.5326562 L11.4783379,52.5529078 L11.1341902,52.9174366 Z M23.5842392,40.8879849 L23.5032633,41.0905009 L23.4627753,41.4752814 L23.5032633,52.2288821 L23.5437513,52.4313982 L23.6247272,52.5326562 L23.7259471,52.5529078 L23.9486309,52.492153 L24.1713147,52.3098886 L24.3535105,52.0263661 L24.4142425,51.7023405 L24.3737545,40.8069785 L24.3332666,40.6044625 L24.2522906,40.5234561 L24.1105828,40.4829529 L23.786679,40.6449657 L23.5842392,40.8879849 Z M15.3044505,48.6038453 L15.2032306,48.8671162 L15.1627426,49.2923998 L15.1829866,54.6995776 L15.3044505,55.0033517 L15.6283542,54.9628484 L15.871282,54.780584 L16.0332339,54.4970616 L16.0939658,54.173036 L16.0737218,48.5430905 L16.0332339,48.3405745 L15.9522579,48.2393165 L15.8105501,48.2190649 L15.4866464,48.3810777 L15.3044505,48.6038453 Z M17.3895807,47.4697556 L17.2883608,47.7127749 L17.2478728,48.1178069 L17.2681168,53.1807075 L17.3086047,53.3832235 L17.5110446,53.5249847 L17.7337284,53.4642299 L17.9564122,53.2617139 L18.118364,52.998443 L18.19934,52.6541658 L18.179096,47.3887492 L18.138608,47.2064848 L18.0373881,47.1052268 L17.9159242,47.0647236 L17.5920205,47.246988 L17.3895807,47.4697556 Z M21.519353,44.8775505 L21.4181331,45.0800666 L21.3776452,45.4850986 L21.3978891,51.5605793 L21.4383771,51.7630953 L21.6408169,51.8846049 L21.8432568,51.8238501 L22.0861845,51.6415857 L22.2481364,51.3783149 L22.3088683,51.0340376 L22.2886244,44.7965441 L22.2481364,44.5940281 L22.1469165,44.4927701 L22.0052086,44.4725185 L21.6813049,44.6547829 L21.519353,44.8775505 Z M13.1990764,49.8999479 L13.0978565,50.1429671 L13.0776125,50.5277476 L13.0978565,55.6108997 L13.2193204,55.8944222 L13.5432241,55.8741705 L13.7659079,55.6919061 L13.9481037,55.4083837 L14.0088357,55.0641065 L13.9885917,49.8189415 L13.9481037,49.6164255 L13.8671278,49.5151674 L13.7254199,49.4949158 L13.4015162,49.6569287 L13.1990764,49.8999479 Z",fill:"#FFF",transform:"translate(2 33.6838)"},null),t.createVNode("g",null,[t.createVNode("path",{fill:"#F5F7FA",d:"M29.510665 101.420326L29.5407779 114.910916 29.6311167 115.603513 29.8720201 116.055207 30.1731493 116.326223 36.2559598 119.849435 35.9548306 119.578419 35.7440402 119.126725 35.6235885 118.464241 35.5934755 104.973651z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{d:"M10.8707654,116.717691 L2.28858218,111.749059 L1.68632371,111.297365 L1.17440402,110.72522 L0.722710163,110.002509 L0.421580928,109.18946 L0.240903388,108.225847 L0.150564617,107.111669 L8.7327478,112.080301 L8.82308657,113.224592 L9.00376412,114.158093 L9.33500627,114.971142 L9.7565872,115.723965 L10.2685069,116.29611 L10.8707654,116.717691 Z M8.7327478,112.080301 L0.150564617,107.111669 L0,51.8544542 L8.58218319,56.8230866 L8.7327478,112.080301 Z",fill:"#DDE1EB",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#F5F7FA",d:"M87.327478 5.45043915L86.6348808 5.14930991 85.8820577 4.96863237 85.0087829 4.96863237 84.1355082 5.11919699 83.2020075 5.45043915 82.1480552 5.96235885 15.8695107 44.2659975 7.25721455 39.2973651 73.565872 0.993726474 74.6198243 0.481806775 75.553325 0.150564617 76.4265997 0 77.2697616 0 78.0225847 0.180677541 78.7151819 0.481806775z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#DDE1EB",d:"M8.58218319 56.8230866L0 51.8544542 0.240903388 49.5056462 0.572145546 48.2710163 1.50564617 45.8920954 2.10790464 44.7176913 2.83061481 43.5734003 4.42659975 41.5558344 5.32998745 40.6825596 7.25721455 39.2672522 15.8393977 44.2659975 13.9422836 45.651192 13.0087829 46.5545797 11.412798 48.5721455 10.7202008 49.6863237 10.0878294 50.8607277 9.15432873 53.2396487 8.64240903 55.6787955z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#E9ECF2",d:"M82.1480552 5.96235885L83.2321205 5.45043915 84.195734 5.11919699 85.0690088 4.96863237 85.8519448 4.99874529 86.6348808 5.14930991 87.327478 5.45043915 87.9297365 5.902133 88.4416562 6.50439147 88.8632371 7.19698871 89.1643664 8.01003764 89.3450439 8.97365119 89.4353827 10.1480552 89.5859473 65.4052698 89.3450439 67.7239649 88.6223338 70.1631117 87.5081556 72.5119197 86.0627353 74.6800502 84.2860728 76.5470514 83.3525721 77.2998745 82.3588457 77.9623588 56.3412798 92.9887077 39.0263488 118.55458 38.0025094 119.578419 37.5207026 119.849435 37.0087829 120 36.587202 119.969887 36.195734 119.819322 35.9247177 119.548306 35.7139272 119.096612 35.6235885 118.464241 35.5934755 104.973651 16.0501882 116.235885 14.9962359 116.777917 14.0326223 117.079046 13.1894605 117.229611 12.3764115 117.199498 11.5934755 117.048934 10.9008783 116.747804 10.2986198 116.29611 9.7565872 115.693852 9.33500627 115.031368 9.03387704 114.218319 8.82308657 113.254705 8.7327478 112.080301 8.58218319 56.8230866 8.82308657 54.5043915 9.57590966 52.0351317 10.7202008 49.6863237 12.195734 47.5181932 13.9422836 45.651192 15.8393977 44.2659975z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{d:"M72.3613551,40.1706399 L72.2107905,40.4416562 L72.1806775,41.0138018 L72.2107905,55.2572146 L72.2710163,55.5583438 L72.5420326,55.7390213 L72.8732748,55.6486826 L73.2045169,55.3776662 L73.4454203,54.9861982 L73.565872,54.4742785 L73.5056462,40.0803011 L73.4454203,39.749059 L73.2948557,39.6286073 L73.0840652,39.5984944 L72.6022585,39.8695107 L72.3613551,40.1706399 Z M69.229611,40.7427854 L69.1091593,41.0439147 L69.0489335,41.6461731 L69.0790464,57.846926 L69.1392723,58.1480552 L69.4404015,58.3287327 L69.7415307,58.238394 L70.1028858,57.9372647 L70.3437892,57.5457967 L70.4642409,57.06399 L70.4040151,40.6223338 L70.3437892,40.3513174 L70.1932246,40.2007528 L69.9824341,40.140527 L69.5006274,40.3814304 L69.229611,40.7427854 Z M53.6311167,32.3111669 L53.510665,32.4617315 L53.4504391,33.0037641 L53.4203262,34.629862 L53.5708908,84.8281054 L53.7515684,85.2797992 L54.2333752,85.2195734 L54.5947302,84.9184442 L54.8356336,84.5269762 L54.9259724,84.0451694 L54.7754078,32.1907152 L54.7151819,31.8895859 L54.5646173,31.7390213 L54.3839398,31.7089084 L53.8720201,31.9799247 L53.6311167,32.3111669 Z M78.4742785,38.9962359 L78.3237139,39.357591 L78.293601,39.9899624 L78.3237139,48.9335006 L78.3839398,49.2346299 L78.685069,49.4153074 L78.9861982,49.3249686 L79.3174404,49.0539523 L79.5884567,48.6323714 L79.6787955,48.1505646 L79.6486826,38.8757842 L79.5884567,38.574655 L79.468005,38.4240903 L79.2572146,38.3939774 L78.7754078,38.6348808 L78.4742785,38.9962359 Z M59.7139272,44.6875784 L59.7741531,65.7967378 L59.9548306,66.2484316 L60.4366374,66.1882058 L60.7678795,65.9171895 L61.0087829,65.5257215 L61.1292346,65.0138018 L61.0690088,43.9046424 L60.8883312,43.4529486 L60.4065245,43.5131744 L60.0451694,43.7841907 L59.804266,44.1756587 L59.7139272,44.6875784 Z M56.7929737,49.3851945 L56.642409,49.6863237 L56.5821832,50.2584693 L56.642409,64.140527 L56.7026349,64.4416562 L57.0037641,64.6223338 L57.3048934,64.531995 L57.6361355,64.2308657 L57.9071518,63.8393977 L57.9974906,63.357591 L57.9673777,49.2647428 L57.9071518,48.9636136 L57.7565872,48.8431619 L57.5457967,48.8130489 L57.033877,49.0840652 L56.7929737,49.3851945 Z M44.3864492,36.9485571 L44.2659975,37.1292346 L44.2057716,37.6712673 L44.1756587,39.2973651 L44.3563363,89.4956085 L44.4165621,89.7967378 L44.6875784,89.9774153 L44.9887077,89.8870765 L45.3500627,89.5859473 L45.5909661,89.1944793 L45.6813049,88.7126725 L45.5608532,36.8582183 L45.4705144,36.5269762 L45.3500627,36.4065245 L45.1392723,36.3764115 L44.6273526,36.6474279 L44.3864492,36.9485571 Z M65.9473024,44.5671267 L65.9774153,58.9611041 L66.1580928,59.412798 L66.6398996,59.3525721 L66.9711418,59.0815558 L67.2421581,58.6900878 L67.3324969,58.1781681 L67.3023839,43.7841907 L67.1217064,43.3324969 L66.6398996,43.3626098 L66.2785445,43.663739 L66.0376412,44.055207 L65.9473024,44.5671267 Z M50.5897114,28.2158093 L50.4391468,28.7879548 L50.4090339,32.9736512 L50.5897114,92.2659975 L50.6499373,92.5671267 L50.9510665,92.7478043 L51.2521957,92.6574655 L51.5834379,92.3864492 L51.8243413,91.9648683 L51.944793,91.4830615 L51.7641154,28.1254705 L51.7038896,27.7942284 L51.553325,27.6737767 L51.3425345,27.6436637 L50.8306148,27.9146801 L50.5897114,28.2158093 Z M75.3726474,39.6587202 L75.2220828,40.0200753 L75.161857,40.7728984 L75.1919699,52.1856964 L75.2521957,52.4868256 L75.553325,52.6675031 L75.8845671,52.5771644 L76.2158093,52.3061481 L76.4567127,51.9146801 L76.5771644,51.4027604 L76.5470514,39.5382685 L76.4567127,39.2371393 L76.336261,39.1166876 L76.1254705,39.0865747 L75.6135508,39.357591 L75.3726474,39.6587202 Z M62.9962359,40.6524467 L62.8757842,40.923463 L62.8155583,41.4052698 L62.7854454,42.6700125 L62.8757842,64.8933501 L62.93601,65.1944793 L63.0865747,65.3450439 L63.2672522,65.3751568 L63.5382685,65.2848181 L64.0200753,64.7728984 L64.2308657,64.1104141 L64.1706399,40.531995 L64.1104141,40.2308657 L63.9598494,40.1104141 L63.749059,40.0501882 L63.2672522,40.2910916 L62.9962359,40.6524467 Z M47.4880803,37.9422836 L47.3977415,38.153074 L47.3375157,38.6649937 L47.3074028,40.1706399 L47.4579674,86.3337516 L47.5181932,86.6348808 L47.6386449,86.7854454 L47.8494354,86.8155583 L48.391468,86.5144291 L48.7528231,85.9121706 L48.8130489,85.5508156 L48.6624843,37.8218319 L48.6022585,37.5508156 L48.4818068,37.4002509 L48.2710163,37.370138 L47.7892095,37.6110414 L47.4880803,37.9422836 Z M84.7076537,38.3036386 L84.5570891,38.7252196 L84.5269762,39.327478 L84.5269762,42.4291092 L84.587202,42.7302384 L84.8883312,42.9109159 L85.1894605,42.8205772 L85.5508156,42.5495609 L85.7917189,42.1580928 L85.9121706,41.6461731 L85.8820577,38.183187 L85.8218319,37.8820577 L85.6712673,37.7314931 L85.4604768,37.7013802 L85.0087829,37.9422836 L84.7076537,38.3036386 Z M81.6060226,39.4178168 L81.455458,39.8695107 L81.3952321,40.7126725 L81.425345,46.1329987 L81.6060226,46.5846926 L82.0878294,46.5244668 L82.4491844,46.2534504 L82.6900878,45.8318695 L82.7804266,45.3500627 L82.7804266,39.327478 L82.6900878,38.9962359 L82.5395232,38.8456713 L82.3287327,38.8155583 L81.846926,39.1166876 L81.6060226,39.4178168 Z M38.2132999,53.510665 L38.0928482,53.7515684 L38.0025094,54.2634881 L38.0025094,55.6787955 L38.0928482,81.455458 L38.2735257,81.9071518 L38.7553325,81.846926 L39.0865747,81.5759097 L39.327478,81.1844417 L39.4479297,80.672522 L39.357591,53.3902133 L39.2973651,53.119197 L39.1769134,52.9686324 L38.966123,52.9084065 L38.4843162,53.1493099 L38.2132999,53.510665 Z M41.2848181,41.5558344 L41.1643664,41.7365119 L41.1041405,42.2785445 L41.0740276,43.7841907 L41.2245922,89.9473024 L41.2848181,90.2484316 L41.5859473,90.4291092 L41.8870765,90.3387704 L42.2183187,90.0677541 L42.489335,89.6461731 L42.5796738,89.1643664 L42.4592221,41.4353827 L42.3688833,41.1342535 L42.2484316,40.9836888 L42.0376412,40.9535759 L41.5558344,41.1944793 L41.2848181,41.5558344 Z M28.9084065,69.9523212 L28.727729,70.4040151 L28.6976161,71.217064 L28.6976161,76.6675031 L28.8782936,77.119197 L29.3902133,77.0589711 L29.7214555,76.7879548 L29.9623588,76.3964868 L30.0828105,75.8845671 L30.0526976,69.8619824 L29.9924718,69.5608532 L29.8419072,69.4102886 L29.6311167,69.3801757 L29.1493099,69.651192 L28.9084065,69.9523212 Z M16.5621079,78.685069 L16.3814304,79.076537 L16.3513174,79.6486826 L16.4115433,83.1116688 L16.7126725,83.2923463 L17.0138018,83.2020075 L17.3751568,82.9309912 L17.6160602,82.5094103 L17.706399,82.0276035 L17.706399,78.5646173 L17.6461731,78.2634881 L17.4956085,78.1129235 L17.0740276,78.1430364 L16.5621079,78.685069 Z M35.0815558,60.7979925 L34.9611041,61.0991217 L34.9008783,61.6712673 L34.9611041,77.6612296 L35.02133,77.9623588 L35.1417817,78.1129235 L35.2923463,78.1430364 L35.6235885,78.0526976 L35.9548306,77.7816813 L36.2258469,77.3601004 L36.3161857,76.8782936 L36.2559598,60.6775408 L36.195734,60.3764115 L36.0752823,60.2559598 L35.8644918,60.195734 L35.3826851,60.4366374 L35.0815558,60.7979925 Z M22.7653701,72.2710163 L22.6148055,72.6624843 L22.5545797,73.2948557 L22.5846926,81.3350063 L22.7653701,81.7867001 L23.2471769,81.7264743 L23.608532,81.455458 L23.8494354,81.033877 L23.9397742,80.5520703 L23.9096612,72.1806775 L23.8494354,71.8795483 L23.7289837,71.7289837 L23.5181932,71.6988708 L23.0363864,71.9397742 L22.7653701,72.2710163 Z M25.8670013,70.5846926 L25.7164366,70.9460477 L25.6562108,71.5483061 L25.6863237,79.076537 L25.7465496,79.3776662 L26.0476788,79.5884567 L26.378921,79.4981179 L26.7101631,79.1969887 L26.9510665,78.8055207 L27.0715182,78.293601 L27.0414053,70.4642409 L26.9811794,70.1932246 L26.8306148,70.04266 L26.6499373,69.9824341 L26.1681305,70.2534504 L25.8670013,70.5846926 Z M32.0100376,66.7302384 L31.859473,67.0313676 L31.7992472,67.6336261 L31.8293601,76.6675031 L31.8895859,76.9686324 L32.1907152,77.1493099 L32.4918444,77.0589711 L32.8531995,76.7879548 L33.0941029,76.3964868 L33.1844417,75.8845671 L33.1543287,66.6097867 L33.0941029,66.3086575 L32.9435383,66.1580928 L32.7327478,66.1279799 L32.250941,66.3989962 L32.0100376,66.7302384 Z M19.6336261,74.1982434 L19.4830615,74.5595985 L19.4529486,75.131744 L19.4830615,82.6900878 L19.663739,83.1116688 L20.1455458,83.0815558 L20.476788,82.8105395 L20.7478043,82.3889586 L20.838143,81.8770389 L20.8080301,74.0777917 L20.7478043,73.7766625 L20.6273526,73.6260979 L20.4165621,73.5959849 L19.9347553,73.8368883 L19.6336261,74.1982434 Z",fill:"#FFF",transform:"matrix(-1 0 0 1 163.315 22)"},null)])])])]),t.createVNode("div",{class:rv("tips")},[r.value?" ":"按住说话"]),t.createVNode("div",{class:rv("footer")},[e.value&&t.createVNode("div",{class:rv("clear"),onClick:d},[t.createTextVNode("清空")]),t.createVNode("div",{onContextmenu:p,class:[rv("btn"),r.value?rv("btn","active"):""],onTouchstart:h,onTouchend:v,onTouchcancel:v},[t.createVNode(it,{name:"microphone",size:"32"},null)]),e.value&&t.createVNode("div",{class:rv("confirm"),onClick:f},[t.createTextVNode("确定")])])])]);return()=>t.createVNode(kt,{show:a.value,"onUpdate:show":[e=>a.value=e,c],round:!0,position:"bottom",closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay},{default:y})}})),[sv,cv]=Se("steps"),uv={active:C(0),direction:N("horizontal"),activeColor:String,activeBgColor:String,activeBorderColor:String,titleActiveColor:String,inactiveColor:String,inactiveBgColor:String,inactiveBorderColor:String,titleInactiveColor:String},dv=Symbol(sv);var fv=t.defineComponent({name:sv,props:uv,emits:["clickStep"],setup(e,{emit:o,slots:n}){const{linkChildren:a}=D(dv);return a({props:e,onClickStep:e=>o("clickStep",e)}),()=>{var o;return t.createVNode("div",{class:cv([e.direction])},[t.createVNode("div",{class:cv("items")},[null==(o=n.default)?void 0:o.call(n)])])}}});const[pv,hv]=Se("step"),vv={iconPrefix:String,activeIcon:String,inactiveIcon:String};const mv=je(t.defineComponent({name:pv,props:vv,setup(e,{slots:o}){const{parent:n,index:a}=I(dv);if(!n)return;const r=n.props,i=()=>{const e=+r.active;return a.value===e?"process":"waiting"},l=()=>"process"===i(),s=t.computed((()=>l()?{color:r.titleActiveColor||""}:{color:r.titleInactiveColor||""})),c=()=>n.onClickStep(a.value),u=()=>{const{activeColor:e,activeBgColor:t,activeBorderColor:o,inactiveBgColor:n,inactiveBorderColor:a,inactiveColor:i}=r,s={};return l()?(s.background=`${t||"var(--zt-primary-color-a2)"}`,o&&(s.border=`1px solid ${o}`),s.fontWeight="bold",s.color=`${e||"var(--zt-primary-color)"}`):(s.background=`${n||""}`,a&&(s.border=`1px solid ${a}`),s.fontWeight="normal",s.color=`${i||"#FFFFFF"}`),s},d=()=>{const{activeColor:n,inactiveColor:i}=r,{iconPrefix:s,activeIcon:c,inactiveIcon:d}=e;return l()&&(c||o["active-icon"])?o["active-icon"]?o["active-icon"]():t.createVNode("div",{class:hv("circle"),style:u()},[t.createVNode(rt,{class:hv("icon","active"),name:c,color:n,classPrefix:s},null)]):d||o["inactive-icon"]?o["inactive-icon"]?o["inactive-icon"]():t.createVNode("div",{class:hv("circle"),style:u()},[t.createVNode(rt,{class:hv("icon"),name:d,color:i,classPrefix:s},null)]):t.createVNode("div",{class:hv("circle"),style:u()},[a.value+1])};return()=>{var e;const n=i();return t.createVNode("div",{class:[Te,hv([r.direction,{[n]:n}])]},[t.createVNode("div",{class:hv("title",{active:l()}),style:s.value,onClick:c},[null==(e=o.default)?void 0:e.call(o)]),t.createVNode("div",{class:hv("circle-container"),onClick:c},[d()]),t.createVNode("div",{class:hv("line")},null)])}}})),[gv,yv]=Se("stepper"),wv=(e,t)=>String(e)===String(t),bv={min:C(1),max:C(1/0),name:C(""),step:C(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:w,showMinus:w,showInput:w,longPress:w,allowEmpty:Boolean,modelValue:y,inputWidth:y,buttonSize:y,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:C(1),decimalLength:y};const Lv=je(t.defineComponent({name:gv,props:bv,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup(e,{emit:n}){const a=t=>{const{min:n,max:a,allowEmpty:r,decimalLength:i}=e;return r&&""===t||(t=""===(t=me(String(t),!e.integer))?0:+t,t=Number.isNaN(t)?+n:t,t=Math.max(Math.min(+a,t),+n),o(i)&&(t=t.toFixed(+i))),t};let r;const i=t.ref(),l=t.ref((()=>{var t;const o=null!=(t=e.modelValue)?t:e.defaultValue,r=a(o);return wv(r,e.modelValue)||n("update:modelValue",r),r})()),s=t.computed((()=>e.disabled||e.disableMinus||+l.value<=+e.min)),c=t.computed((()=>e.disabled||e.disablePlus||+l.value>=+e.max)),u=t.computed((()=>({width:re(e.inputWidth),height:re(e.buttonSize)}))),d=t.computed((()=>ie(e.buttonSize))),f=t=>{e.beforeChange?_e(e.beforeChange,{args:[t],done(){l.value=t}}):l.value=t},p=()=>{if("plus"===r&&c.value||"minus"===r&&s.value)return void n("overlimit",r);const t="minus"===r?-e.step:+e.step,o=a(ge(+l.value,t));f(o),n(r)},h=t=>{const n=t.target,{value:a}=n,{decimalLength:r}=e;let i=me(String(a),!e.integer);if(o(r)&&i.includes(".")){const e=i.split(".");i=`${e[0]}.${e[1].slice(0,+r)}`}e.beforeChange?n.value=String(l.value):wv(a,i)||(n.value=i);const s=i===String(+i);f(s?+i:i)},v=t=>{var o;e.disableInput?null==(o=i.value)||o.blur():n("focus",t)},m=e=>{const o=e.target,r=a(o.value);o.value=String(r),l.value=r,t.nextTick((()=>{n("blur",e),Q()}))};let g,y;const w=()=>{y=setTimeout((()=>{p(),w()}),200)},b=t=>{e.longPress&&(clearTimeout(y),g&&ee(t))},L=t=>{e.disableInput&&ee(t)},x=t=>({onClick:e=>{ee(e),r=t,p()},onTouchstart:()=>{r=t,e.longPress&&(g=!1,clearTimeout(y),y=setTimeout((()=>{g=!0,p(),w()}),500))},onTouchend:b,onTouchcancel:b});return t.watch((()=>[e.max,e.min,e.integer,e.decimalLength]),(()=>{const e=a(l.value);wv(e,l.value)||(l.value=e)})),t.watch((()=>e.modelValue),(e=>{wv(e,l.value)||(l.value=a(e))})),t.watch(l,(t=>{n("update:modelValue",t),n("change",t,{name:e.name})})),Z((()=>e.modelValue)),()=>t.createVNode("div",{role:"group",class:yv([e.theme])},[t.withDirectives(t.createVNode("div",t.mergeProps({style:d.value,class:[yv("minus",{disabled:s.value}),{[yv("could-click")]:!s.value}],"aria-disabled":s.value||void 0},x("minus")),[t.createVNode(it,{name:"minus",size:(null==e?void 0:e.buttonSize)?e.buttonSize:"32"},null)]),[[t.vShow,e.showMinus]]),t.withDirectives(t.createVNode("input",{ref:i,type:e.integer?"tel":"text",role:"spinbutton",class:yv("input"),value:l.value,style:u.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":l.value,onBlur:m,onInput:h,onFocus:v,onMousedown:L},null),[[t.vShow,e.showInput]]),t.withDirectives(t.createVNode("div",t.mergeProps({style:d.value,class:[yv("plus",{disabled:c.value}),{[yv("could-click")]:!c.value}],"aria-disabled":c.value||void 0},x("plus")),[t.createVNode(it,{name:"plus",size:(null==e?void 0:e.buttonSize)?e.buttonSize:"32"},null)]),[[t.vShow,e.showPlus]])])}})),xv=je(fv),[Cv,Nv]=Se("swipe-cell"),Vv={name:C(""),disabled:Boolean,leftWidth:y,rightWidth:y,beforeClose:Function,stopPropagation:Boolean};const kv=je(t.defineComponent({name:Cv,props:Vv,emits:["open","close","click"],setup(e,{emit:n,slots:a}){let r,i,l,s;const c=t.ref(),u=t.ref(),d=t.ref(),f=t.reactive({offset:0,dragging:!1}),p=ut(),h=e=>e.value?P(e).width:0,v=t.computed((()=>o(e.leftWidth)?+e.leftWidth:h(u))),m=t.computed((()=>o(e.rightWidth)?+e.rightWidth:h(d))),g=t=>{f.offset="left"===t?v.value:-m.value,r||(r=!0,n("open",{name:e.name,position:t}))},y=t=>{f.offset=0,r&&(r=!1,n("close",{name:e.name,position:t}))},w=t=>{e.disabled||(l=f.offset,p.start(t))},b=()=>{f.dragging&&(f.dragging=!1,(e=>{const t=Math.abs(f.offset),o=r?.85:.15,n="left"===e?v.value:m.value;n&&t>n*o?g(e):y(e)})(f.offset>0?"left":"right"),setTimeout((()=>{i=!1}),0))},L=(t="outside")=>{s||(n("click",t),r&&!i&&(s=!0,_e(e.beforeClose,{args:[{name:e.name,position:t}],done:()=>{s=!1,y(t)},canceled:()=>s=!1,error:()=>s=!1})))},x=(e,t)=>o=>{t&&o.stopPropagation(),L(e)},C=(e,o)=>{const n=a[e];if(n)return t.createVNode("div",{ref:o,class:Nv(e),onClick:x(e,!0)},[n()])};return ct({open:g,close:y}),_(c,(()=>L("outside")),{eventName:"touchstart"}),z("touchmove",(t=>{if(e.disabled)return;const{deltaX:o}=p;if(p.move(t),p.isHorizontal()){i=!0,f.dragging=!0;(!r||o.value*l<0)&&ee(t,e.stopPropagation),f.offset=he(o.value+l,-m.value,v.value)}}),{target:c}),()=>{var e;const o={transform:`translate3d(${f.offset}px, 0, 0)`,transitionDuration:f.dragging?"0s":".6s"};return t.createVNode("div",{ref:c,class:Nv(),onClick:x("cell",i),onTouchstartPassive:w,onTouchend:b,onTouchcancel:b},[t.createVNode("div",{class:Nv("wrapper"),style:o},[C("left",u),null==(e=a.default)?void 0:e.call(a),C("right",d)])])}}})),[Av,Sv]=Se("switch"),Tv={size:y,loading:Boolean,disabled:Boolean,modelValue:g,activeColor:String,inactiveColor:String,activeValue:{type:g,default:!0},inactiveValue:{type:g,default:!1}};const Ov=je(t.defineComponent({name:Av,props:Tv,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const a=()=>e.modelValue===e.activeValue,r=()=>{if(!e.disabled&&!e.loading){const t=a()?e.inactiveValue:e.activeValue;o("update:modelValue",t),o("change",t)}},i=()=>{if(e.loading){const o=a()?e.activeColor:e.inactiveColor;return t.createVNode(Pt,{class:Sv("loading"),color:o},null)}if(n.node)return n.node()};return Z((()=>e.modelValue)),()=>{var o;const{size:l,loading:s,disabled:c,activeColor:u,inactiveColor:d}=e,f=a(),p={fontSize:re(l),backgroundColor:f?u:d};return t.createVNode("div",{role:"switch",class:Sv({on:f,loading:s,disabled:c}),style:p,tabindex:c?void 0:0,"aria-checked":f,onClick:r},[t.createVNode("div",{class:Sv("node")},[i()]),null==(o=n.background)?void 0:o.call(n)])}}}));var Mv=Ov;const[Pv,Iv]=Se("tabbar"),Bv={route:Boolean,fixed:w,border:w,zIndex:y,placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,modelValue:C(0),safeAreaInsetBottom:{type:Boolean,default:null}},Dv=Symbol(Pv);const Ev=je(t.defineComponent({name:Pv,props:Bv,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),{linkChildren:r}=D(Dv),i=xd(a,Iv),l=()=>{var t;return null!=(t=e.safeAreaInsetBottom)?t:e.fixed},s=()=>{var o;const{fixed:r,zIndex:i,border:s}=e;return t.createVNode("div",{ref:a,role:"tablist",style:le(i),class:[Iv({fixed:r}),{[Oe]:s,"zt-safe-area-bottom":l()}]},[null==(o=n.default)?void 0:o.call(n)])};return r({props:e,setActive:(t,n)=>{_e(e.beforeChange,{args:[t],done(){o("update:modelValue",t),o("change",t),n()}})}}),()=>e.fixed&&e.placeholder?i(s):s()}})),[zv,_v]=Se("tabbar-item"),jv=d({},ro,{dot:Boolean,icon:String,name:y,badge:y,badgeProps:Object,iconPrefix:String});const Fv=je(t.defineComponent({name:zv,props:jv,emits:["click"],setup(e,{emit:o,slots:n}){const r=lo(),i=t.getCurrentInstance().proxy,{parent:l,index:s}=I(Dv);if(!l)return;const c=t.computed((()=>{var t;const{route:o,modelValue:n}=l.props;if(o&&"$route"in i){const{$route:t}=i,{to:o}=e,n=a(o)?o:{path:o};return!!t.matched.find((e=>{const t="path"in n&&n.path===e.path,o="name"in n&&n.name===e.name;return t||o}))}return(null!=(t=e.name)?t:s.value)===n})),u=t=>{var n;c.value||l.setActive(null!=(n=e.name)?n:s.value,r),o("click",t)},d=()=>n.icon?n.icon({active:c.value}):e.icon?t.createVNode(rt,{name:e.icon,classPrefix:e.iconPrefix},null):void 0;return()=>{var o;const{dot:a,badge:r}=e,{activeColor:i,inactiveColor:s}=l.props,f=c.value?i:s;return t.createVNode("div",{role:"tab",class:_v({active:c.value}),style:{color:f},tabindex:0,"aria-selected":c.value,onClick:u},[t.createVNode(Ue,t.mergeProps({dot:a,class:_v("icon",{active:c.value}),content:r},e.badgeProps),{default:d}),t.createVNode("div",{class:_v("text")},[null==(o=n.default)?void 0:o.call(n,{active:c.value})])])}}}));var Rv=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(Rv||{});const[Hv,$v]=Se("text-ellipsis"),Uv={rows:C(1),dots:N("..."),content:N(""),expandText:N(""),expandType:N("flat"),collapseText:N(""),position:N("end")};const Zv=je(t.defineComponent({name:Hv,props:Uv,emits:["clickAction"],setup(e,{emit:o}){const n=t.ref(""),a=t.ref(!1),r=t.ref(!1),i=t.ref(),l=t.computed((()=>a.value?e.collapseText:e.expandText)),s=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0},c=()=>{const t=(()=>{if(!i.value)return;const t=window.getComputedStyle(i.value),o=document.createElement("div");return Array.prototype.slice.apply(t).forEach((e=>{o.style.setProperty(e,t.getPropertyValue(e))})),o.style.position="fixed",o.style.zIndex="-9999",o.style.top="-9999px",o.style.height="auto",o.style.minHeight="auto",o.style.maxHeight="auto",o.innerText=e.content,document.body.appendChild(o),o})();if(!t)return;const{paddingBottom:o,paddingTop:a,lineHeight:c}=t.style,u=Math.ceil((Number(e.rows)+.5)*s(c)+s(a)+s(o));u<t.offsetHeight?(r.value=!0,n.value=((t,o)=>{const{content:n,position:a,dots:r}=e,i=n.length,s=(a,l)=>{if(a[1]-a[0]<=1&&l[1]-l[0]<=1)return n.slice(0,a[0])+r+n.slice(l[1],i);const c=Math.floor((a[0]+a[1])/2),u=Math.ceil((l[0]+l[1])/2);return t.innerText=e.content.slice(0,c)+e.dots+e.content.slice(u,i)+e.expandText,t.offsetHeight>=o?s([a[0],c],[u,l[1]]):s([c,a[1]],[l[0],u])},c=0+i>>1;return"middle"===e.position?t.innerText=s([0,c],[c,i]):(()=>{const e=(s,c)=>{if(c-s<=1)return"end"===a?n.slice(0,s)+r:r+n.slice(c,i);const u=Math.round((s+c)/2);return t.innerText="end"===a?n.slice(0,u)+r+l.value:r+n.slice(u,i)+l.value,t.offsetHeight>o?"end"===a?e(s,u):e(u,c):"end"===a?e(u,c):e(s,u)};t.innerText=e(0,i)})(),t.innerText})(t,u)):(r.value=!1,n.value=e.content),document.body.removeChild(t)},u=e=>{e.stopPropagation(),e.preventDefault(),a.value=!a.value,o("clickAction",e)},d=()=>{"dialog"===e.expandType&&r.value&&qr({message:e.content}).then((()=>{}))};return t.onMounted(c),t.watch((()=>[e.content,e.rows,e.position]),c),z("resize",c),()=>t.createVNode("div",{ref:i,class:$v(),onClick:d},[a.value?e.content:n.value,"dialog"!==e.expandType&&r.value?t.createVNode("span",{class:$v("action"),onClick:u},[l.value]):null])}}));var Wv=Zv;const[Yv,qv]=Se("table"),Gv="bodyCell",Xv={headList:L(),dataList:L(),striped:w,emptyValue:N("-"),loading:{type:Boolean,default:!1},skeletonRow:{type:Number,default:6},border:{type:Boolean,default:!1},hideTableHead:{type:Boolean,default:!1}};const Kv=je(t.defineComponent({name:Yv,props:Xv,emits:["sort"],setup(e,{emit:o,slots:n}){const a=t.ref(""),r=t.ref(""),i=t.ref(),l=t.computed((()=>e.headList.filter((e=>e.fixed||e.fixedRight)))),s=t.computed((()=>{const t=[];let o=0;return e.headList.forEach(((n,a)=>{var r;const i=Object.assign({},n),l=e.headList[a-1],s=e.headList[a+1];l?(o+=Number(null==(r=l.width)?void 0:r.split("px")[0]),i.left=`${o}px`):i.left=0,n.fixed&&!(null==s?void 0:s.fixed)&&(i.lastFixLeft=!0),t.push(i)})),t})),c=t.ref(!1),u=t.ref(!1),d=t.computed((()=>l.value.concat(e.headList.filter((e=>!e.fixed)))));t.onMounted((()=>{i.value&&(u.value=i.value.scrollWidth>i.value.clientWidth);const t=e.headList.map(((e,t)=>(e.sorter&&e.defaultSortOrder&&(a.value=e.defaultSortOrder||"",r.value=e.key),e.fixed?`tableHead${t}`:""))).filter((e=>""!==e));t.length>0&&t.forEach(((e,t)=>{const o=document.getElementById(`fixedHead${t}`),n=document.getElementById(e);o&&n&&(o.style.width=n.offsetWidth+"px")}),0)}));const f=e=>{var t;e.sorter&&(a.value=(t=e.key===r.value?a.value:"")?t===Rv.ASCEND?Rv.DESCEND:"":Rv.ASCEND,r.value=e.key,o("sort",{order:a.value,key:e.key}))},p=e=>{const{scrollLeft:t,currentTarget:o}=e,n="number"==typeof t?t:null==o?void 0:o.scrollLeft;c.value=n>0;const a=o.scrollWidth-o.scrollLeft-o.clientWidth;u.value=a>0},h=(e,o,a)=>{if(e[o.key]&&e[o.key].id&&n[`data-${e[o.key].id}`])return n[`data-${e[o.key].id}`](e[o.key]);const r={column:o,record:e,text:e[o.key],index:a},i=n[Gv]&&n[Gv](r);return i&&i.length?i[0]:o.ellipsis?t.createVNode(Wv,{content:e[o.key],expandType:"dialog"},null):e[o.key]},v=()=>{const e=[],o=d.value.length;for(let n=0;n<o;n++)e.push(t.createVNode("div",{class:qv("col")},[t.createVNode("div",{class:qv("col-item")},null)]));return e},m=()=>{const o=[];for(let n=0;n<e.skeletonRow;n++)o.push(t.createVNode("div",{class:qv("row",{head:0===n})},[v()]));return o};return()=>e.loading?t.createVNode("div",{class:qv({animate:!0,skeleton:!0})},[m()]):t.createVNode("div",{ref:i,class:qv({fixed:l.value.length>0,bordered:e.border,striped:e.striped}),onScroll:p},[t.createVNode("table",null,[t.createVNode("colgroup",null,[e.headList.map((e=>t.createVNode("col",{style:{width:e.width}},null)))]),t.withDirectives(t.createVNode("thead",{class:qv("thead")},[t.createVNode("tr",null,[s.value.map((e=>(e=>{const o=n[`head-${e.id}`],i=e.sorter?"flat":"dialog";if(0!==(null==e?void 0:e.colSpan))return t.createVNode("th",{class:[qv("left",{fixed:e.fixed,last:e.lastFixLeft&&c.value}),qv("right",{fixed:e.fixedRight,last:e.lastRight&&u.value})],style:{left:e.fixed?e.left:"",right:e.fixedRight?e.right:""},colspan:1!==(null==e?void 0:e.colSpan)?null==e?void 0:e.colSpan:null},[o?o(e):t.createVNode("div",{class:qv("head"),onClick:()=>f(e)},[e.ellipsis?t.createVNode(Wv,{content:e.label,expandType:i,class:qv("head-label-ellipsis")},null):t.createVNode("span",{class:qv("head-label")},[e.label]),e.sorter?t.createVNode("span",{class:qv("head-sort")},[t.createVNode(rt,{class:[e.key===r.value&&a.value===Rv.ASCEND?qv("sort-active"):""],name:"spinner-shrink",size:"12",style:{marginBottom:"-3px"}},null),t.createVNode(rt,{class:[e.key===r.value&&a.value===Rv.DESCEND?qv("sort-active"):""],name:"spinner-expand",size:"12",style:{marginTop:"-3px"}},null)]):""])])})(e)))])]),[[t.vShow,!e.hideTableHead]]),t.createVNode("tbody",{class:qv("tbody")},[e.dataList.map(((e,o)=>((e,o)=>t.createVNode("tr",null,[s.value.map((n=>{let a;n.customCell&&(a=n.customCell(e,o));const r=Object.assign({},n.style);return r.left=n.fixed?n.left:"",r.right=n.fixedRight?n.right:"",0!==(null==a?void 0:a.rowSpan)&&0!==(null==a?void 0:a.colSpan)&&t.createVNode("td",{onClick:()=>n.click&&n.click(e,o),class:[qv("left",{fixed:n.fixed,last:n.lastFixLeft&&c.value}),qv("right",{fixed:n.fixedRight,last:n.lastRight&&u.value})],colspan:1!==(null==a?void 0:a.colSpan)?null==a?void 0:a.colSpan:null,rowspan:1!==(null==a?void 0:a.rowSpan)?null==a?void 0:a.rowSpan:null,style:r},[h(e,n,o)])}))]))(e,o)))])])])}})),[Qv,Jv]=Se("timeline"),em={title:N("办理经过"),defaultFold:{type:Boolean,default:!1},collapseCount:x(0),processes:L([]),opinionKey:N("处理意见"),enableSingleFold:w,dot:{type:Boolean,default:!1}};const tm=je(t.defineComponent({name:Qv,props:em,setup(e,{slots:o}){const n=t.ref(e.defaultFold),a=n=>o.avatar?t.createVNode("div",{class:Jv("avatar-box")},[o.avatar(n)]):e.dot?t.createVNode("div",{class:Jv("dot")},null):t.createVNode("div",{class:Jv("avatar-box")},[n.avatar?t.createVNode("img",{class:Jv("avatar"),src:n.avatar,alt:""},null):t.createVNode("div",{class:Jv("avatar")},[n.human.slice(-2)])]),r=e=>o.title?t.createVNode("div",{class:Jv("title-box")},[o.title(e)]):t.createVNode("div",{class:Jv("title-box")},[t.createVNode("span",{class:Jv("title")},[`${e.department}[${e.human}]`]),t.createVNode("span",{class:Jv("time")},[e.timestamp])]),i=n=>o.opinion?t.createVNode("div",{class:Jv("opinion-box")},[o.opinion(n)]):t.createVNode("div",{class:Jv("opinion-box")},[t.createVNode("div",{class:Jv("opinion-label")},[e.opinionKey]),t.createVNode("div",{class:Jv("opinion")},[n.opinion||"无"])]),l=e=>o.content?t.createVNode("div",{class:[Jv("content-box"),Pe]},[o.content(e)]):t.createVNode("div",{class:[Jv("content-box"),Pe]},[t.createTextVNode("在"),t.createVNode("span",null,[e.stage]),t.createTextVNode("阶段"),t.createVNode("span",{class:Jv("text-bold")},[t.createTextVNode(" "),e.action,t.createTextVNode(" ")]),t.createTextVNode("到"),t.createVNode("span",null,[e.nextAction]),t.createVNode("span",null,[e.nextDepartment]),t.createVNode("span",{class:Jv("text-bold")},[t.createTextVNode(" ["),e.nextHuman,t.createTextVNode("]")])]),s=(o,n)=>t.createVNode("div",{class:Jv("item")+" "+(n?"last-item":""),onClick:function(){e.enableSingleFold&&(o.folded=!o.folded)}},[t.createVNode("div",{class:[Jv("left-container"),e.dot?Jv("dot-container"):""]},[a(o),t.createVNode("div",{class:Jv(e.dot?"line-dot":"line")},null)]),t.createVNode("div",{class:Jv("right-container")},[r(o),!o.folded&&t.createVNode("div",{class:Jv("main-container")},[l(o),i(o)])])]),c=t.computed((()=>{const t=e.processes.map((e=>(e.folded=!1,e)));if(n.value){const o=t.slice(0,e.collapseCount);return o.map(((e,t)=>s(e,t===o.length-1)))}return t.map(((e,o)=>s(e,o===t.length-1)))}));return()=>{var a;return t.createVNode("div",{class:Jv()},[o["top-bar"]?t.createVNode("div",{class:[Jv("top-bar"),Pe]},[o["top-bar"]()]):t.createVNode("div",{class:[Jv("top-bar"),Pe]},[t.createVNode("div",{class:Jv("top-left")},[t.createVNode("div",{class:Jv("bar")},null),t.createVNode("div",{class:Jv("title")},[e.title])]),t.createVNode("div",{class:Jv("top-right")},[t.createVNode("span",{class:Jv("fold-text")},[t.createTextVNode("折叠"),e.title]),t.createVNode(Mv,{modelValue:n.value,"onUpdate:modelValue":e=>n.value=e},null)])]),(null==(a=c.value)?void 0:a.length)>0&&t.createVNode("div",{class:Jv("container")},[c.value])])}}})),[om,nm,am]=Se("uploader");function rm(e,t){return new Promise((o=>{if("file"===t)return void o();const n=new FileReader;n.onload=e=>{o(e.target.result)},"dataUrl"===t?n.readAsDataURL(e):"text"===t&&n.readAsText(e)}))}function im(e,t){return m(e).some((e=>!!e.file&&(n(t)?t(e.file):e.file.size>+t)))}const lm=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;function sm(e){return!!e.isImage||(e.file&&e.file.type?0===e.file.type.indexOf("image"):e.url?(t=e.url,lm.test(t)):"string"==typeof e.content&&0===e.content.indexOf("data:image"));var t}var cm=t.defineComponent({props:{name:y,item:b(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup(e,{emit:n,slots:a}){const r=()=>{const{status:n,message:a}=e.item;if("uploading"===n||"failed"===n){const e="failed"===n?t.createVNode(rt,{name:"close",class:nm("mask-icon")},null):t.createVNode(Pt,{class:nm("loading")},null),r=o(a)&&""!==a;return t.createVNode("div",{class:nm("mask")},[e,r&&t.createVNode("div",{class:nm("mask-message")},[a])])}},i=t=>{const{name:o,item:a,index:r,beforeDelete:i}=e;t.stopPropagation(),_e(i,{args:[a,{name:o,index:r}],done:()=>n("delete")})},l=()=>n("preview"),s=()=>{if(e.deletable&&"uploading"!==e.item.status){const e=a["preview-delete"];return t.createVNode("div",{role:"button",class:nm("preview-delete",{shadow:!e}),tabindex:0,"aria-label":am("delete"),onClick:i},[e?e():t.createVNode(rt,{name:"cross",class:nm("preview-delete-icon")},null)])}},c=()=>{if(a["preview-cover"]){const{index:o,item:n}=e;return t.createVNode("div",{class:nm("preview-cover")},[a["preview-cover"](d({index:o},n))])}},u=()=>{const{item:o,lazyLoad:n,imageFit:a,previewSize:r}=e;return sm(o)?t.createVNode(Jt,{fit:a,src:o.content||o.url,class:nm("preview-image"),width:Array.isArray(r)?r[0]:r,height:Array.isArray(r)?r[1]:r,lazyLoad:n,onClick:l},{default:c}):t.createVNode("div",{class:nm("file"),style:ie(e.previewSize)},[t.createVNode(rt,{class:nm("file-icon"),name:"description"},null),t.createVNode("div",{class:[nm("file-name"),"zt-ellipsis"]},[o.file?o.file.name:o.url]),c()])};return()=>t.createVNode("div",{class:nm("preview")},[u(),r(),s()])}});const um={name:C(""),accept:N("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:C(1/0),imageFit:N("cover"),resultType:N("dataUrl"),uploadIcon:N("photograph"),uploadText:String,deletable:w,afterRead:Function,showUpload:w,modelValue:L(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:w,previewOptions:Object,previewFullImage:w,maxSize:{type:[Number,String,Function],default:1/0}};const dm=je(t.defineComponent({name:om,props:um,emits:["delete","oversize","clickUpload","closePreview","clickPreview","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),i=[],l=(t=e.modelValue.length)=>({name:e.name,index:t}),s=()=>{a.value&&(a.value.value="")},c=n=>{if(s(),im(n,e.maxSize)){if(!Array.isArray(n))return void o("oversize",n,l());{const t=function(e,t){const o=[],n=[];return e.forEach((e=>{im(e,t)?n.push(e):o.push(e)})),{valid:o,invalid:n}}(n,e.maxSize);if(n=t.valid,o("oversize",t.invalid,l()),!n.length)return}}n=t.reactive(n),o("update:modelValue",[...e.modelValue,...m(n)]),e.afterRead&&e.afterRead(n,l())},u=t=>{const{maxCount:o,modelValue:n,resultType:a}=e;if(Array.isArray(t)){const e=+o-n.length;t.length>e&&(t=t.slice(0,e)),Promise.all(t.map((e=>rm(e,a)))).then((e=>{const o=t.map(((t,o)=>{const n={file:t,status:"",message:""};return e[o]&&(n.content=e[o]),n}));c(o)}))}else rm(t,a).then((e=>{const o={file:t,status:"",message:""};e&&(o.content=e),c(o)}))},f=t=>{const{files:o}=t.target;if(e.disabled||!o||!o.length)return;const n=1===o.length?o[0]:[].slice.call(o);if(e.beforeRead){const t=e.beforeRead(n,l());if(!t)return void s();if(r(t))return void t.then((e=>{u(e||n)})).catch(s)}u(n)};let p;const v=()=>o("closePreview"),g=(a,r)=>{const s=["imageFit","deletable","previewSize","beforeDelete"],c=d(h(e,s),h(a,s,!0));return t.createVNode(cm,t.mergeProps({item:a,index:r,onClick:()=>o("clickPreview",a,l(r)),onDelete:()=>((t,n)=>{const a=e.modelValue.slice(0);a.splice(n,1),o("update:modelValue",a),o("delete",t,l(n))})(a,r),onPreview:()=>(t=>{if(e.previewFullImage){const o=e.modelValue.filter(sm),n=o.map((e=>(e.file&&!e.url&&"failed"!==e.status&&(e.url=URL.createObjectURL(e.file),i.push(e.url)),e.url))).filter(Boolean);p=bl(d({images:n,startPosition:o.indexOf(t),closeable:!0,onClose:v},e.previewOptions))}})(a)},h(e,["name","lazyLoad"]),c),h(n,["preview-cover","preview-delete"]))},y=()=>{if(e.previewImage)return e.modelValue.map(g)},w=e=>o("clickUpload",e),b=()=>{if(e.modelValue.length>=+e.maxCount||!e.showUpload)return;const o=e.readonly?null:t.createVNode("input",{ref:a,type:"file",class:nm("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:f},null);return n.default?t.createVNode("div",{class:nm("input-wrapper"),onClick:w},[n.default(),o]):t.createVNode("div",{class:nm("upload",{readonly:e.readonly}),style:ie(e.previewSize),onClick:w},[t.createVNode(rt,{name:e.uploadIcon,class:nm("upload-icon")},null),e.uploadText&&t.createVNode("span",{class:nm("upload-text")},[e.uploadText]),o])};return t.onBeforeUnmount((()=>{i.forEach((e=>URL.revokeObjectURL(e)))})),ct({chooseFile:()=>{a.value&&!e.disabled&&a.value.click()},closeImagePreview:()=>{p&&p.close()}}),Z((()=>e.modelValue)),()=>t.createVNode("div",{class:nm()},[t.createVNode("div",{class:nm("wrapper",{disabled:e.disabled})},[y(),b()])])}})),fm=V&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,pm="event",hm="observer";function vm(e,t){if(!e.length)return;const o=e.indexOf(t);return o>-1?e.splice(o,1):void 0}function mm(e,t){if("IMG"!==e.tagName||!e.getAttribute("data-srcset"))return;let o=e.getAttribute("data-srcset");const n=e.parentNode.offsetWidth*t;let a,r,i;o=o.trim().split(",");const l=o.map((e=>(e=e.trim(),a=e.lastIndexOf(" "),-1===a?(r=e,i=999998):(r=e.substr(0,a),i=parseInt(e.substr(a+1,e.length-a-2),10)),[i,r])));l.sort(((e,t)=>{if(e[0]<t[0])return 1;if(e[0]>t[0])return-1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0}));let s,c="";for(let u=0;u<l.length;u++){s=l[u],c=s[1];const e=l[u+1];if(e&&e[0]<n){c=s[1];break}if(!e){c=s[1];break}}return c}const gm=(e=1)=>V&&window.devicePixelRatio||e;function ym(){if(!V)return!1;let e=!0;try{const t=document.createElement("canvas");t.getContext&&t.getContext("2d")&&(e=0===t.toDataURL("image/webp").indexOf("data:image/webp"))}catch(t){e=!1}return e}function wm(e,t){let o=null,n=0;return function(...a){if(o)return;const r=()=>{n=Date.now(),o=!1,e.apply(this,a)};Date.now()-n>=t?r():o=setTimeout(r,t)}}function bm(e,t,o){e.addEventListener(t,o,{capture:!1,passive:!0})}function Lm(e,t,o){e.removeEventListener(t,o,!1)}const xm=(e,t,o)=>{const n=new Image;if(!e||!e.src)return o(new Error("image src is required"));n.src=e.src,e.cors&&(n.crossOrigin=e.cors),n.onload=()=>t({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src}),n.onerror=e=>o(e)};class Cm{constructor({max:e}){this.options={max:e||100},this.caches=[]}has(e){return this.caches.indexOf(e)>-1}add(e){this.has(e)||(this.caches.push(e),this.caches.length>this.options.max&&this.free())}free(){this.caches.shift()}}const[Nm,Vm]=Se("video"),km={src:N(""),showToolBox:Boolean,options:{type:Object,default:{autoplay:!1,volume:.5,poster:"",loop:!1,controls:!0,muted:!1,disabled:!1,playsinline:!1,touchPlay:!1,preload:"",controlsList:["nodownload"]}},errorTip:N("播放器发生错误"),clickRetryTip:N("请点击重试")};const Am=je(t.defineComponent({name:Nm,props:km,emits:["play","pause","play-end","time"],setup(e,{emit:o}){const n=t.ref(),a=t.ref(),r=t.reactive({initial:!0,player:{$player:null,pos:null},progressBar:{progressElm:null,pos:null},videoSet:{loaded:0,displayTime:"00:00",totalTime:"00:00",progress:{width:0,current:0}},state:{controlShow:!0,vol:.5,currentTime:0,fullScreen:!1,playing:!1,isLoading:!1,isEnd:!1,isError:!1,isMuted:!1},showTouchMask:!1}),i=t.computed((()=>e.options.disabled));t.watch((()=>e.src),(e=>{e&&t.nextTick((()=>{var e;null==(e=a.value)||e.load()}))}),{immediate:!0,deep:!0}),t.watch((()=>e.options),(e=>{r.state.isMuted=(null==e?void 0:e.muted)||!1}),{immediate:!0});const l=()=>{var t,n,i,l,c,u,p,v;e.options.autoplay&&setTimeout((()=>{var e;null==(e=a.value)||e.play()}),200),e.options.touchPlay&&(r.showTouchMask=!0),e.options.playsinline&&(null==(t=a.value)||t.setAttribute("playsinline","true"),null==(n=a.value)||n.setAttribute("webkit-playsinline","true"),null==(i=a.value)||i.setAttribute("x5-video-player-type","h5-page"),null==(l=a.value)||l.setAttribute("x5-video-player-fullscreen","false")),h(),e.showToolBox?s():(null==(c=a.value)||c.addEventListener("play",(()=>{r.state.playing=!0,o("play",a.value)})),null==(u=a.value)||u.addEventListener("pause",(()=>{r.state.playing=!1,o("pause",a.value)})),null==(p=a.value)||p.addEventListener("ended",f),null==(v=a.value)||v.addEventListener("timeupdate",wm(d,1e3)))},s=()=>{var e,t;r.player.$player=a.value,r.progressBar.progressElm=n.value,r.progressBar.pos=null==(e=n.value)?void 0:e.getBoundingClientRect(),r.videoSet.progress.width=Math.round((null==(t=n.value)?void 0:t.getBoundingClientRect().width)||0)},c=()=>{var t,n,i,l;if(e.options.autoplay&&e.options.disabled)return r.state.playing=!0,!1;if(r.state.playing=!r.state.playing,a.value)if(r.state.playing)try{setTimeout((()=>{var e;null==(e=a.value)||e.play()}),200),null==(t=a.value)||t.addEventListener("progress",(()=>{u()})),null==(n=a.value)||n.addEventListener("timeupdate",wm(d,1e3)),null==(i=a.value)||i.addEventListener("ended",f),o("play",a.value)}catch(s){p()}else null==(l=a.value)||l.pause(),o("pause",a.value)},u=()=>{var e,t;r.videoSet.loaded=((null==(e=a.value)?void 0:e.buffered.end(0))||0)/((null==(t=a.value)?void 0:t.duration)||1)*100},d=()=>{var e,t,n,i,l;const s=Number.isNaN(null==(e=a.value)?void 0:e.duration)?0:null==(t=a.value)?void 0:t.duration,c=Number.isNaN(null==(n=a.value)?void 0:n.currentTime)?0:null==(i=a.value)?void 0:i.currentTime,u=(c||0)/(s||1);r.videoSet.progress.current=Math.round(r.videoSet.progress.width*u),r.videoSet.totalTime=ye(s),r.videoSet.displayTime=ye(null==(l=a.value)?void 0:l.currentTime),o("time",c,s,r.videoSet.displayTime,r.videoSet.totalTime)},f=()=>{r.state.playing=!1,r.state.isEnd=!0,r.videoSet.displayTime="00:00",r.videoSet.progress.current=0,a.value&&(a.value.currentTime=0),o("play-end",a.value)},p=()=>{r.state.isError=!0},h=()=>{r.state.vol=e.options.volume||0},v=()=>{r.state.isMuted=!r.state.isMuted,a.value&&(a.value.muted=r.state.isMuted)},m=e=>{var t,o;e.stopPropagation(),e.preventDefault();let n=e.targetTouches[0].pageX-r.progressBar.pos.left;n<=0&&(n=0),n>=r.videoSet.progress.width&&(n=r.videoSet.progress.width),r.videoSet.progress.current=n;const i=r.videoSet.progress.current/r.videoSet.progress.width;(null==(t=a.value)?void 0:t.duration)&&y(i,null==(o=a.value)?void 0:o.duration)},g=e=>{var t,o;e.stopPropagation();const n=e.changedTouches[0].pageX-r.progressBar.pos.left;r.videoSet.progress.current=n;const i=n/r.videoSet.progress.width;(null==(t=a.value)?void 0:t.duration)&&y(i,null==(o=a.value)?void 0:o.duration)},y=(e,t)=>{a.value&&(a.value.currentTime=Math.floor(e*t))},w=()=>{r.state.isError=!1,l()},b=()=>{var e;r.state.fullScreen?(r.state.fullScreen=!1,document.webkitCancelFullScreen()):(r.state.fullScreen=!0,null==(e=a.value)||e.webkitRequestFullScreen())};function L(){if(e.showToolBox&&!i.value)return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:Vm("mask"),onClick:c},null),r.state.playing?null:t.createVNode("div",{class:Vm("play-btn"),onClick:c},[t.createVNode(it,{name:"play-r"},null)]),t.createVNode("div",{class:[Vm("controller",{show:!r.state.playing,hide:r.state.playing})],style:{"z-index":We()}},[t.createVNode("div",{class:Vm("controller-play-btn"),onClick:c},null),t.createVNode("div",{class:Vm("controller-now")},[r.videoSet.displayTime]),t.createVNode("div",{class:Vm("controller-progress")},[t.createVNode("div",{ref:n,class:Vm("controller-progress-value")},[t.createVNode("div",{class:"buffered",style:{width:`${r.videoSet.loaded}%`}},null),t.createVNode("div",{class:Vm("controller-progress-ball"),style:{transform:`translate3d(${r.videoSet.progress.current}px, -50%, 0)`},onTouchmove:m,onTouchend:g},[t.createVNode("div",{class:Vm("move")},null)]),t.createVNode("div",{class:Vm("played")},null)])]),t.createVNode("div",{class:Vm("controller-total")},[r.videoSet.totalTime]),t.createVNode("div",{class:Vm("controller-volume"),onClick:v},[r.state.isMuted?t.createVNode(it,{name:"volume-off"},null):t.createVNode(it,{name:"volume-on"},null)]),t.createVNode("div",{class:Vm("controller-full"),onClick:b},[t.createVNode(it,{name:"expand"},null)])])])}function x(){if(r.state.isError)return t.createVNode("div",{class:Vm("error"),style:{"z-index":We()}},[t.createVNode("p",{class:Vm("tip")},[e.errorTip]),t.createVNode("p",{class:Vm("retry"),onClick:w},[e.clickRetryTip])])}return ct({play:c,pause:()=>{var e;r.state.playing=!1,null==(e=a.value)||e.pause(),o("pause",a.value)},stop:()=>{var e;f(),null==(e=a.value)||e.pause()},muted:()=>{r.state.isMuted=!0,a.value&&(a.value.muted=!0)},unmuted:()=>{r.state.isMuted=!1,a.value&&(a.value.muted=!1)}}),t.onMounted((()=>{l()})),()=>{const{src:o,options:n}=e,r=n.controlsList||["nodownload"];return t.createVNode("div",{class:Vm()},[t.createVNode("video",{ref:a,class:Vm("player"),muted:n.muted,autoplay:n.autoplay,loop:n.loop,poster:n.poster,controls:n.controls,controlslist:r.join(" "),preload:n.preload,src:o,onError:p},null),L(),x()])}}}));class Sm{constructor({el:e,src:t,error:o,loading:n,bindType:a,$parent:r,options:i,cors:l,elRenderer:s,imageCache:c}){this.el=e,this.src=t,this.error=o,this.loading=n,this.bindType=a,this.attempt=0,this.cors=l,this.naturalHeight=0,this.naturalWidth=0,this.options=i,this.$parent=r,this.elRenderer=s,this.imageCache=c,this.performanceData={loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(e){this.performanceData[e]=Date.now()}update({src:e,loading:t,error:o}){const n=this.src;this.src=e,this.loading=t,this.error=o,this.filter(),n!==this.src&&(this.attempt=0,this.initState())}checkInView(){const e=P(this.el);return e.top<window.innerHeight*this.options.preLoad&&e.bottom>this.options.preLoadTop&&e.left<window.innerWidth*this.options.preLoad&&e.right>0}filter(){Object.keys(this.options.filter).forEach((e=>{this.options.filter[e](this,this.options)}))}renderLoading(e){this.state.loading=!0,xm({src:this.loading,cors:this.cors},(()=>{this.render("loading",!1),this.state.loading=!1,e()}),(()=>{e(),this.state.loading=!1}))}load(e=u){if(this.attempt>this.options.attempt-1&&this.state.error)e();else if(!this.state.rendered||!this.state.loaded)return this.imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e()):void this.renderLoading((()=>{var t,o;this.attempt++,null==(o=(t=this.options.adapter).beforeLoad)||o.call(t,this,this.options),this.record("loadStart"),xm({src:this.src,cors:this.cors},(t=>{this.naturalHeight=t.naturalHeight,this.naturalWidth=t.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this.imageCache.add(this.src),e()}),(e=>{!this.options.silent&&console.error(e),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)}))}))}render(e,t){this.elRenderer(this,e,t)}performance(){let e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const Tm="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Om=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],Mm={rootMargin:"0px",threshold:0};var Pm=e=>({props:{tag:{type:String,default:"div"}},emits:["show"],render(){return t.h(this.tag,this.show&&this.$slots.default?this.$slots.default():null)},data:()=>({el:null,state:{loaded:!1},show:!1}),mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{checkInView(){const t=P(this.$el);return V&&t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});const Im={selector:"img"};class Bm{constructor({el:e,binding:t,vnode:o,lazy:n}){this.el=null,this.vnode=o,this.binding=t,this.options={},this.lazy=n,this.queue=[],this.update({el:e,binding:t})}update({el:e,binding:t}){this.el=e,this.options=Object.assign({},Im,t.value);this.getImgs().forEach((e=>{this.lazy.add(e,Object.assign({},this.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||this.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||this.options.loading}}),this.vnode)}))}getImgs(){return Array.from(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach((e=>this.lazy.remove(e))),this.vnode=null,this.binding=null,this.lazy=null}}class Dm{constructor({lazy:e}){this.lazy=e,this.queue=[]}bind(e,t,o){const n=new Bm({el:e,binding:t,vnode:o,lazy:this.lazy});this.queue.push(n)}update(e,t,o){const n=this.queue.find((t=>t.el===e));n&&n.update({el:e,binding:t,vnode:o})}unbind(e){const t=this.queue.find((t=>t.el===e));t&&(t.clear(),vm(this.queue,t))}}var Em=e=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(){var e,o;return t.h(this.tag,{src:this.renderSrc},null==(o=(e=this.$slots).default)?void 0:o.call(e))},data:()=>({el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},renderSrc:""}),watch:{src(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created(){this.init(),this.renderSrc=this.options.loading},mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{init(){const{src:t,loading:o,error:n}=e.valueFormatter(this.src);this.state.loaded=!1,this.options.src=t,this.options.error=n,this.options.loading=o,this.renderSrc=this.options.loading},checkInView(){const t=P(this.$el);return t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(e=u){if(this.state.attempt>this.options.attempt-1&&this.state.error)return void e();const{src:t}=this.options;xm({src:t},(({src:e})=>{this.renderSrc=e,this.state.loaded=!0}),(()=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0}))}}});const zm={install(e,o={}){const n=class{constructor({preLoad:e,error:t,throttleWait:o,preLoadTop:n,dispatchEvent:a,loading:r,attempt:i,silent:l=!0,scale:s,listenEvents:c,filter:u,adapter:d,observer:f,observerOptions:p}){this.mode=pm,this.listeners=[],this.targetIndex=0,this.targets=[],this.options={silent:l,dispatchEvent:!!a,throttleWait:o||200,preLoad:e||1.3,preLoadTop:n||0,error:t||Tm,loading:r||Tm,attempt:i||3,scale:s||gm(s),ListenEvents:c||Om,supportWebp:ym(),filter:u||{},adapter:d||{},observer:!!f,observerOptions:p||Mm},this.initEvent(),this.imageCache=new Cm({max:200}),this.lazyLoadHandler=wm(this.lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?hm:pm)}config(e={}){Object.assign(this.options,e)}performance(){return this.listeners.map((e=>e.performance()))}addLazyBox(e){this.listeners.push(e),V&&(this.addListenerTarget(window),this.observer&&this.observer.observe(e.el),e.$el&&e.$el.parentNode&&this.addListenerTarget(e.$el.parentNode))}add(e,o,n){if(this.listeners.some((t=>t.el===e)))return this.update(e,o),t.nextTick(this.lazyLoadHandler);const a=this.valueFormatter(o.value);let{src:r}=a;t.nextTick((()=>{r=mm(e,this.options.scale)||r,this.observer&&this.observer.observe(e);const i=Object.keys(o.modifiers)[0];let l;i&&(l=n.context.$refs[i],l=l?l.$el||l:document.getElementById(i)),l||(l=H(e));const s=new Sm({bindType:o.arg,$parent:l,el:e,src:r,loading:a.loading,error:a.error,cors:a.cors,elRenderer:this.elRenderer.bind(this),options:this.options,imageCache:this.imageCache});this.listeners.push(s),V&&(this.addListenerTarget(window),this.addListenerTarget(l)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}))}update(e,o,n){const a=this.valueFormatter(o.value);let{src:r}=a;r=mm(e,this.options.scale)||r;const i=this.listeners.find((t=>t.el===e));i?i.update({src:r,error:a.error,loading:a.loading}):this.add(e,o,n),this.observer&&(this.observer.unobserve(e),this.observer.observe(e)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}remove(e){if(!e)return;this.observer&&this.observer.unobserve(e);const t=this.listeners.find((t=>t.el===e));t&&(this.removeListenerTarget(t.$parent),this.removeListenerTarget(window),vm(this.listeners,t),t.$destroy())}removeComponent(e){e&&(vm(this.listeners,e),this.observer&&this.observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this.removeListenerTarget(e.$el.parentNode),this.removeListenerTarget(window))}setMode(e){fm||e!==hm||(e=pm),this.mode=e,e===pm?(this.observer&&(this.listeners.forEach((e=>{this.observer.unobserve(e.el)})),this.observer=null),this.targets.forEach((e=>{this.initListen(e.el,!0)}))):(this.targets.forEach((e=>{this.initListen(e.el,!1)})),this.initIntersectionObserver())}addListenerTarget(e){if(!e)return;let t=this.targets.find((t=>t.el===e));return t?t.childrenCount++:(t={el:e,id:++this.targetIndex,childrenCount:1,listened:!0},this.mode===pm&&this.initListen(t.el,!0),this.targets.push(t)),this.targetIndex}removeListenerTarget(e){this.targets.forEach(((t,o)=>{t.el===e&&(t.childrenCount--,t.childrenCount||(this.initListen(t.el,!1),this.targets.splice(o,1),t=null))}))}initListen(e,t){this.options.ListenEvents.forEach((o=>(t?bm:Lm)(e,o,this.lazyLoadHandler)))}initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(e,t)=>{this.Event.listeners[e]||(this.Event.listeners[e]=[]),this.Event.listeners[e].push(t)},this.$once=(e,t)=>{const o=(...n)=>{this.$off(e,o),t.apply(this,n)};this.$on(e,o)},this.$off=(e,t)=>{if(t)vm(this.Event.listeners[e],t);else{if(!this.Event.listeners[e])return;this.Event.listeners[e].length=0}},this.$emit=(e,t,o)=>{this.Event.listeners[e]&&this.Event.listeners[e].forEach((e=>e(t,o)))}}lazyLoadHandler(){const e=[];this.listeners.forEach((t=>{t.el&&t.el.parentNode||e.push(t),t.checkInView()&&t.load()})),e.forEach((e=>{vm(this.listeners,e),e.$destroy()}))}initIntersectionObserver(){fm&&(this.observer=new IntersectionObserver(this.observerHandler.bind(this),this.options.observerOptions),this.listeners.length&&this.listeners.forEach((e=>{this.observer.observe(e.el)})))}observerHandler(e){e.forEach((e=>{e.isIntersecting&&this.listeners.forEach((t=>{if(t.el===e.target){if(t.state.loaded)return this.observer.unobserve(t.el);t.load()}}))}))}elRenderer(e,t,o){if(!e.el)return;const{el:n,bindType:a}=e;let r;switch(t){case"loading":r=e.loading;break;case"error":r=e.error;break;default:({src:r}=e)}if(a?n.style[a]='url("'+r+'")':n.getAttribute("src")!==r&&n.setAttribute("src",r),n.setAttribute("lazy",t),this.$emit(t,e,o),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){const o=new CustomEvent(t,{detail:e});n.dispatchEvent(o)}}valueFormatter(e){let t=e,{loading:o,error:n}=this.options;return a(e)&&(({src:t}=e),o=e.loading||this.options.loading,n=e.error||this.options.error),{src:t,loading:o,error:n}}},r=new n(o),i=new Dm({lazy:r});e.config.globalProperties.$Lazyload=r,o.lazyComponent&&e.component("LazyComponent",Pm(r)),o.lazyImage&&e.component("LazyImage",Em(r)),e.directive("lazy",{beforeMount:r.add.bind(r),updated:r.update.bind(r),unmounted:r.remove.bind(r)}),e.directive("lazy-container",{beforeMount:i.bind.bind(i),updated:i.update.bind(i),unmounted:i.unbind.bind(i)})}},_m="3.1.63";function jm(e){[_t,Gt,ao,Ue,po,ln,Gn,ra,ca,ba,xa,Ma,Ea,Fa,Ra,_r,Xr,Un,yi,Ai,Si,Di,ti,ji,$i,qi,Ji,cl,rt,Jt,Ll,Ol,Ml,El,Pt,Ce,pd,Rl,Ld,kd,Od,jd,qd,bt,Qd,wr,eh,Vt,ih,vh,mh,zh,Rh,Hh,ii,Kh,ov,$t,lv,mv,Lv,xv,hn,xn,kv,Bn,Ov,_n,Ev,Fv,Kv,jn,fi,Zv,Tr,tm,Xo,dm,Am].forEach((t=>{t.install?e.use(t):t.name&&e.component(t.name,t)}))}var Fm={install:jm,version:_m};function Rm(){var e=window.jsi&&window.jsi.callNative,t=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative;return!!e||!!t}function Hm(e,t,o){var n=this,a=window;window[e]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t&&function(e,t){void 0===t&&(t=window);var o=t||window;delete o[e],o.top&&delete o.top[e]}(e,a),o.apply(n,r)},window.top&&(window.top[e]=window[e])}function $m(e){var t=e.methodName,o=void 0===t?"":t,n=e.requestCode,a=void 0===n?-1:n,r=e.params,i=void 0===r?{}:r,l=e.callbackName,s=void 0===l?null:l,c=e.callbackFunc,u=void 0===c?null:c,d=e.autoClear,f=void 0===d||d,p=e.onFail,h=void 0===p?null:p;if(Rm()){var v={method:o,params:i,callback:null};a&&a>=0&&(v.requestCode=a);var m,g,y=s,w=u;y?w||(w=window[y]):w&&((m=window.top||window).hasOwnProperty("__callId__")||(m.__callId__=0),m.__callId__+=1,y="jsicallback"+m.__callId__),v.callback=y,y&&Hm(y,f,(g=w,function(e){var t=e;try{"string"==typeof t&&(t=t.replace(/\n/g,"\\n").replace(/\r/g,"\\r"),t=JSON.parse(t)||{})}catch(o){console.log(o),t={code:-1,msg:"返回数据格式异常:"+t}}console.debug(t),g&&(t||(t={}),t.isSuccess=0===t.code,g(t))}));var b=JSON.stringify(v);window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative?window.webkit.messageHandlers.callNative.postMessage(b):window.jsi.callNative(b)}else h&&h()}function Um(e){var t=e.methodName,o=void 0===t?"":t,n=e.requestCode,a=void 0===n?-1:n,r=e.params,i=void 0===r?{}:r,l=e.callbackName,s=void 0===l?null:l,c=e.autoClear,u=void 0===c||c,d=e.timeout,f=void 0===d?1e4:d,p=e.raw,h=void 0===p||p,v=e.onFail,m=void 0===v?null:v;return new Promise((function(e,t){var n=!1,r=!1;$m({methodName:o,requestCode:a,params:i,callbackName:s,autoClear:u,callbackFunc:function(o){o&&o.isSuccess&&o.data&&o.data.cancelFlag?r=!0:(h?e(o):o.isSuccess?e(o.data):t(o.msg),n=!0)},onFail:function(){t("callNative "+o+" not supported"),console.error("callNative "+o+" not supported"),n=!0,m&&m()}}),f>0&&setTimeout((function(){n||r||(t(o+"超时"),m&&m())}),f)}))}var Zm=function(){function e(){}return e.prototype.isEnvironmentEnabled=function(){return!1},e}();function Wm(e){return Um({methodName:"getLocation"}).then((function(t){var o=(null==t?void 0:t.data)||{},n={longitude:o.x,latitude:o.y,accuracy:"",horizontalAccuracy:""};return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(t){e&&e.fail&&e.fail(t)}))}function Ym(e){return Um({methodName:"getBase64FileData",params:{path:e},raw:!1}).then((function(e){return Promise.resolve(e.base64)}))}function qm(e,t,o){for(var n=atob(e),a=n.length,r=new Uint8Array(a);a--;)r[a]=n.charCodeAt(a);return new File([r],t,{type:o})}function Gm(e){var t=function(e){return{status:"rejected",reason:e}},o=function(e){return{status:"fulfilled",value:e}};return Promise.all(e.map((function(e){return Promise.resolve(e).then(o,t)})))}function Xm(e){var t=e.lastIndexOf("/");return e.substring(t+1)}function Km(e){var t="media.pickPhoto";return e.sourceType&&e.sourceType.includes("camera")&&(t="media.takePhoto"),Um({methodName:t,timeout:3e5,params:{watermarkConfigString:e.watermarkConfigString||"",cameraFacingType:e.cameraFacingType||0}}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.resultList)||[];if("string"==typeof n)try{n=JSON.parse(n)||[]}catch(i){console.log(i)}var a=[],r=[];Gm(n.map((function(e){return Ym(e)}))).then((function(t){t.forEach((function(e,t){if("fulfilled"===e.status){var o=e.value,i=Xm(n[t]);a.push(qm(o,i,"image/jpeg")),r.push("data:image/jpeg;base64,"+o)}}));var o={files:a,tempFilePaths:r};return e.success&&e.success(o),Promise.resolve(o)}))})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}function Qm(e){var t="media.pickVideo";return e.sourceType&&e.sourceType.includes("camera")&&(t="media.takeVideo"),Um({methodName:t,timeout:3e5}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.resultList)||[];if("string"==typeof n)try{n=JSON.parse(n)||[]}catch(r){console.log(r)}var a=[];Gm(n.map((function(e){return Ym(e)}))).then((function(t){t.forEach((function(e,t){if("fulfilled"===e.status){var o=e.value,r=Xm(n[t]);a.push(qm(o,r,"video/mp4"))}}));var o={files:a};return e.success&&e.success(o),Promise.resolve(o)}))})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}var Jm=navigator.userAgent.toLowerCase();window.jsi&&window.jsi.callNative;var eg=window.jsInterface&&window.jsInterface.loadFinish,tg=Jm.includes("dingtalk"),og=Jm&&/micromessenger/.test(Jm),ng=Jm&&/iphone|ipad|ipod|ios/.test(Jm);Jm&&Jm.indexOf("android");var ag=Jm&&(/egovamobilev22/.test(Jm)||/egovamobilepro/.test(Jm)),rg=window.self!==window.top,ig=Jm&&/gwork/.test(Jm);function lg(e){var t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=e.needConvertInZhixin,l=n||t||-1,s=a||o||-1;return Um(ag?{methodName:"location.navigateToPosition",params:{longitude:l,latitude:s,address:r}}:{methodName:"navigateToPosition",params:{coordX:l,coordY:s,address:r,needConvert:i}})}function sg(e){return $m({methodName:ag?"navigation.setTitle":"bindNavBar",raw:!1,params:{title:e.title||""}}),e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()}function cg(e){return Um({methodName:"navigation.setColor",params:{backgroundColor:e.backgroundColor,frontColor:e.frontColor}}).then((function(){return e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()})).catch((function(t){return e.fail&&e.fail(t),e.complete&&e.complete(),Promise.reject(t)}))}function ug(e){return Um({methodName:ag?"navigate.openLink":"openWebPage",raw:!1,params:{url:e.url||""}}).then((function(){return e.success&&e.success(),Promise.resolve()})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}function dg(){return Um({methodName:ag?"navigate.close":"close",raw:!1}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function fg(e){var t=e.success,o=e.fail,n=e.phoneNumber;return Um({methodName:ag?"device.phoneCall":"phoneCall",params:{phoneNum:n},onFail:o}).then((function(e){return t&&t(e),Promise.resolve(e)}))}function pg(e){return Um({methodName:"startQrCodeScan"}).then((function(t){return e.success&&e.success(t.data.result),Promise.resolve(t.data.result)}))}function hg(e){return Um({methodName:"getDeviceInfo"}).then((function(t){return e.success&&e.success(t.data),Promise.resolve(t.data)}))}function vg(e){return Um({methodName:"navigation.setStatusBarBlackFont",params:{blackFont:e}}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function mg(e){return Um({methodName:"audio.startRecord",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function gg(e){return Um({methodName:"audio.stopRecord",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function yg(e){return Um({methodName:"audio.onRecordEnd",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function wg(e){return Um({methodName:"audio.playVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function bg(e){return Um({methodName:"audio.pauseVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Lg(e){return Um({methodName:"audio.stopVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function xg(e){return Um({methodName:"audio.onPlayEnd",timeout:36e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path}),Promise.resolve({localAudioId:o.path})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Cg(e){return Um({methodName:"audio.uploadVoice",timeout:3e5,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({mediaId:o.mediaId}),Promise.resolve({mediaId:o.mediaId})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Ng(e){return Um({methodName:"audio.downloadVoice",timeout:3e5,params:{mediaId:e.mediaId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Vg(e){return Um({methodName:"file.isLocalFileExist",params:{mediaIdArray:e.mediaIdArray}}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.list)||[];return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function kg(e){return Um({methodName:"file.download",timeout:36e5,params:{url:e.url}}).then((function(t){var o;if((null==t?void 0:t.isSuccess)||!1){var n={tempFilePath:(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.tempFilePath)||""};return e&&e.success&&e.success(n),Promise.resolve(n)}var a=(null==t?void 0:t.msg)||"下载失败";return e&&e.fail&&e.fail(a),Promise.reject(a)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Ag(e){return Um({methodName:"file.openDocument",params:{localFilePath:e.localFilePath}}).then((function(t){if((null==t?void 0:t.isSuccess)||!1){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)}var n=(null==t?void 0:t.msg)||"打开文件失败";return e&&e.fail&&e.fail(n),Promise.reject(n)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}var Sg,Tg=globalThis&&globalThis.__extends||(Sg=function(e,t){return(Sg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}Sg(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Og=function(e){function t(){var t=e.call(this)||this;return t.navigate={close:dg,openLink:ug},ag?(t.navigationBar={setNavigationBarTitle:sg,setNavigationBarColor:cg,setStatusBarBlackFont:vg},t.location={getLocation:Wm,navigateTo:lg},t.device={makePhoneCall:fg},t.audio={startRecord:mg,stopRecord:gg,onRecordEnd:yg,playVoice:wg,pauseVoice:bg,stopVoice:Lg,onPlayEnd:xg,uploadVoice:Cg,downloadVoice:Ng},t.file={isLocalFileExist:Vg}):(t.navigationBar={setNavigationBarTitle:sg},t.location={getLocation:Wm,navigateTo:lg},t.device={makePhoneCall:fg,scan:pg,getSystemInfo:hg},t.media={chooseImage:Km,chooseVideo:Qm},t.file={download:kg,openDocument:Ag}),t}return Tg(t,e),t.prototype.isEnvironmentEnabled=function(){return Rm()},t}(Zm),Mg="undefined"!=typeof window&&"onload"in window,Pg="undefined"!=typeof process&&!(!process.versions||!process.versions.node);"undefined"!=typeof WXEnvironment&&WXEnvironment.platform;var Ig="undefined"!=typeof my&&null!==my&&void 0!==my.alert,Bg="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,Dg="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,Eg="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,zg=!Bg&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);Ig&&Mg&&my.isFRM;var _g="object"==typeof navigator?navigator.userAgent||navigator.swuserAgent:"";function jg(e){return"undefined"===e}/.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(_g)&&Mg&&"undefined"!=typeof WindVane&&WindVane.call;var Fg=!jg(typeof dd)&&null!==dd&&!jg(typeof dd.alert);function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Rg.apply(this,arguments)}function Hg(e){return function(t){return new Promise((function(o,n){var a=t;e(Rg({},a,{success:function(e){a&&"function"==typeof a.success&&a.success(e),o(e)},onSuccess:function(e){a&&"function"==typeof a.onSuccess&&a.onSuccess(e),o(e)},fail:function(e){a&&"function"==typeof a.fail&&a.fail(e),n(e)},onFail:function(e){a&&"function"==typeof a.onFail&&a.onFail(e),n(e)},complete:function(e){a&&"function"==typeof a.complete&&a.complete(e)},onComplete:function(e){a&&"function"==typeof a.onComplete&&a.onComplete(e)}}))}))}}var $g=["_ext"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Ug.apply(this,arguments)}var Zg=function(e,t){var o=e||{},n=o._ext,a=void 0===n?{}:n;return Ug({},function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(o,$g),a[t]||{})};function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Wg.apply(this,arguments)}var Yg=function(e){var t="en";switch(e.toLowerCase()){case"zh_cn":case"zh-hans":case"zh-cn":case"chinese":t="zh_CN";break;case"zh_tw":case"zh-hant":case"zh-hk":t="zh_TW";break;default:t="en"}return t},qg=function(e){return function(){var t=e();return Gg(t)}},Gg=function(e){return Wg({},{pixelRatio:1,screenWidth:0,screenHeight:0,windowWidth:0,windowHeight:0,language:"",version:"",platform:""},e,{language:e.language?Yg(e.language):""})},Xg=function(e,t){return function(o){var n=Zg(o,t),a=Wg({},n,{success:function(e){n.success&&n.success(Gg(e))},complete:function(e){n.complete&&n.complete(e.pixelRatio?Gg(e):e)}});return Hg(e)(a).then(Gg)}},Kg="wechatMiniProgram",Qg="aliMiniApp",Jg="bytedanceMicroApp",ey="web",ty="baiduSmartProgram",oy="kuaishouMiniProgram",ny="node";var ay=qg((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(a=navigator.platform,(a?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(t=e.userAgent)?void 0:t.toLowerCase())?"iOS":/android/.test(null==(o=navigator)||null==(n=o.userAgent)?void 0:n.toLowerCase())?"Android":a:"")||"")};var e,t,o,n,a}));const ry=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;try{var a=ay();t&&t(a),n&&n(a)}catch(r){o&&o(r),n&&n(r)}}),ey);const iy=qg((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(a=navigator.platform,a?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(t=e.userAgent)?void 0:t.toLowerCase())?"iOS":/android/.test(null==(o=navigator)||null==(n=o.userAgent)?void 0:n.toLowerCase())?"Android":a:"")};var e,t,o,n,a}));const ly=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;(Fg?dd.getSystemInfo:my.getSystemInfo)({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Qg);const sy=qg((function(){return Fg?dd.getSystemInfoSync():my.getSystemInfoSync()}));const cy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;wx.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Kg);const uy=qg((function(){return wx.getSystemInfoSync()}));const dy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;tt.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Jg);const fy=qg((function(){return tt.getSystemInfoSync()}));const py=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;ks.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),oy);const hy=qg((function(){return ks.getSystemInfoSync()}));const vy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;swan.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),ty);const gy=qg((function(){return swan.getSystemInfoSync()}));var yy=qg((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}}));const wy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;try{var a=yy();t&&t(a),n&&n(a)}catch(r){o&&o(r),n&&n(r)}}),ny);const by=qg((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}}));const Ly={getInfoSync:function(){if(Mg)return iy();if(Eg)return hy();if(zg)return uy();if(Bg)return fy();if(Ig)return sy();if(Dg)return gy();if(Pg)return by();throw new Error("Uni API:getInfoSync暂不支持")},getInfo:function(e){if(Mg)return ry(e);if(Eg)return py(e);if(zg)return cy(e);if(Bg)return dy(e);if(Ig)return ly(e);if(Dg)return vy(e);if(Pg)return wy(e);throw new Error("Uni API:getInfo暂不支持")}};function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},xy.apply(this,arguments)}var Cy=function(e,t){return function(o){void 0===o&&(o={});var n=Zg(o,t),a=xy({hideAlbum:!1,scanType:["barCode","qrCode"]},n,{success:function(e){n.success&&n.success(e)},complete:function(e){n.complete&&n.complete(e)}});return Hg(e)(a)}};const Ny=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;my.scan({hideAlbum:t,scanType:o,success:n,fail:a,complete:r})}),Qg);var Vy={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"};const ky=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;wx.scanCode({onlyFromCamera:t,scanType:Vy[o],success:n,fail:a,complete:r})}),Kg),Ay=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;tt.scanCode({onlyFromCamera:t,scanType:o,success:n,fail:a,complete:r})}),Jg),Sy=Cy((function(e){var t=e.success,o=e.fail,n=e.complete;swan.scanCode({success:t,fail:o,complete:n})}),ty);var Ty={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"};const Oy=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;ks.scanCode({onlyFromCamera:t,scanType:Ty[o],success:n,fail:a,complete:r})}),oy);const My=function(e){if(Mg)return function(){throw new Error("Uni API: scanCode不支持")}();if(Eg)return Oy(e);if(zg)return ky(e);if(Bg)return Ay(e);if(Ig)return Ny(e);if(Dg)return Sy(e);throw new Error("Uni API:scanCode暂不支持")};function Py(){return Py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Py.apply(this,arguments)}var Iy=function(e){return Py({},e,{tapIndex:null!=e.tapIndex?e.tapIndex:e.index})};const By=(Dy=function(e){e.items=e.itemList,Fg?dd.showActionSheet(e):my.showActionSheet(e)},Ey=Qg,function(e){return e=Zg(e,Ey),Hg(Dy)(Py({},e,{success:function(t){e.success&&e.success(Iy(t))},complete:function(t){e.complete&&e.complete(t)}})).then(Iy)});var Dy,Ey;function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},zy.apply(this,arguments)}function _y(e,t){return function(o){return Hg(e)(Zg(o,t))}}function jy(e,t){return function(o){return Hg(e)((n=Zg(o,t),(a=zy({},n)).frontColor||(a.frontColor="#000000"),a));var n,a}}const Fy={setNavigationBarColor:jy((function(e){return Fg?dd.setNavigationBar(e):my.setNavigationBar(e)}),Qg),setNavigationBarTitle:_y((function(e){return Fg?dd.setNavigationBar(e):my.setNavigationBar(e)}),Qg)};const Ry={setNavigationBarTitle:_y((function(e){var t=e.title,o=e.success,n=void 0===o?function(){}:o,a=e.fail,r=void 0===a?function(){}:a,i=e.complete,l=void 0===i?function(){}:i;try{document.title=t,n(),l()}catch(s){r(),l()}}),ey)};const Hy={setNavigationBarColor:jy((function(e){wx.setNavigationBarColor(e)}),Kg),setNavigationBarTitle:_y((function(e){return wx.setNavigationBarTitle(e)}),Kg),getMenuButtonBoundingClientRect:function(){return wx.getMenuButtonBoundingClientRect()}};const $y={setNavigationBarColor:jy((function(e){tt.setNavigationBarColor(e)}),Jg),setNavigationBarTitle:_y((function(e){return tt.setNavigationBarTitle(e)}),Jg),getMenuButtonBoundingClientRect:function(){return tt.getMenuButtonBoundingClientRect()}};const Uy={setNavigationBarColor:jy((function(e){ks.setNavigationBarColor(e)}),oy),setNavigationBarTitle:_y((function(e){return ks.setNavigationBarTitle(e)}),oy),getMenuButtonBoundingClientRect:function(){return ks.getMenuButtonBoundingClientRect()}};const Zy={setNavigationBarColor:jy((function(e){swan.setNavigationBarColor(e)}),ty),setNavigationBarTitle:_y((function(e){return swan.setNavigationBarTitle(e)}),ty),getMenuButtonBoundingClientRect:function(){return swan.getMenuButtonBoundingClientRect()}};const Wy={setNavigationBarColor:function(e){if(Eg)return Uy.setNavigationBarColor(e);if(zg)return Hy.setNavigationBarColor(e);if(Bg)return $y.setNavigationBarColor(e);if(Ig)return Fy.setNavigationBarColor(e);if(Dg)return Zy.setNavigationBarColor(e);throw new Error("Uni API:setNavigationBarColor暂不支持")},setNavigationBarTitle:function(e){if(Mg)return Ry.setNavigationBarTitle(e);if(Eg)return Uy.setNavigationBarTitle(e);if(zg)return Hy.setNavigationBarTitle(e);if(Bg)return $y.setNavigationBarTitle(e);if(Ig)return Fy.setNavigationBarTitle(e);if(Dg)return Zy.setNavigationBarTitle(e);throw new Error("Uni API:setNavigationBarTitle暂不支持")},getMenuButtonBoundingClientRect:function(){if(Eg)return Uy.getMenuButtonBoundingClientRect();if(zg)return Hy.getMenuButtonBoundingClientRect();if(Bg)return $y.getMenuButtonBoundingClientRect();if(Dg)return Zy.getMenuButtonBoundingClientRect();throw new Error("Uni API:getMenuButtonBoundingClientRect暂不支持")}};function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Yy.apply(this,arguments)}var qy=function(e){return Yy({},e,{latitude:String(e.latitude),longitude:String(e.longitude),accuracy:String(e.accuracy),horizontalAccuracy:String(e.horizontalAccuracy)})};function Gy(e,t){return function(o){return Hg(e)((n=Zg(o,t),void 0===n&&(n={}),Yy({},n,{success:function(e){n.success&&n.success(qy(e))},complete:function(e){n.complete&&n.complete(e)}}))).then(qy);var n}}function Xy(e,t){return function(o){return Hg(e)(Zg(o,t))}}function Ky(e,t){return function(o){return Hg(e)(Zg(o,t))}}function Qy(){return Qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qy.apply(this,arguments)}const Jy={getLocation:Gy((function(e){return e.resultType=e.resultType||0,null!=e&&e.type&&"string"==typeof e.type&&(e.type=0),null!=e&&e.resultType&&"number"==typeof e.resultType&&!isNaN(e.resultType)&&(e.type=e.resultType),Fg?dd.getLocation(e):my.getLocation(e)}),Qg),openLocation:Xy((function(e){var t=Qy({},e,{latitude:String(e.latitude),longitude:String(e.longitude)});Fg?dd.openLocation(t):my.openLocation(t)}),Qg),chooseLocation:Ky((function(e){return Fg?dd.chooseLocation(e):my.chooseLocation(e)}),Qg)};const ew={getLocation:Gy((function(e){var t=e.success,o=void 0===t?function(){}:t,n=e.fail,a=void 0===n?function(){}:n,r=e.complete,i=void 0===r?function(){}:r;if("geolocation"in navigator)navigator.geolocation.getCurrentPosition((function(e){o(e.coords),i(e.coords)}),(function(e){a(e),i(e)}));else{var l={code:-1,message:"地理位置服务不可用"};a(l),i(l)}}),ey),openLocation:Xy((function(){throw new Error("Uni API: openLocation不支持")}),ey),chooseLocation:Ky((function(){throw new Error("@uni/apis: chooseLocation不支持")}),ey)};function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},tw.apply(this,arguments)}const ow={getLocation:Gy((function(e){return wx.getLocation(e)}),Kg),openLocation:Xy((function(e){return wx.openLocation(tw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Kg),chooseLocation:Ky((function(e){return wx.chooseLocation(e)}),Kg)};function nw(){return nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},nw.apply(this,arguments)}const aw={getLocation:Gy((function(e){return tt.getLocation(e)}),Jg),openLocation:Xy((function(e){return tt.openLocation(nw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Jg),chooseLocation:Ky((function(e){return tt.chooseLocation(e)}),Jg)};function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},rw.apply(this,arguments)}const iw={getLocation:Gy((function(e){return swan.getLocation(e)}),ty),openLocation:Xy((function(e){return swan.openLocation(rw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),ty),chooseLocation:Ky((function(e){return swan.chooseLocation(e)}),ty)};function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},lw.apply(this,arguments)}const sw={getLocation:Gy((function(e){return ks.getLocation(e)}),oy),openLocation:Xy((function(e){return ks.openLocation(lw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),oy),chooseLocation:Ky((function(e){return ks.chooseLocation(e)}),oy)};const cw=function(e){if(Mg)return ew.getLocation(e);if(Eg)return sw.getLocation(e);if(zg)return ow.getLocation(e);if(Bg)return aw.getLocation(e);if(Ig)return Jy.getLocation(e);if(Dg)return iw.getLocation(e);throw new Error("Uni API:getLocation暂不支持")};function uw(){return uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},uw.apply(this,arguments)}var dw=function(e,t){var o=function(e){return uw({},e,{tempFiles:e.tempFiles||e.files,tempFilePaths:e.tempFilePaths})};return function(n){return n=Zg(n,t),Hg(e)(uw({},n,{count:n.count||1,success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},fw=function(e,t){var o=function(e){return{tempFilePath:e.tempFilePath||(e.filePaths||[])[0]||(e.apFilePaths||[])[0]||""}};return function(n){return n=Zg(n,t),Hg(e)(uw({},n,{success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},pw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}},hw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}},vw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}};const mw={chooseImage:dw((function(e){return Fg?dd.chooseImage(e):my.chooseImage(e)}),Qg),compressImage:fw((function(e){return Fg?e.filePaths=[e.src]:e.apFilePaths=[e.src],e&&"number"==typeof e.quality&&(e.compressLevel=e.quality),Fg?dd.compressImage(e):my.compressImage(e)}),Qg),getImageInfo:pw((function(e){return Fg?dd.getImageInfo(e):my.getImageInfo(e)}),Qg),previewImage:hw((function(e){return Fg?dd.previewImage(e):my.previewImage(e)}),Qg),saveImage:vw((function(e){return Fg?dd.saveImage(e):my.saveImage(e)}),Qg)};function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},gw.apply(this,arguments)}var yw=function(e,t){var o=function(e){return gw({},e,{tempFilePath:e.tempFilePath||e.filePath})};return function(n){return n=Zg(n,t),Hg(e)(gw({},n,{success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},ww=function(e,t){var o=function(e){return gw({},e,{tempFiles:(e.tempFiles||e.files).map((function(e){return gw({},e,{tempFilePath:e.tempFilePath||e.path})}))})};return function(n){return void 0===n&&(n={}),n=Zg(gw({count:9,sizeType:["original","compressed"],sourceType:["camera","album"],mediaType:["image","video"],maxDuration:60},n),t),Hg(e)(gw({},n,{success:function(e){n.success&&n.success(o(e))},fail:function(e){n.fail&&n.fail(e)},complete:function(e){n.complete&&n.complete(e)}})).then(o)}};const bw=ww((function(e){void 0===e&&(e={});var t=e,o=t.count,n=void 0===o?9:o,a=t.success,r=void 0===a?function(){}:a,i=t.fail,l=void 0===i?function(){}:i,s=t.complete,c=void 0===s?function(){}:s;try{var u=function(e,t){var o=document.createElement("INPUT");return o.name="file",o.id="input-"+1e8*Math.random(),o.type="file",e&&o.setAttribute("multiple","multiple"),o.style.display="none",t&&o.setAttribute("accept",t),document.body.appendChild(o),o}(n>1,e.accept),d=[];u.addEventListener("change",(function(e){var t={tempFiles:(d=e.target.files&&Array.from(e.target.files).slice(0,n)).map((function(e){return{tempFilePath:window.URL.createObjectURL(e),size:e.size}})),files:d};r(t),c(t),u.remove&&u.remove()}),!1);var f=document.createEvent("MouseEvents");f.initEvent("click",!0,!0),u.dispatchEvent(f)}catch(p){l(p),c(p)}}),ey);const Lw=dw((function(e){void 0===e&&(e={});var t=e,o=t.count,n=void 0===o?1:o,a=t.success,r=void 0===a?function(){}:a,i=t.fail,l=void 0===i?function(){}:i,s=t.complete,c=void 0===s?function(){}:s;bw({count:n,accept:"image/*"}).then((function(e){var t={tempFilePaths:e.tempFiles.map((function(e){return e.tempFilePath})),tempFiles:e.tempFiles.map((function(e){return{path:e.tempFilePath,size:e.size}})),files:e.files};r(t),c(t)})).catch((function(e){l(e),c(e)}))}),ey);const xw=function(){throw new Error("Uni API: compressImage不支持")};const Cw=pw((function(e){var t=new Image;if(t.src=e.src,t.naturalWidth){var o={width:t.naturalWidth,height:t.naturalHeight,path:e.src};e.success(o),e.complete(o)}else{var n=function(){var o={width:t.width,height:t.height,path:e.src};e.success(o),e.complete(o)};if(t.complete)n();else{var a=null,r=function(){clearInterval(a),a=null};a=setInterval((function(){(t.width>0||t.height>0)&&(n(),r())}),40),t.onload=function(){a&&(n(),r())},t.onabort=t.onerror=function(t){e.fail(t),e.complete(t),r()}}}}),ey);var Nw="__universal_preview_image",Vw=("."+Nw+" {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n text-align: center;\n background: #000;\n box-sizing: border-box;\n outline: none;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n}\n."+Nw+"_pageindex {\n position: absolute;\n top: 12px;\n left: 0;\n right: 0;\n text-align: center;\n color: #fff;\n font-size: 16px;\n z-index: 2;\n}\n."+Nw+"_swiper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n align-items: center;\n transition-property: transform;\n box-sizing: content-box;\n}\n."+Nw+"_item {\n max-height: 70%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 100%;\n position: relative;\n transition-property: transform;\n overflow: hidden;\n}\n."+Nw+"_img {\n width: 100%;\n}\n@keyframes "+Nw+"_fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes "+Nw+"_fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}").replace(/\n/g,""),kw=null;const Aw={chooseImage:Lw,compressImage:xw,getImageInfo:Cw,previewImage:hw((function(e){var t=(e||{}).urls,o=void 0===t?[]:t,n=(e||{}).current,a=void 0===n?0:n;if("[object Array]"!==Object.prototype.toString.call(o))throw new Error("the arguments must contain urls that type is a Array");if(o.length<=0)throw new Error("the urls`s length is at least 1");if(!Number.isSafeInteger(a))throw new Error("the current must be a safe integer");a=Math.min(Math.max(a,0),o.length-1),kw||((kw=document.createElement("style")).innerHTML=Vw,document.body.appendChild(kw));var r=document.createElement("div");r.className=Nw,r.style.animationName=Nw+"_fadeIn",r.addEventListener("click",(function(){r&&(r.style.animationName=Nw+"_fadeOut"),setTimeout((function(){r&&document.body.removeChild(r),r=null}),300)}));var i=document.createElement("div");i.className=Nw+"_pageindex",i.innerText=a+1+"/"+o.length,r.appendChild(i);var l=document.createElement("div");l.className=Nw+"_swiper";var s=document.documentElement.clientWidth,c=0;l.addEventListener("touchstart",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault()),c=e.targetTouches[0].pageX})),l.addEventListener("touchmove",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault());var t=e.targetTouches[0].pageX-c;l.style.transform="translateX("+(-s*a+1*t)+"px)"})),l.addEventListener("touchend",(function(e){var t=e.changedTouches[0].pageX-c;Math.abs(1*t)>s/5&&(a=t<0?Math.min(a+1,o.length-1):Math.max(a-1,0)),i.innerText=a+1+"/"+o.length;l.style.transitionDuration="300ms",l.style.transform="translateX("+-s*a+"px)",setTimeout((function(){l.style.transitionDuration="0ms"}),300)})),l.style.transform="translateX("+-s*a+"px)",r.appendChild(l),o.forEach((function(e){var t=document.createElement("div");t.className=Nw+"_item",t.addEventListener("click",(function(e){e.stopPropagation(),r&&(r.style.animationName=Nw+"_fadeOut"),setTimeout((function(){r&&document.body.removeChild(r),r=null}),300)})),l.appendChild(t);var o=document.createElement("img");o.className=Nw+"_img",o.src=e,t.appendChild(o),t.addEventListener("touchstart",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var o=e.touches[0],n=e.touches[1],a=Math.abs(n.pageX-o.pageX),r=Math.abs(n.pageY-o.pageY);t.touchDistance=Math.sqrt(a*a+r*r)}else t.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}})),t.addEventListener("touchmove",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var n=Math.abs(e.touches[0].pageX-e.touches[1].pageX),a=Math.abs(e.touches[1].pageY-e.touches[1].pageY),r=Math.sqrt(n*n+a*a);if(t.touchDistance){var i=(t.previousPinchScale||1)+(r-t.touchDistance)/t.touchDistance,l=Math.max(1,i);o.style.transform="scale("+l+")",t.previousPinchScale=l}t.touchDistance=r}else if(t.previousPinchScale>1){e.stopPropagation();var s=(t.preX||0)+(e.touches[0].pageX-t.touched.x),c=(t.preY||0)+(e.touches[0].pageY-t.touched.y);o.style.transform="scale("+t.previousPinchScale+") translate("+s+"px, "+c+"px)",t.preX=s,t.preY=c,t.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}}}))})),document.body.appendChild(r)}),ey),saveImage:function(){throw new Error("Uni API: saveImage不支持")}};function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Sw.apply(this,arguments)}function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Tw.apply(this,arguments)}const Ow={chooseImage:dw((function(e){return wx.chooseImage(e)}),Kg),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),wx.compressImage(e)}),Kg),getImageInfo:pw((function(e){return wx.getImageInfo(e)}),Kg),previewImage:hw((function(e){wx.previewImage(Sw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Kg),saveImage:vw((function(e){wx.saveImageToPhotosAlbum(Tw({},e,{filePath:e.url}))}),Kg)};function Mw(){return Mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Mw.apply(this,arguments)}function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Pw.apply(this,arguments)}const Iw={chooseImage:dw((function(e){return tt.chooseImage(e)}),Jg),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),tt.compressImage(e)}),Jg),getImageInfo:pw((function(e){return tt.getImageInfo(e)}),Jg),previewImage:hw((function(e){tt.previewImage(Mw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Jg),saveImage:vw((function(e){tt.saveImageToPhotosAlbum(Pw({},e,{filePath:e.url}))}),Jg)};function Bw(){return Bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Bw.apply(this,arguments)}function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Dw.apply(this,arguments)}const Ew={chooseImage:dw((function(e){return ks.chooseImage(e)}),oy),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),ks.compressImage(e)}),oy),getImageInfo:pw((function(e){return ks.getImageInfo(e)}),oy),previewImage:hw((function(e){ks.previewImage(Bw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),oy),saveImage:vw((function(e){ks.saveImageToPhotosAlbum(Dw({},e,{filePath:e.url}))}),oy)};function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},zw.apply(this,arguments)}function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_w.apply(this,arguments)}const jw={chooseImage:dw((function(e){return swan.chooseImage(e)}),ty),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),swan.compressImage(e)}),ty),getImageInfo:pw((function(e){return swan.getImageInfo(e)}),ty),previewImage:hw((function(e){swan.previewImage(zw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),ty),saveImage:vw((function(e){swan.saveImageToPhotosAlbum(_w({},e,{filePath:e.url}))}),ty)};const Fw={chooseImage:function(e){if(Mg)return Aw.chooseImage(e);if(Eg)return Ew.chooseImage(e);if(zg)return Ow.chooseImage(e);if(Bg)return Iw.chooseImage(e);if(Ig)return mw.chooseImage(e);if(Dg)return jw.chooseImage(e);throw new Error("Uni API:chooseImage暂不支持")},compressImage:function(e){if(Mg)return Aw.compressImage();if(Eg)return Ew.compressImage(e);if(zg)return Ow.compressImage(e);if(Bg)return Iw.compressImage(e);if(Ig)return mw.compressImage(e);if(Dg)return jw.compressImage(e);throw new Error("Uni API:compressImage暂不支持")},getImageInfo:function(e){if(Mg)return Aw.getImageInfo(e);if(Eg)return Ew.getImageInfo(e);if(zg)return Ow.getImageInfo(e);if(Bg)return Iw.getImageInfo(e);if(Ig)return mw.getImageInfo(e);if(Dg)return jw.getImageInfo(e);throw new Error("Uni API:getImageInfo暂不支持")},previewImage:function(e){if(Mg)return Aw.previewImage(e);if(Eg)return Ew.previewImage(e);if(zg)return Ow.previewImage(e);if(Bg)return Iw.previewImage(e);if(Ig)return mw.previewImage(e);if(Dg)return jw.previewImage(e);throw new Error("Uni API:previewImage暂不支持")},saveImage:function(e){if(Mg)return Aw.saveImage();if(Eg)return Ew.saveImage(e);if(zg)return Ow.saveImage(e);if(Bg)return Iw.saveImage(e);if(Ig)return mw.saveImage(e);if(Dg)return jw.saveImage(e);throw new Error("Uni API:saveImage暂不支持")}};function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Rw.apply(this,arguments)}const Hw={chooseVideo:yw((function(e){return Fg?dd.chooseVideo(e):my.chooseVideo(e)}),Qg),createVideoContext:function(e){return Fg?dd.createVideoContext(e):my.createVideoContext(e)},chooseMedia:ww((function(e){var t=e.mediaType,o=function(){return my.chooseImage(Rw({},e,{success:function(t){var o={type:"image",tempFiles:t.tempFiles.map((function(e){return Rw({},e,{tempFilePath:e.path})}))};e.success(o)}}))},n=function(){return my.chooseVideo(Rw({},e,{success:function(t){var o={type:"video",tempFiles:[t]};e.success(o)}}))};1===t.length&&"image"===t[0]?o():1===t.length&&"video"===t[0]?n():By({itemList:["图片","视频"]}).then((function(e){if(0===e.tapIndex)o();else{if(1!==e.tapIndex)return Promise.reject({errMsg:"用户取消选择"});n()}}))}),Qg)};function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},$w.apply(this,arguments)}const Uw={chooseVideo:yw((function(e){void 0===e&&(e={});var t=e,o=t.success,n=void 0===o?function(){}:o,a=t.fail,r=void 0===a?function(){}:a,i=t.complete,l=void 0===i?function(){}:i;bw({count:1,accept:"video/*"}).then((function(e){var t=$w({},e.tempFiles[0],{files:e.files});n(t),l(t)})).catch((function(e){r(e),l(e)}))}),ey),createVideoContext:function(){throw new Error("@uni/apis: createVideoContext不支持")},chooseMedia:bw};const Zw={chooseVideo:yw((function(e){return wx.chooseVideo(e)}),Kg),createVideoContext:function(e,t){return t?wx.createVideoContext(e,t):wx.createVideoContext(e)},chooseMedia:ww((function(e){return wx.canIUse("chooseMedia")?wx.chooseMedia(e):wx.chooseImage(e)}),Kg)};const Ww={chooseVideo:yw((function(e){return tt.chooseVideo(e)}),Jg),createVideoContext:function(e,t){return t?tt.createVideoContext(e,t):tt.createVideoContext(e)},chooseMedia:ww((function(e){return tt.chooseImage(e)}),Jg)};const Yw={chooseVideo:yw((function(e){return swan.chooseVideo(e)}),ty),createVideoContext:function(e){return swan.createVideoContext(e)},chooseMedia:ww((function(e){return swan.canIUse("chooseMedia")?swan.chooseMedia(e):swan.chooseImage(e)}),ty)};const qw={chooseVideo:yw((function(e){return ks.chooseVideo(e)}),oy),createVideoContext:function(e,t){return t?ks.createVideoContext(e,t):ks.createVideoContext(e)},chooseMedia:ww((function(e){return ks.canIUse("chooseMedia")?ks.chooseMedia(e):ks.chooseImage(e)}),oy)};const Gw={chooseMedia:function(e){if(Mg)return Uw.chooseMedia(e);if(Eg)return qw.chooseMedia(e);if(zg)return Zw.chooseMedia(e);if(Bg)return Ww.chooseMedia(e);if(Ig)return Hw.chooseMedia(e);if(Dg)return Yw.chooseMedia(e);throw new Error("@uni/apis:chooseMedia暂不支持")},chooseVideo:function(e){if(Mg)return Uw.chooseVideo(e);if(Eg)return qw.chooseVideo(e);if(zg)return Zw.chooseVideo(e);if(Bg)return Ww.chooseVideo(e);if(Ig)return Hw.chooseVideo(e);if(Dg)return Yw.chooseVideo(e);throw new Error("@uni/apis:chooseVideo暂不支持")},createVideoContext:function(e,t){if(Mg)return Uw.createVideoContext();if(Eg)return qw.createVideoContext(e,t);if(zg)return Zw.createVideoContext(e,t);if(Bg)return Ww.createVideoContext(e,t);if(Ig)return Hw.createVideoContext(e);if(Dg)return Yw.createVideoContext(e);throw new Error("@uni/apis:createVideoContext暂不支持")}};function Xw(e,t){return function(o){return Hg(e)(Zg(o,t))}}var Kw=["phoneNumber"];function Qw(){return Qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qw.apply(this,arguments)}const Jw=Xw((function(e){if(Fg)dd.showCallMenu(e);else{var t=e.phoneNumber,o=function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(e,Kw);my.makePhoneCall(Qw({},o,{number:t}))}}),Qg);const eb=Xw((function(e){var t=null==e?void 0:e.phoneNumber,o=document.createElement("a");o.href="tel:"+t,o.innerHTML="tel:"+t,o.style.display="none",document.body.appendChild(o),setTimeout((function(){o.click(),setTimeout((function(){try{document.body.removeChild(o)}catch(t){}finally{null==e||e.success()}}),0)}),0)}),ey);const tb=Xw((function(e){wx.makePhoneCall(e)}),Kg);const ob=Xw((function(e){tt.makePhoneCall(e)}),Jg);const nb=Xw((function(e){ks.makePhoneCall(e)}),oy);const ab=Xw((function(e){swan.makePhoneCall(e)}),ty);function rb(e){if(Mg)return eb(e);if(Eg)return nb(e);if(zg)return tb(e);if(Bg)return ob(e);if(Ig)return Jw(e);if(Dg)return ab(e);throw new Error("Uni API:makePhoneCall 暂不支持")}var ib=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},lb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function sb(e){return ib(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c,u,d,f;return lb(this,(function(p){return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=e.medium,l=n||t||-1,s=a||o||-1,c=document.createElement("a"),u="",u="bdapp://map/direction?"+(d="destination=name:"+(r||"")+"|latlng:"+s+","+l+"&coord_type=wgs84"),ng&&(u="baidumap://map/direction?"+d),"gaode"===i&&(u="amapuri://route/plan/?"+(f="dlat="+s+"&dlon="+l+"&dname="+r+"&dev=1&t=0"),ng&&(u="iosamap://path?"+f)),c.setAttribute("href",u),c.setAttribute("style","visibility:hidden;"),c.setAttribute("id","navgatorLink"),document.getElementById("navgatorLink")&&document.body.removeChild(document.getElementById("navgatorLink")),document.body.appendChild(c),c.click(),[2]}))}))}var cb=3.141592653589793,ub=6378245,db=.006693421622965943;function fb(e,t){if(function(e,t){return e<72.004||e>137.8347||t<.8293||t>55.8271||!1}(e,t))return{longitude:e,latitude:t};var o=function(e,t){var o=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*cb)+20*Math.sin(2*e*cb))/3,o+=2*(20*Math.sin(t*cb)+40*Math.sin(t/3*cb))/3,o+2*(160*Math.sin(t/12*cb)+320*Math.sin(t*cb/30))/3}(e-105,t-35),n=function(e,t){var o=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*cb)+20*Math.sin(2*e*cb))/3,o+=2*(20*Math.sin(e*cb)+40*Math.sin(e/3*cb))/3,o+2*(150*Math.sin(e/12*cb)+300*Math.sin(e/30*cb))/3}(e-105,t-35),a=t/180*cb,r=Math.sin(a);r=1-db*r*r;var i=Math.sqrt(r);return o=180*o/(ub*(1-db)/(r*i)*cb),{longitude:2*e-(e+(n=180*n/(ub/i*Math.cos(a)*cb))),latitude:2*t-(t+o)}}var pb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},hb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function vb(e){return pb(this,void 0,void 0,(function(){return hb(this,(function(t){switch(t.label){case 0:return console.log("isJinBan",ig),ig?[4,(o="https://jzb.beijing.gov.cn/oss/focus-desktop/gwork/jssdk/JZB-JSSDK-1.1.0.js",new Promise((function(e,t){try{var n=document.createElement("script");n.type="text/javascript",n.src=o,document.body.appendChild(n),n.onload=function(){e()}}catch(a){t()}})))]:[3,2];case 1:return t.sent(),[2,new Promise((function(t,o){try{console.log("getDeviceInfo",window.jme.device.getDeviceInfo()),window.jme.device.getDeviceInfo()&&window.jme.location.startLocationUpdate({callBackInterval:0,callback:function(n){if(console.log("startLocationUpdate",n),n&&0===n.statusCode){var a=fb(n.longitude,n.latitude),r={accuracy:n.accuracy.toString(),latitude:a.latitude.toString(),longitude:a.longitude.toString(),horizontalAccuracy:n.accuracy.toString()};e.success&&e.success(r),t(r)}else{var i="获取定位失败,statusCode"+n.statusCode;e.fail&&e.fail(i),o(i)}}})}catch(n){e.fail&&e.fail(n),o(n)}}))];case 2:return[2,cw(e)]}var o}))}))}var mb=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),gb=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:rb,scan:My,getSystemInfo:Ly.getInfo},t.location={getLocation:vb,navigateTo:sb},t.media={chooseImage:Fw.chooseImage,chooseVideo:Gw.chooseVideo},t.navigationBar={setNavigationBarTitle:Wy.setNavigationBarTitle},t}return mb(t,e),t.prototype.isEnvironmentEnabled=function(){return!0},t}(Zm),yb=3.141592653589793,wb=6378245,bb=.006693421622965943;function Lb(e,t){if(kb(e,t))return[e,t];var o=Cb(e-105,t-35),n=Nb(e-105,t-35),a=t/180*yb,r=Math.sin(a);r=1-bb*r*r;var i=Math.sqrt(r);return o=180*o/(wb*(1-bb)/(r*i)*yb),[e+(n=180*n/(wb/i*Math.cos(a)*yb)),t+o]}function xb(e,t){if(kb(e,t))return[e,t];var o=Cb(e-105,t-35),n=Nb(e-105,t-35),a=t/180*yb,r=Math.sin(a);r=1-bb*r*r;var i=Math.sqrt(r);return o=180*o/(wb*(1-bb)/(r*i)*yb),[2*e-(e+(n=180*n/(wb/i*Math.cos(a)*yb))),2*t-(t+o)]}function Cb(e,t){var o=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*yb)+20*Math.sin(2*e*yb))/3,o+=2*(20*Math.sin(t*yb)+40*Math.sin(t/3*yb))/3,o+=2*(160*Math.sin(t/12*yb)+320*Math.sin(t*yb/30))/3}function Nb(e,t){var o=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*yb)+20*Math.sin(2*e*yb))/3,o+=2*(20*Math.sin(e*yb)+40*Math.sin(e/3*yb))/3,o+=2*(150*Math.sin(e/12*yb)+300*Math.sin(e/30*yb))/3}function Vb(e,t){var o,n,a,r,i,l=(o=52.35987755982988,n=e-.0065,a=t-.006,r=Math.sqrt(n*n+a*a)-2e-5*Math.sin(a*o),i=Math.atan2(a,n)-3e-6*Math.cos(n*o),[r*Math.cos(i),r*Math.sin(i)]);return xb(l[0],l[1])}function kb(e,t){return e<72.004||e>137.8347||t<.8293||t>55.8271||!1}function Ab(e){return new Promise((function(t,o){if(window.jsInterface&&window.jsInterface.getLocationInfo){var n=setTimeout((function(){o(new Error("定位超时"))}),15e3);window.callbackLocation=function(a){var r=a;if("string"==typeof r&&(r=JSON.parse(r)),r)if(r.error)o(new Error(""+r.error)),clearTimeout(n);else{var i=Vb(r.longitude,r.latitude);(!i||i.length<2)&&(o(new Error("定位失败")),clearTimeout(n));var l={longitude:i[0]+"",latitude:i[1]+"",address:""+r.address,accuracy:"",horizontalAccuracy:""};e&&e.success&&e.success(l),t(l),clearTimeout(n)}else o(new Error("定位失败")),clearTimeout(n)},window.jsInterface&&window.jsInterface.getLocationInfo()}else o(new Error("不存在对应方法,无法调用定位"))}))}var Sb=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Tb=function(e){function t(){var t=e.call(this)||this;return t.location={getLocation:Ab},t}return Sb(t,e),t.prototype.isEnvironmentEnabled=function(){return!0},t}(Zm),Ob=function(){return new Promise((function(e,t){try{var o=document.createElement("script");o.type="text/javascript",o.src="https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.12/dingtalk.open.js",document.body.appendChild(o),o.onload=function(){e()}}catch(n){t()}}))};function Mb(e,t){void 0===t&&(t=0);var o=parseInt(e);return isNaN(o)?t:o}var Pb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Ib=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Bb(e){return Pb(this,void 0,void 0,(function(){return Ib(this,(function(t){switch(t.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t,o){window.dd.device.geolocation.get({targetAccuracy:200,coordinate:1,withReGeocode:Mb(e.resultType)>0,useCache:!1,onSuccess:function(o){var n=xb(o.longitude,o.latitude),a={longitude:(null==n?void 0:n[0])||o.longitude,latitude:(null==n?void 0:n[1])||o.latitude,accuracy:o.accuracy,horizontalAccuracy:"",address:o.address,province:o.province,city:o.city,district:o.district,road:o.road,netType:o.netType,operatorType:o.operatorType,isWifiEnabled:o.isWifiEnabled,isGpsEnabled:o.isGpsEnabled,isFromMock:o.isFromMock,provider:o.provider,isMobileEnabled:o.isMobileEnabled};e.success&&e.success(a),t(a)},onFail:function(t){e.fail&&e.fail(t),o(t)}})}))]}}))}))}var Db=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Eb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function zb(e){return Db(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c;return Eb(this,(function(u){switch(u.label){case 0:return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=n||t||-1,l=a||o||-1,window.dd?[3,2]:[4,Ob()];case 1:u.sent(),u.label=2;case 2:return s=window.dd&&window.dd.biz.map.view,c=Lb(i,l),s&&s({latitude:c[1],longitude:c[0],title:r}),[2]}}))}))}var _b=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},jb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Fb(e){var t=e.title,o=e.success,n=void 0===o?function(){}:o,a=e.complete,r=void 0===a?function(){}:a;return _b(this,void 0,void 0,(function(){var e;return jb(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),window.dd?[3,2]:[4,Ob()];case 1:o.sent(),o.label=2;case 2:return window.dd.biz.navigation.setTitle({title:t}),n(),r(),[3,4];case 3:return e=o.sent(),console.error(e),[3,4];case 4:return[2]}}))}))}var Rb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Hb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function $b(e){return Rb(this,void 0,void 0,(function(){var t,o,n,a;return Hb(this,(function(r){switch(r.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:r.sent(),r.label=2;case 2:return t=e.success,o=e.fail,n=e.phoneNumber,(a=window.dd&&window.dd.biz.telephone.showCallMenu)&&a({phoneNumber:n,code:"+86",showDingCall:!0,onSuccess:t,onFail:o}),[2]}}))}))}var Ub=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Zb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Wb(e){return Ub(this,void 0,void 0,(function(){var t,o,n,a,r,i,l;return Zb(this,(function(s){switch(s.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:s.sent(),s.label=2;case 2:return t=e.success,o=e.fail,n=e.scanType,a=window.dd&&window.dd.biz.util.scan,r="all",n&&(i=n.indexOf("qrCode")>-1,l=n.indexOf("barCode")>-1,i&&!l&&(r="qrCode"),!i&&l&&(r="barCode")),a&&a({type:r,onSuccess:t,onFail:o}),[2]}}))}))}var Yb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},qb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Gb(e){return Yb(this,void 0,void 0,(function(){var t,o,n;return qb(this,(function(a){switch(a.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:a.sent(),a.label=2;case 2:return t=e.success,o=e.fail,(n=window.dd&&window.dd.device.base.getPhoneInfo)&&n({onSuccess:t,onFail:o}),[2]}}))}))}var Xb=globalThis&&globalThis.__assign||function(){return Xb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Xb.apply(this,arguments)},Kb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Qb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}},Jb=function(){return null};function eL(e){var t=e.methodName,o=e.params,n=void 0===o?{}:o,a=e.success,r=void 0===a?Jb:a,i=e.fail,l=void 0===i?Jb:i;return Kb(this,void 0,void 0,(function(){return Qb(this,(function(e){switch(e.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,o){var a=window.dd&&window.dd.device.audio[t];a||o(t+" library not loaded"),a(Xb(Xb({},n),{onSuccess:function(t){r(t),e(t)},onFail:function(e){l(e),o(e)}}))}))]}}))}))}function tL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function oL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function nL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"onRecordEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function aL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"play",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function rL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"pause",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function iL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"stop",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function lL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"onPlayEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function sL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{mediaId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({content:t.content})),Promise.resolve({content:t.content})}))]}))}))}var cL=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),uL=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:$b,scan:Wb,getSystemInfo:Gb},t.location={getLocation:Bb,navigateTo:zb},t.navigationBar={setNavigationBarTitle:Fb},t.audio={startRecord:tL,stopRecord:oL,onRecordEnd:nL,playVoice:aL,pauseVoice:rL,stopVoice:iL,onPlayEnd:lL,translateVoice:sL},t}return cL(t,e),t.prototype.isEnvironmentEnabled=function(){return tg&&window.dd},t}(Zm),dL=function(){return new Promise((function(e,t){try{var o=document.createElement("script");o.type="text/javascript",o.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",document.body.appendChild(o),o.onload=function(){e()}}catch(n){t()}}))},fL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},pL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function hL(e){return fL(this,void 0,void 0,(function(){return pL(this,(function(t){switch(t.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t,o){var n=window.wx&&window.wx.getLocation;n||o("getLocationWeixin library not loaded"),n({type:"wgs84",success:function(n){if(console.log("weixinLocationAPI",n),n.longitude){var a={longitude:n.longitude,latitude:n.latitude,accuracy:n.accuracy,speed:n.speed,horizontalAccuracy:""};return e&&e.success&&e.success(a),t(a)}console.error("get wx location fail"),e&&e.fail&&e.fail("定位失败"),o("定位失败")},fail:function(t){console.error("get wx location fail",t),e&&e.fail&&e.fail(t),o("定位失败")}})}))]}}))}))}var vL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},mL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function gL(e){return vL(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c;return mL(this,(function(u){switch(u.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:u.sent(),u.label=2;case 2:return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,e.fail,i=n||t||-1,l=a||o||-1,s=window.wx&&window.wx.openLocation,c=Lb(i,l),s&&s({latitude:c[1],longitude:c[0],name:r,address:r}),[2]}}))}))}var yL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},wL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function bL(e){return yL(this,void 0,void 0,(function(){var t,o,n,a,r,i;return wL(this,(function(l){switch(l.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:l.sent(),l.label=2;case 2:return t=e.success,o=e.scanType,n=window.wx&&window.wx.scanQRCode,a=["qrCode","barCode"],o&&(r=o.indexOf("qrCode")>-1,i=o.indexOf("barCode")>-1,r&&!i&&(a=["qrCode"]),!r&&i&&(a=["barCode"])),n&&n({needResult:1,scanType:a,success:t}),[2]}}))}))}var LL=globalThis&&globalThis.__assign||function(){return LL=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},LL.apply(this,arguments)},xL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},CL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}},NL=function(){return null};function VL(e){var t=e.methodName,o=e.params,n=void 0===o?{}:o,a=e.success,r=void 0===a?NL:a,i=e.fail,l=void 0===i?NL:i;return xL(this,void 0,void 0,(function(){return CL(this,(function(e){switch(e.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,o){var a=window.wx&&window.wx[t];a||o(t+" library not loaded"),a(LL(LL({},n),{success:function(t){r(t),e(t)},fail:function(e){l(e),o(e)},complete:function(t){e(t)}}))}))]}}))}))}function kL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function AL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function SL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"onVoiceRecordEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function TL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"playVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function OL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"pauseVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function ML(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"stopVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function PL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"onVoicePlayEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function IL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({content:t.translateResult})),Promise.resolve({content:t.translateResult})}))]}))}))}var BL=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DL=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:rb,scan:bL,getSystemInfo:Ly.getInfo},t.location={getLocation:hL,navigateTo:gL},t.navigationBar={setNavigationBarTitle:Wy.setNavigationBarTitle},t.audio={startRecord:kL,stopRecord:AL,onRecordEnd:SL,playVoice:TL,pauseVoice:OL,stopVoice:ML,onPlayEnd:PL,translateVoice:IL},t}return BL(t,e),t.prototype.isEnvironmentEnabled=function(){return og&&window.wx},t}(Zm),EL=[];const zL=Object.freeze(Object.defineProperty({__proto__:null,JsInterface:Zm,getJSI:function(){if(rg&&window.parent&&window.parent.__mobile__uni__api)return window.parent.__mobile__uni__api;if(!rg&&window.__mobile__uni__api)return window.__mobile__uni__api;for(var e=0;e<EL.length;e++){var t=EL[e];if(t.isEnvironmentEnabled())return window.__mobile__uni__api=t,window.__mobile__uni__api}var o;return o=Rm()?new Og:tg?new uL:og&&window.wx?new DL:eg?new Tb:new gb,window.__mobile__uni__api=o,window.__mobile__uni__api},registerJSI:function(e){EL.push(e)},unregisterJSI:function(e){var t=EL.indexOf(e);t>=0&&EL.splice(t,1)}},Symbol.toStringTag,{value:"Module"}));e.ActionSheet=_t,e.Audio=Gt,e.Avatar=ao,e.Badge=Ue,e.Button=po,e.Calendar=ln,e.Cascader=Gn,e.Cell=ra,e.CellGroup=ca,e.Checkbox=ba,e.CheckboxGroup=xa,e.Col=Ma,e.Collapse=Ea,e.CollapseItem=Fa,e.ConfigProvider=Ra,e.DateTimePicker=_r,e.Dialog=Xr,e.Divider=Un,e.DrawerSelect=yi,e.DropdownItem=Ai,e.DropdownMenu=Si,e.Empty=Di,e.Field=ti,e.FloatingBubble=ji,e.Form=$i,e.Grid=qi,e.GridItem=Ji,e.HierarchySelect=cl,e.Icon=rt,e.Image=Jt,e.ImagePreview=Ll,e.IndexAnchor=Ol,e.IndexBar=Ml,e.Lazyload=zm,e.List=El,e.Loading=Pt,e.Locale=Ce,e.MediaPicker=pd,e.MediaPlayer=Rl,e.MultiplePicker=Ld,e.NavBar=kd,e.NoticeBar=Od,e.Notify=jd,e.NumberKeyboard=qd,e.Overlay=bt,e.PasswordInput=Qd,e.Picker=wr,e.Popover=eh,e.Popup=Vt,e.PullRefresh=ih,e.Radio=vh,e.RadioGroup=mh,e.RadioPicker=zh,e.Rate=Rh,e.Row=Hh,e.Search=ii,e.Signature=Kh,e.Skeleton=ov,e.Slider=$t,e.SpeechRecognizer=lv,e.Step=mv,e.Stepper=Lv,e.Steps=xv,e.Sticky=hn,e.Swipe=xn,e.SwipeCell=kv,e.SwipeItem=Bn,e.Switch=Ov,e.Tab=_n,e.Tabbar=Ev,e.TabbarItem=Fv,e.Table=Kv,e.Tabs=jn,e.Tag=fi,e.TextEllipsis=Zv,e.TimePicker=Tr,e.Timeline=tm,e.Toast=Xo,e.Uploader=dm,e.Video=Am,e.ZT_AUDIO_KEY=Zt,e.actionSheetProps=Et,e.allowMultipleToast=(e=!0)=>{jo=e},e.calendarProps=rn,e.cascaderProps=qn,e.closeDialog=()=>{Zr&&Zr.toggle(!1)},e.closeNotify=_d,e.closeToast=Go,e.collapseItemProps=ja,e.collapseProps=Da,e.dateTimePickerProps=Br,e.default=Fm,e.defaultMedia={uniqueCode:"",fileSize:0,fileName:"",originalName:"",originalSize:0,lastModified:0,deletable:!1},e.dialogProps=Hr,e.dropdownItemProps=ki,e.dropdownMenuProps=Li,e.floatingBubbleProps=Ei,e.gridItemProps=Qi,e.gridProps=Wi,e.imagePreviewProps=ml,e.indexAnchorProps=Tl,e.indexBarProps=Nl,e.install=jm,e.pickerProps=pr,e.popoverProps=Jp,e.radioPickerProps=Eh,e.resetDialogDefaultOptions=()=>{Yr=d({},Wr)},e.resetNotifyDefaultOptions=()=>{zd={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0}},e.resetToastDefaultOptions=e=>{"string"==typeof e?Ro.delete(e):(Fo=d({},zo),Ro.clear())},e.searchProps=ri,e.setDialogDefaultOptions=e=>{d(Yr,e)},e.setNotifyDefaultOptions=e=>d(zd,e),e.setToastDefaultOptions=function(e,t){"string"==typeof e?Ro.set(e,t):d(Fo,e)},e.showConfirmDialog=Gr,e.showDialog=qr,e.showFailToast=qo,e.showImagePreview=bl,e.showLoadingToast=Wo,e.showNotify=function(e){var o;if(f)return Ed||({instance:Ed}=Eo({setup(){const{state:e,toggle:o}=Do();return()=>t.createVNode(Bd,t.mergeProps(e,{"onUpdate:show":o}),null)}})),e=d({},zd,a(o=e)?o:{message:o}),Ed.open(e),clearTimeout(Dd),e.duration>0&&(Dd=window.setTimeout(_d,e.duration)),Ed},e.showSuccessToast=Yo,e.showToast=Uo,e.signatureProps=Xh,e.skeletonProps=tv,e.sliderProps=Ht,e.stepsProps=uv,e.swipeCellProps=Vv,e.tableProps=Xv,e.tagProps=di,e.textEllipsisProps=Uv,e.timePickerProps=Sr,e.timelineProps=em,e.uploaderProps=um,e.version=_m,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
8
|
+
function rc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ic(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?rc(Object(o),!0).forEach((function(t){sc(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):rc(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function lc(e){return(lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sc(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function cc(){return cc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},cc.apply(this,arguments)}function uc(e,t){if(null==e)return{};var o,n,a=function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}function dc(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var fc=dc(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),pc=dc(/Edge/i),hc=dc(/firefox/i),vc=dc(/safari/i)&&!dc(/chrome/i)&&!dc(/android/i),mc=dc(/iP(ad|od|hone)/i),gc=dc(/chrome/i)&&dc(/android/i),yc={capture:!1,passive:!1};function wc(e,t,o){e.addEventListener(t,o,!fc&&yc)}function bc(e,t,o){e.removeEventListener(t,o,!fc&&yc)}function Lc(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(o){return!1}return!1}}function xc(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Cc(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&Lc(e,t):Lc(e,t))||n&&e===o)return e;if(e===o)break}while(e=xc(e))}return null}var Nc,Vc=/\s+/g;function kc(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(Vc," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(Vc," ")}}function Ac(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function Sc(e,t){var o="";if("string"==typeof e)o=e;else do{var n=Ac(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(o)}function Tc(e,t,o){if(e){var n=e.getElementsByTagName(t),a=0,r=n.length;if(o)for(;a<r;a++)o(n[a],a);return n}return[]}function Oc(){var e=document.scrollingElement;return e||document.documentElement}function Mc(e,t,o,n,a){if(e.getBoundingClientRect||e===window){var r,i,l,s,c,u,d;if(e!==window&&e.parentNode&&e!==Oc()?(i=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,d=r.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||o)&&e!==window&&(a=a||e.parentNode,!fc))do{if(a&&a.getBoundingClientRect&&("none"!==Ac(a,"transform")||o&&"static"!==Ac(a,"position"))){var f=a.getBoundingClientRect();i-=f.top+parseInt(Ac(a,"border-top-width")),l-=f.left+parseInt(Ac(a,"border-left-width")),s=i+r.height,c=l+r.width;break}}while(a=a.parentNode);if(n&&e!==window){var p=Sc(a||e),h=p&&p.a,v=p&&p.d;p&&(s=(i/=v)+(u/=v),c=(l/=h)+(d/=h))}return{top:i,left:l,bottom:s,right:c,width:d,height:u}}}function Pc(e,t,o){for(var n=zc(e,!0),a=Mc(e)[t];n;){var r=Mc(n)[o];if(!("top"===o||"left"===o?a>=r:a<=r))return n;if(n===Oc())break;n=zc(n,!1)}return!1}function Ic(e,t,o,n){for(var a=0,r=0,i=e.children;r<i.length;){if("none"!==i[r].style.display&&i[r]!==Ru.ghost&&(n||i[r]!==Ru.dragged)&&Cc(i[r],o.draggable,e,!1)){if(a===t)return i[r];a++}r++}return null}function Bc(e,t){for(var o=e.lastElementChild;o&&(o===Ru.ghost||"none"===Ac(o,"display")||t&&!Lc(o,t));)o=o.previousElementSibling;return o||null}function Dc(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ru.clone||t&&!Lc(e,t)||o++;return o}function Ec(e){var t=0,o=0,n=Oc();if(e)do{var a=Sc(e),r=a.a,i=a.d;t+=e.scrollLeft*r,o+=e.scrollTop*i}while(e!==n&&(e=e.parentNode));return[t,o]}function zc(e,t){if(!e||!e.getBoundingClientRect)return Oc();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var a=Ac(o);if(o.clientWidth<o.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!o.getBoundingClientRect||o===document.body)return Oc();if(n||t)return o;n=!0}}}while(o=o.parentNode);return Oc()}function _c(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function jc(e,t){return function(){if(!Nc){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),Nc=setTimeout((function(){Nc=void 0}),t)}}}function Fc(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function Rc(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function Hc(e,t,o){var n={};return Array.from(e.children).forEach((function(a){var r,i,l,s;if(Cc(a,t.draggable,e,!1)&&!a.animated&&a!==o){var c=Mc(a);n.left=Math.min(null!==(r=n.left)&&void 0!==r?r:1/0,c.left),n.top=Math.min(null!==(i=n.top)&&void 0!==i?i:1/0,c.top),n.right=Math.max(null!==(l=n.right)&&void 0!==l?l:-1/0,c.right),n.bottom=Math.max(null!==(s=n.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var $c="Sortable"+(new Date).getTime();function Uc(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==Ac(e,"display")&&e!==Ru.ghost){t.push({target:e,rect:Mc(e)});var o=ic({},t[t.length-1].rect);if(e.thisAnimationDuration){var n=Sc(e,!0);n&&(o.top-=n.f,o.left-=n.e)}e.fromRect=o}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(t,{target:e}),1)},animateAll:function(o){var n=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof o&&o());var a=!1,r=0;t.forEach((function(e){var t=0,o=e.target,i=o.fromRect,l=Mc(o),s=o.prevFromRect,c=o.prevToRect,u=e.rect,d=Sc(o,!0);d&&(l.top-=d.f,l.left-=d.e),o.toRect=l,o.thisAnimationDuration&&_c(s,l)&&!_c(i,l)&&(u.top-l.top)/(u.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(t=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(u,s,c,n.options)),_c(l,i)||(o.prevFromRect=i,o.prevToRect=l,t||(t=n.options.animation),n.animate(o,u,l,t)),t&&(a=!0,r=Math.max(r,t),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),t),o.thisAnimationDuration=t)})),clearTimeout(e),a?e=setTimeout((function(){"function"==typeof o&&o()}),r):"function"==typeof o&&o(),t=[]},animate:function(e,t,o,n){if(n){Ac(e,"transition",""),Ac(e,"transform","");var a=Sc(this.el),r=a&&a.a,i=a&&a.d,l=(t.left-o.left)/(r||1),s=(t.top-o.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,Ac(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),Ac(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),Ac(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){Ac(e,"transition",""),Ac(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),n)}}}}var Zc=[],Wc={initializeByDefault:!0},Yc={mount:function(e){for(var t in Wc)Wc.hasOwnProperty(t)&&!(t in e)&&(e[t]=Wc[t]);Zc.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Zc.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var a=e+"Global";Zc.forEach((function(n){t[n.pluginName]&&(t[n.pluginName][a]&&t[n.pluginName][a](ic({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](ic({sortable:t},o)))}))},initializePlugins:function(e,t,o,n){for(var a in Zc.forEach((function(n){var a=n.pluginName;if(e.options[a]||n.initializeByDefault){var r=new n(e,t,e.options);r.sortable=e,r.options=e.options,e[a]=r,cc(o,r.defaults)}})),e.options)if(e.options.hasOwnProperty(a)){var r=this.modifyOption(e,a,e.options[a]);void 0!==r&&(e.options[a]=r)}},getEventProperties:function(e,t){var o={};return Zc.forEach((function(n){"function"==typeof n.eventProperties&&cc(o,n.eventProperties.call(t[n.pluginName],e))})),o},modifyOption:function(e,t,o){var n;return Zc.forEach((function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(n=a.optionListeners[t].call(e[a.pluginName],o))})),n}};var qc=["evt"],Gc=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,a=uc(o,qc);Yc.pluginEvent.bind(Ru)(e,t,ic({dragEl:Kc,parentEl:Qc,ghostEl:Jc,rootEl:eu,nextEl:tu,lastDownEl:ou,cloneEl:nu,cloneHidden:au,dragStarted:gu,putSortable:uu,activeSortable:Ru.active,originalEvent:n,oldIndex:ru,oldDraggableIndex:lu,newIndex:iu,newDraggableIndex:su,hideGhostForTarget:zu,unhideGhostForTarget:_u,cloneNowHidden:function(){au=!0},cloneNowShown:function(){au=!1},dispatchSortableEvent:function(e){Xc({sortable:t,name:e,originalEvent:n})}},a))};function Xc(e){!function(e){var t=e.sortable,o=e.rootEl,n=e.name,a=e.targetEl,r=e.cloneEl,i=e.toEl,l=e.fromEl,s=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,h=e.extraEventProperties;if(t=t||o&&o[$c]){var v,m=t.options,g="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||fc||pc?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=i||o,v.from=l||o,v.item=a||o,v.clone=r,v.oldIndex=s,v.newIndex=c,v.oldDraggableIndex=u,v.newDraggableIndex=d,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var y=ic(ic({},h),Yc.getEventProperties(n,t));for(var w in y)v[w]=y[w];o&&o.dispatchEvent(v),m[g]&&m[g].call(t,v)}}(ic({putSortable:uu,cloneEl:nu,targetEl:Kc,rootEl:eu,oldIndex:ru,oldDraggableIndex:lu,newIndex:iu,newDraggableIndex:su},e))}var Kc,Qc,Jc,eu,tu,ou,nu,au,ru,iu,lu,su,cu,uu,du,fu,pu,hu,vu,mu,gu,yu,wu,bu,Lu,xu=!1,Cu=!1,Nu=[],Vu=!1,ku=!1,Au=[],Su=!1,Tu=[],Ou="undefined"!=typeof document,Mu=mc,Pu=pc||fc?"cssFloat":"float",Iu=Ou&&!gc&&!mc&&"draggable"in document.createElement("div"),Bu=function(){if(Ou){if(fc)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Du=function(e,t){var o=Ac(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),a=Ic(e,0,t),r=Ic(e,1,t),i=a&&Ac(a),l=r&&Ac(r),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Mc(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Mc(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=n&&"none"===o[Pu]||r&&"none"===o[Pu]&&s+c>n)?"vertical":"horizontal"},Eu=function(e){function t(e,o){return function(n,a,r,i){var l=n.options.group.name&&a.options.group.name&&n.options.group.name===a.options.group.name;if(null==e&&(o||l))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,a,r,i),o)(n,a,r,i);var s=(o?n:a).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var o={},n=e.group;n&&"object"==lc(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},zu=function(){!Bu&&Jc&&Ac(Jc,"display","none")},_u=function(){!Bu&&Jc&&Ac(Jc,"display","")};Ou&&!gc&&document.addEventListener("click",(function(e){if(Cu)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Cu=!1,!1}),!0);var ju=function(e){if(Kc){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,r=e.clientY,Nu.some((function(e){var t=e[$c].options.emptyInsertThreshold;if(t&&!Bc(e)){var o=Mc(e),n=a>=o.left-t&&a<=o.right+t,l=r>=o.top-t&&r<=o.bottom+t;return n&&l?i=e:void 0}})),i);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[$c]._onDragOver(o)}}var a,r,i},Fu=function(e){Kc&&Kc.parentNode[$c]._isOutsideThisEl(e.target)};function Ru(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=cc({},t),e[$c]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Du(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ru.supportPointer&&"PointerEvent"in window&&(!vc||mc),emptyInsertThreshold:5};for(var n in Yc.initializePlugins(this,e,o),o)!(n in t)&&(t[n]=o[n]);for(var a in Eu(t),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&Iu,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?wc(e,"pointerdown",this._onTapStart):(wc(e,"mousedown",this._onTapStart),wc(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(wc(e,"dragover",this),wc(e,"dragenter",this)),Nu.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),cc(this,Uc())}function Hu(e,t,o,n,a,r,i,l){var s,c,u=e[$c],d=u.options.onMove;return!window.CustomEvent||fc||pc?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=o,s.draggedRect=n,s.related=a||t,s.relatedRect=r||Mc(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),d&&(c=d.call(u,s,i)),c}function $u(e){e.draggable=!1}function Uu(){Su=!1}function Zu(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function Wu(e){return setTimeout(e,0)}function Yu(e){return clearTimeout(e)}Ru.prototype={constructor:Ru,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(yu=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Kc):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,a=n.preventOnFilter,r=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=n.filter;if(function(e){Tu.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var n=t[o];n.checked&&Tu.push(n)}}(o),!Kc&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!vc||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=Cc(l,n.draggable,o,!1))&&l.animated||ou===l)){if(ru=Dc(l),lu=Dc(l,n.draggable),"function"==typeof c){if(c.call(this,e,l,this))return Xc({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),Gc("filter",t,{evt:e}),void(a&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=Cc(s,n.trim(),o,!1))return Xc({sortable:t,rootEl:n,name:"filter",targetEl:l,fromEl:o,toEl:o}),Gc("filter",t,{evt:e}),!0}))))return void(a&&e.preventDefault());n.handle&&!Cc(s,n.handle,o,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,o){var n,a=this,r=a.el,i=a.options,l=r.ownerDocument;if(o&&!Kc&&o.parentNode===r){var s=Mc(o);if(eu=r,Qc=(Kc=o).parentNode,tu=Kc.nextSibling,ou=o,cu=i.group,Ru.dragged=Kc,du={target:Kc,clientX:(t||e).clientX,clientY:(t||e).clientY},vu=du.clientX-s.left,mu=du.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Kc.style["will-change"]="all",n=function(){Gc("delayEnded",a,{evt:e}),Ru.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!hc&&a.nativeDraggable&&(Kc.draggable=!0),a._triggerDragStart(e,t),Xc({sortable:a,name:"choose",originalEvent:e}),kc(Kc,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){Tc(Kc,e.trim(),$u)})),wc(l,"dragover",ju),wc(l,"mousemove",ju),wc(l,"touchmove",ju),i.supportPointer?(wc(l,"pointerup",a._onDrop),!this.nativeDraggable&&wc(l,"pointercancel",a._onDrop)):(wc(l,"mouseup",a._onDrop),wc(l,"touchend",a._onDrop),wc(l,"touchcancel",a._onDrop)),hc&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Kc.draggable=!0),Gc("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(pc||fc))n();else{if(Ru.eventCanceled)return void this._onDrop();i.supportPointer?(wc(l,"pointerup",a._disableDelayedDrag),wc(l,"pointercancel",a._disableDelayedDrag)):(wc(l,"mouseup",a._disableDelayedDrag),wc(l,"touchend",a._disableDelayedDrag),wc(l,"touchcancel",a._disableDelayedDrag)),wc(l,"mousemove",a._delayedDragTouchMoveHandler),wc(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&wc(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(n,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Kc&&$u(Kc),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bc(e,"mouseup",this._disableDelayedDrag),bc(e,"touchend",this._disableDelayedDrag),bc(e,"touchcancel",this._disableDelayedDrag),bc(e,"pointerup",this._disableDelayedDrag),bc(e,"pointercancel",this._disableDelayedDrag),bc(e,"mousemove",this._delayedDragTouchMoveHandler),bc(e,"touchmove",this._delayedDragTouchMoveHandler),bc(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?wc(document,"pointermove",this._onTouchMove):wc(document,t?"touchmove":"mousemove",this._onTouchMove):(wc(Kc,"dragend",this),wc(eu,"dragstart",this._onDragStart));try{document.selection?Wu((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,t){if(xu=!1,eu&&Kc){Gc("dragStarted",this,{evt:t}),this.nativeDraggable&&wc(document,"dragover",Fu);var o=this.options;!e&&kc(Kc,o.dragClass,!1),kc(Kc,o.ghostClass,!0),Ru.active=this,e&&this._appendGhost(),Xc({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(fu){this._lastX=fu.clientX,this._lastY=fu.clientY,zu();for(var e=document.elementFromPoint(fu.clientX,fu.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(fu.clientX,fu.clientY))!==t;)t=e;if(Kc.parentNode[$c]._isOutsideThisEl(e),t)do{if(t[$c]){if(t[$c]._onDragOver({clientX:fu.clientX,clientY:fu.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=xc(t));_u()}},_onTouchMove:function(e){if(du){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,a=e.touches?e.touches[0]:e,r=Jc&&Sc(Jc,!0),i=Jc&&r&&r.a,l=Jc&&r&&r.d,s=Mu&&Lu&&Ec(Lu),c=(a.clientX-du.clientX+n.x)/(i||1)+(s?s[0]-Au[0]:0)/(i||1),u=(a.clientY-du.clientY+n.y)/(l||1)+(s?s[1]-Au[1]:0)/(l||1);if(!Ru.active&&!xu){if(o&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(Jc){r?(r.e+=c-(pu||0),r.f+=u-(hu||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Ac(Jc,"webkitTransform",d),Ac(Jc,"mozTransform",d),Ac(Jc,"msTransform",d),Ac(Jc,"transform",d),pu=c,hu=u,fu=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Jc){var e=this.options.fallbackOnBody?document.body:eu,t=Mc(Kc,!0,Mu,!0,e),o=this.options;if(Mu){for(Lu=e;"static"===Ac(Lu,"position")&&"none"===Ac(Lu,"transform")&&Lu!==document;)Lu=Lu.parentNode;Lu!==document.body&&Lu!==document.documentElement?(Lu===document&&(Lu=Oc()),t.top+=Lu.scrollTop,t.left+=Lu.scrollLeft):Lu=Oc(),Au=Ec(Lu)}kc(Jc=Kc.cloneNode(!0),o.ghostClass,!1),kc(Jc,o.fallbackClass,!0),kc(Jc,o.dragClass,!0),Ac(Jc,"transition",""),Ac(Jc,"transform",""),Ac(Jc,"box-sizing","border-box"),Ac(Jc,"margin",0),Ac(Jc,"top",t.top),Ac(Jc,"left",t.left),Ac(Jc,"width",t.width),Ac(Jc,"height",t.height),Ac(Jc,"opacity","0.8"),Ac(Jc,"position",Mu?"absolute":"fixed"),Ac(Jc,"zIndex","100000"),Ac(Jc,"pointerEvents","none"),Ru.ghost=Jc,e.appendChild(Jc),Ac(Jc,"transform-origin",vu/parseInt(Jc.style.width)*100+"% "+mu/parseInt(Jc.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,a=o.options;Gc("dragStart",this,{evt:e}),Ru.eventCanceled?this._onDrop():(Gc("setupClone",this),Ru.eventCanceled||((nu=Rc(Kc)).removeAttribute("id"),nu.draggable=!1,nu.style["will-change"]="",this._hideClone(),kc(nu,this.options.chosenClass,!1),Ru.clone=nu),o.cloneId=Wu((function(){Gc("clone",o),Ru.eventCanceled||(o.options.removeCloneOnHide||eu.insertBefore(nu,Kc),o._hideClone(),Xc({sortable:o,name:"clone"}))})),!t&&kc(Kc,a.dragClass,!0),t?(Cu=!0,o._loopId=setInterval(o._emulateDragOver,50)):(bc(document,"mouseup",o._onDrop),bc(document,"touchend",o._onDrop),bc(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",a.setData&&a.setData.call(o,n,Kc)),wc(document,"drop",o),Ac(Kc,"transform","translateZ(0)")),xu=!0,o._dragStartId=Wu(o._dragStarted.bind(o,t,e)),wc(document,"selectstart",o),gu=!0,window.getSelection().removeAllRanges(),vc&&Ac(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,a,r=this.el,i=e.target,l=this.options,s=l.group,c=Ru.active,u=cu===s,d=l.sort,f=uu||c,p=this,h=!1;if(!Su){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=Cc(i,l.draggable,r,!0),T("dragOver"),Ru.eventCanceled)return h;if(Kc.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||p._ignoreWhileAnimating===i)return M(!1);if(Cu=!1,c&&!l.disabled&&(u?d||(n=Qc!==eu):uu===this||(this.lastPutMode=cu.checkPull(this,c,Kc,e))&&s.checkPut(this,c,Kc,e))){if(a="vertical"===this._getDirection(e,i),t=Mc(Kc),T("dragOverValid"),Ru.eventCanceled)return h;if(n)return Qc=eu,O(),this._hideClone(),T("revert"),Ru.eventCanceled||(tu?eu.insertBefore(Kc,tu):eu.appendChild(Kc)),M(!0);var v=Bc(r,l.draggable);if(!v||function(e,t,o){var n=Mc(Bc(o.el,o.options.draggable)),a=Hc(o.el,o.options,Jc),r=10;return t?e.clientX>a.right+r||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>a.bottom+r||e.clientX>n.right&&e.clientY>n.top}(e,a,this)&&!v.animated){if(v===Kc)return M(!1);if(v&&r===e.target&&(i=v),i&&(o=Mc(i)),!1!==Hu(eu,r,Kc,t,i,o,e,!!i))return O(),v&&v.nextSibling?r.insertBefore(Kc,v.nextSibling):r.appendChild(Kc),Qc=r,P(),M(!0)}else if(v&&function(e,t,o){var n=Mc(Ic(o.el,0,o.options,!0)),a=Hc(o.el,o.options,Jc),r=10;return t?e.clientX<a.left-r||e.clientY<n.top&&e.clientX<n.right:e.clientY<a.top-r||e.clientY<n.bottom&&e.clientX<n.left}(e,a,this)){var m=Ic(r,0,l,!0);if(m===Kc)return M(!1);if(o=Mc(i=m),!1!==Hu(eu,r,Kc,t,i,o,e,!1))return O(),r.insertBefore(Kc,m),Qc=r,P(),M(!0)}else if(i.parentNode===r){o=Mc(i);var g,y,w,b=Kc.parentNode!==r,L=!function(e,t,o){var n=o?e.left:e.top,a=o?e.right:e.bottom,r=o?e.width:e.height,i=o?t.left:t.top,l=o?t.right:t.bottom,s=o?t.width:t.height;return n===i||a===l||n+r/2===i+s/2}(Kc.animated&&Kc.toRect||t,i.animated&&i.toRect||o,a),x=a?"top":"left",C=Pc(i,"top","top")||Pc(Kc,"top","top"),N=C?C.scrollTop:void 0;if(yu!==i&&(y=o[x],Vu=!1,ku=!L&&l.invertSwap||b),g=function(e,t,o,n,a,r,i,l){var s=n?e.clientY:e.clientX,c=n?o.height:o.width,u=n?o.top:o.left,d=n?o.bottom:o.right,f=!1;if(!i)if(l&&bu<c*a){if(!Vu&&(1===wu?s>u+c*r/2:s<d-c*r/2)&&(Vu=!0),Vu)f=!0;else if(1===wu?s<u+bu:s>d-bu)return-wu}else if(s>u+c*(1-a)/2&&s<d-c*(1-a)/2)return function(e){return Dc(Kc)<Dc(e)?1:-1}(t);if((f=f||i)&&(s<u+c*r/2||s>d-c*r/2))return s>u+c/2?1:-1;return 0}(e,i,o,a,L?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ku,yu===i),0!==g){var V=Dc(Kc);do{V-=g,w=Qc.children[V]}while(w&&("none"===Ac(w,"display")||w===Jc))}if(0===g||w===i)return M(!1);yu=i,wu=g;var k=i.nextElementSibling,A=!1,S=Hu(eu,r,Kc,t,i,o,e,A=1===g);if(!1!==S)return 1!==S&&-1!==S||(A=1===S),Su=!0,setTimeout(Uu,30),O(),A&&!k?r.appendChild(Kc):i.parentNode.insertBefore(Kc,A?k:i),C&&Fc(C,0,N-C.scrollTop),Qc=Kc.parentNode,void 0===y||ku||(bu=Math.abs(y-Mc(i)[x])),P(),M(!0)}if(r.contains(Kc))return M(!1)}return!1}function T(l,s){Gc(l,p,ic({evt:e,isOwner:u,axis:a?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:f,target:i,completed:M,onMove:function(o,n){return Hu(eu,r,Kc,t,o,Mc(o),e,n)},changed:P},s))}function O(){T("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function M(t){return T("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(p),p!==f&&(kc(Kc,uu?uu.options.ghostClass:c.options.ghostClass,!1),kc(Kc,l.ghostClass,!0)),uu!==p&&p!==Ru.active?uu=p:p===Ru.active&&uu&&(uu=null),f===p&&(p._ignoreWhileAnimating=i),p.animateAll((function(){T("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(i===Kc&&!Kc.animated||i===r&&!i.animated)&&(yu=null),l.dragoverBubble||e.rootEl||i===document||(Kc.parentNode[$c]._isOutsideThisEl(e.target),!t&&ju(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function P(){iu=Dc(Kc),su=Dc(Kc,l.draggable),Xc({sortable:p,name:"change",toEl:r,newIndex:iu,newDraggableIndex:su,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){bc(document,"mousemove",this._onTouchMove),bc(document,"touchmove",this._onTouchMove),bc(document,"pointermove",this._onTouchMove),bc(document,"dragover",ju),bc(document,"mousemove",ju),bc(document,"touchmove",ju)},_offUpEvents:function(){var e=this.el.ownerDocument;bc(e,"mouseup",this._onDrop),bc(e,"touchend",this._onDrop),bc(e,"pointerup",this._onDrop),bc(e,"pointercancel",this._onDrop),bc(e,"touchcancel",this._onDrop),bc(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;iu=Dc(Kc),su=Dc(Kc,o.draggable),Gc("drop",this,{evt:e}),Qc=Kc&&Kc.parentNode,iu=Dc(Kc),su=Dc(Kc,o.draggable),Ru.eventCanceled||(xu=!1,ku=!1,Vu=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Yu(this.cloneId),Yu(this._dragStartId),this.nativeDraggable&&(bc(document,"drop",this),bc(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),vc&&Ac(document.body,"user-select",""),Ac(Kc,"transform",""),e&&(gu&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),Jc&&Jc.parentNode&&Jc.parentNode.removeChild(Jc),(eu===Qc||uu&&"clone"!==uu.lastPutMode)&&nu&&nu.parentNode&&nu.parentNode.removeChild(nu),Kc&&(this.nativeDraggable&&bc(Kc,"dragend",this),$u(Kc),Kc.style["will-change"]="",gu&&!xu&&kc(Kc,uu?uu.options.ghostClass:this.options.ghostClass,!1),kc(Kc,this.options.chosenClass,!1),Xc({sortable:this,name:"unchoose",toEl:Qc,newIndex:null,newDraggableIndex:null,originalEvent:e}),eu!==Qc?(iu>=0&&(Xc({rootEl:Qc,name:"add",toEl:Qc,fromEl:eu,originalEvent:e}),Xc({sortable:this,name:"remove",toEl:Qc,originalEvent:e}),Xc({rootEl:Qc,name:"sort",toEl:Qc,fromEl:eu,originalEvent:e}),Xc({sortable:this,name:"sort",toEl:Qc,originalEvent:e})),uu&&uu.save()):iu!==ru&&iu>=0&&(Xc({sortable:this,name:"update",toEl:Qc,originalEvent:e}),Xc({sortable:this,name:"sort",toEl:Qc,originalEvent:e})),Ru.active&&(null!=iu&&-1!==iu||(iu=ru,su=lu),Xc({sortable:this,name:"end",toEl:Qc,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Gc("nulling",this),eu=Kc=Qc=Jc=tu=nu=ou=au=du=fu=gu=iu=su=ru=lu=yu=wu=uu=cu=Ru.dragged=Ru.ghost=Ru.clone=Ru.active=null,Tu.forEach((function(e){e.checked=!0})),Tu.length=pu=hu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Kc&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,a=o.length,r=this.options;n<a;n++)Cc(e=o[n],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Zu(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach((function(e,t){var a=n.children[t];Cc(a,this.options.draggable,n,!1)&&(o[e]=a)}),this),t&&this.captureAnimationState(),e.forEach((function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Cc(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=Yc.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Eu(o)},destroy:function(){Gc("destroy",this);var e=this.el;e[$c]=null,bc(e,"mousedown",this._onTapStart),bc(e,"touchstart",this._onTapStart),bc(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(bc(e,"dragover",this),bc(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Nu.splice(Nu.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!au){if(Gc("hideClone",this),Ru.eventCanceled)return;Ac(nu,"display","none"),this.options.removeCloneOnHide&&nu.parentNode&&nu.parentNode.removeChild(nu),au=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(au){if(Gc("showClone",this),Ru.eventCanceled)return;Kc.parentNode!=eu||this.options.group.revertClone?tu?eu.insertBefore(nu,tu):eu.appendChild(nu):eu.insertBefore(nu,Kc),this.options.group.revertClone&&this.animate(Kc,nu),Ac(nu,"display",""),au=!1}}else this._hideClone()}},Ou&&wc(document,"touchmove",(function(e){(Ru.active||xu)&&e.cancelable&&e.preventDefault()})),Ru.utils={on:wc,off:bc,css:Ac,find:Tc,is:function(e,t){return!!Cc(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:jc,closest:Cc,toggleClass:kc,clone:Rc,index:Dc,nextTick:Wu,cancelNextTick:Yu,detectDirection:Du,getChild:Ic,expando:$c},Ru.get=function(e){return e[$c]},Ru.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ru.utils=ic(ic({},Ru.utils),e.utils)),Yc.mount(e)}))},Ru.create=function(e,t){return new Ru(e,t)},Ru.version="1.15.6";var qu,Gu,Xu,Ku,Qu,Ju,ed=[],td=!1;function od(){ed.forEach((function(e){clearInterval(e.pid)})),ed=[]}function nd(){clearInterval(Ju)}var ad=jc((function(e,t,o,n){if(t.scroll){var a,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=Oc(),u=!1;Gu!==o&&(Gu=o,od(),qu=t.scroll,a=t.scrollFn,!0===qu&&(qu=zc(o,!0)));var d=0,f=qu;do{var p=f,h=Mc(p),v=h.top,m=h.bottom,g=h.left,y=h.right,w=h.width,b=h.height,L=void 0,x=void 0,C=p.scrollWidth,N=p.scrollHeight,V=Ac(p),k=p.scrollLeft,A=p.scrollTop;p===c?(L=w<C&&("auto"===V.overflowX||"scroll"===V.overflowX||"visible"===V.overflowX),x=b<N&&("auto"===V.overflowY||"scroll"===V.overflowY||"visible"===V.overflowY)):(L=w<C&&("auto"===V.overflowX||"scroll"===V.overflowX),x=b<N&&("auto"===V.overflowY||"scroll"===V.overflowY));var S=L&&(Math.abs(y-r)<=l&&k+w<C)-(Math.abs(g-r)<=l&&!!k),T=x&&(Math.abs(m-i)<=l&&A+b<N)-(Math.abs(v-i)<=l&&!!A);if(!ed[d])for(var O=0;O<=d;O++)ed[O]||(ed[O]={});ed[d].vx==S&&ed[d].vy==T&&ed[d].el===p||(ed[d].el=p,ed[d].vx=S,ed[d].vy=T,clearInterval(ed[d].pid),0==S&&0==T||(u=!0,ed[d].pid=setInterval(function(){n&&0===this.layer&&Ru.active._onTouchMove(Qu);var t=ed[this.layer].vy?ed[this.layer].vy*s:0,o=ed[this.layer].vx?ed[this.layer].vx*s:0;"function"==typeof a&&"continue"!==a.call(Ru.dragged.parentNode[$c],o,t,e,Qu,ed[this.layer].el)||Fc(ed[this.layer].el,o,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=zc(f,!1)));td=u}}),30),rd=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,a=e.activeSortable,r=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=o||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function id(){}function ld(){}id.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=Ic(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:rd},cc(id,{pluginName:"revertOnSpill"}),ld.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:rd},cc(ld,{pluginName:"removeOnSpill"}),Ru.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?wc(document,"dragover",this._handleAutoScroll):this.options.supportPointer?wc(document,"pointermove",this._handleFallbackAutoScroll):t.touches?wc(document,"touchmove",this._handleFallbackAutoScroll):wc(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?bc(document,"dragover",this._handleAutoScroll):(bc(document,"pointermove",this._handleFallbackAutoScroll),bc(document,"touchmove",this._handleFallbackAutoScroll),bc(document,"mousemove",this._handleFallbackAutoScroll)),nd(),od(),clearTimeout(Nc),Nc=void 0},nulling:function(){Qu=Gu=qu=td=Ju=Xu=Ku=null,ed.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(n,a);if(Qu=e,t||this.options.forceAutoScrollFallback||pc||fc||vc){ad(e,this.options,r,t);var i=zc(r,!0);!td||Ju&&n===Xu&&a===Ku||(Ju&&nd(),Ju=setInterval((function(){var r=zc(document.elementFromPoint(n,a),!0);r!==i&&(i=r,od()),ad(e,o.options,r,t)}),10),Xu=n,Ku=a)}else{if(!this.options.bubbleScroll||zc(r,!0)===Oc())return void od();ad(e,this.options,zc(r,!1),!1)}}},cc(e,{pluginName:"scroll",initializeByDefault:!0})}),Ru.mount(ld,id);var sd=(e,t,o)=>new Promise(((n,a)=>{var r=e=>{try{l(o.next(e))}catch(t){a(t)}},i=e=>{try{l(o.throw(e))}catch(t){a(t)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,i);l((o=o.apply(e,t)).next())}));const[cd,ud]=Se("media-picker"),fd={sortable:{type:Boolean,default:!1},disabled:Boolean,showTitle:Boolean,useFileNameAsLabel:Boolean,title:N("添加附件"),mediaList:L(),maxImageSideLength:x(1920),maxImageFileSize:x(1024),maxFileSize:x(102400),watermarkOptions:{type:Object,default:()=>null},maxMediaCount:x(Number.MAX_VALUE),maxImageCount:x(Number.MAX_VALUE),maxAudioCount:x(Number.MAX_VALUE),maxVideoCount:x(Number.MAX_VALUE),allowTakePhoto:w,allowPickPhoto:w,allowTakeVideo:Boolean,allowPickVideo:Boolean,allowTakeAudio:Boolean,allowPickAudio:Boolean,allowPickFile:Boolean,preview:Function,mediaPick:Function,beforeRead:Function,afterRead:Function,beforeDelete:Function,useWx:Boolean,imageSizeType:N("compressed"),mediaPlayerProps:Object};const pd=je(t.defineComponent({name:cd,props:fd,emits:["update:mediaList","delete","processing"],setup(e,{emit:n,slots:a}){const r=t.ref(!1),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),u=t.ref("file"),d=t.ref(""),f=t.ref(),p=t.ref(),h=t.ref(),v=t.ref(),m=t.ref(),g=t.ref(),y=t.ref(),w=t.ref(),b=t.ref([]),L=t.ref();t.watch((()=>e.mediaList.length),(()=>{var t;!L.value&&e.sortable&&(L.value=Ru.create(null==(t=w.value)?void 0:t.$el,{animation:200,handle:".zt-grid-item",onEnd:t=>{const o=x(e.mediaList,t.oldIndex,t.newIndex);n("update:mediaList",o)}}))}));const x=(e,t,o)=>{const n=[...e],a=n[t];return n.splice(t,1),n.splice(o,0,a),[...n]},C=e=>{e&&e.click()},N=(t,o)=>{if(!e.disabled&&(t=>e.mediaList.length===e.maxMediaCount?(qo("已达到文件最大数量限制"),!1):"photo"===t&&e.mediaList.filter((e=>"photo"===e.type)).length>e.maxImageCount?(qo("已达到图片最大数量限制"),!1):"video"===t&&e.mediaList.filter((e=>"video"===e.type)).length>e.maxVideoCount?(qo("已达到视频最大数量限制"),!1):!("audio"===t&&e.mediaList.filter((e=>"audio"===e.type)).length>e.maxAudioCount&&(qo("已达到录音最大数量限制"),1)))(t)&&(!e.mediaPick||!e.mediaPick(t,o)))if("photo"===t)if(e.useWx&&c()&&window.wx){ac("take"===o?"camera":"album").then((t=>{n("update:mediaList",[...e.mediaList,...t])}))}else"take"===o?C(f.value):"pick"===o&&C(p.value);else"video"===t?"take"===o?C(h.value):"pick"===o?C(v.value):"take_and_pick"===o&&(l.value=!0,r.value=!0,i.value=!1):"audio"===t?"take"===o?C(m.value):"pick"===o?C(g.value):"take_and_pick"===o&&(l.value=!0,r.value=!1,i.value=!0):"file"===t&&C(y.value)},V=(e,t)=>{"photo"===e?"take"===t&&f.value instanceof HTMLInputElement?f.value.value="":"pick"===t&&p.value instanceof HTMLInputElement&&(p.value.value=""):"video"===e?"take"===t&&h.value instanceof HTMLInputElement?h.value.value="":"pick"===t&&v.value&&(v.value.value=""):"audio"===e?"take"===t&&m.value instanceof HTMLInputElement?m.value.value="":"pick"===t&&g.value instanceof HTMLInputElement&&(g.value.value=""):"file"===e&&y.value instanceof HTMLInputElement&&(y.value.value="")},k=t.computed((()=>e.mediaList.filter((e=>"photo"===e.type)))),A=t.computed((()=>r.value?[{name:"拍摄",callback:()=>{N("video","take")}},{name:"视频文件",callback:()=>{N("video","pick")}}]:i.value?[{name:"录音",callback:()=>{N("audio","take")}},{name:"音频文件",callback:()=>{N("audio","pick")}}]:void 0)),S=t=>e.mediaList.some((e=>e.uniqueCode===es(t))),T=t=>{const n=[],a=new tc(e.maxImageSideLength),r=new oc(e.maxImageFileSize);for(let o=0;o<t.length;o++){const i=t[o],l=e.watermarkOptions&&e.watermarkOptions.watermarkConfigString&&Xs(e.watermarkOptions.watermarkConfigString);let s;s=l?{enabled:!0,watermarkConfigString:l?e.watermarkOptions.watermarkConfigString:"",context:{address:e.watermarkOptions.address||"",humanName:e.watermarkOptions.humanName||"",projectName:e.watermarkOptions.projectName||"",watermarkTime:new Date}}:{enabled:!1};const c=new nc(i,a,s,r).process().then((e=>e?os(e).then((t=>{const o=ts(e,"jpg"),n={showSrc:t,type:"photo",file:new File([e],o,{lastModified:e.lastModified,type:e.type}),uniqueCode:es(i),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,deletable:!0,message:"",originalName:i.name,originalSize:i.size};return Promise.resolve(n)})):Promise.resolve(null)));n.push(c)}return Promise.all(n).then((e=>{const t=[];return e.forEach((e=>{o(e)&&t.push(e)})),t})).finally((()=>{}))},O=t=>{n("processing",!0),b.value=t.map((e=>{let t;return t=Ql(e)?"audio":Jl(e)?"video":Kl(e)?"photo":"file",{file:e,message:"处理中...",status:"processing",type:t}}));const a=t.filter((e=>!Kl(e))).map((e=>(e=>{let t,o="";Ql(e)?(t="audio",o="mp3"):Jl(e)?(t="video",o="mp4"):t="file";const n=ts(e,o);return{type:t,file:new File([e],n,{lastModified:e.lastModified,type:e.type}),uniqueCode:es(e),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,originalName:e.name,originalSize:e.size,originalFile:e,deletable:!0,message:""}})(e)));let r=[];a.length>0&&(r=r.concat(a));const i=t.filter((e=>Kl(e)));let l;l=0===i.length?Promise.resolve([]):"original"===e.imageSizeType?(e=>{const t=e.map((e=>os(e).then((t=>({showSrc:t,type:"photo",file:e,uniqueCode:es(e),lastModified:e.lastModified,fileSize:e.size,fileName:e.name,deletable:!0,message:"",originalName:e.name,originalSize:e.size,originalFile:e})))));return Promise.all(t).then((e=>{const t=[];return e.forEach((e=>{o(e)&&t.push(e)})),t})).finally((()=>{}))})(i):T(i),l.then((e=>{e&&e.length>0&&(r=r.concat(e))})).finally((()=>{e.useFileNameAsLabel&&r.forEach((e=>{e.label=e.originalName})),b.value=[],n("processing",!1),n("update:mediaList",[...e.mediaList,...r]),e.afterRead&&e.afterRead(r)}))},M=t=>sd(this,null,(function*(){const o=t.target.files;if(!o||0===o.length)return;const n=(t=>{const o=[];for(let n=0;n<t.length;n++){const a=t[n];if(a.size>1024*e.maxFileSize)return qo(`请勿添加大于${e.maxFileSize}K的文件`),o;if(S(a))return qo("请勿重复添加文件"),o;o.push(a)}return o})(o);if(0!==n.length&&(t=>e.mediaList.length+t.length>e.maxMediaCount?(qo(`最多只能上传${e.maxMediaCount}个文件`),!1):e.mediaList.filter((e=>"photo"===e.type)).length+t.filter((e=>Kl(e))).length>e.maxImageCount?(qo(`最多只能上传${e.maxImageCount}张图片`),!1):e.mediaList.filter((e=>"video"===e.type)).length+t.filter((e=>Jl(e))).length>e.maxVideoCount?(qo(`最多只能上传${e.maxVideoCount}个视频`),!1):!(e.mediaList.filter((e=>"audio"===e.type)).length+t.filter((e=>Ql(e))).length>e.maxAudioCount&&(qo(`最多只能上传${e.maxAudioCount}个录音`),1)))(n))if(e.beforeRead)try{const t=yield e.beforeRead(n);if(!t)return;if(Array.isArray(t)){const e=t.filter((e=>!!e));O(e)}else O(n)}catch(a){return void qo(null==a?void 0:a.message)}else O(n)})),P=(e,o)=>{if("photo"===e){if("take"===o)return t.createVNode(Wl,{class:ud("icon")},null);if("pick"===o)return t.createVNode(Yl,{class:ud("icon")},null)}else{if("video"===e)return t.createVNode(ql,{class:ud("icon")},null);if("audio"===e)return t.createVNode(Gl,{class:ud("icon")},null);if("file"===e)return t.createVNode(Xl,{class:ud("icon")},null)}},I=(e,o)=>{let n="";return"photo"===e?"take"===o?n="拍照":"pick"===o&&(n="照片"):"video"===e?n="摄像":"audio"===e?n="录音":"file"===e&&(n="文档"),t.createVNode("div",{class:ud("box")},[t.createVNode("div",{class:ud("button"),onClick:()=>N(e,o)},[P(e,o)]),t.createVNode("div",{class:ud("label")},[n])])},B=()=>{const t=[];if(e.allowTakePhoto&&t.push(I("photo","take")),e.allowPickPhoto&&t.push(I("photo","pick")),e.allowTakeVideo||e.allowPickVideo){let o="take_and_pick";e.allowTakeVideo?e.allowPickVideo||(o="take"):o="pick",t.push(I("video",o))}if(e.allowTakeAudio||e.allowPickAudio){let o="take_and_pick";e.allowTakeAudio?e.allowPickAudio||(o="take"):o="pick",t.push(I("audio",o))}return e.allowPickFile&&t.push(I("file","pick")),t},D=e=>{const{status:n,message:a}=e;if("processing"===n||"uploading"===n||"failed"===n){const e="failed"===n?t.createVNode(it,{name:"close",class:ud("mask-icon")},null):t.createVNode(It,{class:ud("loading")},null),r=o(a)&&""!==a;return t.createVNode("div",{class:ud("mask")},[e,r&&t.createVNode("div",{class:ud("mask-message")},[a])])}},E=e=>{if(a.thumbnail)return a.thumbnail({file:e});if("video"===e.type)return t.createVNode($l,{class:ud("thumbnail")},null);if("audio"===e.type)return t.createVNode(Ul,{class:ud("thumbnail")},null);if("file"===e.type)return t.createVNode(Zl,{class:ud("thumbnail")},null);if("photo"===e.type){const o=e.showSrc||e.url;return t.createVNode(eo,{src:o,fit:"cover",radius:"4"},null)}return t.createVNode(Zl,{class:ud("thumbnail")},null)},z=e=>a["preview-cover"]?a["preview-cover"]({file:e}):Xn(e.label)?void 0:t.createVNode("div",{class:ud("thumbnail-label")},[e.label]),_=(t,o)=>sd(this,null,(function*(){if(e.beforeDelete){if(!(yield e.beforeDelete(t)))return}((t,o)=>{const a=e.mediaList.slice(0);a.splice(o,1),n("update:mediaList",a),n("delete",t,o)})(t,o)})),j=t=>sd(this,null,(function*(){var o;if(e.preview&&(yield e.preview(e.mediaList,t)))return;const n=e.mediaList[t];if("photo"===n.type){const e=k.value.indexOf(n);bl({images:k.value.map((e=>({url:e.url||e.showSrc||""}))),startPosition:e,closeable:!0})}else if("audio"===n.type||"video"===n.type)n.file||n.url?(u.value=n.type,d.value=n.url||(URL||webkitURL).createObjectURL(n.file),s.value=!0):qo("文件参数缺失");else if("file"===n.type){try{let e=yield Promise.resolve().then((()=>zL));if(e&&e.getJSI&&n.url){let t=null==(o=e.getJSI())?void 0:o.file;if(t&&t.download&&t.openDocument)return Wo({message:"打开中...",forbidClick:!0,duration:0}),void t.download({url:n.url}).then((({tempFilePath:e})=>{t&&t.openDocument?t.openDocument({localFilePath:e}).finally((()=>{Go()})):Go()})).catch((()=>{Go(),qo("下载失败")}))}}catch(a){console.log(a.message)}qo("暂不支持此类文件的预览")}})),F=e=>{l.value=!1,e.func&&e.func()};return ct({mediaPickAction:N,handleInputFiles:M,transformImageFiles:T,resetInput:V,previewMedia:j}),()=>{const o=e.showTitle&&t.createVNode("div",{class:ud("title")},[e.title]),n=e.allowTakePhoto||e.allowPickPhoto||e.allowTakeVideo||e.allowPickVideo||e.allowTakeAudio||e.allowPickAudio||e.allowPickFile;return t.createVNode("div",{class:ud()},[o,[t.createVNode("input",{type:"file",accept:"image/*",ref:f,multiple:!0,onChange:M,class:ud("hidden"),onClick:()=>V("photo","take"),capture:"environment"},null),t.createVNode("input",{type:"file",accept:"image/*,image/exact",ref:p,multiple:!0,onChange:M,class:ud("hidden"),onClick:()=>V("photo","pick")},null),t.createVNode("input",{type:"file",accept:"video/*",ref:h,onChange:M,class:ud("hidden"),onClick:()=>V("video","take"),capture:"environment"},null),t.createVNode("input",{type:"file",accept:"video/*",ref:v,onChange:M,class:ud("hidden"),onClick:()=>V("video","pick")},null),t.createVNode("input",{type:"file",accept:"audio/*",ref:m,onChange:M,class:ud("hidden"),onClick:()=>V("audio","take"),capture:"nonce"},null),t.createVNode("input",{type:"file",accept:"audio/*",ref:g,onChange:M,class:ud("hidden"),onClick:()=>V("audio","pick")},null),t.createVNode("input",{type:"file",accept:"*/*",ref:y,onChange:M,class:ud("hidden"),onClick:()=>V("file","pick")},null)],t.createVNode(Hl,t.mergeProps({show:s.value,"onUpdate:show":e=>s.value=e,mediaType:u.value,mediaUrl:d.value},e.mediaPlayerProps),null),t.createVNode(jt,{show:l.value,"onUpdate:show":e=>l.value=e,actions:A.value,description:"请选择","cancel-text":"取消","close-on-click-action":!0,onSelect:F},null),t.withDirectives(t.createVNode("div",{class:ud("line")},[B(),a.extend?a.extend():""]),[[t.vShow,n]]),t.withDirectives(t.createVNode(Gi,{ref:w,"column-num":"3",border:!1,square:!0,gutter:"4",class:ud("grid")},{default:()=>[e.mediaList.map(((e,o)=>{const n=e.deletable&&"uploading"!==e.status&&t.createVNode(zl,{class:ud("delete"),onClick:t=>{t.stopPropagation(),_(e,o)}},null);return t.createVNode(el,{key:e.uniqueCode,onClick:()=>j(o)},{default:()=>[E(e),z(e),D(e),n]})}))]}),[[t.vShow,e.mediaList.length]]),t.withDirectives(t.createVNode(Gi,{"column-num":"3",border:!1,square:!0,gutter:"4",class:ud("grid")},{default:()=>[b.value.map((e=>t.createVNode(el,{key:e.uniqueCode},{default:()=>[E(e),z(e),D(e)]})))]}),[[t.vShow,b.value.length]])])}}})),[hd,vd]=Se("multiple-picker-options"),md={textKey:N(""),readonly:Boolean,allowHtml:Boolean,itemHeight:x(0),columnCounts:x(3),initialOptions:L([]),currentIndexes:L([])};var gd=t.defineComponent({name:hd,props:md,emits:["change","update:currentIndexes"],setup(e,{emit:o,slots:n}){const r=t.computed((()=>e.initialOptions)),i=t.reactive({confirmed:!1}),l=t.computed((()=>e.currentIndexes)),s=t.ref(e.columnCounts),c=()=>{s.value=Number(e.columnCounts),s.value&&s.value>3&&(s.value=3),s.value&&s.value<1&&(s.value=1);const i={height:`${e.itemHeight+8}px`,width:1/s.value*100+"%"};return r.value.map(((r,c)=>{const u=(t=>a(t)&&e.textKey in t?t[e.textKey]:t)(r),d=(t=>e.readonly||a(t)&&t.disabled)(r),f={class:"zt-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:u};return t.createVNode("div",{role:"button",style:i,tabindex:d?-1:0,onClick:()=>(t=>{if(e.readonly)return;let n=!1;l.value.forEach(((e,o)=>{e===t&&(n=!0,l.value.splice(o,1))})),n||l.value.push(t),o("update:currentIndexes",l.value),o("change")})(c),class:[vd("item",{disabled:d,selected:l.value.indexOf(c)>-1,"disabled-selected":d&&l.value.indexOf(c)>-1,last:(c+1)%s.value==0})]},[n.options?n.options(r):t.createVNode("div",f,null)])}))};return ct({setConfirmIndex:e=>{const t=hi(e);i.confirmed=!0;const o=Object.keys(t);l.value.length=0,o.forEach((e=>{l.value.push(t[e])}))}}),()=>t.createVNode("div",{class:vd()},[t.createVNode("div",{ref:"wrapper",class:vd("wrapper")},[c()])])}});const[yd,wd]=Se("multiple-picker"),bd={title:String,loading:Boolean,readonly:Boolean,itemHeight:C(0),cancelButtonText:String,confirmButtonText:String,otherButtonText:String,showPicker:Boolean,allowHtml:w,closeOnPopstate:w,closeOnClickOverlay:w,showToolbar:w,showTitle:w,options:L(),toolbarPosition:N("bottom"),textKey:N("text"),columnCounts:x(3),selectedIndex:L([]),selectedValue:L([]),popup:w,showSelectAll:Boolean};const Ld=je(t.defineComponent({name:yd,props:bd,emits:["cancel","confirm","change","update:showPicker","update:selectedIndex","update:selectedValue"],setup(e,{emit:o,slots:n}){const a=t.ref(e.options),r=t.computed((()=>e.selectedIndex)),i=t.computed((()=>e.selectedValue)),l=t.ref(e.selectedIndex),s=t.ref(e.selectedValue),c=t.computed((()=>l.value.length>0&&l.value.length<a.value.length)),u=t.computed((()=>l.value.length>0&&l.value.length===a.value.length)),d=e=>{l.value=e,e.length>0?p():s.value=[],p(),o("update:selectedValue",s.value)},f=()=>{var e;s.value&&s.value.length>0&&(l.value.splice(0,l.value.length),null==(e=a.value)||e.forEach(((e,t)=>{e.value&&s.value.includes(e.value)&&l.value.push(t)})))};f();const p=()=>{l.value&&l.value.length>0&&(s.value.splice(0,s.value.length),l.value.forEach((e=>{e>-1&&e<a.value.length&&s.value.push(a.value[e].value)})))},h=t.ref(),v=t.ref(e.showPicker);t.ref(36);t.watch(v,(t=>{t!==e.showPicker&&o("update:showPicker",t),a.value=hi(e.options),l.value=hi(r.value),s.value=hi(i.value),f()})),t.watch((()=>e.showPicker),(e=>{var t;e!==v.value&&(v.value=e),null==(t=h.value)||t.setConfirmIndex(l.value)}));const m=t.computed((()=>{e.itemHeight&&ue(Number(e.itemHeight))})),g=()=>{o("update:showPicker",!1),o("cancel")},y=e=>o("update:showPicker",e),w=()=>{const t=l.value,o=[];return null==t||t.forEach((t=>{t>-1&&t<a.value.length&&a.value[t]&&o.push({[e.textKey]:a.value[t][e.textKey],value:a.value[t].value,initialIndex:t})})),o},b=()=>o("change",w()),L=()=>{const e=w();o("confirm",e)},x=()=>{if(e.showTitle)return n.title?n.title():t.createVNode("div",{class:["zt-ellipsis",wd("title")]},[e.title?e.title:"请选择"])},C=()=>{const o=e.otherButtonText||"其他";return t.createVNode(ho,{class:wd("select-other"),size:"medium",style:{marginLeft:"12px",marginRight:"8px"},onClick:T},{default:()=>[n.selectOther?n.selectOther():o]})},N=()=>{const o=e.cancelButtonText||"取消";return t.createVNode(ho,t.mergeProps({class:[e.showSelectAll?wd("in-select-all"):""],size:e.showSelectAll?"medium":"normal"},!0!==e.showSelectAll?{block:!0}:{},{style:{marginRigth:"4px"},onClick:g}),{default:()=>[n.cancel?n.cancel():o]})},V=()=>{const o=e.confirmButtonText||"确定";return t.createVNode(ho,t.mergeProps({type:"primary",class:[e.showSelectAll?wd("in-select-all"):""],size:e.showSelectAll?"medium":"normal"},!0!==e.showSelectAll?{block:!0}:{},{style:{marginLeft:"8px"},onClick:L}),{default:()=>[n.confirm?n.confirm():o]})},k=()=>{if(e.showToolbar){const o=e.showSelectAll?[A(),C(),N(),V()]:[N(),V()];return t.createVNode("div",{class:wd("toolbar")},[n.toolbar?n.toolbar():o])}},A=()=>t.createVNode("div",{class:wd("toolbar-select-all")},[t.createVNode(La,{class:wd("toolbar-checkbox"),shape:"square",modelValue:u.value,indeterminate:c.value,onClick:S},{default:()=>[t.createTextVNode("全选")]}),t.createVNode("div",{class:wd("toolbar-divider")},null),t.createVNode("span",{class:wd("toolbar-checkbox-text")},[t.createTextVNode("已选 "),l.value.length])]),S=()=>{l.value=u.value?[]:a.value.map(((e,t)=>t))},T=()=>{const e=new Array;a.value.forEach(((t,o)=>{l.value.includes(o)||e.push(o)})),l.value=e},O=()=>{let o=[];return o=a.value&&a.value[0]&&"object"!=typeof a.value[0]?a.value.map((e=>({value:e,text:e}))):a.value,t.createVNode(gd,{ref:h,currentIndexes:l.value,"onUpdate:currentIndexes":[e=>l.value=e,d],columnCounts:e.columnCounts,initialOptions:o,allowHtml:e.allowHtml,textKey:e.textKey,readonly:e.readonly,itemHeight:Number(m),onChange:b},{option:n.option})},M=()=>t.createVNode("div",{class:wd()},[x(),e.loading?t.createVNode(It,{class:wd("loading")},null):"",t.createVNode("div",{class:wd("options")},[O()]),"bottom"===e.toolbarPosition?k():""]);return ct({resetOptions:e=>{a.value=e.options,l.value=e.selectedIndex,l.value.length>0?p():s.value=[],o("update:selectedValue",s.value)}}),()=>e.popup?t.createVNode(kt,{show:v.value,"onUpdate:show":[e=>v.value=e,y],round:!0,position:"bottom",closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay},{default:M}):M()}}));function xd(e,o){const n=Ko(e,!0);return e=>t.createVNode("div",{class:o("placeholder"),style:{height:n.value?`${n.value}px`:void 0}},[e()])}const[Cd,Nd]=Se("nav-bar"),Vd={title:String,fixed:Boolean,zIndex:y,border:w,leftText:Boolean,leftIcon:Boolean,multiIcon:Boolean,rightText:String,rightIcon:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,color:String,navBarBackground:String,leftBtnStyle:Object};const kd=je(t.defineComponent({name:Cd,props:Vd,emits:["clickLeft","clickRight"],setup(e,{emit:o,slots:n}){const a=t.ref(),r=xd(a,Nd),i=e=>o("clickLeft",e),l=e=>o("clickRight",e),s=()=>{const{color:t,navBarBackground:o}=e,n={};if(t&&(n.color=t),o&&(n.background=o),Object.keys(n).length>0)return n},c=()=>{const{title:o,fixed:r}=e,c=e.leftText||e.leftIcon||n.left,u=e.rightIcon||e.rightText||n.right;return t.createVNode("div",{ref:a,style:s(),class:[Nd({fixed:r}),{"zt-safe-area-top":e.safeAreaInsetTop}]},[t.createVNode("div",{class:Nd("content")},[c&&t.createVNode("div",{class:[Nd("left")],onClick:i},[n.left?n.left():t.createVNode("div",{class:Nd("bar-btn","left")},[e.leftIcon?t.createVNode(rt,{class:Nd("icon"),name:"back"},null):"",e.leftText?t.createVNode("span",{class:Nd("text",e.leftIcon?"left-text":"")},["返回"]):""])]),t.createVNode("div",{class:[Nd("title"),"zt-ellipsis"]},[n.title?n.title():o]),u&&t.createVNode("div",{class:[Nd("right",e.multiIcon?"multi-icon":"")],onClick:l},[n.right?n.right():t.createVNode("div",{class:Nd("bar-btn","right")},[e.rightIcon?t.createVNode(rt,{class:Nd("icon"),name:"more"},null):"",e.rightText?t.createVNode("span",{class:Nd("text")},[e.rightText||"更多"]):""]),n.extra?n.extra():null])])])};return()=>e.fixed&&e.placeholder?r(c):c()}})),[Ad,Sd]=Se("notice-bar"),Td={text:String,mode:String,color:String,delay:C(1),speed:C(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};const Od=je(t.defineComponent({name:Ad,props:Td,emits:["close","replay"],setup(e,{emit:n,slots:a}){let r,i=0,l=0;const s=t.ref(),c=t.ref(),u=t.reactive({show:!0,offset:0,duration:0}),d=t=>{"closeable"===e.mode&&(u.show=!1,n("close",t))},f=()=>{if(a["right-icon"])return a["right-icon"]();const o="closeable"===e.mode?"clear-r":"link"===e.mode?"arrow-right":void 0;return o?t.createVNode(it,{name:o,class:Sd("right-icon"),onClick:d},null):void 0},p=()=>{u.offset=i,u.duration=0,k((()=>{A((()=>{u.offset=-l,u.duration=(l+i)/+e.speed,n("replay")}))}))},h=()=>{const o=!1===e.scrollable&&!e.wrapable,n={transform:u.offset?`translateX(${u.offset}px)`:"",transitionDuration:`${u.duration}s`};return t.createVNode("div",{ref:s,role:"marquee",class:Sd("wrap")},[t.createVNode("div",{ref:c,style:n,class:[Sd("content"),{"zt-ellipsis":o}],onTransitionend:p},[a.default?a.default():e.text])])},v=()=>{const{delay:t,speed:n,scrollable:a}=e,d=o(t)?1e3*+t:0;i=0,l=0,u.offset=0,u.duration=0,clearTimeout(r),r=setTimeout((()=>{if(!s.value||!c.value||!1===a)return;const e=P(s).width,t=P(c).width;(a||t>e)&&A((()=>{i=e,l=t,u.offset=-l,u.duration=l/+n}))}),d)};return vt(v),E(v),z("pageshow",v),ct({reset:v}),t.watch((()=>[e.text,e.scrollable]),v),()=>{const{color:o,wrapable:n,background:r}=e;return t.withDirectives(t.createVNode("div",{role:"alert",class:Sd({wrapable:n}),style:{color:o,background:r}},[a["left-icon"]?a["left-icon"]():e.leftIcon?t.createVNode(it,{class:Sd("left-icon"),name:e.leftIcon},null):void 0,h(),f()]),[[t.vShow,u.show]])}}})),[Md,Pd]=Se("notify"),Id=d({},lt,{type:N("danger"),color:String,message:y,position:N("top"),className:g,background:String,lockScroll:Boolean});var Bd=t.defineComponent({name:Md,props:Id,emits:["update:show"],setup(e,{emit:o,slots:n}){const a=e=>o("update:show",e);return()=>t.createVNode(Vt,{show:e.show,class:[Pd([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,position:e.position,duration:.2,lockScroll:e.lockScroll,"onUpdate:show":a},{default:()=>[n.default?n.default():e.message]})}});let Dd,Ed;let zd={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0};const _d=()=>{Ed&&Ed.toggle(!1)};const jd=je(Bd),[Fd,Rd]=Se("key"),Hd=t.createVNode(it,{name:"keyboard-shrink",size:"40"},null),$d=t.createVNode(it,{name:"backspace",size:"40"},null);var Ud=t.defineComponent({name:Fd,props:{type:String,text:y,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(e,{emit:o,slots:n}){const a=t.ref(!1),r=ut(),i=e=>{r.start(e),a.value=!0},l=e=>{r.move(e),r.direction.value&&(a.value=!1)},s=t=>{a.value&&(n.default||ee(t),a.value=!1,o("press",e.text,e.type))},c=()=>{if(e.loading)return t.createVNode(Pt,{class:Rd("loading-icon")},null);const o=n.default?n.default():e.text;switch(e.type){case"delete":return o||$d;case"extra":return o||Hd;default:return o}};return()=>t.createVNode("div",{class:Rd("wrapper",{wider:e.wider}),onTouchstartPassive:i,onTouchmovePassive:l,onTouchend:s,onTouchcancel:s},[t.createVNode("div",{role:"button",tabindex:0,class:Rd([e.color,{large:e.large,active:a.value,delete:"delete"===e.type}])},[c()])])}});const[Zd,Wd]=Se("number-keyboard"),Yd={show:Boolean,title:String,theme:N("default"),zIndex:y,teleport:[String,Object],maxlength:C(1/0),modelValue:N(""),transition:w,blurOnClose:w,showDeleteKey:w,randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,hideOnClickOutside:w,safeAreaInsetBottom:w,extraKey:{type:[String,Array],default:""}};const qd=je(t.defineComponent({name:Zd,props:Yd,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),r=()=>{const t=Array(9).fill("").map(((e,t)=>({text:t+1})));return e.randomKeyOrder&&function(e){for(let t=e.length-1;t>0;t--){const o=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[o],e[o]=n}}(t),t},i=t.computed((()=>"custom"===e.theme?(()=>{const t=r(),{extraKey:o}=e,n=Array.isArray(o)?o:[o];return 1===n.length?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):2===n.length&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t})():[...r(),{text:e.extraKey,type:"extra"},{text:0},{text:e.showDeleteKey?e.deleteButtonText:"",type:e.showDeleteKey?"delete":""}])),l=()=>{e.show&&o("blur")},s=()=>o(e.show?"show":"hide"),c=(t,n)=>{if(""===t)return void("extra"===n&&l());const a=e.modelValue;"delete"===n?(o("delete"),o("update:modelValue",a.slice(0,a.length-1))):"close"===n?(o("close"),e.blurOnClose&&l()):a.length<+e.maxlength?(o("input",t),o("update:modelValue",a+t)):a.length>=+e.maxlength&&Uo(`最大长度为${e.maxlength}`)},u=()=>{if("custom"===e.theme)return t.createVNode("div",{class:Wd("sidebar")},[e.showDeleteKey&&t.createVNode(Ud,{large:!0,text:e.deleteButtonText,type:"delete",onPress:c},{delete:n.delete}),t.createVNode(Ud,{large:!0,text:e.closeButtonText,type:"close",color:"blue",loading:e.closeButtonLoading,onPress:c},null)])};return t.watch((()=>e.show),(t=>{e.transition||o(t?"show":"hide")})),e.hideOnClickOutside&&_(a,l,{eventName:"touchstart"}),()=>{const o=(()=>{const{title:o}=e,a=n["title-left"];if(o||a)return t.createVNode("div",{class:Wd("header")},[a&&t.createVNode("span",{class:Wd("title-left")},[a()]),o&&t.createVNode("div",{class:Wd("title")},[o])])})(),{title:r}=e,l=t.createVNode(t.Transition,{name:e.transition?"zt-slide-up":""},{default:()=>[t.withDirectives(t.createVNode("div",{ref:a,style:le(e.zIndex),class:[Wd({unfit:!e.safeAreaInsetBottom,"with-title":!!o}),r?Wd("no-title"):""],onAnimationend:s,onTouchstartPassive:J},[r&&o,t.createVNode("div",{class:[Wd("body"),r?"":Wd("body-no-title")]},[t.createVNode("div",{class:Wd("keys")},[i.value.map((e=>{const o={};return"delete"===e.type&&(o.default=n.delete),"extra"===e.type&&(o.default=n["extra-key"]),t.createVNode(Ud,{key:e.text,text:e.text,type:e.type,wider:e.wider,color:e.color,onPress:c},o)}))]),u()])]),[[t.vShow,e.show]])]});return e.teleport?t.createVNode(t.Teleport,{to:e.teleport},{default:()=>[l]}):l}}})),[Gd,Xd]=Se("password-input"),Kd={info:String,mask:w,value:N(""),gutter:y,length:C(6),focused:Boolean,errorInfo:String};const Qd=je(t.defineComponent({name:Gd,props:Kd,emits:["focus"],setup(e,{emit:o}){const n=e=>{e.stopPropagation(),o("focus",e)},a=()=>{const o=[],{mask:n,value:a,gutter:r,focused:i}=e,l=+e.length;for(let e=0;e<l;e++){const l=a[e],s=0!==e&&!r,c=i&&e===a.length;let u;0!==e&&r&&(u={marginLeft:re(r)}),o.push(t.createVNode("li",{class:[{[Me]:s},Xd("item",{focus:c})],style:u},[n?t.createVNode("i",{style:{visibility:l?"visible":"hidden"}},null):l,c&&t.createVNode("div",{class:Xd("cursor")},null)]))}return o};return()=>{const o=e.errorInfo||e.info;return t.createVNode("div",{class:Xd()},[t.createVNode("ul",{class:[Xd("security"),{[Ie]:!e.gutter}],onTouchstartPassive:n},[a()]),o&&t.createVNode("div",{class:Xd(e.errorInfo?"error-info":"info")},[o])])}}})),Jd=["top","right","bottom","left"],ef=Math.min,tf=Math.max,of=Math.round,nf=Math.floor,af=e=>({x:e,y:e}),rf={left:"right",right:"left",bottom:"top",top:"bottom"},lf={start:"end",end:"start"};function sf(e,t,o){return tf(e,ef(t,o))}function cf(e,t){return"function"==typeof e?e(t):e}function uf(e){return e.split("-")[0]}function df(e){return e.split("-")[1]}function ff(e){return"x"===e?"y":"x"}function pf(e){return"y"===e?"height":"width"}function hf(e){return["top","bottom"].includes(uf(e))?"y":"x"}function vf(e){return ff(hf(e))}function mf(e){return e.replace(/start|end/g,(e=>lf[e]))}function gf(e){return e.replace(/left|right|bottom|top/g,(e=>rf[e]))}function yf(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function wf(e){const{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function bf(e,t,o){let{reference:n,floating:a}=e;const r=hf(t),i=vf(t),l=pf(i),s=uf(t),c="y"===r,u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,f=n[l]/2-a[l]/2;let p;switch(s){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-a.width,y:d};break;default:p={x:n.x,y:n.y}}switch(df(t)){case"start":p[i]-=f*(o&&c?-1:1);break;case"end":p[i]+=f*(o&&c?-1:1)}return p}async function Lf(e,t){var o;void 0===t&&(t={});const{x:n,y:a,platform:r,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cf(t,e),h=yf(p),v=l[f?"floating"===d?"reference":"floating":d],m=wf(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:n,y:a,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),w=await(null==r.isElement?void 0:r.isElement(y))&&await(null==r.getScale?void 0:r.getScale(y))||{x:1,y:1},b=wf(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:y,strategy:s}):g);return{top:(m.top-b.top+h.top)/w.y,bottom:(b.bottom-m.bottom+h.bottom)/w.y,left:(m.left-b.left+h.left)/w.x,right:(b.right-m.right+h.right)/w.x}}function xf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cf(e){return Jd.some((t=>e[t]>=0))}function Nf(){return"undefined"!=typeof window}function Vf(e){return Sf(e)?(e.nodeName||"").toLowerCase():"#document"}function kf(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Af(e){var t;return null==(t=(Sf(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Sf(e){return!!Nf()&&(e instanceof Node||e instanceof kf(e).Node)}function Tf(e){return!!Nf()&&(e instanceof Element||e instanceof kf(e).Element)}function Of(e){return!!Nf()&&(e instanceof HTMLElement||e instanceof kf(e).HTMLElement)}function Mf(e){return!(!Nf()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kf(e).ShadowRoot)}function Pf(e){const{overflow:t,overflowX:o,overflowY:n,display:a}=_f(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(a)}function If(e){return["table","td","th"].includes(Vf(e))}function Bf(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(o){return!1}}))}function Df(e){const t=Ef(),o=Tf(e)?_f(e):e;return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function Ef(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function zf(e){return["html","body","#document"].includes(Vf(e))}function _f(e){return kf(e).getComputedStyle(e)}function jf(e){return Tf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ff(e){if("html"===Vf(e))return e;const t=e.assignedSlot||e.parentNode||Mf(e)&&e.host||Af(e);return Mf(t)?t.host:t}function Rf(e){const t=Ff(e);return zf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Of(t)&&Pf(t)?t:Rf(t)}function Hf(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const a=Rf(e),r=a===(null==(n=e.ownerDocument)?void 0:n.body),i=kf(a);if(r){const e=$f(i);return t.concat(i,i.visualViewport||[],Pf(a)?a:[],e&&o?Hf(e):[])}return t.concat(a,Hf(a,[],o))}function $f(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uf(e){const t=_f(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Of(e),r=a?e.offsetWidth:o,i=a?e.offsetHeight:n,l=of(o)!==r||of(n)!==i;return l&&(o=r,n=i),{width:o,height:n,$:l}}function Zf(e){return Tf(e)?e:e.contextElement}function Wf(e){const t=Zf(e);if(!Of(t))return af(1);const o=t.getBoundingClientRect(),{width:n,height:a,$:r}=Uf(t);let i=(r?of(o.width):o.width)/n,l=(r?of(o.height):o.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Yf=af(0);function qf(e){const t=kf(e);return Ef()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Yf}function Gf(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const a=e.getBoundingClientRect(),r=Zf(e);let i=af(1);t&&(n?Tf(n)&&(i=Wf(n)):i=Wf(e));const l=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==kf(e))&&t}(r,o,n)?qf(r):af(0);let s=(a.left+l.x)/i.x,c=(a.top+l.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(r){const e=kf(r),t=n&&Tf(n)?kf(n):n;let o=e,a=$f(o);for(;a&&n&&t!==o;){const e=Wf(a),t=a.getBoundingClientRect(),n=_f(a),r=t.left+(a.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(n.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,o=kf(a),a=$f(o)}}return wf({width:u,height:d,x:s,y:c})}function Xf(e,t){const o=jf(e).scrollLeft;return t?t.left+o:Gf(Af(e)).left+o}function Kf(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=kf(e),n=Af(e),a=o.visualViewport;let r=n.clientWidth,i=n.clientHeight,l=0,s=0;if(a){r=a.width,i=a.height;const e=Ef();(!e||e&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:r,height:i,x:l,y:s}}(e,o);else if("document"===t)n=function(e){const t=Af(e),o=jf(e),n=e.ownerDocument.body,a=tf(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=tf(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-o.scrollLeft+Xf(e);const l=-o.scrollTop;return"rtl"===_f(n).direction&&(i+=tf(t.clientWidth,n.clientWidth)-a),{width:a,height:r,x:i,y:l}}(Af(e));else if(Tf(t))n=function(e,t){const o=Gf(e,!0,"fixed"===t),n=o.top+e.clientTop,a=o.left+e.clientLeft,r=Of(e)?Wf(e):af(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:a*r.x,y:n*r.y}}(t,o);else{const o=qf(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return wf(n)}function Qf(e,t){const o=Ff(e);return!(o===t||!Tf(o)||zf(o))&&("fixed"===_f(o).position||Qf(o,t))}function Jf(e,t,o){const n=Of(t),a=Af(t),r="fixed"===o,i=Gf(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const s=af(0);if(n||!n&&!r)if(("body"!==Vf(t)||Pf(a))&&(l=jf(t)),n){const e=Gf(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Xf(a));let c=0,u=0;if(a&&!n&&!r){const e=a.getBoundingClientRect();u=e.top+l.scrollTop,c=e.left+l.scrollLeft-Xf(a,e)}return{x:i.left+l.scrollLeft-s.x-c,y:i.top+l.scrollTop-s.y-u,width:i.width,height:i.height}}function ep(e){return"static"===_f(e).position}function tp(e,t){if(!Of(e)||"fixed"===_f(e).position)return null;if(t)return t(e);let o=e.offsetParent;return Af(e)===o&&(o=o.ownerDocument.body),o}function op(e,t){const o=kf(e);if(Bf(e))return o;if(!Of(e)){let t=Ff(e);for(;t&&!zf(t);){if(Tf(t)&&!ep(t))return t;t=Ff(t)}return o}let n=tp(e,t);for(;n&&If(n)&&ep(n);)n=tp(n,t);return n&&zf(n)&&ep(n)&&!Df(n)?o:n||function(e){let t=Ff(e);for(;Of(t)&&!zf(t);){if(Df(t))return t;if(Bf(t))return null;t=Ff(t)}return null}(e)||o}const np={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e;const r="fixed"===a,i=Af(n),l=!!t&&Bf(t.floating);if(n===i||l&&r)return o;let s={scrollLeft:0,scrollTop:0},c=af(1);const u=af(0),d=Of(n);if((d||!d&&!r)&&(("body"!==Vf(n)||Pf(i))&&(s=jf(n)),Of(n))){const e=Gf(n);c=Wf(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-s.scrollLeft*c.x+u.x,y:o.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:Af,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e;const r=[..."clippingAncestors"===o?Bf(t)?[]:function(e,t){const o=t.get(e);if(o)return o;let n=Hf(e,[],!1).filter((e=>Tf(e)&&"body"!==Vf(e))),a=null;const r="fixed"===_f(e).position;let i=r?Ff(e):e;for(;Tf(i)&&!zf(i);){const t=_f(i),o=Df(i);o||"fixed"!==t.position||(a=null),(r?!o&&!a:!o&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||Pf(i)&&!o&&Qf(e,i))?n=n.filter((e=>e!==i)):a=t,i=Ff(i)}return t.set(e,n),n}(t,this._c):[].concat(o),n],i=r[0],l=r.reduce(((e,o)=>{const n=Kf(t,o,a);return e.top=tf(n.top,e.top),e.right=ef(n.right,e.right),e.bottom=ef(n.bottom,e.bottom),e.left=tf(n.left,e.left),e}),Kf(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:op,getElementRects:async function(e){const t=this.getOffsetParent||op,o=this.getDimensions,n=await o(e.floating);return{reference:Jf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Uf(e);return{width:t,height:o}},getScale:Wf,isElement:Tf,isRTL:function(e){return"rtl"===_f(e).direction}};function ap(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=n,c=Zf(e),u=a||r?[...c?Hf(c):[],...Hf(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",o,{passive:!0}),r&&e.addEventListener("resize",o)}));const d=c&&l?function(e,t){let o,n=null;const a=Af(e);function r(){var e;clearTimeout(o),null==(e=n)||e.disconnect(),n=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(l||t(),!d||!f)return;const p={rootMargin:-nf(u)+"px "+-nf(a.clientWidth-(c+d))+"px "+-nf(a.clientHeight-(u+f))+"px "+-nf(c)+"px",threshold:tf(0,ef(1,s))||1};let h=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!h)return i();t?i(!1,t):o=setTimeout((()=>{i(!1,1e-7)}),1e3)}h=!1}try{n=new IntersectionObserver(v,{...p,root:a.ownerDocument})}catch(m){n=new IntersectionObserver(v,p)}n.observe(e)}(!0),r}(c,o):null;let f,p=-1,h=null;i&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),o()})),c&&!s&&h.observe(c),h.observe(t));let v=s?Gf(e):null;return s&&function t(){const n=Gf(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||o();v=n,f=requestAnimationFrame(t)}(),o(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",o),r&&e.removeEventListener("resize",o)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,s&&cancelAnimationFrame(f)}}const rp=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:a,y:r,placement:i,middlewareData:l}=t,s=await async function(e,t){const{placement:o,platform:n,elements:a}=e,r=await(null==n.isRTL?void 0:n.isRTL(a.floating)),i=uf(o),l=df(o),s="y"===hf(o),c=["left","top"].includes(i)?-1:1,u=r&&s?-1:1,d=cf(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(o=l.offset)?void 0:o.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:i}}}}},ip=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...s}=cf(e,t),c={x:o,y:n},u=await Lf(t,s),d=hf(uf(a)),f=ff(d);let p=c[f],h=c[d];if(r){const e="y"===f?"bottom":"right";p=sf(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=sf(h+u["y"===d?"top":"left"],h,h-u[e])}const v=l.fn({...t,[f]:p,[d]:h});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[f]:r,[d]:i}}}}}},lp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:a,middlewareData:r,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...m}=cf(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=uf(a),y=hf(l),w=uf(l)===l,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),L=f||(w||!v?[gf(l)]:function(e){const t=gf(e);return[mf(e),t,mf(t)]}(l)),x="none"!==h;!f&&x&&L.push(...function(e,t,o,n){const a=df(e);let r=function(e,t,o){const n=["left","right"],a=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return o?t?a:n:t?n:a;case"left":case"right":return t?r:i;default:return[]}}(uf(e),"start"===o,n);return a&&(r=r.map((e=>e+"-"+a)),t&&(r=r.concat(r.map(mf)))),r}(l,v,h,b));const C=[l,...L],N=await Lf(t,m),V=[];let k=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&V.push(N[g]),d){const e=function(e,t,o){void 0===o&&(o=!1);const n=df(e),a=vf(e),r=pf(a);let i="x"===a?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=gf(i)),[i,gf(i)]}(a,i,b);V.push(N[e[0]],N[e[1]])}if(k=[...k,{placement:a,overflows:V}],!V.every((e=>e<=0))){var A,S;const e=((null==(A=r.flip)?void 0:A.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:k},reset:{placement:t}};let o=null==(S=k.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!o)switch(p){case"bestFit":{var T;const e=null==(T=k.filter((e=>{if(x){const t=hf(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(o=e);break}case"initialPlacement":o=l}if(a!==o)return{reset:{placement:o}}}return{}}}},sp=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o}=t,{strategy:n="referenceHidden",...a}=cf(e,t);switch(n){case"referenceHidden":{const e=xf(await Lf(t,{...a,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cf(e)}}}case"escaped":{const e=xf(await Lf(t,{...a,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:Cf(e)}}}default:return{}}}}},cp=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:a,rects:r,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=cf(e,t)||{};if(null==c)return{};const d=yf(u),f={x:o,y:n},p=vf(a),h=pf(p),v=await i.getDimensions(c),m="y"===p,g=m?"top":"left",y=m?"bottom":"right",w=m?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[p]-f[p]-r.floating[h],L=f[p]-r.reference[p],x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let C=x?x[w]:0;C&&await(null==i.isElement?void 0:i.isElement(x))||(C=l.floating[w]||r.floating[h]);const N=b/2-L/2,V=C/2-v[h]/2-1,k=ef(d[g],V),A=ef(d[y],V),S=k,T=C-v[h]-A,O=C/2-v[h]/2+N,M=sf(S,O,T),P=!s.arrow&&null!=df(a)&&O!==M&&r.reference[h]/2-(O<S?k:A)-v[h]/2<0,I=P?O<S?O-S:O-T:0;return{[p]:f[p]+I,data:{[p]:M,centerOffset:O-M-I,...P&&{alignmentOffset:I}},reset:P}}}),up=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:o,y:n,placement:a,rects:r,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=cf(e,t),u={x:o,y:n},d=hf(a),f=ff(d);let p=u[f],h=u[d];const v=cf(l,t),m="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===f?"height":"width",t=r.reference[f]-r.floating[e]+m.mainAxis,o=r.reference[f]+r.reference[e]-m.mainAxis;p<t?p=t:p>o&&(p=o)}if(c){var g,y;const e="y"===f?"width":"height",t=["top","left"].includes(uf(a)),o=r.reference[d]-r.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:m.crossAxis),n=r.reference[d]+r.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<o?h=o:h>n&&(h=n)}return{[f]:p,[d]:h}}}},dp=(e,t,o)=>{const n=new Map,a={platform:np,...o},r={...a.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:a="absolute",middleware:r=[],platform:i}=o,l=r.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=bf(c,n,s),f=n,p={},h=0;for(let v=0;v<l.length;v++){const{name:o,fn:r}=l[v],{x:m,y:g,data:y,reset:w}=await r({x:u,y:d,initialPlacement:n,placement:f,strategy:a,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=g?g:d,p={...p,[o]:{...p[o],...y}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:u,y:d}=bf(c,f,s))),v=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:p}})(e,t,{...a,platform:r})};function fp(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pp(e){return e instanceof fp(e).Element||e instanceof Element}function hp(e){return e instanceof fp(e).HTMLElement||e instanceof HTMLElement}function vp(e){return"undefined"!=typeof ShadowRoot&&(e instanceof fp(e).ShadowRoot||e instanceof ShadowRoot)}var mp=Math.round;function gp(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function yp(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var n=e.getBoundingClientRect(),a=1,r=1;t&&hp(e)&&(a=e.offsetWidth>0&&mp(n.width)/e.offsetWidth||1,r=e.offsetHeight>0&&mp(n.height)/e.offsetHeight||1);var i=(pp(e)?fp(e):window).visualViewport,l=!!/^((?!chrome|android).)*safari/i.test(gp())&&o,s=(n.left+(l&&i?i.offsetLeft:0))/a,c=(n.top+(l&&i?i.offsetTop:0))/r,u=n.width/a,d=n.height/r;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function wp(e){var t=fp(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bp(e){return e?(e.nodeName||"").toLowerCase():null}function Lp(e){return((pp(e)?e.ownerDocument:e.document)||window.document).documentElement}function xp(e){return fp(e).getComputedStyle(e)}function Cp(e){var t=xp(e),o=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+a+n)}function Np(e,t,o){void 0===o&&(o=!1);var n,a,r=hp(t),i=hp(t)&&function(e){var t=e.getBoundingClientRect(),o=mp(t.width)/e.offsetWidth||1,n=mp(t.height)/e.offsetHeight||1;return 1!==o||1!==n}(t),l=Lp(t),s=yp(e,i,o),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!o)&&(("body"!==bp(t)||Cp(l))&&(c=(n=t)!==fp(n)&&hp(n)?{scrollLeft:(a=n).scrollLeft,scrollTop:a.scrollTop}:wp(n)),hp(t)?((u=yp(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=function(e){return yp(Lp(e)).left+wp(e).scrollLeft}(l))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function Vp(e){return"html"===bp(e)?e:e.assignedSlot||e.parentNode||(vp(e)?e.host:null)||Lp(e)}function kp(e){return["html","body","#document"].indexOf(bp(e))>=0?e.ownerDocument.body:hp(e)&&Cp(e)?e:kp(Vp(e))}function Ap(e,t){var o;void 0===t&&(t=[]);var n=kp(e),a=n===(null==(o=e.ownerDocument)?void 0:o.body),r=fp(n),i=a?[r].concat(r.visualViewport||[],Cp(n)?n:[]):n,l=t.concat(i);return a?l:l.concat(Ap(Vp(i)))}function Sp(e){return["table","td","th"].indexOf(bp(e))>=0}function Tp(e){return hp(e)&&"fixed"!==xp(e).position?e.offsetParent:null}function Op(e){for(var t=fp(e),o=Tp(e);o&&Sp(o)&&"static"===xp(o).position;)o=Tp(o);return o&&("html"===bp(o)||"body"===bp(o)&&"static"===xp(o).position)?t:o||function(e){var t=/firefox/i.test(gp());if(/Trident/i.test(gp())&&hp(e)&&"fixed"===xp(e).position)return null;var o=Vp(e);for(vp(o)&&(o=o.host);hp(o)&&["html","body"].indexOf(bp(o))<0;){var n=xp(o);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return o;o=o.parentNode}return null}(e)||t}var Mp="top",Pp="bottom",Ip="right",Bp="left",Dp="start",Ep="end",zp=[].concat([Mp,Pp,Ip,Bp],["auto"]).reduce((function(e,t){return e.concat([t,t+"-"+Dp,t+"-"+Ep])}),[]),_p=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function jp(e){var t=new Map,o=new Set,n=[];function a(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!o.has(e)){var n=t.get(e);n&&a(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||a(e)})),n}function Fp(e){return e.split("-")[0]}function Rp(e){return e.split("-")[1]}var Hp={placement:"bottom",modifiers:[],strategy:"absolute"};function $p(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Up(e){void 0===e&&(e={});var t=e,o=t.defaultModifiers,n=void 0===o?[]:o,a=t.defaultOptions,r=void 0===a?Hp:a;return function(e,t,o){void 0===o&&(o=r);var a,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Hp,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(o){var a="function"==typeof o?o(l.options):o;d(),l.options=Object.assign({},r,l.options,a),l.scrollParents={reference:pp(e)?Ap(e):e.contextElement?Ap(e.contextElement):[],popper:Ap(t)};var i,c,f=function(e){var t=jp(e);return _p.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}((i=[].concat(n,l.options.modifiers),c=i.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=f.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,o=e.options,n=void 0===o?{}:o,a=e.effect;if("function"==typeof a){var r=a({state:l,name:t,instance:u,options:n}),i=function(){};s.push(r||i)}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,o=e.popper;if($p(t,o)){var n,a,r,i;l.rects={reference:Np(t,Op(o),"fixed"===l.options.strategy),popper:(n=o,a=yp(n),r=n.offsetWidth,i=n.offsetHeight,Math.abs(a.width-r)<=1&&(r=a.width),Math.abs(a.height-i)<=1&&(i=a.height),{x:n.offsetLeft,y:n.offsetTop,width:r,height:i})},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var s=0;s<l.orderedModifiers.length;s++)if(!0!==l.reset){var d=l.orderedModifiers[s],f=d.fn,p=d.options,h=void 0===p?{}:p,v=d.name;"function"==typeof f&&(l=f({state:l,options:h,name:v,instance:u})||l)}else l.reset=!1,s=-1}}},update:(a=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),c=!0}};if(!$p(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(o).then((function(e){!c&&o.onFirstUpdate&&o.onFirstUpdate(e)})),u}}var Zp={passive:!0};var Wp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yp(e){var t,o=e.popper,n=e.popperRect,a=e.placement,r=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=i.x,p=void 0===f?0:f,h=i.y,v=void 0===h?0:h,m="function"==typeof u?u({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),w=Bp,b=Mp,L=window;if(c){var x=Op(o),C="clientHeight",N="clientWidth";if(x===fp(o)&&"static"!==xp(x=Lp(o)).position&&"absolute"===l&&(C="scrollHeight",N="scrollWidth"),a===Mp||(a===Bp||a===Ip)&&r===Ep)b=Pp,v-=(d&&x===L&&L.visualViewport?L.visualViewport.height:x[C])-n.height,v*=s?1:-1;if(a===Bp||(a===Mp||a===Pp)&&r===Ep)w=Ip,p-=(d&&x===L&&L.visualViewport?L.visualViewport.width:x[N])-n.width,p*=s?1:-1}var V,k=Object.assign({position:l},c&&Wp),A=!0===u?function(e,t){var o=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:mp(o*a)/a||0,y:mp(n*a)/a||0}}({x:p,y:v},fp(o)):{x:p,y:v};return p=A.x,v=A.y,s?Object.assign({},k,((V={})[b]=y?"0":"",V[w]=g?"0":"",V.transform=(L.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",V)):Object.assign({},k,((t={})[b]=y?v+"px":"",t[w]=g?p+"px":"",t.transform="",t))}var qp=Up({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,n=e.options,a=n.scroll,r=void 0===a||a,i=n.resize,l=void 0===i||i,s=fp(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach((function(e){e.addEventListener("scroll",o.update,Zp)})),l&&s.addEventListener("resize",o.update,Zp),function(){r&&c.forEach((function(e){e.removeEventListener("scroll",o.update,Zp)})),l&&s.removeEventListener("resize",o.update,Zp)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=function(e){var t,o=e.reference,n=e.element,a=e.placement,r=a?Fp(a):null,i=a?Rp(a):null,l=o.x+o.width/2-n.width/2,s=o.y+o.height/2-n.height/2;switch(r){case Mp:t={x:l,y:o.y-n.height};break;case Pp:t={x:l,y:o.y+o.height};break;case Ip:t={x:o.x+o.width,y:s};break;case Bp:t={x:o.x-n.width,y:s};break;default:t={x:o.x,y:o.y}}var c=r?function(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}(r):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case Dp:t[c]=t[c]-(o[u]/2-n[u]/2);break;case Ep:t[c]=t[c]+(o[u]/2-n[u]/2)}}return t}({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,n=o.gpuAcceleration,a=void 0===n||n,r=o.adaptive,i=void 0===r||r,l=o.roundOffsets,s=void 0===l||l,c={placement:Fp(t.placement),variation:Rp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Yp(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yp(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},n=t.attributes[e]||{},a=t.elements[e];hp(a)&&bp(a)&&(Object.assign(a.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],a=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{});hp(n)&&bp(n)&&(Object.assign(n.style,r),Object.keys(a).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}]});var Gp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,n=e.name,a=o.offset,r=void 0===a?[0,0]:a,i=zp.reduce((function(e,o){return e[o]=function(e,t,o){var n=Fp(e),a=[Bp,Mp].indexOf(n)>=0?-1:1,r="function"==typeof o?o(Object.assign({},t,{placement:e})):o,i=r[0],l=r[1];return i=i||0,l=(l||0)*a,[Bp,Ip].indexOf(n)>=0?{x:l,y:i}:{x:i,y:l}}(o,t.rects,r),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};const[Xp,Kp]=Se("popover"),Qp=["overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],Jp={show:Boolean,theme:N("light"),overlay:Boolean,actions:L(),trigger:N("click"),duration:y,showArrow:w,placement:N("bottom"),iconPrefix:String,overlayClass:g,overlayStyle:Object,closeOnClickAction:w,closeOnClickOverlay:w,closeOnClickOutside:w,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"},autoAdjustOverflow:{type:Boolean,default:!1}};const eh=je(t.defineComponent({name:Xp,props:Jp,emits:["select","touchstart","update:show"],setup(e,{emit:o,slots:n,attrs:a}){let r;const i=t.ref(),l=t.ref(),s=t.ref(),c=t.ref(),u=rl((()=>e.show),(e=>o("update:show",e))),p=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},d({},Gp,{options:{offset:e.offset}})]}),v=()=>{t.nextTick((()=>{u.value&&(r?r.setOptions(p()):(r=l.value&&s.value?qp(l.value,s.value.popupRef.value,p()):null,f&&(window.addEventListener("animationend",v),window.addEventListener("transitionend",v))))}))},m=e=>{u.value=e},g=()=>{"click"===e.trigger&&(u.value=!u.value)},y=(o,a)=>n.action?n.action({action:o,index:a}):[o.icon&&t.createVNode(rt,{name:o.icon,classPrefix:e.iconPrefix,class:Kp("action-icon")},null),t.createVNode("div",{class:[Kp("action-text"),Pe]},[o.text])],w=(n,a)=>{const{icon:r,color:i,disabled:l,className:s,selected:c}=n;return t.createVNode("div",{role:"menuitem",class:[Kp("action",{disabled:l,"with-icon":r}),s],style:c?{color:"var(--zt-primary-color)"}:{color:i},tabindex:l?void 0:0,"aria-disabled":l||void 0,onClick:()=>((t,n)=>{t.disabled||(e.actions.forEach((e=>{e.selected=!1})),t.selected=!0,o("select",t,n),e.closeOnClickAction&&(u.value=!1))})(n,a)},[y(n,a)])};function b(){return o=this,n=null,a=function*(){var o,n;if(l.value&&i.value&&c.value){const a=i.value,r=l.value,{x:s,y:u,placement:d,middlewareData:f}=yield dp(r,a,{placement:e.placement,middleware:[rp(8),ip({padding:4,crossAxis:!1,limiter:up()}),lp(),sp(),(n={element:c.value,padding:6},{name:"arrow",options:n,fn(e){const o=function(e){var t;return null!=(t=null==e?void 0:e.$el)?t:e}(t.unref(n.element));return null==o?{}:cp({element:o,padding:n.padding}).fn(e)}})]});let p=u;const h={top:"bottom",right:"left",bottom:"top",left:"right"}[d.split("-")[0]];u<0?p=0:u>0&&u+a.offsetHeight>document.body.clientHeight&&(p=document.body.clientHeight-a.offsetHeight),Object.assign(i.value.style,{left:`${s}px`,top:`${p}px`}),i.value.setAttribute("data-popper-placement",d);const{x:v,y:m}=null!=(o=f.arrow)?o:{};Object.assign(c.value.style,{left:null!=v?`${v}px`:"",top:null!=m?`${m}px`:"",margin:0,[h]:"calc(var(--zt-popover-arrow-size) * -1)"})}},new Promise(((e,t)=>{var r=e=>{try{l(a.next(e))}catch(o){t(o)}},i=e=>{try{l(a.throw(e))}catch(o){t(o)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,i);l((a=a.apply(o,n)).next())}));var o,n,a}return t.onMounted((()=>{v(),t.watchEffect((()=>{var t;i.value=null==(t=s.value)?void 0:t.popupRef.value,l.value&&i.value&&e.autoAdjustOverflow&&ap(l.value,i.value,b,{elementResize:"undefined"!=typeof ResizeObserver})}))})),t.onBeforeUnmount((()=>{r&&(f&&(window.removeEventListener("animationend",v),window.removeEventListener("transitionend",v)),r.destroy(),r=null)})),t.watch((()=>[u.value,e.offset,e.placement]),v),_(l,(()=>{u.value&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&(u.value=!1)}),{eventName:"touchstart"}),()=>{var o;return t.createVNode(t.Fragment,null,[t.createVNode("span",{ref:l,class:Kp("wrapper"),onClick:g},[null==(o=n.reference)?void 0:o.call(n)]),t.createVNode(Vt,t.mergeProps({ref:s,show:u.value,class:Kp([e.theme,u.value?"show":"hidden"]),position:"",transition:"zt-popover-zoom",lockScroll:!1,"onUpdate:show":m},a,mt(),h(e,Qp)),{default:()=>[e.showArrow&&t.createVNode("div",{class:Kp("arrow"),ref:c},null),t.createVNode("div",{role:"menu",class:Kp("content")},[n.default?n.default():e.actions.map(w)])]})])}}})),[th,oh,nh]=Se("pull-refresh"),ah=["pulling","loosing","success"],rh={disabled:Boolean,modelValue:Boolean,headHeight:C(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:y,successDuration:C(500),animationDuration:C(300),scrollElement:null};const ih=je(t.defineComponent({name:th,props:rh,emits:["change","refresh","update:modelValue"],setup(e,{emit:o,slots:n}){let a;const r=t.ref(),i=t.ref(),l=$(r),s=t.computed((()=>{if(e.scrollElement){const t=(e=>{if(e){if("string"==typeof e)return document.querySelectorAll(e)[0];if("function"==typeof e)return e();if("object"==typeof e&&e instanceof window.HTMLElement)return e}return document.body})(e.scrollElement);return t||console.warn("请检查props scroll-element元素是否存在!"),null!=t?t:l.value}return l.value})),c=t.reactive({status:"normal",distance:0,duration:0}),u=ut(),d=()=>{if(50!==e.headHeight)return{height:`${e.headHeight}px`}},f=()=>"loading"!==c.status&&"success"!==c.status&&!e.disabled,p=(t,n)=>{const a=+(e.pullDistance||e.headHeight);c.distance=t,c.status=n?"loading":0===t?"normal":t<a?"pulling":"loosing",o("change",{status:c.status,distance:t})},h=()=>{const{status:t}=c;return"normal"===t?"":e[`${t}Text`]||nh(t)},v=()=>{const{status:e,distance:o}=c;if(n[e])return n[e]({distance:o});const a=[];return ah.includes(e)&&a.push(t.createVNode("div",{class:oh("text")},[h()])),"loading"===e&&a.push(t.createVNode(Pt,{color:"#969799","text-color":"#969799",class:oh("loading")},{default:h})),a},m=e=>{a=0===W(s.value),a&&(c.duration=0,u.start(e))},g=e=>{f()&&m(e)},y=t=>{if(f()){a||m(t);const{deltaY:o}=u;u.move(t),a&&o.value>=0&&u.isVertical()&&(ee(t),p((t=>{const o=+(e.pullDistance||e.headHeight);return t>o&&(t=t<2*o?o+(t-o)/2:1.5*o+(t-2*o)/4),Math.round(t)})(o.value)))}};z("touchmove",y,{target:i});const w=()=>{a&&u.deltaY.value&&f()&&(c.duration=+e.animationDuration,"loosing"===c.status?(p(+e.headHeight,!0),o("update:modelValue",!0),t.nextTick((()=>o("refresh")))):p(0))};return t.watch((()=>e.modelValue),(t=>{c.duration=+e.animationDuration,t?p(+e.headHeight,!0):n.success||e.successText?(c.status="success",setTimeout((()=>{p(0)}),+e.successDuration)):p(0,!1)})),()=>{var e;const o={transitionDuration:`${c.duration}ms`,transform:c.distance?`translate3d(0,${c.distance}px, 0)`:""};return t.createVNode("div",{ref:r,class:oh()},[t.createVNode("div",{ref:i,class:oh("track"),style:o,onTouchstartPassive:g,onTouchmove:y,onTouchend:w,onTouchcancel:w},[t.createVNode("div",{class:oh("head"),style:d()},[v()]),null==(e=n.default)?void 0:e.call(n)])])}}})),[lh,sh]=Se("radio-group"),ch={disabled:Boolean,iconSize:y,direction:N("vertical"),modelValue:g,checkedColor:String},uh=Symbol(lh);var dh=t.defineComponent({name:lh,props:ch,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const{linkChildren:a}=D(uh);return t.watch((()=>e.modelValue),(e=>o("change",e))),a({props:e,updateValue:e=>o("update:modelValue",e)}),Z((()=>e.modelValue)),()=>{var o;return t.createVNode("div",{class:sh([e.direction]),role:"radiogroup"},[null==(o=n.default)?void 0:o.call(n)])}}});const[fh,ph]=Se("radio");var hh=t.defineComponent({name:fh,props:va,emits:["update:modelValue"],setup(e,{emit:o,slots:n}){const{parent:a}=I(uh),r=()=>{a?a.updateValue(e.name):o("update:modelValue",e.name)};return()=>t.createVNode(ma,t.mergeProps({bem:ph,role:"radio",parent:a,checked:(a?a.props.modelValue:e.modelValue)===e.name,onToggle:r},e),h(n,["default","icon"]))}});const vh=je(hh),mh=je(dh),[gh,yh,wh]=Se("radio-picker"),bh=e=>e.find((e=>!e.disabled))||e[0];function Lh(e,t){for(let o=t=he(t,0,e.length);o<e.length;o++)if(!e[o].disabled)return o;for(let o=t-1;o>=0;o--)if(!e[o].disabled)return o;return 0}const xh=(e,t,o)=>void 0!==t&&!!e.find((e=>e[o.value]===t));function Ch(e,t,o){const n=e.findIndex((e=>e[o.value]===t));return e[Lh(e,n)]}const[Nh,Vh]=Se("radio-picker-column"),kh=Symbol(Nh);var Ah=t.defineComponent({name:Nh,props:{value:y,unit:N(""),fields:b(Object),options:L(),readonly:Boolean,allowHtml:Boolean,wrapHeight:b(Number),swipeDuration:b(y),autoSearchVal:N("")},emits:["change","clickOption"],setup(e,{emit:o,slots:n}){let a,r,i,l,s;const c=t.ref(),u=t.ref(),d=t.ref(0),f=t.ref(0),p=ut(),h=t=>{const o=u.value.clientHeight-e.wrapHeight;d.value=he(t,-o,0)},v=t.computed((()=>!e.options.some((t=>{const o=t[e.fields.text];return null==o?void 0:o.includes(e.autoSearchVal)}))));t.watch((()=>e.autoSearchVal),(()=>{d.value=0}),{immediate:!0});const m=()=>e.readonly||!e.options.length,g=t=>{a||m()||(s=null,f.value=200,(t=>{const n=Lh(e.options,t),r=()=>{const t=e.options[n][e.fields.value];t!==e.value&&o("change",t)};a?s=r:r()})(t),o("clickOption",e.options[t]))},y=()=>{a=!1,f.value=0,s&&(s(),s=null)},w=e=>{if(!m()){if(p.start(e),a&&u.value){const e=function(e){const{transform:t}=window.getComputedStyle(e),o=t.slice(7,t.length-1).split(", ")[5];return Number(o)}(u.value);h(Math.min(0,e-0))}f.value=0,r=d.value,i=Date.now(),l=r,s=null}},b=()=>{if(m())return;const t=d.value-l,o=Date.now()-i;o<300&&Math.abs(t)>15?((t,o)=>{const n=Math.abs(t/o);t=d.value+n/.003*(t<0?-1:1),h(t),f.value=+e.swipeDuration})(t,o):(f.value=200,setTimeout((()=>{a=!1}),0))},L=()=>e.options.map(((o,a)=>{let r=o[e.fields.text];const{disabled:i}=o,l=o[e.fields.value],s=null==r?void 0:r.includes(e.autoSearchVal);let c=!1;s&&e.autoSearchVal&&(r=(t=>{if(!t)return t;const o=new RegExp(e.autoSearchVal,"gi");return t.replace(o,"<span style='color: var(--zt-radio-picker-search-radio-label-match-color);'>$&</span>")})(r),c=!0);const u={tabindex:i?-1:0,class:[Vh("item",{"not-match":!s}),o.className],disabled:i,onClick:()=>{if(!i)return g(a)},name:l},d={[e.allowHtml||c?"innerHTML":"textContent"]:r};return t.createVNode(hh,u,{default:()=>[n.option?n.option({option:o,searchValue:e.autoSearchVal}):t.createVNode("div",d,null)]})}));I(kh),ct({stopMomentum:y}),z("touchmove",(e=>{if(m())return;p.move(e),p.isVertical()&&(a=!0,ee(e,!0)),h(r+p.deltaY.value);const t=Date.now();t-i>300&&(i=t,l=d.value)}),{target:c});const x=()=>{var e;if(v.value)return n.searchEmpty?null==(e=n.searchEmpty)?void 0:e.call(n):t.createVNode(Bi,{class:Vh("search-empty"),image:"no-search-result"},{description:()=>t.createVNode("span",null,[t.createTextVNode("暂无搜索结果")])})};return()=>t.createVNode("div",{ref:c,class:Vh(),onTouchstartPassive:w,onTouchend:b,onTouchcancel:b},[t.createVNode("ul",{ref:u,style:{transform:`translate3d(0, ${d.value+0}px, 0)`,transitionDuration:`${f.value}ms`,transitionProperty:f.value?"all":"none"},class:Vh("wrapper"),onTransitionend:y},[t.createVNode(dh,{modelValue:e.value},{default:()=>[L()]})]),x()])}});const[Sh]=Se("picker-toolbar"),Th={cancelButtonText:String,confirmButtonText:String},Oh=["cancel","confirm","title","toolbar"],Mh=Object.keys(Th);var Ph=t.defineComponent({name:Sh,props:Th,emits:["confirm","cancel"],setup(e,{emit:o,slots:n}){const a=()=>o("cancel"),r=()=>o("confirm"),i=()=>{const o=e.cancelButtonText||wh("cancel");return t.createVNode(po,{type:"default",hairline:!0,class:yh("cancel"),onClick:a},{default:()=>[n.cancel?n.cancel():o]})},l=()=>{const o=e.confirmButtonText||wh("confirm");return t.createVNode(po,{type:"primary",class:[yh("confirm"),De],onClick:r},{default:()=>[n.confirm?n.confirm():o]})};return()=>t.createVNode("div",{class:yh("toolbar")},[n.toolbar?n.toolbar():[i(),l()]])}});function Ih(e){return"function"==typeof e?e():t.unref(e)}function Bh(e,t=200,o={}){return function(e,t){return function(...o){return new Promise(((n,a)=>{Promise.resolve(e((()=>t.apply(this,o)),{fn:t,thisArg:this,args:o})).then(n).catch(a)}))}}(function(e,t={}){let o,n,a=u;const r=e=>{clearTimeout(e),a(),a=u};return i=>{const l=Ih(e),s=Ih(t.maxWait);return o&&r(o),l<=0||void 0!==s&&s<=0?(n&&(r(n),n=null),Promise.resolve(i())):new Promise(((e,c)=>{a=t.rejectOnCancel?c:e,s&&!n&&(n=setTimeout((()=>{o&&r(o),n=null,e(i())}),s)),o=setTimeout((()=>{n&&r(n),n=null,e(i())}),l)}))}}(t,o),e)}const Dh=d({loading:Boolean,readonly:Boolean,allowHtml:Boolean,showToolbar:w,showTitle:w,swipeDuration:C(1e3),title:N("请选择")},Th),Eh=d({},Dh,{columns:L(),modelValue:L(),columnsFieldNames:Object,wrapHeight:C("40vh"),showPicker:Boolean,popup:w,searchable:Boolean,autoSearch:w,searchPlaceholder:N("请搜索")});const zh=je(t.defineComponent({name:gh,props:Eh,emits:["confirm","cancel","change","clickOption","update:modelValue","update:showPicker"],setup(e,{emit:n,slots:a}){const r=t.ref(),i=t.ref(e.modelValue.slice(0)),l=t.ref(e.showPicker),{children:s,linkChildren:c}=D(kh),u=t.ref(""),f=t.ref("");c();const p=t.computed((()=>function(e){return d({text:"text",value:"value",children:"children"},e)}(e.columnsFieldNames))),m=t.computed((()=>{const t=ue(e.wrapHeight);let o=t;return e.showTitle?e.searchable&&(o=t-60):(o=t+44,e.searchable&&(o-=60)),o})),g=t.computed((()=>function(e,t){const o=e[0];if(o){if(Array.isArray(o))return"multiple";if(t.children in o)return"cascade"}return"default"}(e.columns,p.value))),y=t.computed((()=>{const{columns:t}=e;switch(g.value){case"multiple":return t;case"cascade":return function(e,t,n){const a=[];let r={[t.children]:e},i=0;for(;r&&r[t.children];){const e=r[t.children],l=n.value[i];r=o(l)?Ch(e,l,t):void 0,!r&&e.length&&(r=Ch(e,bh(e)[t.value],t)),i++,a.push(e)}return a}(t,p.value,i);default:return[t]}})),w=t.computed((()=>y.value.some((e=>e.length)))),b=t.computed((()=>y.value.map(((e,t)=>Ch(e,i.value[t],p.value)))));t.watch(l,(t=>{t!==e.showPicker&&n("update:showPicker",t)})),t.watch((()=>e.showPicker),(e=>{e!==l.value&&(l.value=e)}));const L=(e,t)=>{if(i.value[e]!==t){const o=i.value.slice(0);o[e]=t,i.value=o}},x=()=>({selectedValues:i.value.slice(0),selectedOptions:b.value}),C=()=>{s.forEach((e=>e.stopMomentum()));const e=x();return n("confirm",e),e},N=()=>{n("update:showPicker",!1),n("cancel",x())},V=e=>n("update:showPicker",e),k=()=>y.value.map(((o,r)=>t.createVNode(Ah,{value:i.value[r],fields:p.value,options:o,readonly:e.readonly,allowHtml:e.allowHtml,wrapHeight:m.value,swipeDuration:e.swipeDuration,autoSearchVal:f.value,onChange:e=>((e,o)=>{L(o,e),"cascade"===g.value&&i.value.forEach(((e,t)=>{const o=y.value[t];xh(o,e,p.value)||L(t,o.length?o[0][p.value.value]:void 0)})),t.nextTick((()=>{n("change",d({columnIndex:o},x()))}))})(e,r),onClickOption:e=>((e,t)=>n("clickOption",d({columnIndex:t,currentOption:e},x())))(e,r)},{option:a.option,searchEmpty:a["search-empty"]}))),A=e=>{if(w.value){const o={backgroundSize:`100% ${(e-m.value)/2}px`};return[t.createVNode("div",{class:yh("mask"),style:o},null)]}},S=()=>{e.autoSearch||(f.value=u.value)},T=()=>{if(e.searchable)return t.createVNode("div",{class:yh("search")},[t.createVNode(li,{"show-action":!e.autoSearch,modelValue:u.value,placeholder:e.searchPlaceholder,"onUpdate:modelValue":e.autoSearch?Bh((e=>{u.value=e,f.value=u.value}),500):e=>{u.value=e},onSearch:S,onClear:S},null)])},O=()=>{const e={height:`${m.value}px`};return t.createVNode("div",{ref:r,class:yh("columns"),style:e},[k(),A(m.value)])},M=()=>{if(e.showToolbar)return t.createVNode(Ph,t.mergeProps(h(e,Mh),{onConfirm:C,onCancel:N}),h(a,Oh))},P=()=>{if(e.showTitle)return a.title?a.title():t.createVNode("div",{class:[yh("title"),De]},[e.title])};let I;t.watch(y,(e=>{e.forEach(((e,t)=>{e.length&&!xh(e,i.value[t],p.value)&&L(t,bh(e)[p.value.value])}))}),{immediate:!0}),t.watch((()=>e.modelValue),(e=>{v(e,i.value)||v(e,I)||(i.value=e.slice(0),I=e.slice(0))}),{deep:!0}),t.watch(i,(t=>{v(t,e.modelValue)||(I=t.slice(0),n("update:modelValue",I))}),{immediate:!0}),z("touchmove",ee,{target:r});ct({confirm:C,getSelectedOptions:()=>b.value});const B=()=>{var o,n;return t.createVNode("div",{class:yh()},[P(),e.loading?t.createVNode(Pt,{class:yh("loading")},null):null,e.showTitle?t.createVNode(Un,{style:"margin: 0"},null):null,T(),null==(o=a["columns-top"])?void 0:o.call(a),O(),null==(n=a["columns-bottom"])?void 0:n.call(a),e.showToolbar?t.createVNode(Un,{style:"margin: 0"},null):null,M()])};return()=>e.popup?t.createVNode(kt,{show:l.value,"onUpdate:show":[e=>l.value=e,V],round:!0,position:"bottom"},{default:B}):B()}})),[_h,jh]=Se("rate");const Fh={size:y,icon:N("star"),color:String,count:C(5),gutter:y,readonly:Boolean,disabled:Boolean,voidIcon:N("star"),allowHalf:Boolean,voidColor:String,touchable:w,iconPrefix:String,modelValue:x(0),disabledColor:String};const Rh=je(t.defineComponent({name:_h,props:Fh,emits:["change","update:modelValue"],setup(e,{emit:o}){const n=ut(),[a,r]=So(),i=t.ref(),l=()=>e.readonly||e.disabled||!e.touchable,s=t.computed((()=>Array(+e.count).fill("").map(((t,o)=>function(e,t,o,n){if(e>=t)return{status:"full",value:1};if(e+.5>=t&&o&&!n)return{status:"half",value:.5};if(e+1>=t&&o&&n){const o=10**10;return{status:"half",value:Math.round((e-t+1)*o)/o}}return{status:"void",value:0}}(e.modelValue,o+1,e.allowHalf,e.readonly)))));let c,u,d=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER;const p=()=>{u=P(i);const t=a.value.map(P);c=[],t.forEach(((t,o)=>{d=Math.min(t.top,d),f=Math.max(t.top,f),e.allowHalf?c.push({score:o+.5,left:t.left,top:t.top,height:t.height},{score:o+1,left:t.left+t.width/2,top:t.top,height:t.height}):c.push({score:o+1,left:t.left,top:t.top,height:t.height})}))},h=(t,o)=>{for(let e=c.length-1;e>0;e--)if(o>=u.top&&o<=u.bottom){if(t>c[e].left&&o>=c[e].top&&o<=c[e].top+c[e].height)return c[e].score}else{const n=o<u.top?d:f;if(t>c[e].left&&c[e].top===n)return c[e].score}return e.allowHalf?.5:1},v=t=>{e.disabled||e.readonly||t===e.modelValue||(o("update:modelValue",t),o("change",t))},m=e=>{l()||(n.start(e),p())},g=e=>{if(!l()&&(n.move(e),n.isHorizontal())){const{clientX:t,clientY:o}=e.touches[0];ee(e),v(h(t,o))}},y=(o,n)=>{const{icon:a,size:i,color:l,count:s,gutter:c,voidIcon:u,disabled:d,voidColor:f,allowHalf:m,iconPrefix:g,disabledColor:y}=e,w=n+1,b="full"===o.status,L="void"===o.status,x=m&&o.value>0&&o.value<1;let C;c&&w!==+s&&(C={paddingRight:re(c)});return t.createVNode("div",{key:n,ref:r(n),role:"radio",style:C,class:jh("item"),tabindex:d?void 0:0,"aria-setsize":s,"aria-posinset":w,"aria-checked":!L,onClick:e=>{p(),v(m?h(e.clientX,e.clientY):w)}},[t.createVNode(rt,{size:i,name:b?a:u,class:jh("icon",{disabled:d,full:b}),color:d?y:b?l:f,classPrefix:g},null),x&&t.createVNode(rt,{size:i,style:{width:o.value+"em"},name:L?u:a,class:jh("icon",["half",{disabled:d,full:!L}]),color:d?y:L?f:l,classPrefix:g},null)])};return Z((()=>e.modelValue)),()=>t.createVNode("div",{ref:i,role:"radiogroup",class:jh({readonly:e.readonly,disabled:e.disabled}),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,"aria-readonly":e.readonly,onTouchstartPassive:m,onTouchmove:g},[s.value.map(y)])}})),Hh=je(Aa),$h=(e,t,o)=>{const n={width:"",height:"",transform:"",transformOrigin:""},{clientWidth:a}=document.documentElement,r=e,{clientHeight:i}=document.documentElement,l=a-r,s=i-t,c=Math.max(l,s),u=Math.min(l,s);return null==window.orientation||180===window.orientation||0===window.orientation?l<s?o?(console.debug("竖屏打开,强制横屏"),n.transform="rotate(90deg)",n.width=`${c}px`,n.height=`${u}px`,n.transformOrigin=u/2+"px center"):(console.debug("竖屏打开,保持竖屏"),n.transform="rotate(0deg)",n.width=`${u}px`,n.height=`${c}px`):o?(console.debug("横屏旋转到强制横屏"),n.transform="rotate(90deg)",n.width=`${c}px`,n.height=`${u}px`,n.transformOrigin=u/2+"px center"):(console.debug("横屏旋转到竖屏"),n.transform="rotate(0deg)",n.width=`${u}px`,n.height=`${c}px`):(l>s?console.debug("横屏打开"):console.debug("竖屏旋转到横屏"),n.transform="rotate(0deg)",n.width=`${c}px`,n.height=`${u}px`),n},[Uh,Zh]=Se("signature"),Wh="#FFF",Yh="#000",qh=oe(Zh("stroke"),Yh),Gh=oe(Zh("canvas"),Wh),Xh={customClass:N(""),lineWidth:C(2),strokeStyle:N(qh),backgroundStyle:N(Gh),imageType:N("png"),resultTypes:L(["file","dataUrl"]),unSupportTpl:N("对不起,当前浏览器不支持Canvas,无法使用签名组件"),allowPortrait:Boolean};const Kh=je(t.defineComponent({name:Uh,props:Xh,emits:["clear","cancel","confirm"],setup(e,{emit:o}){const n=t.ref(),a=t.ref(),r=t.ref(0),i=t.ref(0),l=t.ref(),s=t.ref("ontouchstart"in window?["touchstart","touchmove","touchend","touchleave"]:["mousedown","mousemove","mouseup","mouseleave"]),c=t.ref(!0),u=t.ref(!1),d=t.ref("ontouchstart"in window),f=t.computed((()=>{const e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))})),p=()=>{var t,o;if(!n.value)return void console.error("container is empty");const a=$h((null==(t=n.value)?void 0:t.offsetLeft)||0,(null==(o=n.value)?void 0:o.offsetTop)||0,!e.allowPortrait);n.value.style.transform=a.transform,n.value.style.width=a.width,n.value.style.height=a.height,n.value.style.transformOrigin=a.transformOrigin,r.value=si(a.width),i.value=si(a.height)},h=()=>{var t,o,n,r;if("jpg"===e.imageType){let n=e.backgroundStyle;"transparent"===n&&(n="#fff"),l.value&&(l.value.fillStyle=n,l.value.fillRect(0,0,(null==(t=a.value)?void 0:t.width)||0,(null==(o=a.value)?void 0:o.height)||0))}else{const t=e.backgroundStyle;"transparent"!==t&&l.value&&(l.value.fillStyle=t,l.value.fillRect(0,0,(null==(n=a.value)?void 0:n.width)||0,(null==(r=a.value)?void 0:r.height)||0))}},v=t=>{var o,n;t.preventDefault(),u.value=!0,c.value=!1;const r=d.value?t.touches[0]:t;if(a.value){const t=((e,t,o)=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,r=e.clientY-n.top;if(o&&(null==window.orientation||180===window.orientation||0===window.orientation)){const{clientWidth:e}=document.documentElement;return{x:r,y:e-0-a}}return{x:a,y:r}})(r,a.value,!e.allowPortrait);null==(o=l.value)||o.lineTo(t.x,t.y),null==(n=l.value)||n.stroke()}},m=e=>{var t,o;e.preventDefault(),null==(t=a.value)||t.removeEventListener(s.value[1],v,!1),null==(o=a.value)||o.removeEventListener(s.value[2],m,!1)},g=e=>{var t,o;e.preventDefault(),null==(t=a.value)||t.removeEventListener(s.value[1],v,!1),null==(o=a.value)||o.removeEventListener(s.value[2],m,!1)},y=t=>{var o,n,r;t.preventDefault(),l.value&&(l.value.beginPath(),l.value.lineWidth=+e.lineWidth,l.value.strokeStyle=e.strokeStyle),null==(o=a.value)||o.addEventListener(s.value[1],v,!1),null==(n=a.value)||n.addEventListener(s.value[2],m,!1),null==(r=a.value)||r.addEventListener(s.value[3],g,!1)},w=(e=!1)=>{var t,n,r,i,d;null==(t=a.value)||t.addEventListener(s.value[2],m,!1),null==(i=l.value)||i.clearRect(0,0,(null==(n=a.value)?void 0:n.width)||0,(null==(r=a.value)?void 0:r.height)||0),null==(d=l.value)||d.closePath(),h(),u.value=!1,c.value=!0,e||o("clear")},b=()=>{var t;a.value&&(t=a.value,Promise.all(e.resultTypes.map((o=>{if("dataUrl"===o.trim()){let o;return o="png"===e.imageType?t.toDataURL("image/png"):t.toDataURL("image/jpeg",.8),Promise.resolve(o)}if("file"===o.trim()){const o=(new Date).getTime();return"png"===e.imageType?ns(t,o+".png",o,"image/png"):ns(t,o+".jpg",o)}return Promise.resolve(null)}))).then((e=>{w(!0),o("confirm",e)})))},L=()=>{w(!0),o("cancel")},x=()=>{var e;f.value&&(l.value=null==(e=a.value)?void 0:e.getContext("2d"),p(),(()=>{var e;null==(e=a.value)||e.addEventListener(s.value[0],y,!1),f.value&&window.addEventListener("resize",(()=>{setTimeout((()=>{p(),c.value||(Uo("旋转屏幕或者改变屏幕大小触发重新绘制"),w(!0))}),100)}))})(),setTimeout((()=>{h()}),50))};return()=>t.createVNode(t.Transition,{appear:!0,onAfterEnter:x},{default:()=>[t.createVNode("div",{class:[Zh(""),e.customClass?e.customClass:""],ref:n},[t.withDirectives(t.createVNode("label",{class:Zh("placeholder")},[f.value?"请在此签名":e.unSupportTpl]),[[t.vShow,!u.value]]),t.createVNode("div",{class:Zh("canvasWrapper"),ref:"canvasWrapper"},[t.withDirectives(t.createVNode("canvas",{class:Zh("canvas"),ref:a,width:r.value,height:i.value},null),[[t.vShow,f.value]])]),t.createVNode("div",{class:Zh("actions")},[t.createVNode(ho,{plain:!0,type:"warning",onClick:()=>w(),class:Zh("button-again")},{default:()=>[t.createTextVNode("重签")]}),t.createVNode(ho,{type:"default",onClick:L,class:Zh("button-cancel")},{default:()=>[t.createTextVNode("取消")]}),t.createVNode(ho,{block:!0,type:"primary",disabled:c.value,onClick:b,class:Zh("button-complete")},{default:()=>[t.createTextVNode("完成")]})])])]})}})),[Qh,Jh]=Se("skeleton"),ev="100%",tv={row:C(0),title:Boolean,round:Boolean,avatar:Boolean,field:Boolean,textarea:Boolean,loading:w,animate:w,avatarSize:y,titleWidth:y,avatarShape:N("round"),rowWidth:{type:[Number,String,Array],default:ev}};const ov=je(t.defineComponent({name:Qh,inheritAttrs:!1,props:tv,setup(e,{slots:o,attrs:n}){const a=()=>{if(e.avatar)return t.createVNode("div",{class:Jh("avatar",e.avatarShape),style:ie(e.avatarSize)},null)},r=()=>{if(e.title&&!e.field)return t.createVNode("h3",{class:Jh("title"),style:{width:re(e.titleWidth)}},null)};function i(){const o=[],{rowWidth:n}=e;function a(t){return n===ev&&t===+e.row-1?"60%":Array.isArray(n)?n[t]:n}for(let r=0;r<+e.row;r++)e.field?o.push(t.createVNode("div",{class:Jh("field")},[t.createVNode("span",{class:Jh("field-title"),style:{width:re(e.titleWidth)}},null),t.createVNode("span",{class:Jh("field-value"),style:{width:re(a(r))}},null)])):e.textarea?o.push(t.createVNode("div",{class:Jh("textarea"),style:{width:re(a(r))}},null)):o.push(t.createVNode("div",{class:Jh("row"),style:{width:re(a(r))}},null));return o}return()=>{var l;return e.loading?t.createVNode("div",t.mergeProps({class:Jh({animate:e.animate,round:e.round})},n),[a(),t.createVNode("div",{class:Jh("content")},[r(),i()])]):null==(l=o.default)?void 0:l.call(o)}}}));function nv(e,o=""){const n=t.ref([]),a=t.ref();return navigator.mediaDevices||(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia||(navigator.mediaDevices.getUserMedia=function(e){const t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise(((o,n)=>t.call(navigator,e,o,n))):(qo("浏览器不支持getUserMedia"),Promise.reject(new Error("您的浏览器暂不支持 getUserMedia !")))}),{startRecording:function(){return t=this,r=null,i=function*(){const t=yield navigator.mediaDevices.getUserMedia({audio:!0});a.value=new MediaRecorder(t),n.value=[],a.value.ondataavailable=t=>{if(t.data&&t.data.size>0){if(n.value.push(t.data),"raw"===o)return void e("change",n.value);!function(t){const o=new FileReader;o.onloadend=()=>{var t;const n=null==(t=o.result)?void 0:t.split(",")[1];e("change",n)},o.readAsDataURL(t)}(new Blob(n.value,{type:"audio/wav"}))}},a.value.start()},new Promise(((e,o)=>{var n=e=>{try{l(i.next(e))}catch(t){o(t)}},a=e=>{try{l(i.throw(e))}catch(t){o(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);l((i=i.apply(t,r)).next())}));var t,r,i},stopRecording:function(){var e,t;null==(e=a.value)||e.stop(),null==(t=a.value)||t.stream.getTracks().forEach((e=>e.stop())),a.value=void 0},recordedBlobs:n}}const[av,rv]=Se("speech-recognizer"),iv={title:String,value:String,type:String,show:Boolean,closeOnPopstate:w,closeOnClickOverlay:w};const lv=je(t.defineComponent({name:av,props:iv,emits:["change","confirm","close","update:show","update:value","onTouchstart","onTouchend"],setup(e,{emit:o,slots:n}){const a=t.ref(e.show),r=t.ref(!1),{startRecording:i,stopRecording:l}=nv(o,e.type),s=t.computed({get:()=>e.value,set:e=>{o("update:value",e)}});t.watch(a,(t=>{t!==e.show&&o("update:show",t)})),t.watch((()=>e.show),(e=>{e!==a.value&&(a.value=e)}));const c=e=>o("update:show",e),u=()=>{a.value=!1,o("close")},d=()=>{o("update:value","")},f=()=>{a.value=!1,o("confirm")},p=e=>{e.preventDefault()},h=()=>{o("onTouchstart"),r.value=!0,i()},v=()=>{r.value=!1,l(),o("onTouchend")},m=()=>{const o=e.value?e.value:"请说话";return t.createVNode("div",{class:rv("text")},[o,t.createVNode("div",{class:rv("loading")},[t.createVNode("div",null,null),t.createVNode("div",null,null),t.createVNode("div",null,null)])])},g=e=>{s.value=e},y=()=>t.createVNode("div",{class:rv()},[n.title?n.title():t.createVNode("div",{class:[rv("header"),"zt-hairline--bottom"]},[t.createVNode("div",{class:["zt-ellipsis",rv("title")]},[e.title?e.title:"语音输入"]),t.createVNode("div",{class:rv("close"),onClick:u},[t.createVNode(it,{name:"clear",size:"24"},null)])]),t.createTextVNode(" "),t.createVNode("div",{class:rv("body")},[r.value?m():e.value?t.createVNode("div",{class:rv("text")},[t.createVNode(oi,{modelValue:s.value,type:"textarea",rows:"12",label:"",placeholder:"","onUpdate:modelValue":g},null)]):t.createVNode("div",{class:rv("empty")},[t.createVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 164 164",class:"design-iconfont"},[t.createVNode("g",{"fill-rule":"nonzero",fill:"none"},[t.createVNode("path",{fill:"#F5F7FA",d:"M19.8391025 68.2073963L19.8593465 77.2801141 19.9200784 77.745901 20.0820303 78.049675 20.2844701 78.2319394 24.3737545 80.6013769 24.1713147 80.4191124 24.0296068 80.1153384 23.9486309 79.6698032 23.9283869 70.5970854z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{d:"M7.30807756,78.4952102 L1.53854264,75.1536959 L1.133663,74.8499218 L0.789515304,74.4651414 L0.485855572,73.9791029 L0.28341575,73.4323097 L0.161951857,72.7842584 L0.101219911,72.0349491 L5.87075483,75.3764635 L5.93148677,76.1460244 L6.05295067,76.773824 L6.27563447,77.3206173 L6.55905022,77.8269074 L6.90319792,78.2116878 L7.30807756,78.4952102 Z M5.87075483,75.3764635 L0.101219911,72.0349491 L0,34.873259 L5.76953492,38.2147734 L5.87075483,75.3764635 Z",fill:"#DDE1EB",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#F5F7FA",d:"M58.7075483 3.66554L58.2419367 3.46302398 57.7358371 3.34151437 57.1487616 3.34151437 56.5616862 3.44277238 55.9341227 3.66554 55.2255833 4.00981724 10.6685786 29.7698553 4.8787997 26.4283409 49.4560484 0.668302874 50.1645878 0.324025636 50.7921512 0.101258011 51.3792267 0 51.9460582 0 52.4521578 0.121509613 52.9177694 0.324025636z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#DDE1EB",d:"M5.76953492 38.2147734L0 34.873259 0.161951857 33.2936341 0.384635661 32.4633184 1.01219911 30.8634418 1.41707875 30.0736293 1.90293432 29.3040684 2.97586538 27.9472111 3.58318484 27.3599146 4.8787997 26.4080893 10.6483346 29.7698553 9.37296374 30.701429 8.74540029 31.308977 7.67246924 32.6658344 7.20685765 33.4151437 6.78173402 34.2049562 6.15417058 35.8048327 5.81002288 37.4452125z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{fill:"#E9ECF2",d:"M55.2255833 4.00981724L55.9543667 3.66554 56.6021741 3.44277238 57.1892496 3.34151437 57.7155931 3.36176597 58.2419367 3.46302398 58.7075483 3.66554 59.1124279 3.96931404 59.4565756 4.37434608 59.7399914 4.84013293 59.9424312 5.38692619 60.0638951 6.03497746 60.124627 6.82478995 60.2258469 43.98648 60.0638951 45.5458534 59.5780395 47.1862332 58.8290122 48.7658582 57.857301 50.2239735 56.6629061 51.4795729 56.0353426 51.9858629 55.3672912 52.4313982 37.8764906 62.5369477 26.2362009 79.730558 25.5479055 80.4191124 25.2240018 80.6013769 24.8798541 80.7026349 24.5964383 80.6823833 24.3332666 80.5811253 24.1510707 80.3988608 24.0093628 80.0950868 23.9486309 79.6698032 23.9283869 70.5970854 10.7900425 78.1711846 10.0815031 78.5357134 9.43369569 78.7382295 8.86686419 78.8394875 8.32027667 78.8192359 7.79393313 78.7179779 7.32832154 78.5154618 6.9234419 78.2116878 6.55905022 77.8066558 6.27563447 77.3611205 6.07319465 76.8143273 5.93148677 76.166276 5.87075483 75.3764635 5.76953492 38.2147734 5.93148677 36.6554 6.43758633 34.9947687 7.20685765 33.4151437 8.19881277 31.9570283 9.37296374 30.701429 10.6483346 29.7698553z",transform:"translate(2 33.6838)"},null),t.createVNode("path",{d:"M48.6462891,27.0156374 L48.5450692,27.1979018 L48.5248252,27.5826822 L48.5450692,37.1616901 L48.5855572,37.3642061 L48.767753,37.4857157 L48.9904368,37.4249609 L49.2131206,37.2426965 L49.3750725,36.9794257 L49.4560484,36.6351484 L49.4155605,26.9548826 L49.3750725,26.7321149 L49.2738526,26.6511085 L49.1321447,26.6308569 L48.808241,26.8131214 L48.6462891,27.0156374 Z M46.540915,27.4004178 L46.4599391,27.6029338 L46.4194511,28.0079659 L46.4396951,38.9033279 L46.480183,39.1058439 L46.6826229,39.2273535 L46.8850627,39.1665987 L47.1279905,38.9640827 L47.2899423,38.7008119 L47.3709183,38.3767862 L47.3304303,27.3194114 L47.2899423,27.137147 L47.1887224,27.035889 L47.0470145,26.9953858 L46.7231108,27.1573986 L46.540915,27.4004178 Z M36.0545322,21.7299692 L35.9735563,21.8312272 L35.9330683,22.195756 L35.9128244,23.2893426 L36.0140443,57.0487635 L36.1355082,57.3525375 L36.4594119,57.3120343 L36.7023397,57.1095183 L36.8642915,56.8462475 L36.9250235,56.5222218 L36.8238035,21.6489628 L36.7833156,21.4464468 L36.6820957,21.3451887 L36.5606318,21.3249371 L36.2164841,21.5072016 L36.0545322,21.7299692 Z M52.7558175,26.2258249 L52.6545976,26.4688441 L52.6343536,26.8941278 L52.6545976,32.9088536 L52.6950856,33.1113696 L52.8975254,33.2328793 L53.0999652,33.1721245 L53.322649,32.98986 L53.5048448,32.7063376 L53.5655768,32.382312 L53.5453328,26.1448185 L53.5048448,25.9423025 L53.4238689,25.8410444 L53.282161,25.8207928 L52.9582573,25.9828057 L52.7558175,26.2258249 Z M40.1438166,30.0533777 L40.1843046,44.2497509 L40.3057685,44.5535249 L40.6296722,44.5130217 L40.852356,44.3307573 L41.0143079,44.0674864 L41.0952838,43.7232092 L41.0547958,29.526836 L40.9333319,29.223062 L40.6094282,29.2635652 L40.3665004,29.4458296 L40.2045486,29.7091005 L40.1438166,30.0533777 Z M38.1801504,33.2126277 L38.0789304,33.4151437 L38.0384425,33.7999241 L38.0789304,43.1359127 L38.1194184,43.3384288 L38.3218582,43.4599384 L38.5242981,43.3991836 L38.7469819,43.1966676 L38.9291777,42.9333967 L38.9899096,42.6093711 L38.9696657,33.1316212 L38.9291777,32.9291052 L38.8279578,32.8480988 L38.6862499,32.8278472 L38.3421022,33.0101116 L38.1801504,33.2126277 Z M29.8396297,24.8487159 L29.7586538,24.9702255 L29.7181658,25.3347544 L29.6979218,26.4283409 L29.8193857,60.1877618 L29.8598737,60.3902778 L30.0420695,60.5117875 L30.2445093,60.4510327 L30.4874371,60.2485166 L30.649389,59.9852458 L30.7101209,59.6612202 L30.629145,24.7879611 L30.5684131,24.5651935 L30.4874371,24.4841871 L30.3457293,24.4639355 L30.0015816,24.6461999 L29.8396297,24.8487159 Z M44.3343209,29.9723713 L44.3545649,39.6526372 L44.4760288,39.9564112 L44.7999325,39.915908 L45.0226163,39.7336436 L45.2048122,39.4703727 L45.2655441,39.1260955 L45.2453001,29.4458296 L45.1238362,29.1420556 L44.7999325,29.1623072 L44.5570047,29.3648232 L44.3950529,29.6280941 L44.3343209,29.9723713 Z M34.00989,18.9757513 L33.9086701,19.3605317 L33.8884261,22.1755044 L34.00989,62.0509092 L34.050378,62.2534253 L34.2528178,62.3749349 L34.4552576,62.3141801 L34.6779414,62.1319156 L34.8398933,61.8483932 L34.9208692,61.5243676 L34.7994053,18.9149965 L34.7589174,18.6922289 L34.6576975,18.6112224 L34.5159896,18.5909708 L34.1718419,18.7732353 L34.00989,18.9757513 Z M50.6706873,26.6713601 L50.5694674,26.9143794 L50.5289795,27.4206694 L50.5492235,35.0960267 L50.5897114,35.2985427 L50.7921512,35.4200523 L51.014835,35.3592975 L51.2375188,35.1770331 L51.3994707,34.9137622 L51.4804466,34.569485 L51.4602027,26.5903537 L51.3994707,26.3878377 L51.3184948,26.3068313 L51.1767869,26.2865797 L50.8326392,26.4688441 L50.6706873,26.6713601 Z M42.3504107,27.339663 L42.2694348,27.5219274 L42.2289468,27.8459531 L42.2087028,28.6965204 L42.2694348,43.6422028 L42.3099227,43.8447188 L42.4111426,43.9459768 L42.5326065,43.9662284 L42.7148024,43.9054736 L43.0387061,43.5611964 L43.1804139,43.1156611 L43.139926,27.2586566 L43.099438,27.0561406 L42.9982181,26.9751342 L42.8565102,26.934631 L42.5326065,27.0966438 L42.3504107,27.339663 Z M31.9247599,25.5170188 L31.8640279,25.65878 L31.82354,26.0030573 L31.803296,27.0156374 L31.9045159,58.0613436 L31.9450038,58.2638596 L32.0259798,58.3651176 L32.1676877,58.3853692 L32.5320793,58.1828532 L32.7750071,57.7778212 L32.8154951,57.5348019 L32.7142752,25.4360124 L32.6737872,25.253748 L32.5928113,25.15249 L32.4511034,25.1322384 L32.1271997,25.2942512 L31.9247599,25.5170188 Z M56.9463218,25.760038 L56.8451019,26.0435605 L56.8248579,26.4485925 L56.8248579,28.5345075 L56.8653459,28.7370236 L57.0677857,28.8585332 L57.2702255,28.7977784 L57.5131533,28.6155139 L57.6751052,28.3522431 L57.7560811,28.0079659 L57.7358371,25.6790316 L57.6953492,25.4765156 L57.5941292,25.3752576 L57.4524214,25.355006 L57.1487616,25.5170188 L56.9463218,25.760038 Z M54.8611917,26.5093473 L54.7599717,26.8131214 L54.7194838,27.3801662 L54.7397278,31.0254546 L54.8611917,31.3292286 L55.1850954,31.2887254 L55.4280232,31.106461 L55.589975,30.8229386 L55.650707,30.498913 L55.650707,26.4485925 L55.589975,26.2258249 L55.4887551,26.1245669 L55.3470472,26.1043153 L55.0231435,26.3068313 L54.8611917,26.5093473 Z M25.6896134,35.9870972 L25.6086374,36.14911 L25.5479055,36.4933872 L25.5479055,37.4452125 L25.6086374,54.780584 L25.7301013,55.0843581 L26.054005,55.0438549 L26.2766888,54.8615904 L26.4386407,54.5983196 L26.5196166,54.2540424 L26.4588847,35.9060908 L26.4183967,35.7238263 L26.3374208,35.6225683 L26.1957129,35.5820651 L25.8718092,35.7440779 L25.6896134,35.9870972 Z M27.7544995,27.9472111 L27.6735236,28.0687207 L27.6330356,28.4332495 L27.6127917,29.4458296 L27.7140116,60.4915359 L27.7544995,60.6940519 L27.9569394,60.8155615 L28.1593792,60.7548067 L28.382063,60.5725423 L28.5642588,60.2890198 L28.6249908,59.9649942 L28.5440148,27.8662047 L28.4832829,27.6636886 L28.402307,27.5624306 L28.2605991,27.542179 L27.9366954,27.7041918 L27.7544995,27.9472111 Z M19.4342229,47.044472 L19.312759,47.348246 L19.292515,47.8950393 L19.292515,51.5605793 L19.4139789,51.8643533 L19.7581266,51.8238501 L19.9808104,51.6415857 L20.1427622,51.3783149 L20.2237382,51.0340376 L20.2034942,46.9837172 L20.1630062,46.7812011 L20.0617863,46.6799431 L19.9200784,46.6596915 L19.5961747,46.841956 L19.4342229,47.044472 Z M11.1341902,52.9174366 L11.0127263,53.1807075 L10.9924823,53.5654879 L11.0329703,55.8944222 L11.2354101,56.0159318 L11.4378499,55.955177 L11.6807777,55.7729125 L11.8427296,55.4893901 L11.9034615,55.1653645 L11.9034615,52.8364302 L11.8629735,52.6339142 L11.7617536,52.5326562 L11.4783379,52.5529078 L11.1341902,52.9174366 Z M23.5842392,40.8879849 L23.5032633,41.0905009 L23.4627753,41.4752814 L23.5032633,52.2288821 L23.5437513,52.4313982 L23.6247272,52.5326562 L23.7259471,52.5529078 L23.9486309,52.492153 L24.1713147,52.3098886 L24.3535105,52.0263661 L24.4142425,51.7023405 L24.3737545,40.8069785 L24.3332666,40.6044625 L24.2522906,40.5234561 L24.1105828,40.4829529 L23.786679,40.6449657 L23.5842392,40.8879849 Z M15.3044505,48.6038453 L15.2032306,48.8671162 L15.1627426,49.2923998 L15.1829866,54.6995776 L15.3044505,55.0033517 L15.6283542,54.9628484 L15.871282,54.780584 L16.0332339,54.4970616 L16.0939658,54.173036 L16.0737218,48.5430905 L16.0332339,48.3405745 L15.9522579,48.2393165 L15.8105501,48.2190649 L15.4866464,48.3810777 L15.3044505,48.6038453 Z M17.3895807,47.4697556 L17.2883608,47.7127749 L17.2478728,48.1178069 L17.2681168,53.1807075 L17.3086047,53.3832235 L17.5110446,53.5249847 L17.7337284,53.4642299 L17.9564122,53.2617139 L18.118364,52.998443 L18.19934,52.6541658 L18.179096,47.3887492 L18.138608,47.2064848 L18.0373881,47.1052268 L17.9159242,47.0647236 L17.5920205,47.246988 L17.3895807,47.4697556 Z M21.519353,44.8775505 L21.4181331,45.0800666 L21.3776452,45.4850986 L21.3978891,51.5605793 L21.4383771,51.7630953 L21.6408169,51.8846049 L21.8432568,51.8238501 L22.0861845,51.6415857 L22.2481364,51.3783149 L22.3088683,51.0340376 L22.2886244,44.7965441 L22.2481364,44.5940281 L22.1469165,44.4927701 L22.0052086,44.4725185 L21.6813049,44.6547829 L21.519353,44.8775505 Z M13.1990764,49.8999479 L13.0978565,50.1429671 L13.0776125,50.5277476 L13.0978565,55.6108997 L13.2193204,55.8944222 L13.5432241,55.8741705 L13.7659079,55.6919061 L13.9481037,55.4083837 L14.0088357,55.0641065 L13.9885917,49.8189415 L13.9481037,49.6164255 L13.8671278,49.5151674 L13.7254199,49.4949158 L13.4015162,49.6569287 L13.1990764,49.8999479 Z",fill:"#FFF",transform:"translate(2 33.6838)"},null),t.createVNode("g",null,[t.createVNode("path",{fill:"#F5F7FA",d:"M29.510665 101.420326L29.5407779 114.910916 29.6311167 115.603513 29.8720201 116.055207 30.1731493 116.326223 36.2559598 119.849435 35.9548306 119.578419 35.7440402 119.126725 35.6235885 118.464241 35.5934755 104.973651z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{d:"M10.8707654,116.717691 L2.28858218,111.749059 L1.68632371,111.297365 L1.17440402,110.72522 L0.722710163,110.002509 L0.421580928,109.18946 L0.240903388,108.225847 L0.150564617,107.111669 L8.7327478,112.080301 L8.82308657,113.224592 L9.00376412,114.158093 L9.33500627,114.971142 L9.7565872,115.723965 L10.2685069,116.29611 L10.8707654,116.717691 Z M8.7327478,112.080301 L0.150564617,107.111669 L0,51.8544542 L8.58218319,56.8230866 L8.7327478,112.080301 Z",fill:"#DDE1EB",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#F5F7FA",d:"M87.327478 5.45043915L86.6348808 5.14930991 85.8820577 4.96863237 85.0087829 4.96863237 84.1355082 5.11919699 83.2020075 5.45043915 82.1480552 5.96235885 15.8695107 44.2659975 7.25721455 39.2973651 73.565872 0.993726474 74.6198243 0.481806775 75.553325 0.150564617 76.4265997 0 77.2697616 0 78.0225847 0.180677541 78.7151819 0.481806775z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#DDE1EB",d:"M8.58218319 56.8230866L0 51.8544542 0.240903388 49.5056462 0.572145546 48.2710163 1.50564617 45.8920954 2.10790464 44.7176913 2.83061481 43.5734003 4.42659975 41.5558344 5.32998745 40.6825596 7.25721455 39.2672522 15.8393977 44.2659975 13.9422836 45.651192 13.0087829 46.5545797 11.412798 48.5721455 10.7202008 49.6863237 10.0878294 50.8607277 9.15432873 53.2396487 8.64240903 55.6787955z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{fill:"#E9ECF2",d:"M82.1480552 5.96235885L83.2321205 5.45043915 84.195734 5.11919699 85.0690088 4.96863237 85.8519448 4.99874529 86.6348808 5.14930991 87.327478 5.45043915 87.9297365 5.902133 88.4416562 6.50439147 88.8632371 7.19698871 89.1643664 8.01003764 89.3450439 8.97365119 89.4353827 10.1480552 89.5859473 65.4052698 89.3450439 67.7239649 88.6223338 70.1631117 87.5081556 72.5119197 86.0627353 74.6800502 84.2860728 76.5470514 83.3525721 77.2998745 82.3588457 77.9623588 56.3412798 92.9887077 39.0263488 118.55458 38.0025094 119.578419 37.5207026 119.849435 37.0087829 120 36.587202 119.969887 36.195734 119.819322 35.9247177 119.548306 35.7139272 119.096612 35.6235885 118.464241 35.5934755 104.973651 16.0501882 116.235885 14.9962359 116.777917 14.0326223 117.079046 13.1894605 117.229611 12.3764115 117.199498 11.5934755 117.048934 10.9008783 116.747804 10.2986198 116.29611 9.7565872 115.693852 9.33500627 115.031368 9.03387704 114.218319 8.82308657 113.254705 8.7327478 112.080301 8.58218319 56.8230866 8.82308657 54.5043915 9.57590966 52.0351317 10.7202008 49.6863237 12.195734 47.5181932 13.9422836 45.651192 15.8393977 44.2659975z",transform:"matrix(-1 0 0 1 163.315 22)"},null),t.createVNode("path",{d:"M72.3613551,40.1706399 L72.2107905,40.4416562 L72.1806775,41.0138018 L72.2107905,55.2572146 L72.2710163,55.5583438 L72.5420326,55.7390213 L72.8732748,55.6486826 L73.2045169,55.3776662 L73.4454203,54.9861982 L73.565872,54.4742785 L73.5056462,40.0803011 L73.4454203,39.749059 L73.2948557,39.6286073 L73.0840652,39.5984944 L72.6022585,39.8695107 L72.3613551,40.1706399 Z M69.229611,40.7427854 L69.1091593,41.0439147 L69.0489335,41.6461731 L69.0790464,57.846926 L69.1392723,58.1480552 L69.4404015,58.3287327 L69.7415307,58.238394 L70.1028858,57.9372647 L70.3437892,57.5457967 L70.4642409,57.06399 L70.4040151,40.6223338 L70.3437892,40.3513174 L70.1932246,40.2007528 L69.9824341,40.140527 L69.5006274,40.3814304 L69.229611,40.7427854 Z M53.6311167,32.3111669 L53.510665,32.4617315 L53.4504391,33.0037641 L53.4203262,34.629862 L53.5708908,84.8281054 L53.7515684,85.2797992 L54.2333752,85.2195734 L54.5947302,84.9184442 L54.8356336,84.5269762 L54.9259724,84.0451694 L54.7754078,32.1907152 L54.7151819,31.8895859 L54.5646173,31.7390213 L54.3839398,31.7089084 L53.8720201,31.9799247 L53.6311167,32.3111669 Z M78.4742785,38.9962359 L78.3237139,39.357591 L78.293601,39.9899624 L78.3237139,48.9335006 L78.3839398,49.2346299 L78.685069,49.4153074 L78.9861982,49.3249686 L79.3174404,49.0539523 L79.5884567,48.6323714 L79.6787955,48.1505646 L79.6486826,38.8757842 L79.5884567,38.574655 L79.468005,38.4240903 L79.2572146,38.3939774 L78.7754078,38.6348808 L78.4742785,38.9962359 Z M59.7139272,44.6875784 L59.7741531,65.7967378 L59.9548306,66.2484316 L60.4366374,66.1882058 L60.7678795,65.9171895 L61.0087829,65.5257215 L61.1292346,65.0138018 L61.0690088,43.9046424 L60.8883312,43.4529486 L60.4065245,43.5131744 L60.0451694,43.7841907 L59.804266,44.1756587 L59.7139272,44.6875784 Z M56.7929737,49.3851945 L56.642409,49.6863237 L56.5821832,50.2584693 L56.642409,64.140527 L56.7026349,64.4416562 L57.0037641,64.6223338 L57.3048934,64.531995 L57.6361355,64.2308657 L57.9071518,63.8393977 L57.9974906,63.357591 L57.9673777,49.2647428 L57.9071518,48.9636136 L57.7565872,48.8431619 L57.5457967,48.8130489 L57.033877,49.0840652 L56.7929737,49.3851945 Z M44.3864492,36.9485571 L44.2659975,37.1292346 L44.2057716,37.6712673 L44.1756587,39.2973651 L44.3563363,89.4956085 L44.4165621,89.7967378 L44.6875784,89.9774153 L44.9887077,89.8870765 L45.3500627,89.5859473 L45.5909661,89.1944793 L45.6813049,88.7126725 L45.5608532,36.8582183 L45.4705144,36.5269762 L45.3500627,36.4065245 L45.1392723,36.3764115 L44.6273526,36.6474279 L44.3864492,36.9485571 Z M65.9473024,44.5671267 L65.9774153,58.9611041 L66.1580928,59.412798 L66.6398996,59.3525721 L66.9711418,59.0815558 L67.2421581,58.6900878 L67.3324969,58.1781681 L67.3023839,43.7841907 L67.1217064,43.3324969 L66.6398996,43.3626098 L66.2785445,43.663739 L66.0376412,44.055207 L65.9473024,44.5671267 Z M50.5897114,28.2158093 L50.4391468,28.7879548 L50.4090339,32.9736512 L50.5897114,92.2659975 L50.6499373,92.5671267 L50.9510665,92.7478043 L51.2521957,92.6574655 L51.5834379,92.3864492 L51.8243413,91.9648683 L51.944793,91.4830615 L51.7641154,28.1254705 L51.7038896,27.7942284 L51.553325,27.6737767 L51.3425345,27.6436637 L50.8306148,27.9146801 L50.5897114,28.2158093 Z M75.3726474,39.6587202 L75.2220828,40.0200753 L75.161857,40.7728984 L75.1919699,52.1856964 L75.2521957,52.4868256 L75.553325,52.6675031 L75.8845671,52.5771644 L76.2158093,52.3061481 L76.4567127,51.9146801 L76.5771644,51.4027604 L76.5470514,39.5382685 L76.4567127,39.2371393 L76.336261,39.1166876 L76.1254705,39.0865747 L75.6135508,39.357591 L75.3726474,39.6587202 Z M62.9962359,40.6524467 L62.8757842,40.923463 L62.8155583,41.4052698 L62.7854454,42.6700125 L62.8757842,64.8933501 L62.93601,65.1944793 L63.0865747,65.3450439 L63.2672522,65.3751568 L63.5382685,65.2848181 L64.0200753,64.7728984 L64.2308657,64.1104141 L64.1706399,40.531995 L64.1104141,40.2308657 L63.9598494,40.1104141 L63.749059,40.0501882 L63.2672522,40.2910916 L62.9962359,40.6524467 Z M47.4880803,37.9422836 L47.3977415,38.153074 L47.3375157,38.6649937 L47.3074028,40.1706399 L47.4579674,86.3337516 L47.5181932,86.6348808 L47.6386449,86.7854454 L47.8494354,86.8155583 L48.391468,86.5144291 L48.7528231,85.9121706 L48.8130489,85.5508156 L48.6624843,37.8218319 L48.6022585,37.5508156 L48.4818068,37.4002509 L48.2710163,37.370138 L47.7892095,37.6110414 L47.4880803,37.9422836 Z M84.7076537,38.3036386 L84.5570891,38.7252196 L84.5269762,39.327478 L84.5269762,42.4291092 L84.587202,42.7302384 L84.8883312,42.9109159 L85.1894605,42.8205772 L85.5508156,42.5495609 L85.7917189,42.1580928 L85.9121706,41.6461731 L85.8820577,38.183187 L85.8218319,37.8820577 L85.6712673,37.7314931 L85.4604768,37.7013802 L85.0087829,37.9422836 L84.7076537,38.3036386 Z M81.6060226,39.4178168 L81.455458,39.8695107 L81.3952321,40.7126725 L81.425345,46.1329987 L81.6060226,46.5846926 L82.0878294,46.5244668 L82.4491844,46.2534504 L82.6900878,45.8318695 L82.7804266,45.3500627 L82.7804266,39.327478 L82.6900878,38.9962359 L82.5395232,38.8456713 L82.3287327,38.8155583 L81.846926,39.1166876 L81.6060226,39.4178168 Z M38.2132999,53.510665 L38.0928482,53.7515684 L38.0025094,54.2634881 L38.0025094,55.6787955 L38.0928482,81.455458 L38.2735257,81.9071518 L38.7553325,81.846926 L39.0865747,81.5759097 L39.327478,81.1844417 L39.4479297,80.672522 L39.357591,53.3902133 L39.2973651,53.119197 L39.1769134,52.9686324 L38.966123,52.9084065 L38.4843162,53.1493099 L38.2132999,53.510665 Z M41.2848181,41.5558344 L41.1643664,41.7365119 L41.1041405,42.2785445 L41.0740276,43.7841907 L41.2245922,89.9473024 L41.2848181,90.2484316 L41.5859473,90.4291092 L41.8870765,90.3387704 L42.2183187,90.0677541 L42.489335,89.6461731 L42.5796738,89.1643664 L42.4592221,41.4353827 L42.3688833,41.1342535 L42.2484316,40.9836888 L42.0376412,40.9535759 L41.5558344,41.1944793 L41.2848181,41.5558344 Z M28.9084065,69.9523212 L28.727729,70.4040151 L28.6976161,71.217064 L28.6976161,76.6675031 L28.8782936,77.119197 L29.3902133,77.0589711 L29.7214555,76.7879548 L29.9623588,76.3964868 L30.0828105,75.8845671 L30.0526976,69.8619824 L29.9924718,69.5608532 L29.8419072,69.4102886 L29.6311167,69.3801757 L29.1493099,69.651192 L28.9084065,69.9523212 Z M16.5621079,78.685069 L16.3814304,79.076537 L16.3513174,79.6486826 L16.4115433,83.1116688 L16.7126725,83.2923463 L17.0138018,83.2020075 L17.3751568,82.9309912 L17.6160602,82.5094103 L17.706399,82.0276035 L17.706399,78.5646173 L17.6461731,78.2634881 L17.4956085,78.1129235 L17.0740276,78.1430364 L16.5621079,78.685069 Z M35.0815558,60.7979925 L34.9611041,61.0991217 L34.9008783,61.6712673 L34.9611041,77.6612296 L35.02133,77.9623588 L35.1417817,78.1129235 L35.2923463,78.1430364 L35.6235885,78.0526976 L35.9548306,77.7816813 L36.2258469,77.3601004 L36.3161857,76.8782936 L36.2559598,60.6775408 L36.195734,60.3764115 L36.0752823,60.2559598 L35.8644918,60.195734 L35.3826851,60.4366374 L35.0815558,60.7979925 Z M22.7653701,72.2710163 L22.6148055,72.6624843 L22.5545797,73.2948557 L22.5846926,81.3350063 L22.7653701,81.7867001 L23.2471769,81.7264743 L23.608532,81.455458 L23.8494354,81.033877 L23.9397742,80.5520703 L23.9096612,72.1806775 L23.8494354,71.8795483 L23.7289837,71.7289837 L23.5181932,71.6988708 L23.0363864,71.9397742 L22.7653701,72.2710163 Z M25.8670013,70.5846926 L25.7164366,70.9460477 L25.6562108,71.5483061 L25.6863237,79.076537 L25.7465496,79.3776662 L26.0476788,79.5884567 L26.378921,79.4981179 L26.7101631,79.1969887 L26.9510665,78.8055207 L27.0715182,78.293601 L27.0414053,70.4642409 L26.9811794,70.1932246 L26.8306148,70.04266 L26.6499373,69.9824341 L26.1681305,70.2534504 L25.8670013,70.5846926 Z M32.0100376,66.7302384 L31.859473,67.0313676 L31.7992472,67.6336261 L31.8293601,76.6675031 L31.8895859,76.9686324 L32.1907152,77.1493099 L32.4918444,77.0589711 L32.8531995,76.7879548 L33.0941029,76.3964868 L33.1844417,75.8845671 L33.1543287,66.6097867 L33.0941029,66.3086575 L32.9435383,66.1580928 L32.7327478,66.1279799 L32.250941,66.3989962 L32.0100376,66.7302384 Z M19.6336261,74.1982434 L19.4830615,74.5595985 L19.4529486,75.131744 L19.4830615,82.6900878 L19.663739,83.1116688 L20.1455458,83.0815558 L20.476788,82.8105395 L20.7478043,82.3889586 L20.838143,81.8770389 L20.8080301,74.0777917 L20.7478043,73.7766625 L20.6273526,73.6260979 L20.4165621,73.5959849 L19.9347553,73.8368883 L19.6336261,74.1982434 Z",fill:"#FFF",transform:"matrix(-1 0 0 1 163.315 22)"},null)])])])]),t.createVNode("div",{class:rv("tips")},[r.value?" ":"按住说话"]),t.createVNode("div",{class:rv("footer")},[e.value&&t.createVNode("div",{class:rv("clear"),onClick:d},[t.createTextVNode("清空")]),t.createVNode("div",{onContextmenu:p,class:[rv("btn"),r.value?rv("btn","active"):""],onTouchstart:h,onTouchend:v,onTouchcancel:v},[t.createVNode(it,{name:"microphone",size:"32"},null)]),e.value&&t.createVNode("div",{class:rv("confirm"),onClick:f},[t.createTextVNode("确定")])])])]);return()=>t.createVNode(kt,{show:a.value,"onUpdate:show":[e=>a.value=e,c],round:!0,position:"bottom",closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay},{default:y})}})),[sv,cv]=Se("steps"),uv={active:C(0),direction:N("horizontal"),activeColor:String,activeBgColor:String,activeBorderColor:String,titleActiveColor:String,inactiveColor:String,inactiveBgColor:String,inactiveBorderColor:String,titleInactiveColor:String},dv=Symbol(sv);var fv=t.defineComponent({name:sv,props:uv,emits:["clickStep"],setup(e,{emit:o,slots:n}){const{linkChildren:a}=D(dv);return a({props:e,onClickStep:e=>o("clickStep",e)}),()=>{var o;return t.createVNode("div",{class:cv([e.direction])},[t.createVNode("div",{class:cv("items")},[null==(o=n.default)?void 0:o.call(n)])])}}});const[pv,hv]=Se("step"),vv={iconPrefix:String,activeIcon:String,inactiveIcon:String};const mv=je(t.defineComponent({name:pv,props:vv,setup(e,{slots:o}){const{parent:n,index:a}=I(dv);if(!n)return;const r=n.props,i=()=>{const e=+r.active;return a.value===e?"process":"waiting"},l=()=>"process"===i(),s=t.computed((()=>l()?{color:r.titleActiveColor||""}:{color:r.titleInactiveColor||""})),c=()=>n.onClickStep(a.value),u=()=>{const{activeColor:e,activeBgColor:t,activeBorderColor:o,inactiveBgColor:n,inactiveBorderColor:a,inactiveColor:i}=r,s={};return l()?(s.background=`${t||"var(--zt-primary-color-a2)"}`,o&&(s.border=`1px solid ${o}`),s.fontWeight="bold",s.color=`${e||"var(--zt-primary-color)"}`):(s.background=`${n||""}`,a&&(s.border=`1px solid ${a}`),s.fontWeight="normal",s.color=`${i||"#FFFFFF"}`),s},d=()=>{const{activeColor:n,inactiveColor:i}=r,{iconPrefix:s,activeIcon:c,inactiveIcon:d}=e;return l()&&(c||o["active-icon"])?o["active-icon"]?o["active-icon"]():t.createVNode("div",{class:hv("circle"),style:u()},[t.createVNode(rt,{class:hv("icon","active"),name:c,color:n,classPrefix:s},null)]):d||o["inactive-icon"]?o["inactive-icon"]?o["inactive-icon"]():t.createVNode("div",{class:hv("circle"),style:u()},[t.createVNode(rt,{class:hv("icon"),name:d,color:i,classPrefix:s},null)]):t.createVNode("div",{class:hv("circle"),style:u()},[a.value+1])};return()=>{var e;const n=i();return t.createVNode("div",{class:[Te,hv([r.direction,{[n]:n}])]},[t.createVNode("div",{class:hv("title",{active:l()}),style:s.value,onClick:c},[null==(e=o.default)?void 0:e.call(o)]),t.createVNode("div",{class:hv("circle-container"),onClick:c},[d()]),t.createVNode("div",{class:hv("line")},null)])}}})),[gv,yv]=Se("stepper"),wv=(e,t)=>String(e)===String(t),bv={min:C(1),max:C(1/0),name:C(""),step:C(1),theme:String,integer:Boolean,disabled:Boolean,showPlus:w,showMinus:w,showInput:w,longPress:w,allowEmpty:Boolean,modelValue:y,inputWidth:y,buttonSize:y,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,beforeChange:Function,defaultValue:C(1),decimalLength:y};const Lv=je(t.defineComponent({name:gv,props:bv,emits:["plus","blur","minus","focus","change","overlimit","update:modelValue"],setup(e,{emit:n}){const a=t=>{const{min:n,max:a,allowEmpty:r,decimalLength:i}=e;return r&&""===t||(t=""===(t=me(String(t),!e.integer))?0:+t,t=Number.isNaN(t)?+n:t,t=Math.max(Math.min(+a,t),+n),o(i)&&(t=t.toFixed(+i))),t};let r;const i=t.ref(),l=t.ref((()=>{var t;const o=null!=(t=e.modelValue)?t:e.defaultValue,r=a(o);return wv(r,e.modelValue)||n("update:modelValue",r),r})()),s=t.computed((()=>e.disabled||e.disableMinus||+l.value<=+e.min)),c=t.computed((()=>e.disabled||e.disablePlus||+l.value>=+e.max)),u=t.computed((()=>({width:re(e.inputWidth),height:re(e.buttonSize)}))),d=t.computed((()=>ie(e.buttonSize))),f=t=>{e.beforeChange?_e(e.beforeChange,{args:[t],done(){l.value=t}}):l.value=t},p=()=>{if("plus"===r&&c.value||"minus"===r&&s.value)return void n("overlimit",r);const t="minus"===r?-e.step:+e.step,o=a(ge(+l.value,t));f(o),n(r)},h=t=>{const n=t.target,{value:a}=n,{decimalLength:r}=e;let i=me(String(a),!e.integer);if(o(r)&&i.includes(".")){const e=i.split(".");i=`${e[0]}.${e[1].slice(0,+r)}`}e.beforeChange?n.value=String(l.value):wv(a,i)||(n.value=i);const s=i===String(+i);f(s?+i:i)},v=t=>{var o;e.disableInput?null==(o=i.value)||o.blur():n("focus",t)},m=e=>{const o=e.target,r=a(o.value);o.value=String(r),l.value=r,t.nextTick((()=>{n("blur",e),Q()}))};let g,y;const w=()=>{y=setTimeout((()=>{p(),w()}),200)},b=t=>{e.longPress&&(clearTimeout(y),g&&ee(t))},L=t=>{e.disableInput&&ee(t)},x=t=>({onClick:e=>{ee(e),r=t,p()},onTouchstart:()=>{r=t,e.longPress&&(g=!1,clearTimeout(y),y=setTimeout((()=>{g=!0,p(),w()}),500))},onTouchend:b,onTouchcancel:b});return t.watch((()=>[e.max,e.min,e.integer,e.decimalLength]),(()=>{const e=a(l.value);wv(e,l.value)||(l.value=e)})),t.watch((()=>e.modelValue),(e=>{wv(e,l.value)||(l.value=a(e))})),t.watch(l,(t=>{n("update:modelValue",t),n("change",t,{name:e.name})})),Z((()=>e.modelValue)),()=>t.createVNode("div",{role:"group",class:yv([e.theme])},[t.withDirectives(t.createVNode("div",t.mergeProps({style:d.value,class:[yv("minus",{disabled:s.value}),{[yv("could-click")]:!s.value}],"aria-disabled":s.value||void 0},x("minus")),[t.createVNode(it,{name:"minus",size:(null==e?void 0:e.buttonSize)?e.buttonSize:"32"},null)]),[[t.vShow,e.showMinus]]),t.withDirectives(t.createVNode("input",{ref:i,type:e.integer?"tel":"text",role:"spinbutton",class:yv("input"),value:l.value,style:u.value,disabled:e.disabled,readonly:e.disableInput,inputmode:e.integer?"numeric":"decimal",placeholder:e.placeholder,"aria-valuemax":e.max,"aria-valuemin":e.min,"aria-valuenow":l.value,onBlur:m,onInput:h,onFocus:v,onMousedown:L},null),[[t.vShow,e.showInput]]),t.withDirectives(t.createVNode("div",t.mergeProps({style:d.value,class:[yv("plus",{disabled:c.value}),{[yv("could-click")]:!c.value}],"aria-disabled":c.value||void 0},x("plus")),[t.createVNode(it,{name:"plus",size:(null==e?void 0:e.buttonSize)?e.buttonSize:"32"},null)]),[[t.vShow,e.showPlus]])])}})),xv=je(fv),[Cv,Nv]=Se("swipe-cell"),Vv={name:C(""),disabled:Boolean,leftWidth:y,rightWidth:y,beforeClose:Function,stopPropagation:Boolean};const kv=je(t.defineComponent({name:Cv,props:Vv,emits:["open","close","click"],setup(e,{emit:n,slots:a}){let r,i,l,s;const c=t.ref(),u=t.ref(),d=t.ref(),f=t.reactive({offset:0,dragging:!1}),p=ut(),h=e=>e.value?P(e).width:0,v=t.computed((()=>o(e.leftWidth)?+e.leftWidth:h(u))),m=t.computed((()=>o(e.rightWidth)?+e.rightWidth:h(d))),g=t=>{f.offset="left"===t?v.value:-m.value,r||(r=!0,n("open",{name:e.name,position:t}))},y=t=>{f.offset=0,r&&(r=!1,n("close",{name:e.name,position:t}))},w=t=>{e.disabled||(l=f.offset,p.start(t))},b=()=>{f.dragging&&(f.dragging=!1,(e=>{const t=Math.abs(f.offset),o=r?.85:.15,n="left"===e?v.value:m.value;n&&t>n*o?g(e):y(e)})(f.offset>0?"left":"right"),setTimeout((()=>{i=!1}),0))},L=(t="outside")=>{s||(n("click",t),r&&!i&&(s=!0,_e(e.beforeClose,{args:[{name:e.name,position:t}],done:()=>{s=!1,y(t)},canceled:()=>s=!1,error:()=>s=!1})))},x=(e,t)=>o=>{t&&o.stopPropagation(),L(e)},C=(e,o)=>{const n=a[e];if(n)return t.createVNode("div",{ref:o,class:Nv(e),onClick:x(e,!0)},[n()])};return ct({open:g,close:y}),_(c,(()=>L("outside")),{eventName:"touchstart"}),z("touchmove",(t=>{if(e.disabled)return;const{deltaX:o}=p;if(p.move(t),p.isHorizontal()){i=!0,f.dragging=!0;(!r||o.value*l<0)&&ee(t,e.stopPropagation),f.offset=he(o.value+l,-m.value,v.value)}}),{target:c}),()=>{var e;const o={transform:`translate3d(${f.offset}px, 0, 0)`,transitionDuration:f.dragging?"0s":".6s"};return t.createVNode("div",{ref:c,class:Nv(),onClick:x("cell",i),onTouchstartPassive:w,onTouchend:b,onTouchcancel:b},[t.createVNode("div",{class:Nv("wrapper"),style:o},[C("left",u),null==(e=a.default)?void 0:e.call(a),C("right",d)])])}}})),[Av,Sv]=Se("switch"),Tv={size:y,loading:Boolean,disabled:Boolean,modelValue:g,activeColor:String,inactiveColor:String,activeValue:{type:g,default:!0},inactiveValue:{type:g,default:!1}};const Ov=je(t.defineComponent({name:Av,props:Tv,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const a=()=>e.modelValue===e.activeValue,r=()=>{if(!e.disabled&&!e.loading){const t=a()?e.inactiveValue:e.activeValue;o("update:modelValue",t),o("change",t)}},i=()=>{if(e.loading){const o=a()?e.activeColor:e.inactiveColor;return t.createVNode(Pt,{class:Sv("loading"),color:o},null)}if(n.node)return n.node()};return Z((()=>e.modelValue)),()=>{var o;const{size:l,loading:s,disabled:c,activeColor:u,inactiveColor:d}=e,f=a(),p={fontSize:re(l),backgroundColor:f?u:d};return t.createVNode("div",{role:"switch",class:Sv({on:f,loading:s,disabled:c}),style:p,tabindex:c?void 0:0,"aria-checked":f,onClick:r},[t.createVNode("div",{class:Sv("node")},[i()]),null==(o=n.background)?void 0:o.call(n)])}}}));var Mv=Ov;const[Pv,Iv]=Se("tabbar"),Bv={route:Boolean,fixed:w,border:w,zIndex:y,placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,modelValue:C(0),safeAreaInsetBottom:{type:Boolean,default:null}},Dv=Symbol(Pv);const Ev=je(t.defineComponent({name:Pv,props:Bv,emits:["change","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),{linkChildren:r}=D(Dv),i=xd(a,Iv),l=()=>{var t;return null!=(t=e.safeAreaInsetBottom)?t:e.fixed},s=()=>{var o;const{fixed:r,zIndex:i,border:s}=e;return t.createVNode("div",{ref:a,role:"tablist",style:le(i),class:[Iv({fixed:r}),{[Oe]:s,"zt-safe-area-bottom":l()}]},[null==(o=n.default)?void 0:o.call(n)])};return r({props:e,setActive:(t,n)=>{_e(e.beforeChange,{args:[t],done(){o("update:modelValue",t),o("change",t),n()}})}}),()=>e.fixed&&e.placeholder?i(s):s()}})),[zv,_v]=Se("tabbar-item"),jv=d({},ro,{dot:Boolean,icon:String,name:y,badge:y,badgeProps:Object,iconPrefix:String});const Fv=je(t.defineComponent({name:zv,props:jv,emits:["click"],setup(e,{emit:o,slots:n}){const r=lo(),i=t.getCurrentInstance().proxy,{parent:l,index:s}=I(Dv);if(!l)return;const c=t.computed((()=>{var t;const{route:o,modelValue:n}=l.props;if(o&&"$route"in i){const{$route:t}=i,{to:o}=e,n=a(o)?o:{path:o};return!!t.matched.find((e=>{const t="path"in n&&n.path===e.path,o="name"in n&&n.name===e.name;return t||o}))}return(null!=(t=e.name)?t:s.value)===n})),u=t=>{var n;c.value||l.setActive(null!=(n=e.name)?n:s.value,r),o("click",t)},d=()=>n.icon?n.icon({active:c.value}):e.icon?t.createVNode(rt,{name:e.icon,classPrefix:e.iconPrefix},null):void 0;return()=>{var o;const{dot:a,badge:r}=e,{activeColor:i,inactiveColor:s}=l.props,f=c.value?i:s;return t.createVNode("div",{role:"tab",class:_v({active:c.value}),style:{color:f},tabindex:0,"aria-selected":c.value,onClick:u},[t.createVNode(Ue,t.mergeProps({dot:a,class:_v("icon",{active:c.value}),content:r},e.badgeProps),{default:d}),t.createVNode("div",{class:_v("text")},[null==(o=n.default)?void 0:o.call(n,{active:c.value})])])}}}));var Rv=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(Rv||{});const[Hv,$v]=Se("text-ellipsis"),Uv={rows:C(1),dots:N("..."),content:N(""),expandText:N(""),expandType:N("flat"),collapseText:N(""),position:N("end")};const Zv=je(t.defineComponent({name:Hv,props:Uv,emits:["clickAction"],setup(e,{emit:o}){const n=t.ref(""),a=t.ref(!1),r=t.ref(!1),i=t.ref(),l=t.computed((()=>a.value?e.collapseText:e.expandText)),s=e=>{if(!e)return 0;const t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0},c=()=>{const t=(()=>{if(!i.value)return;const t=window.getComputedStyle(i.value),o=document.createElement("div");return Array.prototype.slice.apply(t).forEach((e=>{o.style.setProperty(e,t.getPropertyValue(e))})),o.style.position="fixed",o.style.zIndex="-9999",o.style.top="-9999px",o.style.height="auto",o.style.minHeight="auto",o.style.maxHeight="auto",o.innerText=e.content,document.body.appendChild(o),o})();if(!t)return;const{paddingBottom:o,paddingTop:a,lineHeight:c}=t.style,u=Math.ceil((Number(e.rows)+.5)*s(c)+s(a)+s(o));u<t.offsetHeight?(r.value=!0,n.value=((t,o)=>{const{content:n,position:a,dots:r}=e,i=n.length,s=(a,l)=>{if(a[1]-a[0]<=1&&l[1]-l[0]<=1)return n.slice(0,a[0])+r+n.slice(l[1],i);const c=Math.floor((a[0]+a[1])/2),u=Math.ceil((l[0]+l[1])/2);return t.innerText=e.content.slice(0,c)+e.dots+e.content.slice(u,i)+e.expandText,t.offsetHeight>=o?s([a[0],c],[u,l[1]]):s([c,a[1]],[l[0],u])},c=0+i>>1;return"middle"===e.position?t.innerText=s([0,c],[c,i]):(()=>{const e=(s,c)=>{if(c-s<=1)return"end"===a?n.slice(0,s)+r:r+n.slice(c,i);const u=Math.round((s+c)/2);return t.innerText="end"===a?n.slice(0,u)+r+l.value:r+n.slice(u,i)+l.value,t.offsetHeight>o?"end"===a?e(s,u):e(u,c):"end"===a?e(u,c):e(s,u)};t.innerText=e(0,i)})(),t.innerText})(t,u)):(r.value=!1,n.value=e.content),document.body.removeChild(t)},u=e=>{e.stopPropagation(),e.preventDefault(),a.value=!a.value,o("clickAction",e)},d=()=>{"dialog"===e.expandType&&r.value&&qr({message:e.content}).then((()=>{}))};return t.onMounted(c),t.watch((()=>[e.content,e.rows,e.position]),c),z("resize",c),()=>t.createVNode("div",{ref:i,class:$v(),onClick:d},[a.value?e.content:n.value,"dialog"!==e.expandType&&r.value?t.createVNode("span",{class:$v("action"),onClick:u},[l.value]):null])}}));var Wv=Zv;const[Yv,qv]=Se("table"),Gv="bodyCell",Xv={headList:L(),dataList:L(),striped:w,emptyValue:N("-"),loading:{type:Boolean,default:!1},skeletonRow:{type:Number,default:6},border:{type:Boolean,default:!1},hideTableHead:{type:Boolean,default:!1}};const Kv=je(t.defineComponent({name:Yv,props:Xv,emits:["sort"],setup(e,{emit:o,slots:n}){const a=t.ref(""),r=t.ref(""),i=t.ref(),l=t.computed((()=>e.headList.filter((e=>e.fixed||e.fixedRight)))),s=t.computed((()=>{const t=[];let o=0;return e.headList.forEach(((n,a)=>{var r;const i=Object.assign({},n),l=e.headList[a-1],s=e.headList[a+1];l?(o+=Number(null==(r=l.width)?void 0:r.split("px")[0]),i.left=`${o}px`):i.left=0,n.fixed&&!(null==s?void 0:s.fixed)&&(i.lastFixLeft=!0),t.push(i)})),t})),c=t.ref(!1),u=t.ref(!1),d=t.computed((()=>l.value.concat(e.headList.filter((e=>!e.fixed)))));t.onMounted((()=>{i.value&&(u.value=i.value.scrollWidth>i.value.clientWidth);const t=e.headList.map(((e,t)=>(e.sorter&&e.defaultSortOrder&&(a.value=e.defaultSortOrder||"",r.value=e.key),e.fixed?`tableHead${t}`:""))).filter((e=>""!==e));t.length>0&&t.forEach(((e,t)=>{const o=document.getElementById(`fixedHead${t}`),n=document.getElementById(e);o&&n&&(o.style.width=n.offsetWidth+"px")}),0)}));const f=e=>{var t;e.sorter&&(a.value=(t=e.key===r.value?a.value:"")?t===Rv.ASCEND?Rv.DESCEND:"":Rv.ASCEND,r.value=e.key,o("sort",{order:a.value,key:e.key}))},p=e=>{const{scrollLeft:t,currentTarget:o}=e,n="number"==typeof t?t:null==o?void 0:o.scrollLeft;c.value=n>0;const a=o.scrollWidth-o.scrollLeft-o.clientWidth;u.value=a>0},h=(e,o,a)=>{if(e[o.key]&&e[o.key].id&&n[`data-${e[o.key].id}`])return n[`data-${e[o.key].id}`](e[o.key]);const r={column:o,record:e,text:e[o.key],index:a},i=n[Gv]&&n[Gv](r);return i&&i.length?i[0]:o.ellipsis?t.createVNode(Wv,{content:e[o.key],expandType:"dialog"},null):e[o.key]},v=()=>{const e=[],o=d.value.length;for(let n=0;n<o;n++)e.push(t.createVNode("div",{class:qv("col")},[t.createVNode("div",{class:qv("col-item")},null)]));return e},m=()=>{const o=[];for(let n=0;n<e.skeletonRow;n++)o.push(t.createVNode("div",{class:qv("row",{head:0===n})},[v()]));return o};return()=>e.loading?t.createVNode("div",{class:qv({animate:!0,skeleton:!0})},[m()]):t.createVNode("div",{ref:i,class:qv({fixed:l.value.length>0,bordered:e.border,striped:e.striped}),onScroll:p},[t.createVNode("table",null,[t.createVNode("colgroup",null,[e.headList.map((e=>t.createVNode("col",{style:{width:e.width}},null)))]),t.withDirectives(t.createVNode("thead",{class:qv("thead")},[t.createVNode("tr",null,[s.value.map((e=>(e=>{const o=n[`head-${e.id}`],i=e.sorter?"flat":"dialog";if(0!==(null==e?void 0:e.colSpan))return t.createVNode("th",{class:[qv("left",{fixed:e.fixed,last:e.lastFixLeft&&c.value}),qv("right",{fixed:e.fixedRight,last:e.lastRight&&u.value})],style:{left:e.fixed?e.left:"",right:e.fixedRight?e.right:""},colspan:1!==(null==e?void 0:e.colSpan)?null==e?void 0:e.colSpan:null},[o?o(e):t.createVNode("div",{class:qv("head"),onClick:()=>f(e)},[e.ellipsis?t.createVNode(Wv,{content:e.label,expandType:i,class:qv("head-label-ellipsis")},null):t.createVNode("span",{class:qv("head-label")},[e.label]),e.sorter?t.createVNode("span",{class:qv("head-sort")},[t.createVNode(rt,{class:[e.key===r.value&&a.value===Rv.ASCEND?qv("sort-active"):""],name:"spinner-shrink",size:"12",style:{marginBottom:"-3px"}},null),t.createVNode(rt,{class:[e.key===r.value&&a.value===Rv.DESCEND?qv("sort-active"):""],name:"spinner-expand",size:"12",style:{marginTop:"-3px"}},null)]):""])])})(e)))])]),[[t.vShow,!e.hideTableHead]]),t.createVNode("tbody",{class:qv("tbody")},[e.dataList.map(((e,o)=>((e,o)=>t.createVNode("tr",null,[s.value.map((n=>{let a;n.customCell&&(a=n.customCell(e,o));const r=Object.assign({},n.style);return r.left=n.fixed?n.left:"",r.right=n.fixedRight?n.right:"",0!==(null==a?void 0:a.rowSpan)&&0!==(null==a?void 0:a.colSpan)&&t.createVNode("td",{onClick:()=>n.click&&n.click(e,o),class:[qv("left",{fixed:n.fixed,last:n.lastFixLeft&&c.value}),qv("right",{fixed:n.fixedRight,last:n.lastRight&&u.value})],colspan:1!==(null==a?void 0:a.colSpan)?null==a?void 0:a.colSpan:null,rowspan:1!==(null==a?void 0:a.rowSpan)?null==a?void 0:a.rowSpan:null,style:r},[h(e,n,o)])}))]))(e,o)))])])])}})),[Qv,Jv]=Se("timeline"),em={title:N("办理经过"),defaultFold:{type:Boolean,default:!1},collapseCount:x(0),processes:L([]),opinionKey:N("处理意见"),enableSingleFold:w,dot:{type:Boolean,default:!1}};const tm=je(t.defineComponent({name:Qv,props:em,setup(e,{slots:o}){const n=t.ref(e.defaultFold),a=n=>o.avatar?t.createVNode("div",{class:Jv("avatar-box")},[o.avatar(n)]):e.dot?t.createVNode("div",{class:Jv("dot")},null):t.createVNode("div",{class:Jv("avatar-box")},[n.avatar?t.createVNode("img",{class:Jv("avatar"),src:n.avatar,alt:""},null):t.createVNode("div",{class:Jv("avatar")},[n.human.slice(-2)])]),r=e=>o.title?t.createVNode("div",{class:Jv("title-box")},[o.title(e)]):t.createVNode("div",{class:Jv("title-box")},[t.createVNode("span",{class:Jv("title")},[`${e.department}[${e.human}]`]),t.createVNode("span",{class:Jv("time")},[e.timestamp])]),i=n=>o.opinion?t.createVNode("div",{class:Jv("opinion-box")},[o.opinion(n)]):t.createVNode("div",{class:Jv("opinion-box")},[t.createVNode("div",{class:Jv("opinion-label")},[e.opinionKey]),t.createVNode("div",{class:Jv("opinion")},[n.opinion||"无"])]),l=e=>o.content?t.createVNode("div",{class:[Jv("content-box"),Pe]},[o.content(e)]):t.createVNode("div",{class:[Jv("content-box"),Pe]},[t.createTextVNode("在"),t.createVNode("span",null,[e.stage]),t.createTextVNode("阶段"),t.createVNode("span",{class:Jv("text-bold")},[t.createTextVNode(" "),e.action,t.createTextVNode(" ")]),t.createTextVNode("到"),t.createVNode("span",null,[e.nextAction]),t.createVNode("span",null,[e.nextDepartment]),t.createVNode("span",{class:Jv("text-bold")},[t.createTextVNode(" ["),e.nextHuman,t.createTextVNode("]")])]),s=(o,n)=>t.createVNode("div",{class:Jv("item")+" "+(n?"last-item":""),onClick:function(){e.enableSingleFold&&(o.folded=!o.folded)}},[t.createVNode("div",{class:[Jv("left-container"),e.dot?Jv("dot-container"):""]},[a(o),t.createVNode("div",{class:Jv(e.dot?"line-dot":"line")},null)]),t.createVNode("div",{class:Jv("right-container")},[r(o),!o.folded&&t.createVNode("div",{class:Jv("main-container")},[l(o),i(o)])])]),c=t.computed((()=>{const t=e.processes.map((e=>(e.folded=!1,e)));if(n.value){const o=t.slice(0,e.collapseCount);return o.map(((e,t)=>s(e,t===o.length-1)))}return t.map(((e,o)=>s(e,o===t.length-1)))}));return()=>{var a;return t.createVNode("div",{class:Jv()},[o["top-bar"]?t.createVNode("div",{class:[Jv("top-bar"),Pe]},[o["top-bar"]()]):t.createVNode("div",{class:[Jv("top-bar"),Pe]},[t.createVNode("div",{class:Jv("top-left")},[t.createVNode("div",{class:Jv("bar")},null),t.createVNode("div",{class:Jv("title")},[e.title])]),t.createVNode("div",{class:Jv("top-right")},[t.createVNode("span",{class:Jv("fold-text")},[t.createTextVNode("折叠"),e.title]),t.createVNode(Mv,{modelValue:n.value,"onUpdate:modelValue":e=>n.value=e},null)])]),(null==(a=c.value)?void 0:a.length)>0&&t.createVNode("div",{class:Jv("container")},[c.value])])}}})),[om,nm,am]=Se("uploader");function rm(e,t){return new Promise((o=>{if("file"===t)return void o();const n=new FileReader;n.onload=e=>{o(e.target.result)},"dataUrl"===t?n.readAsDataURL(e):"text"===t&&n.readAsText(e)}))}function im(e,t){return m(e).some((e=>!!e.file&&(n(t)?t(e.file):e.file.size>+t)))}const lm=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;function sm(e){return!!e.isImage||(e.file&&e.file.type?0===e.file.type.indexOf("image"):e.url?(t=e.url,lm.test(t)):"string"==typeof e.content&&0===e.content.indexOf("data:image"));var t}var cm=t.defineComponent({props:{name:y,item:b(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup(e,{emit:n,slots:a}){const r=()=>{const{status:n,message:a}=e.item;if("uploading"===n||"failed"===n){const e="failed"===n?t.createVNode(rt,{name:"close",class:nm("mask-icon")},null):t.createVNode(Pt,{class:nm("loading")},null),r=o(a)&&""!==a;return t.createVNode("div",{class:nm("mask")},[e,r&&t.createVNode("div",{class:nm("mask-message")},[a])])}},i=t=>{const{name:o,item:a,index:r,beforeDelete:i}=e;t.stopPropagation(),_e(i,{args:[a,{name:o,index:r}],done:()=>n("delete")})},l=()=>n("preview"),s=()=>{if(e.deletable&&"uploading"!==e.item.status){const e=a["preview-delete"];return t.createVNode("div",{role:"button",class:nm("preview-delete",{shadow:!e}),tabindex:0,"aria-label":am("delete"),onClick:i},[e?e():t.createVNode(rt,{name:"cross",class:nm("preview-delete-icon")},null)])}},c=()=>{if(a["preview-cover"]){const{index:o,item:n}=e;return t.createVNode("div",{class:nm("preview-cover")},[a["preview-cover"](d({index:o},n))])}},u=()=>{const{item:o,lazyLoad:n,imageFit:a,previewSize:r}=e;return sm(o)?t.createVNode(Jt,{fit:a,src:o.content||o.url,class:nm("preview-image"),width:Array.isArray(r)?r[0]:r,height:Array.isArray(r)?r[1]:r,lazyLoad:n,onClick:l},{default:c}):t.createVNode("div",{class:nm("file"),style:ie(e.previewSize)},[t.createVNode(rt,{class:nm("file-icon"),name:"description"},null),t.createVNode("div",{class:[nm("file-name"),"zt-ellipsis"]},[o.file?o.file.name:o.url]),c()])};return()=>t.createVNode("div",{class:nm("preview")},[u(),r(),s()])}});const um={name:C(""),accept:N("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:C(1/0),imageFit:N("cover"),resultType:N("dataUrl"),uploadIcon:N("photograph"),uploadText:String,deletable:w,afterRead:Function,showUpload:w,modelValue:L(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:w,previewOptions:Object,previewFullImage:w,maxSize:{type:[Number,String,Function],default:1/0}};const dm=je(t.defineComponent({name:om,props:um,emits:["delete","oversize","clickUpload","closePreview","clickPreview","update:modelValue"],setup(e,{emit:o,slots:n}){const a=t.ref(),i=[],l=(t=e.modelValue.length)=>({name:e.name,index:t}),s=()=>{a.value&&(a.value.value="")},c=n=>{if(s(),im(n,e.maxSize)){if(!Array.isArray(n))return void o("oversize",n,l());{const t=function(e,t){const o=[],n=[];return e.forEach((e=>{im(e,t)?n.push(e):o.push(e)})),{valid:o,invalid:n}}(n,e.maxSize);if(n=t.valid,o("oversize",t.invalid,l()),!n.length)return}}n=t.reactive(n),o("update:modelValue",[...e.modelValue,...m(n)]),e.afterRead&&e.afterRead(n,l())},u=t=>{const{maxCount:o,modelValue:n,resultType:a}=e;if(Array.isArray(t)){const e=+o-n.length;t.length>e&&(t=t.slice(0,e)),Promise.all(t.map((e=>rm(e,a)))).then((e=>{const o=t.map(((t,o)=>{const n={file:t,status:"",message:""};return e[o]&&(n.content=e[o]),n}));c(o)}))}else rm(t,a).then((e=>{const o={file:t,status:"",message:""};e&&(o.content=e),c(o)}))},f=t=>{const{files:o}=t.target;if(e.disabled||!o||!o.length)return;const n=1===o.length?o[0]:[].slice.call(o);if(e.beforeRead){const t=e.beforeRead(n,l());if(!t)return void s();if(r(t))return void t.then((e=>{u(e||n)})).catch(s)}u(n)};let p;const v=()=>o("closePreview"),g=(a,r)=>{const s=["imageFit","deletable","previewSize","beforeDelete"],c=d(h(e,s),h(a,s,!0));return t.createVNode(cm,t.mergeProps({item:a,index:r,onClick:()=>o("clickPreview",a,l(r)),onDelete:()=>((t,n)=>{const a=e.modelValue.slice(0);a.splice(n,1),o("update:modelValue",a),o("delete",t,l(n))})(a,r),onPreview:()=>(t=>{if(e.previewFullImage){const o=e.modelValue.filter(sm),n=o.map((e=>(e.file&&!e.url&&"failed"!==e.status&&(e.url=URL.createObjectURL(e.file),i.push(e.url)),e.url))).filter(Boolean);p=bl(d({images:n,startPosition:o.indexOf(t),closeable:!0,onClose:v},e.previewOptions))}})(a)},h(e,["name","lazyLoad"]),c),h(n,["preview-cover","preview-delete"]))},y=()=>{if(e.previewImage)return e.modelValue.map(g)},w=e=>o("clickUpload",e),b=()=>{if(e.modelValue.length>=+e.maxCount||!e.showUpload)return;const o=e.readonly?null:t.createVNode("input",{ref:a,type:"file",class:nm("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:f},null);return n.default?t.createVNode("div",{class:nm("input-wrapper"),onClick:w},[n.default(),o]):t.createVNode("div",{class:nm("upload",{readonly:e.readonly}),style:ie(e.previewSize),onClick:w},[t.createVNode(rt,{name:e.uploadIcon,class:nm("upload-icon")},null),e.uploadText&&t.createVNode("span",{class:nm("upload-text")},[e.uploadText]),o])};return t.onBeforeUnmount((()=>{i.forEach((e=>URL.revokeObjectURL(e)))})),ct({chooseFile:()=>{a.value&&!e.disabled&&a.value.click()},closeImagePreview:()=>{p&&p.close()}}),Z((()=>e.modelValue)),()=>t.createVNode("div",{class:nm()},[t.createVNode("div",{class:nm("wrapper",{disabled:e.disabled})},[y(),b()])])}})),fm=V&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,pm="event",hm="observer";function vm(e,t){if(!e.length)return;const o=e.indexOf(t);return o>-1?e.splice(o,1):void 0}function mm(e,t){if("IMG"!==e.tagName||!e.getAttribute("data-srcset"))return;let o=e.getAttribute("data-srcset");const n=e.parentNode.offsetWidth*t;let a,r,i;o=o.trim().split(",");const l=o.map((e=>(e=e.trim(),a=e.lastIndexOf(" "),-1===a?(r=e,i=999998):(r=e.substr(0,a),i=parseInt(e.substr(a+1,e.length-a-2),10)),[i,r])));l.sort(((e,t)=>{if(e[0]<t[0])return 1;if(e[0]>t[0])return-1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0}));let s,c="";for(let u=0;u<l.length;u++){s=l[u],c=s[1];const e=l[u+1];if(e&&e[0]<n){c=s[1];break}if(!e){c=s[1];break}}return c}const gm=(e=1)=>V&&window.devicePixelRatio||e;function ym(){if(!V)return!1;let e=!0;try{const t=document.createElement("canvas");t.getContext&&t.getContext("2d")&&(e=0===t.toDataURL("image/webp").indexOf("data:image/webp"))}catch(t){e=!1}return e}function wm(e,t){let o=null,n=0;return function(...a){if(o)return;const r=()=>{n=Date.now(),o=!1,e.apply(this,a)};Date.now()-n>=t?r():o=setTimeout(r,t)}}function bm(e,t,o){e.addEventListener(t,o,{capture:!1,passive:!0})}function Lm(e,t,o){e.removeEventListener(t,o,!1)}const xm=(e,t,o)=>{const n=new Image;if(!e||!e.src)return o(new Error("image src is required"));n.src=e.src,e.cors&&(n.crossOrigin=e.cors),n.onload=()=>t({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src}),n.onerror=e=>o(e)};class Cm{constructor({max:e}){this.options={max:e||100},this.caches=[]}has(e){return this.caches.indexOf(e)>-1}add(e){this.has(e)||(this.caches.push(e),this.caches.length>this.options.max&&this.free())}free(){this.caches.shift()}}const[Nm,Vm]=Se("video"),km={src:N(""),showToolBox:Boolean,options:{type:Object,default:{autoplay:!1,volume:.5,poster:"",loop:!1,controls:!0,muted:!1,disabled:!1,playsinline:!1,touchPlay:!1,preload:"",controlsList:["nodownload"]}},errorTip:N("播放器发生错误"),clickRetryTip:N("请点击重试")};const Am=je(t.defineComponent({name:Nm,props:km,emits:["play","pause","play-end","time"],setup(e,{emit:o}){const n=t.ref(),a=t.ref(),r=t.reactive({initial:!0,player:{$player:null,pos:null},progressBar:{progressElm:null,pos:null},videoSet:{loaded:0,displayTime:"00:00",totalTime:"00:00",progress:{width:0,current:0}},state:{controlShow:!0,vol:.5,currentTime:0,fullScreen:!1,playing:!1,isLoading:!1,isEnd:!1,isError:!1,isMuted:!1},showTouchMask:!1}),i=t.computed((()=>e.options.disabled));t.watch((()=>e.src),(e=>{e&&t.nextTick((()=>{var e;null==(e=a.value)||e.load()}))}),{immediate:!0,deep:!0}),t.watch((()=>e.options),(e=>{r.state.isMuted=(null==e?void 0:e.muted)||!1}),{immediate:!0});const l=()=>{var t,n,i,l,c,u,p,v;e.options.autoplay&&setTimeout((()=>{var e;null==(e=a.value)||e.play()}),200),e.options.touchPlay&&(r.showTouchMask=!0),e.options.playsinline&&(null==(t=a.value)||t.setAttribute("playsinline","true"),null==(n=a.value)||n.setAttribute("webkit-playsinline","true"),null==(i=a.value)||i.setAttribute("x5-video-player-type","h5-page"),null==(l=a.value)||l.setAttribute("x5-video-player-fullscreen","false")),h(),e.showToolBox?s():(null==(c=a.value)||c.addEventListener("play",(()=>{r.state.playing=!0,o("play",a.value)})),null==(u=a.value)||u.addEventListener("pause",(()=>{r.state.playing=!1,o("pause",a.value)})),null==(p=a.value)||p.addEventListener("ended",f),null==(v=a.value)||v.addEventListener("timeupdate",wm(d,1e3)))},s=()=>{var e,t;r.player.$player=a.value,r.progressBar.progressElm=n.value,r.progressBar.pos=null==(e=n.value)?void 0:e.getBoundingClientRect(),r.videoSet.progress.width=Math.round((null==(t=n.value)?void 0:t.getBoundingClientRect().width)||0)},c=()=>{var t,n,i,l;if(e.options.autoplay&&e.options.disabled)return r.state.playing=!0,!1;if(r.state.playing=!r.state.playing,a.value)if(r.state.playing)try{setTimeout((()=>{var e;null==(e=a.value)||e.play()}),200),null==(t=a.value)||t.addEventListener("progress",(()=>{u()})),null==(n=a.value)||n.addEventListener("timeupdate",wm(d,1e3)),null==(i=a.value)||i.addEventListener("ended",f),o("play",a.value)}catch(s){p()}else null==(l=a.value)||l.pause(),o("pause",a.value)},u=()=>{var e,t;r.videoSet.loaded=((null==(e=a.value)?void 0:e.buffered.end(0))||0)/((null==(t=a.value)?void 0:t.duration)||1)*100},d=()=>{var e,t,n,i,l;const s=Number.isNaN(null==(e=a.value)?void 0:e.duration)?0:null==(t=a.value)?void 0:t.duration,c=Number.isNaN(null==(n=a.value)?void 0:n.currentTime)?0:null==(i=a.value)?void 0:i.currentTime,u=(c||0)/(s||1);r.videoSet.progress.current=Math.round(r.videoSet.progress.width*u),r.videoSet.totalTime=ye(s),r.videoSet.displayTime=ye(null==(l=a.value)?void 0:l.currentTime),o("time",c,s,r.videoSet.displayTime,r.videoSet.totalTime)},f=()=>{r.state.playing=!1,r.state.isEnd=!0,r.videoSet.displayTime="00:00",r.videoSet.progress.current=0,a.value&&(a.value.currentTime=0),o("play-end",a.value)},p=()=>{r.state.isError=!0},h=()=>{r.state.vol=e.options.volume||0},v=()=>{r.state.isMuted=!r.state.isMuted,a.value&&(a.value.muted=r.state.isMuted)},m=e=>{var t,o;e.stopPropagation(),e.preventDefault();let n=e.targetTouches[0].pageX-r.progressBar.pos.left;n<=0&&(n=0),n>=r.videoSet.progress.width&&(n=r.videoSet.progress.width),r.videoSet.progress.current=n;const i=r.videoSet.progress.current/r.videoSet.progress.width;(null==(t=a.value)?void 0:t.duration)&&y(i,null==(o=a.value)?void 0:o.duration)},g=e=>{var t,o;e.stopPropagation();const n=e.changedTouches[0].pageX-r.progressBar.pos.left;r.videoSet.progress.current=n;const i=n/r.videoSet.progress.width;(null==(t=a.value)?void 0:t.duration)&&y(i,null==(o=a.value)?void 0:o.duration)},y=(e,t)=>{a.value&&(a.value.currentTime=Math.floor(e*t))},w=()=>{r.state.isError=!1,l()},b=()=>{var e;r.state.fullScreen?(r.state.fullScreen=!1,document.webkitCancelFullScreen()):(r.state.fullScreen=!0,null==(e=a.value)||e.webkitRequestFullScreen())};function L(){if(e.showToolBox&&!i.value)return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:Vm("mask"),onClick:c},null),r.state.playing?null:t.createVNode("div",{class:Vm("play-btn"),onClick:c},[t.createVNode(it,{name:"play-r"},null)]),t.createVNode("div",{class:[Vm("controller",{show:!r.state.playing,hide:r.state.playing})],style:{"z-index":We()}},[t.createVNode("div",{class:Vm("controller-play-btn"),onClick:c},null),t.createVNode("div",{class:Vm("controller-now")},[r.videoSet.displayTime]),t.createVNode("div",{class:Vm("controller-progress")},[t.createVNode("div",{ref:n,class:Vm("controller-progress-value")},[t.createVNode("div",{class:"buffered",style:{width:`${r.videoSet.loaded}%`}},null),t.createVNode("div",{class:Vm("controller-progress-ball"),style:{transform:`translate3d(${r.videoSet.progress.current}px, -50%, 0)`},onTouchmove:m,onTouchend:g},[t.createVNode("div",{class:Vm("move")},null)]),t.createVNode("div",{class:Vm("played")},null)])]),t.createVNode("div",{class:Vm("controller-total")},[r.videoSet.totalTime]),t.createVNode("div",{class:Vm("controller-volume"),onClick:v},[r.state.isMuted?t.createVNode(it,{name:"volume-off"},null):t.createVNode(it,{name:"volume-on"},null)]),t.createVNode("div",{class:Vm("controller-full"),onClick:b},[t.createVNode(it,{name:"expand"},null)])])])}function x(){if(r.state.isError)return t.createVNode("div",{class:Vm("error"),style:{"z-index":We()}},[t.createVNode("p",{class:Vm("tip")},[e.errorTip]),t.createVNode("p",{class:Vm("retry"),onClick:w},[e.clickRetryTip])])}return ct({play:c,pause:()=>{var e;r.state.playing=!1,null==(e=a.value)||e.pause(),o("pause",a.value)},stop:()=>{var e;f(),null==(e=a.value)||e.pause()},muted:()=>{r.state.isMuted=!0,a.value&&(a.value.muted=!0)},unmuted:()=>{r.state.isMuted=!1,a.value&&(a.value.muted=!1)}}),t.onMounted((()=>{l()})),()=>{const{src:o,options:n}=e,r=n.controlsList||["nodownload"];return t.createVNode("div",{class:Vm()},[t.createVNode("video",{ref:a,class:Vm("player"),muted:n.muted,autoplay:n.autoplay,loop:n.loop,poster:n.poster,controls:n.controls,controlslist:r.join(" "),preload:n.preload,src:o,onError:p},null),L(),x()])}}}));class Sm{constructor({el:e,src:t,error:o,loading:n,bindType:a,$parent:r,options:i,cors:l,elRenderer:s,imageCache:c}){this.el=e,this.src=t,this.error=o,this.loading=n,this.bindType=a,this.attempt=0,this.cors=l,this.naturalHeight=0,this.naturalWidth=0,this.options=i,this.$parent=r,this.elRenderer=s,this.imageCache=c,this.performanceData={loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(e){this.performanceData[e]=Date.now()}update({src:e,loading:t,error:o}){const n=this.src;this.src=e,this.loading=t,this.error=o,this.filter(),n!==this.src&&(this.attempt=0,this.initState())}checkInView(){const e=P(this.el);return e.top<window.innerHeight*this.options.preLoad&&e.bottom>this.options.preLoadTop&&e.left<window.innerWidth*this.options.preLoad&&e.right>0}filter(){Object.keys(this.options.filter).forEach((e=>{this.options.filter[e](this,this.options)}))}renderLoading(e){this.state.loading=!0,xm({src:this.loading,cors:this.cors},(()=>{this.render("loading",!1),this.state.loading=!1,e()}),(()=>{e(),this.state.loading=!1}))}load(e=u){if(this.attempt>this.options.attempt-1&&this.state.error)e();else if(!this.state.rendered||!this.state.loaded)return this.imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e()):void this.renderLoading((()=>{var t,o;this.attempt++,null==(o=(t=this.options.adapter).beforeLoad)||o.call(t,this,this.options),this.record("loadStart"),xm({src:this.src,cors:this.cors},(t=>{this.naturalHeight=t.naturalHeight,this.naturalWidth=t.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this.imageCache.add(this.src),e()}),(e=>{!this.options.silent&&console.error(e),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)}))}))}render(e,t){this.elRenderer(this,e,t)}performance(){let e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const Tm="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Om=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],Mm={rootMargin:"0px",threshold:0};var Pm=e=>({props:{tag:{type:String,default:"div"}},emits:["show"],render(){return t.h(this.tag,this.show&&this.$slots.default?this.$slots.default():null)},data:()=>({el:null,state:{loaded:!1},show:!1}),mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{checkInView(){const t=P(this.$el);return V&&t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});const Im={selector:"img"};class Bm{constructor({el:e,binding:t,vnode:o,lazy:n}){this.el=null,this.vnode=o,this.binding=t,this.options={},this.lazy=n,this.queue=[],this.update({el:e,binding:t})}update({el:e,binding:t}){this.el=e,this.options=Object.assign({},Im,t.value);this.getImgs().forEach((e=>{this.lazy.add(e,Object.assign({},this.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||this.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||this.options.loading}}),this.vnode)}))}getImgs(){return Array.from(this.el.querySelectorAll(this.options.selector))}clear(){this.getImgs().forEach((e=>this.lazy.remove(e))),this.vnode=null,this.binding=null,this.lazy=null}}class Dm{constructor({lazy:e}){this.lazy=e,this.queue=[]}bind(e,t,o){const n=new Bm({el:e,binding:t,vnode:o,lazy:this.lazy});this.queue.push(n)}update(e,t,o){const n=this.queue.find((t=>t.el===e));n&&n.update({el:e,binding:t,vnode:o})}unbind(e){const t=this.queue.find((t=>t.el===e));t&&(t.clear(),vm(this.queue,t))}}var Em=e=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(){var e,o;return t.h(this.tag,{src:this.renderSrc},null==(o=(e=this.$slots).default)?void 0:o.call(e))},data:()=>({el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},renderSrc:""}),watch:{src(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created(){this.init(),this.renderSrc=this.options.loading},mounted(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeUnmount(){e.removeComponent(this)},methods:{init(){const{src:t,loading:o,error:n}=e.valueFormatter(this.src);this.state.loaded=!1,this.options.src=t,this.options.error=n,this.options.loading=o,this.renderSrc=this.options.loading},checkInView(){const t=P(this.$el);return t.top<window.innerHeight*e.options.preLoad&&t.bottom>0&&t.left<window.innerWidth*e.options.preLoad&&t.right>0},load(e=u){if(this.state.attempt>this.options.attempt-1&&this.state.error)return void e();const{src:t}=this.options;xm({src:t},(({src:e})=>{this.renderSrc=e,this.state.loaded=!0}),(()=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0}))}}});const zm={install(e,o={}){const n=class{constructor({preLoad:e,error:t,throttleWait:o,preLoadTop:n,dispatchEvent:a,loading:r,attempt:i,silent:l=!0,scale:s,listenEvents:c,filter:u,adapter:d,observer:f,observerOptions:p}){this.mode=pm,this.listeners=[],this.targetIndex=0,this.targets=[],this.options={silent:l,dispatchEvent:!!a,throttleWait:o||200,preLoad:e||1.3,preLoadTop:n||0,error:t||Tm,loading:r||Tm,attempt:i||3,scale:s||gm(s),ListenEvents:c||Om,supportWebp:ym(),filter:u||{},adapter:d||{},observer:!!f,observerOptions:p||Mm},this.initEvent(),this.imageCache=new Cm({max:200}),this.lazyLoadHandler=wm(this.lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?hm:pm)}config(e={}){Object.assign(this.options,e)}performance(){return this.listeners.map((e=>e.performance()))}addLazyBox(e){this.listeners.push(e),V&&(this.addListenerTarget(window),this.observer&&this.observer.observe(e.el),e.$el&&e.$el.parentNode&&this.addListenerTarget(e.$el.parentNode))}add(e,o,n){if(this.listeners.some((t=>t.el===e)))return this.update(e,o),t.nextTick(this.lazyLoadHandler);const a=this.valueFormatter(o.value);let{src:r}=a;t.nextTick((()=>{r=mm(e,this.options.scale)||r,this.observer&&this.observer.observe(e);const i=Object.keys(o.modifiers)[0];let l;i&&(l=n.context.$refs[i],l=l?l.$el||l:document.getElementById(i)),l||(l=H(e));const s=new Sm({bindType:o.arg,$parent:l,el:e,src:r,loading:a.loading,error:a.error,cors:a.cors,elRenderer:this.elRenderer.bind(this),options:this.options,imageCache:this.imageCache});this.listeners.push(s),V&&(this.addListenerTarget(window),this.addListenerTarget(l)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}))}update(e,o,n){const a=this.valueFormatter(o.value);let{src:r}=a;r=mm(e,this.options.scale)||r;const i=this.listeners.find((t=>t.el===e));i?i.update({src:r,error:a.error,loading:a.loading}):this.add(e,o,n),this.observer&&(this.observer.unobserve(e),this.observer.observe(e)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}remove(e){if(!e)return;this.observer&&this.observer.unobserve(e);const t=this.listeners.find((t=>t.el===e));t&&(this.removeListenerTarget(t.$parent),this.removeListenerTarget(window),vm(this.listeners,t),t.$destroy())}removeComponent(e){e&&(vm(this.listeners,e),this.observer&&this.observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this.removeListenerTarget(e.$el.parentNode),this.removeListenerTarget(window))}setMode(e){fm||e!==hm||(e=pm),this.mode=e,e===pm?(this.observer&&(this.listeners.forEach((e=>{this.observer.unobserve(e.el)})),this.observer=null),this.targets.forEach((e=>{this.initListen(e.el,!0)}))):(this.targets.forEach((e=>{this.initListen(e.el,!1)})),this.initIntersectionObserver())}addListenerTarget(e){if(!e)return;let t=this.targets.find((t=>t.el===e));return t?t.childrenCount++:(t={el:e,id:++this.targetIndex,childrenCount:1,listened:!0},this.mode===pm&&this.initListen(t.el,!0),this.targets.push(t)),this.targetIndex}removeListenerTarget(e){this.targets.forEach(((t,o)=>{t.el===e&&(t.childrenCount--,t.childrenCount||(this.initListen(t.el,!1),this.targets.splice(o,1),t=null))}))}initListen(e,t){this.options.ListenEvents.forEach((o=>(t?bm:Lm)(e,o,this.lazyLoadHandler)))}initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(e,t)=>{this.Event.listeners[e]||(this.Event.listeners[e]=[]),this.Event.listeners[e].push(t)},this.$once=(e,t)=>{const o=(...n)=>{this.$off(e,o),t.apply(this,n)};this.$on(e,o)},this.$off=(e,t)=>{if(t)vm(this.Event.listeners[e],t);else{if(!this.Event.listeners[e])return;this.Event.listeners[e].length=0}},this.$emit=(e,t,o)=>{this.Event.listeners[e]&&this.Event.listeners[e].forEach((e=>e(t,o)))}}lazyLoadHandler(){const e=[];this.listeners.forEach((t=>{t.el&&t.el.parentNode||e.push(t),t.checkInView()&&t.load()})),e.forEach((e=>{vm(this.listeners,e),e.$destroy()}))}initIntersectionObserver(){fm&&(this.observer=new IntersectionObserver(this.observerHandler.bind(this),this.options.observerOptions),this.listeners.length&&this.listeners.forEach((e=>{this.observer.observe(e.el)})))}observerHandler(e){e.forEach((e=>{e.isIntersecting&&this.listeners.forEach((t=>{if(t.el===e.target){if(t.state.loaded)return this.observer.unobserve(t.el);t.load()}}))}))}elRenderer(e,t,o){if(!e.el)return;const{el:n,bindType:a}=e;let r;switch(t){case"loading":r=e.loading;break;case"error":r=e.error;break;default:({src:r}=e)}if(a?n.style[a]='url("'+r+'")':n.getAttribute("src")!==r&&n.setAttribute("src",r),n.setAttribute("lazy",t),this.$emit(t,e,o),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){const o=new CustomEvent(t,{detail:e});n.dispatchEvent(o)}}valueFormatter(e){let t=e,{loading:o,error:n}=this.options;return a(e)&&(({src:t}=e),o=e.loading||this.options.loading,n=e.error||this.options.error),{src:t,loading:o,error:n}}},r=new n(o),i=new Dm({lazy:r});e.config.globalProperties.$Lazyload=r,o.lazyComponent&&e.component("LazyComponent",Pm(r)),o.lazyImage&&e.component("LazyImage",Em(r)),e.directive("lazy",{beforeMount:r.add.bind(r),updated:r.update.bind(r),unmounted:r.remove.bind(r)}),e.directive("lazy-container",{beforeMount:i.bind.bind(i),updated:i.update.bind(i),unmounted:i.unbind.bind(i)})}},_m="3.1.64";function jm(e){[_t,Gt,ao,Ue,po,ln,Gn,ra,ca,ba,xa,Ma,Ea,Fa,Ra,_r,Xr,Un,yi,Ai,Si,Di,ti,ji,$i,qi,Ji,cl,rt,Jt,Ll,Ol,Ml,El,Pt,Ce,pd,Rl,Ld,kd,Od,jd,qd,bt,Qd,wr,eh,Vt,ih,vh,mh,zh,Rh,Hh,ii,Kh,ov,$t,lv,mv,Lv,xv,hn,xn,kv,Bn,Ov,_n,Ev,Fv,Kv,jn,fi,Zv,Tr,tm,Xo,dm,Am].forEach((t=>{t.install?e.use(t):t.name&&e.component(t.name,t)}))}var Fm={install:jm,version:_m};function Rm(){var e=window.jsi&&window.jsi.callNative,t=window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative;return!!e||!!t}function Hm(e,t,o){var n=this,a=window;window[e]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];t&&function(e,t){void 0===t&&(t=window);var o=t||window;delete o[e],o.top&&delete o.top[e]}(e,a),o.apply(n,r)},window.top&&(window.top[e]=window[e])}function $m(e){var t=e.methodName,o=void 0===t?"":t,n=e.requestCode,a=void 0===n?-1:n,r=e.params,i=void 0===r?{}:r,l=e.callbackName,s=void 0===l?null:l,c=e.callbackFunc,u=void 0===c?null:c,d=e.autoClear,f=void 0===d||d,p=e.onFail,h=void 0===p?null:p;if(Rm()){var v={method:o,params:i,callback:null};a&&a>=0&&(v.requestCode=a);var m,g,y=s,w=u;y?w||(w=window[y]):w&&((m=window.top||window).hasOwnProperty("__callId__")||(m.__callId__=0),m.__callId__+=1,y="jsicallback"+m.__callId__),v.callback=y,y&&Hm(y,f,(g=w,function(e){var t=e;try{"string"==typeof t&&(t=t.replace(/\n/g,"\\n").replace(/\r/g,"\\r"),t=JSON.parse(t)||{})}catch(o){console.log(o),t={code:-1,msg:"返回数据格式异常:"+t}}console.debug(t),g&&(t||(t={}),t.isSuccess=0===t.code,g(t))}));var b=JSON.stringify(v);window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.callNative?window.webkit.messageHandlers.callNative.postMessage(b):window.jsi.callNative(b)}else h&&h()}function Um(e){var t=e.methodName,o=void 0===t?"":t,n=e.requestCode,a=void 0===n?-1:n,r=e.params,i=void 0===r?{}:r,l=e.callbackName,s=void 0===l?null:l,c=e.autoClear,u=void 0===c||c,d=e.timeout,f=void 0===d?1e4:d,p=e.raw,h=void 0===p||p,v=e.onFail,m=void 0===v?null:v;return new Promise((function(e,t){var n=!1,r=!1;$m({methodName:o,requestCode:a,params:i,callbackName:s,autoClear:u,callbackFunc:function(o){o&&o.isSuccess&&o.data&&o.data.cancelFlag?r=!0:(h?e(o):o.isSuccess?e(o.data):t(o.msg),n=!0)},onFail:function(){t("callNative "+o+" not supported"),console.error("callNative "+o+" not supported"),n=!0,m&&m()}}),f>0&&setTimeout((function(){n||r||(t(o+"超时"),m&&m())}),f)}))}var Zm=function(){function e(){}return e.prototype.isEnvironmentEnabled=function(){return!1},e}();function Wm(e){return Um({methodName:"getLocation"}).then((function(t){var o=(null==t?void 0:t.data)||{},n={longitude:o.x,latitude:o.y,accuracy:"",horizontalAccuracy:""};return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(t){e&&e.fail&&e.fail(t)}))}function Ym(e){return Um({methodName:"getBase64FileData",params:{path:e},raw:!1}).then((function(e){return Promise.resolve(e.base64)}))}function qm(e,t,o){for(var n=atob(e),a=n.length,r=new Uint8Array(a);a--;)r[a]=n.charCodeAt(a);return new File([r],t,{type:o})}function Gm(e){var t=function(e){return{status:"rejected",reason:e}},o=function(e){return{status:"fulfilled",value:e}};return Promise.all(e.map((function(e){return Promise.resolve(e).then(o,t)})))}function Xm(e){var t=e.lastIndexOf("/");return e.substring(t+1)}function Km(e){var t="media.pickPhoto";return e.sourceType&&e.sourceType.includes("camera")&&(t="media.takePhoto"),Um({methodName:t,timeout:3e5,params:{watermarkConfigString:e.watermarkConfigString||"",cameraFacingType:e.cameraFacingType||0}}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.resultList)||[];if("string"==typeof n)try{n=JSON.parse(n)||[]}catch(i){console.log(i)}var a=[],r=[];Gm(n.map((function(e){return Ym(e)}))).then((function(t){t.forEach((function(e,t){if("fulfilled"===e.status){var o=e.value,i=Xm(n[t]);a.push(qm(o,i,"image/jpeg")),r.push("data:image/jpeg;base64,"+o)}}));var o={files:a,tempFilePaths:r};return e.success&&e.success(o),Promise.resolve(o)}))})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}function Qm(e){var t="media.pickVideo";return e.sourceType&&e.sourceType.includes("camera")&&(t="media.takeVideo"),Um({methodName:t,timeout:3e5}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.resultList)||[];if("string"==typeof n)try{n=JSON.parse(n)||[]}catch(r){console.log(r)}var a=[];Gm(n.map((function(e){return Ym(e)}))).then((function(t){t.forEach((function(e,t){if("fulfilled"===e.status){var o=e.value,r=Xm(n[t]);a.push(qm(o,r,"video/mp4"))}}));var o={files:a};return e.success&&e.success(o),Promise.resolve(o)}))})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}var Jm=navigator.userAgent.toLowerCase();window.jsi&&window.jsi.callNative;var eg=window.jsInterface&&window.jsInterface.loadFinish,tg=Jm.includes("dingtalk"),og=Jm&&/micromessenger/.test(Jm),ng=Jm&&/iphone|ipad|ipod|ios/.test(Jm);Jm&&Jm.indexOf("android");var ag=Jm&&(/egovamobilev22/.test(Jm)||/egovamobilepro/.test(Jm)),rg=window.self!==window.top,ig=Jm&&/gwork/.test(Jm);function lg(e){var t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=e.needConvertInZhixin,l=n||t||-1,s=a||o||-1;return Um(ag?{methodName:"location.navigateToPosition",params:{longitude:l,latitude:s,address:r}}:{methodName:"navigateToPosition",params:{coordX:l,coordY:s,address:r,needConvert:i}})}function sg(e){return $m({methodName:ag?"navigation.setTitle":"bindNavBar",raw:!1,params:{title:e.title||""}}),e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()}function cg(e){return Um({methodName:"navigation.setColor",params:{backgroundColor:e.backgroundColor,frontColor:e.frontColor}}).then((function(){return e.success&&e.success(),e.complete&&e.complete(),Promise.resolve()})).catch((function(t){return e.fail&&e.fail(t),e.complete&&e.complete(),Promise.reject(t)}))}function ug(e){return Um({methodName:ag?"navigate.openLink":"openWebPage",raw:!1,params:{url:e.url||""}}).then((function(){return e.success&&e.success(),Promise.resolve()})).catch((function(t){return e.fail&&e.fail(t),Promise.reject(t)}))}function dg(){return Um({methodName:ag?"navigate.close":"close",raw:!1}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function fg(e){var t=e.success,o=e.fail,n=e.phoneNumber;return Um({methodName:ag?"device.phoneCall":"phoneCall",params:{phoneNum:n},onFail:o}).then((function(e){return t&&t(e),Promise.resolve(e)}))}function pg(e){return Um({methodName:"startQrCodeScan"}).then((function(t){return e.success&&e.success(t.data.result),Promise.resolve(t.data.result)}))}function hg(e){return Um({methodName:"getDeviceInfo"}).then((function(t){return e.success&&e.success(t.data),Promise.resolve(t.data)}))}function vg(e){return Um({methodName:"navigation.setStatusBarBlackFont",params:{blackFont:e}}).then((function(){return Promise.resolve()})).catch((function(e){return Promise.reject(e)}))}function mg(e){return Um({methodName:"audio.startRecord",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function gg(e){return Um({methodName:"audio.stopRecord",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function yg(e){return Um({methodName:"audio.onRecordEnd",timeout:3e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function wg(e){return Um({methodName:"audio.playVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function bg(e){return Um({methodName:"audio.pauseVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Lg(e){return Um({methodName:"audio.stopVoice",timeout:3e4,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function xg(e){return Um({methodName:"audio.onPlayEnd",timeout:36e5}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path}),Promise.resolve({localAudioId:o.path})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Cg(e){return Um({methodName:"audio.uploadVoice",timeout:3e5,params:{localAudioId:e.localAudioId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({mediaId:o.mediaId}),Promise.resolve({mediaId:o.mediaId})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Ng(e){return Um({methodName:"audio.downloadVoice",timeout:3e5,params:{mediaId:e.mediaId}}).then((function(t){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success({localAudioId:o.path,duration:o.duration,size:o.size}),Promise.resolve({localAudioId:o.path,duration:o.duration,size:o.size})})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Vg(e){return Um({methodName:"file.isLocalFileExist",params:{mediaIdArray:e.mediaIdArray}}).then((function(t){var o,n=(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.list)||[];return e&&e.success&&e.success(n),Promise.resolve(n)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function kg(e){return Um({methodName:"file.download",timeout:36e5,params:{url:e.url}}).then((function(t){var o;if((null==t?void 0:t.isSuccess)||!1){var n={tempFilePath:(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.tempFilePath)||""};return e&&e.success&&e.success(n),Promise.resolve(n)}var a=(null==t?void 0:t.msg)||"下载失败";return e&&e.fail&&e.fail(a),Promise.reject(a)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}function Ag(e){return Um({methodName:"file.openDocument",params:{localFilePath:e.localFilePath}}).then((function(t){if((null==t?void 0:t.isSuccess)||!1){var o=(null==t?void 0:t.data)||{};return e&&e.success&&e.success(o),Promise.resolve(o)}var n=(null==t?void 0:t.msg)||"打开文件失败";return e&&e.fail&&e.fail(n),Promise.reject(n)})).catch((function(t){return e&&e.fail&&e.fail(t),Promise.reject(t)}))}var Sg,Tg=globalThis&&globalThis.__extends||(Sg=function(e,t){return(Sg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}Sg(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Og=function(e){function t(){var t=e.call(this)||this;return t.navigate={close:dg,openLink:ug},ag?(t.navigationBar={setNavigationBarTitle:sg,setNavigationBarColor:cg,setStatusBarBlackFont:vg},t.location={getLocation:Wm,navigateTo:lg},t.device={makePhoneCall:fg},t.audio={startRecord:mg,stopRecord:gg,onRecordEnd:yg,playVoice:wg,pauseVoice:bg,stopVoice:Lg,onPlayEnd:xg,uploadVoice:Cg,downloadVoice:Ng},t.file={isLocalFileExist:Vg}):(t.navigationBar={setNavigationBarTitle:sg},t.location={getLocation:Wm,navigateTo:lg},t.device={makePhoneCall:fg,scan:pg,getSystemInfo:hg},t.media={chooseImage:Km,chooseVideo:Qm},t.file={download:kg,openDocument:Ag}),t}return Tg(t,e),t.prototype.isEnvironmentEnabled=function(){return Rm()},t}(Zm),Mg="undefined"!=typeof window&&"onload"in window,Pg="undefined"!=typeof process&&!(!process.versions||!process.versions.node);"undefined"!=typeof WXEnvironment&&WXEnvironment.platform;var Ig="undefined"!=typeof my&&null!==my&&void 0!==my.alert,Bg="undefined"!=typeof tt&&null!==tt&&void 0!==tt.showToast,Dg="undefined"!=typeof swan&&null!==swan&&void 0!==swan.showToast,Eg="undefined"!=typeof ks&&null!==ks&&void 0!==ks.showToast,zg=!Bg&&"undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);Ig&&Mg&&my.isFRM;var _g="object"==typeof navigator?navigator.userAgent||navigator.swuserAgent:"";function jg(e){return"undefined"===e}/.+AliApp\((\w+)\/((?:\d+\.)+\d+)\).* .*(WindVane)(?:\/((?:\d+\.)+\d+))?.*/.test(_g)&&Mg&&"undefined"!=typeof WindVane&&WindVane.call;var Fg=!jg(typeof dd)&&null!==dd&&!jg(typeof dd.alert);function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Rg.apply(this,arguments)}function Hg(e){return function(t){return new Promise((function(o,n){var a=t;e(Rg({},a,{success:function(e){a&&"function"==typeof a.success&&a.success(e),o(e)},onSuccess:function(e){a&&"function"==typeof a.onSuccess&&a.onSuccess(e),o(e)},fail:function(e){a&&"function"==typeof a.fail&&a.fail(e),n(e)},onFail:function(e){a&&"function"==typeof a.onFail&&a.onFail(e),n(e)},complete:function(e){a&&"function"==typeof a.complete&&a.complete(e)},onComplete:function(e){a&&"function"==typeof a.onComplete&&a.onComplete(e)}}))}))}}var $g=["_ext"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Ug.apply(this,arguments)}var Zg=function(e,t){var o=e||{},n=o._ext,a=void 0===n?{}:n;return Ug({},function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(o,$g),a[t]||{})};function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Wg.apply(this,arguments)}var Yg=function(e){var t="en";switch(e.toLowerCase()){case"zh_cn":case"zh-hans":case"zh-cn":case"chinese":t="zh_CN";break;case"zh_tw":case"zh-hant":case"zh-hk":t="zh_TW";break;default:t="en"}return t},qg=function(e){return function(){var t=e();return Gg(t)}},Gg=function(e){return Wg({},{pixelRatio:1,screenWidth:0,screenHeight:0,windowWidth:0,windowHeight:0,language:"",version:"",platform:""},e,{language:e.language?Yg(e.language):""})},Xg=function(e,t){return function(o){var n=Zg(o,t),a=Wg({},n,{success:function(e){n.success&&n.success(Gg(e))},complete:function(e){n.complete&&n.complete(e.pixelRatio?Gg(e):e)}});return Hg(e)(a).then(Gg)}},Kg="wechatMiniProgram",Qg="aliMiniApp",Jg="bytedanceMicroApp",ey="web",ty="baiduSmartProgram",oy="kuaishouMiniProgram",ny="node";var ay=qg((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(a=navigator.platform,(a?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(t=e.userAgent)?void 0:t.toLowerCase())?"iOS":/android/.test(null==(o=navigator)||null==(n=o.userAgent)?void 0:n.toLowerCase())?"Android":a:"")||"")};var e,t,o,n,a}));const ry=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;try{var a=ay();t&&t(a),n&&n(a)}catch(r){o&&o(r),n&&n(r)}}),ey);const iy=qg((function(){return{pixelRatio:window.devicePixelRatio,screenWidth:window.document.documentElement.clientWidth,screenHeight:window.document.documentElement.clientHeight,windowWidth:window.innerWidth,windowHeight:window.innerHeight,language:navigator.language,version:navigator.appVersion,platform:(a=navigator.platform,a?/(iphone|ipod|ipad)/.test(null==(e=navigator)||null==(t=e.userAgent)?void 0:t.toLowerCase())?"iOS":/android/.test(null==(o=navigator)||null==(n=o.userAgent)?void 0:n.toLowerCase())?"Android":a:"")};var e,t,o,n,a}));const ly=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;(Fg?dd.getSystemInfo:my.getSystemInfo)({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Qg);const sy=qg((function(){return Fg?dd.getSystemInfoSync():my.getSystemInfoSync()}));const cy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;wx.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Kg);const uy=qg((function(){return wx.getSystemInfoSync()}));const dy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;tt.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),Jg);const fy=qg((function(){return tt.getSystemInfoSync()}));const py=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;ks.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),oy);const hy=qg((function(){return ks.getSystemInfoSync()}));const vy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;swan.getSystemInfo({success:function(e){t&&t(e)},fail:function(e){o&&o(e)},complete:function(e){n&&n(e)}})}),ty);const gy=qg((function(){return swan.getSystemInfoSync()}));var yy=qg((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}}));const wy=Xg((function(e){var t=e.success,o=e.fail,n=e.complete;try{var a=yy();t&&t(a),n&&n(a)}catch(r){o&&o(r),n&&n(r)}}),ny);const by=qg((function(){return{pixelRatio:1,screenWidth:1,screenHeight:1,windowWidth:1,windowHeight:1,language:"",version:"",platform:""}}));const Ly={getInfoSync:function(){if(Mg)return iy();if(Eg)return hy();if(zg)return uy();if(Bg)return fy();if(Ig)return sy();if(Dg)return gy();if(Pg)return by();throw new Error("Uni API:getInfoSync暂不支持")},getInfo:function(e){if(Mg)return ry(e);if(Eg)return py(e);if(zg)return cy(e);if(Bg)return dy(e);if(Ig)return ly(e);if(Dg)return vy(e);if(Pg)return wy(e);throw new Error("Uni API:getInfo暂不支持")}};function xy(){return xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},xy.apply(this,arguments)}var Cy=function(e,t){return function(o){void 0===o&&(o={});var n=Zg(o,t),a=xy({hideAlbum:!1,scanType:["barCode","qrCode"]},n,{success:function(e){n.success&&n.success(e)},complete:function(e){n.complete&&n.complete(e)}});return Hg(e)(a)}};const Ny=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;my.scan({hideAlbum:t,scanType:o,success:n,fail:a,complete:r})}),Qg);var Vy={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"};const ky=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;wx.scanCode({onlyFromCamera:t,scanType:Vy[o],success:n,fail:a,complete:r})}),Kg),Ay=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;tt.scanCode({onlyFromCamera:t,scanType:o,success:n,fail:a,complete:r})}),Jg),Sy=Cy((function(e){var t=e.success,o=e.fail,n=e.complete;swan.scanCode({success:t,fail:o,complete:n})}),ty);var Ty={barCode:"barCode",qrCode:"qrCode",dmCode:"datamatrix",pdf417Code:"pdf417"};const Oy=Cy((function(e){var t=e.hideAlbum,o=e.scanType,n=e.success,a=e.fail,r=e.complete;ks.scanCode({onlyFromCamera:t,scanType:Ty[o],success:n,fail:a,complete:r})}),oy);const My=function(e){if(Mg)return function(){throw new Error("Uni API: scanCode不支持")}();if(Eg)return Oy(e);if(zg)return ky(e);if(Bg)return Ay(e);if(Ig)return Ny(e);if(Dg)return Sy(e);throw new Error("Uni API:scanCode暂不支持")};function Py(){return Py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Py.apply(this,arguments)}var Iy=function(e){return Py({},e,{tapIndex:null!=e.tapIndex?e.tapIndex:e.index})};const By=(Dy=function(e){e.items=e.itemList,Fg?dd.showActionSheet(e):my.showActionSheet(e)},Ey=Qg,function(e){return e=Zg(e,Ey),Hg(Dy)(Py({},e,{success:function(t){e.success&&e.success(Iy(t))},complete:function(t){e.complete&&e.complete(t)}})).then(Iy)});var Dy,Ey;function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},zy.apply(this,arguments)}function _y(e,t){return function(o){return Hg(e)(Zg(o,t))}}function jy(e,t){return function(o){return Hg(e)((n=Zg(o,t),(a=zy({},n)).frontColor||(a.frontColor="#000000"),a));var n,a}}const Fy={setNavigationBarColor:jy((function(e){return Fg?dd.setNavigationBar(e):my.setNavigationBar(e)}),Qg),setNavigationBarTitle:_y((function(e){return Fg?dd.setNavigationBar(e):my.setNavigationBar(e)}),Qg)};const Ry={setNavigationBarTitle:_y((function(e){var t=e.title,o=e.success,n=void 0===o?function(){}:o,a=e.fail,r=void 0===a?function(){}:a,i=e.complete,l=void 0===i?function(){}:i;try{document.title=t,n(),l()}catch(s){r(),l()}}),ey)};const Hy={setNavigationBarColor:jy((function(e){wx.setNavigationBarColor(e)}),Kg),setNavigationBarTitle:_y((function(e){return wx.setNavigationBarTitle(e)}),Kg),getMenuButtonBoundingClientRect:function(){return wx.getMenuButtonBoundingClientRect()}};const $y={setNavigationBarColor:jy((function(e){tt.setNavigationBarColor(e)}),Jg),setNavigationBarTitle:_y((function(e){return tt.setNavigationBarTitle(e)}),Jg),getMenuButtonBoundingClientRect:function(){return tt.getMenuButtonBoundingClientRect()}};const Uy={setNavigationBarColor:jy((function(e){ks.setNavigationBarColor(e)}),oy),setNavigationBarTitle:_y((function(e){return ks.setNavigationBarTitle(e)}),oy),getMenuButtonBoundingClientRect:function(){return ks.getMenuButtonBoundingClientRect()}};const Zy={setNavigationBarColor:jy((function(e){swan.setNavigationBarColor(e)}),ty),setNavigationBarTitle:_y((function(e){return swan.setNavigationBarTitle(e)}),ty),getMenuButtonBoundingClientRect:function(){return swan.getMenuButtonBoundingClientRect()}};const Wy={setNavigationBarColor:function(e){if(Eg)return Uy.setNavigationBarColor(e);if(zg)return Hy.setNavigationBarColor(e);if(Bg)return $y.setNavigationBarColor(e);if(Ig)return Fy.setNavigationBarColor(e);if(Dg)return Zy.setNavigationBarColor(e);throw new Error("Uni API:setNavigationBarColor暂不支持")},setNavigationBarTitle:function(e){if(Mg)return Ry.setNavigationBarTitle(e);if(Eg)return Uy.setNavigationBarTitle(e);if(zg)return Hy.setNavigationBarTitle(e);if(Bg)return $y.setNavigationBarTitle(e);if(Ig)return Fy.setNavigationBarTitle(e);if(Dg)return Zy.setNavigationBarTitle(e);throw new Error("Uni API:setNavigationBarTitle暂不支持")},getMenuButtonBoundingClientRect:function(){if(Eg)return Uy.getMenuButtonBoundingClientRect();if(zg)return Hy.getMenuButtonBoundingClientRect();if(Bg)return $y.getMenuButtonBoundingClientRect();if(Dg)return Zy.getMenuButtonBoundingClientRect();throw new Error("Uni API:getMenuButtonBoundingClientRect暂不支持")}};function Yy(){return Yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Yy.apply(this,arguments)}var qy=function(e){return Yy({},e,{latitude:String(e.latitude),longitude:String(e.longitude),accuracy:String(e.accuracy),horizontalAccuracy:String(e.horizontalAccuracy)})};function Gy(e,t){return function(o){return Hg(e)((n=Zg(o,t),void 0===n&&(n={}),Yy({},n,{success:function(e){n.success&&n.success(qy(e))},complete:function(e){n.complete&&n.complete(e)}}))).then(qy);var n}}function Xy(e,t){return function(o){return Hg(e)(Zg(o,t))}}function Ky(e,t){return function(o){return Hg(e)(Zg(o,t))}}function Qy(){return Qy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qy.apply(this,arguments)}const Jy={getLocation:Gy((function(e){return e.resultType=e.resultType||0,null!=e&&e.type&&"string"==typeof e.type&&(e.type=0),null!=e&&e.resultType&&"number"==typeof e.resultType&&!isNaN(e.resultType)&&(e.type=e.resultType),Fg?dd.getLocation(e):my.getLocation(e)}),Qg),openLocation:Xy((function(e){var t=Qy({},e,{latitude:String(e.latitude),longitude:String(e.longitude)});Fg?dd.openLocation(t):my.openLocation(t)}),Qg),chooseLocation:Ky((function(e){return Fg?dd.chooseLocation(e):my.chooseLocation(e)}),Qg)};const ew={getLocation:Gy((function(e){var t=e.success,o=void 0===t?function(){}:t,n=e.fail,a=void 0===n?function(){}:n,r=e.complete,i=void 0===r?function(){}:r;if("geolocation"in navigator)navigator.geolocation.getCurrentPosition((function(e){o(e.coords),i(e.coords)}),(function(e){a(e),i(e)}));else{var l={code:-1,message:"地理位置服务不可用"};a(l),i(l)}}),ey),openLocation:Xy((function(){throw new Error("Uni API: openLocation不支持")}),ey),chooseLocation:Ky((function(){throw new Error("@uni/apis: chooseLocation不支持")}),ey)};function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},tw.apply(this,arguments)}const ow={getLocation:Gy((function(e){return wx.getLocation(e)}),Kg),openLocation:Xy((function(e){return wx.openLocation(tw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Kg),chooseLocation:Ky((function(e){return wx.chooseLocation(e)}),Kg)};function nw(){return nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},nw.apply(this,arguments)}const aw={getLocation:Gy((function(e){return tt.getLocation(e)}),Jg),openLocation:Xy((function(e){return tt.openLocation(nw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),Jg),chooseLocation:Ky((function(e){return tt.chooseLocation(e)}),Jg)};function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},rw.apply(this,arguments)}const iw={getLocation:Gy((function(e){return swan.getLocation(e)}),ty),openLocation:Xy((function(e){return swan.openLocation(rw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),ty),chooseLocation:Ky((function(e){return swan.chooseLocation(e)}),ty)};function lw(){return lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},lw.apply(this,arguments)}const sw={getLocation:Gy((function(e){return ks.getLocation(e)}),oy),openLocation:Xy((function(e){return ks.openLocation(lw({},e,{latitude:Number(e.latitude),longitude:Number(e.longitude)}))}),oy),chooseLocation:Ky((function(e){return ks.chooseLocation(e)}),oy)};const cw=function(e){if(Mg)return ew.getLocation(e);if(Eg)return sw.getLocation(e);if(zg)return ow.getLocation(e);if(Bg)return aw.getLocation(e);if(Ig)return Jy.getLocation(e);if(Dg)return iw.getLocation(e);throw new Error("Uni API:getLocation暂不支持")};function uw(){return uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},uw.apply(this,arguments)}var dw=function(e,t){var o=function(e){return uw({},e,{tempFiles:e.tempFiles||e.files,tempFilePaths:e.tempFilePaths})};return function(n){return n=Zg(n,t),Hg(e)(uw({},n,{count:n.count||1,success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},fw=function(e,t){var o=function(e){return{tempFilePath:e.tempFilePath||(e.filePaths||[])[0]||(e.apFilePaths||[])[0]||""}};return function(n){return n=Zg(n,t),Hg(e)(uw({},n,{success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},pw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}},hw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}},vw=function(e,t){return function(o){return Hg(e)(Zg(o,t))}};const mw={chooseImage:dw((function(e){return Fg?dd.chooseImage(e):my.chooseImage(e)}),Qg),compressImage:fw((function(e){return Fg?e.filePaths=[e.src]:e.apFilePaths=[e.src],e&&"number"==typeof e.quality&&(e.compressLevel=e.quality),Fg?dd.compressImage(e):my.compressImage(e)}),Qg),getImageInfo:pw((function(e){return Fg?dd.getImageInfo(e):my.getImageInfo(e)}),Qg),previewImage:hw((function(e){return Fg?dd.previewImage(e):my.previewImage(e)}),Qg),saveImage:vw((function(e){return Fg?dd.saveImage(e):my.saveImage(e)}),Qg)};function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},gw.apply(this,arguments)}var yw=function(e,t){var o=function(e){return gw({},e,{tempFilePath:e.tempFilePath||e.filePath})};return function(n){return n=Zg(n,t),Hg(e)(gw({},n,{success:function(e){n.success&&n.success(o(e))},complete:function(e){n.complete&&n.complete(e)}})).then(o)}},ww=function(e,t){var o=function(e){return gw({},e,{tempFiles:(e.tempFiles||e.files).map((function(e){return gw({},e,{tempFilePath:e.tempFilePath||e.path})}))})};return function(n){return void 0===n&&(n={}),n=Zg(gw({count:9,sizeType:["original","compressed"],sourceType:["camera","album"],mediaType:["image","video"],maxDuration:60},n),t),Hg(e)(gw({},n,{success:function(e){n.success&&n.success(o(e))},fail:function(e){n.fail&&n.fail(e)},complete:function(e){n.complete&&n.complete(e)}})).then(o)}};const bw=ww((function(e){void 0===e&&(e={});var t=e,o=t.count,n=void 0===o?9:o,a=t.success,r=void 0===a?function(){}:a,i=t.fail,l=void 0===i?function(){}:i,s=t.complete,c=void 0===s?function(){}:s;try{var u=function(e,t){var o=document.createElement("INPUT");return o.name="file",o.id="input-"+1e8*Math.random(),o.type="file",e&&o.setAttribute("multiple","multiple"),o.style.display="none",t&&o.setAttribute("accept",t),document.body.appendChild(o),o}(n>1,e.accept),d=[];u.addEventListener("change",(function(e){var t={tempFiles:(d=e.target.files&&Array.from(e.target.files).slice(0,n)).map((function(e){return{tempFilePath:window.URL.createObjectURL(e),size:e.size}})),files:d};r(t),c(t),u.remove&&u.remove()}),!1);var f=document.createEvent("MouseEvents");f.initEvent("click",!0,!0),u.dispatchEvent(f)}catch(p){l(p),c(p)}}),ey);const Lw=dw((function(e){void 0===e&&(e={});var t=e,o=t.count,n=void 0===o?1:o,a=t.success,r=void 0===a?function(){}:a,i=t.fail,l=void 0===i?function(){}:i,s=t.complete,c=void 0===s?function(){}:s;bw({count:n,accept:"image/*"}).then((function(e){var t={tempFilePaths:e.tempFiles.map((function(e){return e.tempFilePath})),tempFiles:e.tempFiles.map((function(e){return{path:e.tempFilePath,size:e.size}})),files:e.files};r(t),c(t)})).catch((function(e){l(e),c(e)}))}),ey);const xw=function(){throw new Error("Uni API: compressImage不支持")};const Cw=pw((function(e){var t=new Image;if(t.src=e.src,t.naturalWidth){var o={width:t.naturalWidth,height:t.naturalHeight,path:e.src};e.success(o),e.complete(o)}else{var n=function(){var o={width:t.width,height:t.height,path:e.src};e.success(o),e.complete(o)};if(t.complete)n();else{var a=null,r=function(){clearInterval(a),a=null};a=setInterval((function(){(t.width>0||t.height>0)&&(n(),r())}),40),t.onload=function(){a&&(n(),r())},t.onabort=t.onerror=function(t){e.fail(t),e.complete(t),r()}}}}),ey);var Nw="__universal_preview_image",Vw=("."+Nw+" {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 9999;\n text-align: center;\n background: #000;\n box-sizing: border-box;\n outline: none;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n}\n."+Nw+"_pageindex {\n position: absolute;\n top: 12px;\n left: 0;\n right: 0;\n text-align: center;\n color: #fff;\n font-size: 16px;\n z-index: 2;\n}\n."+Nw+"_swiper {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1;\n display: flex;\n align-items: center;\n transition-property: transform;\n box-sizing: content-box;\n}\n."+Nw+"_item {\n max-height: 70%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n width: 100%;\n position: relative;\n transition-property: transform;\n overflow: hidden;\n}\n."+Nw+"_img {\n width: 100%;\n}\n@keyframes "+Nw+"_fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes "+Nw+"_fadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}").replace(/\n/g,""),kw=null;const Aw={chooseImage:Lw,compressImage:xw,getImageInfo:Cw,previewImage:hw((function(e){var t=(e||{}).urls,o=void 0===t?[]:t,n=(e||{}).current,a=void 0===n?0:n;if("[object Array]"!==Object.prototype.toString.call(o))throw new Error("the arguments must contain urls that type is a Array");if(o.length<=0)throw new Error("the urls`s length is at least 1");if(!Number.isSafeInteger(a))throw new Error("the current must be a safe integer");a=Math.min(Math.max(a,0),o.length-1),kw||((kw=document.createElement("style")).innerHTML=Vw,document.body.appendChild(kw));var r=document.createElement("div");r.className=Nw,r.style.animationName=Nw+"_fadeIn",r.addEventListener("click",(function(){r&&(r.style.animationName=Nw+"_fadeOut"),setTimeout((function(){r&&document.body.removeChild(r),r=null}),300)}));var i=document.createElement("div");i.className=Nw+"_pageindex",i.innerText=a+1+"/"+o.length,r.appendChild(i);var l=document.createElement("div");l.className=Nw+"_swiper";var s=document.documentElement.clientWidth,c=0;l.addEventListener("touchstart",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault()),c=e.targetTouches[0].pageX})),l.addEventListener("touchmove",(function(e){e.touches.length>1&&(e.stopPropagation(),e.preventDefault());var t=e.targetTouches[0].pageX-c;l.style.transform="translateX("+(-s*a+1*t)+"px)"})),l.addEventListener("touchend",(function(e){var t=e.changedTouches[0].pageX-c;Math.abs(1*t)>s/5&&(a=t<0?Math.min(a+1,o.length-1):Math.max(a-1,0)),i.innerText=a+1+"/"+o.length;l.style.transitionDuration="300ms",l.style.transform="translateX("+-s*a+"px)",setTimeout((function(){l.style.transitionDuration="0ms"}),300)})),l.style.transform="translateX("+-s*a+"px)",r.appendChild(l),o.forEach((function(e){var t=document.createElement("div");t.className=Nw+"_item",t.addEventListener("click",(function(e){e.stopPropagation(),r&&(r.style.animationName=Nw+"_fadeOut"),setTimeout((function(){r&&document.body.removeChild(r),r=null}),300)})),l.appendChild(t);var o=document.createElement("img");o.className=Nw+"_img",o.src=e,t.appendChild(o),t.addEventListener("touchstart",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var o=e.touches[0],n=e.touches[1],a=Math.abs(n.pageX-o.pageX),r=Math.abs(n.pageY-o.pageY);t.touchDistance=Math.sqrt(a*a+r*r)}else t.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}})),t.addEventListener("touchmove",(function(e){if(e.touches.length>1){e.stopPropagation(),e.preventDefault();var n=Math.abs(e.touches[0].pageX-e.touches[1].pageX),a=Math.abs(e.touches[1].pageY-e.touches[1].pageY),r=Math.sqrt(n*n+a*a);if(t.touchDistance){var i=(t.previousPinchScale||1)+(r-t.touchDistance)/t.touchDistance,l=Math.max(1,i);o.style.transform="scale("+l+")",t.previousPinchScale=l}t.touchDistance=r}else if(t.previousPinchScale>1){e.stopPropagation();var s=(t.preX||0)+(e.touches[0].pageX-t.touched.x),c=(t.preY||0)+(e.touches[0].pageY-t.touched.y);o.style.transform="scale("+t.previousPinchScale+") translate("+s+"px, "+c+"px)",t.preX=s,t.preY=c,t.touched={x:e.touches[0].pageX,y:e.touches[0].pageY}}}))})),document.body.appendChild(r)}),ey),saveImage:function(){throw new Error("Uni API: saveImage不支持")}};function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Sw.apply(this,arguments)}function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Tw.apply(this,arguments)}const Ow={chooseImage:dw((function(e){return wx.chooseImage(e)}),Kg),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),wx.compressImage(e)}),Kg),getImageInfo:pw((function(e){return wx.getImageInfo(e)}),Kg),previewImage:hw((function(e){wx.previewImage(Sw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Kg),saveImage:vw((function(e){wx.saveImageToPhotosAlbum(Tw({},e,{filePath:e.url}))}),Kg)};function Mw(){return Mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Mw.apply(this,arguments)}function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Pw.apply(this,arguments)}const Iw={chooseImage:dw((function(e){return tt.chooseImage(e)}),Jg),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality=33*e.quality),tt.compressImage(e)}),Jg),getImageInfo:pw((function(e){return tt.getImageInfo(e)}),Jg),previewImage:hw((function(e){tt.previewImage(Mw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),Jg),saveImage:vw((function(e){tt.saveImageToPhotosAlbum(Pw({},e,{filePath:e.url}))}),Jg)};function Bw(){return Bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Bw.apply(this,arguments)}function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Dw.apply(this,arguments)}const Ew={chooseImage:dw((function(e){return ks.chooseImage(e)}),oy),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),ks.compressImage(e)}),oy),getImageInfo:pw((function(e){return ks.getImageInfo(e)}),oy),previewImage:hw((function(e){ks.previewImage(Bw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),oy),saveImage:vw((function(e){ks.saveImageToPhotosAlbum(Dw({},e,{filePath:e.url}))}),oy)};function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},zw.apply(this,arguments)}function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_w.apply(this,arguments)}const jw={chooseImage:dw((function(e){return swan.chooseImage(e)}),ty),compressImage:fw((function(e){return e&&"number"==typeof e.quality&&(e.quality*=33),swan.compressImage(e)}),ty),getImageInfo:pw((function(e){return swan.getImageInfo(e)}),ty),previewImage:hw((function(e){swan.previewImage(zw({},e,{current:"number"==typeof e.current?e.urls[e.current]:e.urls[0]}))}),ty),saveImage:vw((function(e){swan.saveImageToPhotosAlbum(_w({},e,{filePath:e.url}))}),ty)};const Fw={chooseImage:function(e){if(Mg)return Aw.chooseImage(e);if(Eg)return Ew.chooseImage(e);if(zg)return Ow.chooseImage(e);if(Bg)return Iw.chooseImage(e);if(Ig)return mw.chooseImage(e);if(Dg)return jw.chooseImage(e);throw new Error("Uni API:chooseImage暂不支持")},compressImage:function(e){if(Mg)return Aw.compressImage();if(Eg)return Ew.compressImage(e);if(zg)return Ow.compressImage(e);if(Bg)return Iw.compressImage(e);if(Ig)return mw.compressImage(e);if(Dg)return jw.compressImage(e);throw new Error("Uni API:compressImage暂不支持")},getImageInfo:function(e){if(Mg)return Aw.getImageInfo(e);if(Eg)return Ew.getImageInfo(e);if(zg)return Ow.getImageInfo(e);if(Bg)return Iw.getImageInfo(e);if(Ig)return mw.getImageInfo(e);if(Dg)return jw.getImageInfo(e);throw new Error("Uni API:getImageInfo暂不支持")},previewImage:function(e){if(Mg)return Aw.previewImage(e);if(Eg)return Ew.previewImage(e);if(zg)return Ow.previewImage(e);if(Bg)return Iw.previewImage(e);if(Ig)return mw.previewImage(e);if(Dg)return jw.previewImage(e);throw new Error("Uni API:previewImage暂不支持")},saveImage:function(e){if(Mg)return Aw.saveImage();if(Eg)return Ew.saveImage(e);if(zg)return Ow.saveImage(e);if(Bg)return Iw.saveImage(e);if(Ig)return mw.saveImage(e);if(Dg)return jw.saveImage(e);throw new Error("Uni API:saveImage暂不支持")}};function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Rw.apply(this,arguments)}const Hw={chooseVideo:yw((function(e){return Fg?dd.chooseVideo(e):my.chooseVideo(e)}),Qg),createVideoContext:function(e){return Fg?dd.createVideoContext(e):my.createVideoContext(e)},chooseMedia:ww((function(e){var t=e.mediaType,o=function(){return my.chooseImage(Rw({},e,{success:function(t){var o={type:"image",tempFiles:t.tempFiles.map((function(e){return Rw({},e,{tempFilePath:e.path})}))};e.success(o)}}))},n=function(){return my.chooseVideo(Rw({},e,{success:function(t){var o={type:"video",tempFiles:[t]};e.success(o)}}))};1===t.length&&"image"===t[0]?o():1===t.length&&"video"===t[0]?n():By({itemList:["图片","视频"]}).then((function(e){if(0===e.tapIndex)o();else{if(1!==e.tapIndex)return Promise.reject({errMsg:"用户取消选择"});n()}}))}),Qg)};function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},$w.apply(this,arguments)}const Uw={chooseVideo:yw((function(e){void 0===e&&(e={});var t=e,o=t.success,n=void 0===o?function(){}:o,a=t.fail,r=void 0===a?function(){}:a,i=t.complete,l=void 0===i?function(){}:i;bw({count:1,accept:"video/*"}).then((function(e){var t=$w({},e.tempFiles[0],{files:e.files});n(t),l(t)})).catch((function(e){r(e),l(e)}))}),ey),createVideoContext:function(){throw new Error("@uni/apis: createVideoContext不支持")},chooseMedia:bw};const Zw={chooseVideo:yw((function(e){return wx.chooseVideo(e)}),Kg),createVideoContext:function(e,t){return t?wx.createVideoContext(e,t):wx.createVideoContext(e)},chooseMedia:ww((function(e){return wx.canIUse("chooseMedia")?wx.chooseMedia(e):wx.chooseImage(e)}),Kg)};const Ww={chooseVideo:yw((function(e){return tt.chooseVideo(e)}),Jg),createVideoContext:function(e,t){return t?tt.createVideoContext(e,t):tt.createVideoContext(e)},chooseMedia:ww((function(e){return tt.chooseImage(e)}),Jg)};const Yw={chooseVideo:yw((function(e){return swan.chooseVideo(e)}),ty),createVideoContext:function(e){return swan.createVideoContext(e)},chooseMedia:ww((function(e){return swan.canIUse("chooseMedia")?swan.chooseMedia(e):swan.chooseImage(e)}),ty)};const qw={chooseVideo:yw((function(e){return ks.chooseVideo(e)}),oy),createVideoContext:function(e,t){return t?ks.createVideoContext(e,t):ks.createVideoContext(e)},chooseMedia:ww((function(e){return ks.canIUse("chooseMedia")?ks.chooseMedia(e):ks.chooseImage(e)}),oy)};const Gw={chooseMedia:function(e){if(Mg)return Uw.chooseMedia(e);if(Eg)return qw.chooseMedia(e);if(zg)return Zw.chooseMedia(e);if(Bg)return Ww.chooseMedia(e);if(Ig)return Hw.chooseMedia(e);if(Dg)return Yw.chooseMedia(e);throw new Error("@uni/apis:chooseMedia暂不支持")},chooseVideo:function(e){if(Mg)return Uw.chooseVideo(e);if(Eg)return qw.chooseVideo(e);if(zg)return Zw.chooseVideo(e);if(Bg)return Ww.chooseVideo(e);if(Ig)return Hw.chooseVideo(e);if(Dg)return Yw.chooseVideo(e);throw new Error("@uni/apis:chooseVideo暂不支持")},createVideoContext:function(e,t){if(Mg)return Uw.createVideoContext();if(Eg)return qw.createVideoContext(e,t);if(zg)return Zw.createVideoContext(e,t);if(Bg)return Ww.createVideoContext(e,t);if(Ig)return Hw.createVideoContext(e);if(Dg)return Yw.createVideoContext(e);throw new Error("@uni/apis:createVideoContext暂不支持")}};function Xw(e,t){return function(o){return Hg(e)(Zg(o,t))}}var Kw=["phoneNumber"];function Qw(){return Qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Qw.apply(this,arguments)}const Jw=Xw((function(e){if(Fg)dd.showCallMenu(e);else{var t=e.phoneNumber,o=function(e,t){if(null==e)return{};var o,n,a={},r=Object.keys(e);for(n=0;n<r.length;n++)o=r[n],t.indexOf(o)>=0||(a[o]=e[o]);return a}(e,Kw);my.makePhoneCall(Qw({},o,{number:t}))}}),Qg);const eb=Xw((function(e){var t=null==e?void 0:e.phoneNumber,o=document.createElement("a");o.href="tel:"+t,o.innerHTML="tel:"+t,o.style.display="none",document.body.appendChild(o),setTimeout((function(){o.click(),setTimeout((function(){try{document.body.removeChild(o)}catch(t){}finally{null==e||e.success()}}),0)}),0)}),ey);const tb=Xw((function(e){wx.makePhoneCall(e)}),Kg);const ob=Xw((function(e){tt.makePhoneCall(e)}),Jg);const nb=Xw((function(e){ks.makePhoneCall(e)}),oy);const ab=Xw((function(e){swan.makePhoneCall(e)}),ty);function rb(e){if(Mg)return eb(e);if(Eg)return nb(e);if(zg)return tb(e);if(Bg)return ob(e);if(Ig)return Jw(e);if(Dg)return ab(e);throw new Error("Uni API:makePhoneCall 暂不支持")}var ib=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},lb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function sb(e){return ib(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c,u,d,f;return lb(this,(function(p){return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=e.medium,l=n||t||-1,s=a||o||-1,c=document.createElement("a"),u="",u="bdapp://map/direction?"+(d="destination=name:"+(r||"")+"|latlng:"+s+","+l+"&coord_type=wgs84"),ng&&(u="baidumap://map/direction?"+d),"gaode"===i&&(u="amapuri://route/plan/?"+(f="dlat="+s+"&dlon="+l+"&dname="+r+"&dev=1&t=0"),ng&&(u="iosamap://path?"+f)),c.setAttribute("href",u),c.setAttribute("style","visibility:hidden;"),c.setAttribute("id","navgatorLink"),document.getElementById("navgatorLink")&&document.body.removeChild(document.getElementById("navgatorLink")),document.body.appendChild(c),c.click(),[2]}))}))}var cb=3.141592653589793,ub=6378245,db=.006693421622965943;function fb(e,t){if(function(e,t){return e<72.004||e>137.8347||t<.8293||t>55.8271||!1}(e,t))return{longitude:e,latitude:t};var o=function(e,t){var o=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*cb)+20*Math.sin(2*e*cb))/3,o+=2*(20*Math.sin(t*cb)+40*Math.sin(t/3*cb))/3,o+2*(160*Math.sin(t/12*cb)+320*Math.sin(t*cb/30))/3}(e-105,t-35),n=function(e,t){var o=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*cb)+20*Math.sin(2*e*cb))/3,o+=2*(20*Math.sin(e*cb)+40*Math.sin(e/3*cb))/3,o+2*(150*Math.sin(e/12*cb)+300*Math.sin(e/30*cb))/3}(e-105,t-35),a=t/180*cb,r=Math.sin(a);r=1-db*r*r;var i=Math.sqrt(r);return o=180*o/(ub*(1-db)/(r*i)*cb),{longitude:2*e-(e+(n=180*n/(ub/i*Math.cos(a)*cb))),latitude:2*t-(t+o)}}var pb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},hb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function vb(e){return pb(this,void 0,void 0,(function(){return hb(this,(function(t){switch(t.label){case 0:return console.log("isJinBan",ig),ig?[4,(o="https://jzb.beijing.gov.cn/oss/focus-desktop/gwork/jssdk/JZB-JSSDK-1.1.0.js",new Promise((function(e,t){try{var n=document.createElement("script");n.type="text/javascript",n.src=o,document.body.appendChild(n),n.onload=function(){e()}}catch(a){t()}})))]:[3,2];case 1:return t.sent(),[2,new Promise((function(t,o){try{console.log("getDeviceInfo",window.jme.device.getDeviceInfo()),window.jme.device.getDeviceInfo()&&window.jme.location.startLocationUpdate({callBackInterval:0,callback:function(n){if(console.log("startLocationUpdate",n),n&&0===n.statusCode){var a=fb(n.longitude,n.latitude),r={accuracy:n.accuracy.toString(),latitude:a.latitude.toString(),longitude:a.longitude.toString(),horizontalAccuracy:n.accuracy.toString()};e.success&&e.success(r),t(r)}else{var i="获取定位失败,statusCode"+n.statusCode;e.fail&&e.fail(i),o(i)}}})}catch(n){e.fail&&e.fail(n),o(n)}}))];case 2:return[2,cw(e)]}var o}))}))}var mb=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),gb=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:rb,scan:My,getSystemInfo:Ly.getInfo},t.location={getLocation:vb,navigateTo:sb},t.media={chooseImage:Fw.chooseImage,chooseVideo:Gw.chooseVideo},t.navigationBar={setNavigationBarTitle:Wy.setNavigationBarTitle},t}return mb(t,e),t.prototype.isEnvironmentEnabled=function(){return!0},t}(Zm),yb=3.141592653589793,wb=6378245,bb=.006693421622965943;function Lb(e,t){if(kb(e,t))return[e,t];var o=Cb(e-105,t-35),n=Nb(e-105,t-35),a=t/180*yb,r=Math.sin(a);r=1-bb*r*r;var i=Math.sqrt(r);return o=180*o/(wb*(1-bb)/(r*i)*yb),[e+(n=180*n/(wb/i*Math.cos(a)*yb)),t+o]}function xb(e,t){if(kb(e,t))return[e,t];var o=Cb(e-105,t-35),n=Nb(e-105,t-35),a=t/180*yb,r=Math.sin(a);r=1-bb*r*r;var i=Math.sqrt(r);return o=180*o/(wb*(1-bb)/(r*i)*yb),[2*e-(e+(n=180*n/(wb/i*Math.cos(a)*yb))),2*t-(t+o)]}function Cb(e,t){var o=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*yb)+20*Math.sin(2*e*yb))/3,o+=2*(20*Math.sin(t*yb)+40*Math.sin(t/3*yb))/3,o+=2*(160*Math.sin(t/12*yb)+320*Math.sin(t*yb/30))/3}function Nb(e,t){var o=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return o+=2*(20*Math.sin(6*e*yb)+20*Math.sin(2*e*yb))/3,o+=2*(20*Math.sin(e*yb)+40*Math.sin(e/3*yb))/3,o+=2*(150*Math.sin(e/12*yb)+300*Math.sin(e/30*yb))/3}function Vb(e,t){var o,n,a,r,i,l=(o=52.35987755982988,n=e-.0065,a=t-.006,r=Math.sqrt(n*n+a*a)-2e-5*Math.sin(a*o),i=Math.atan2(a,n)-3e-6*Math.cos(n*o),[r*Math.cos(i),r*Math.sin(i)]);return xb(l[0],l[1])}function kb(e,t){return e<72.004||e>137.8347||t<.8293||t>55.8271||!1}function Ab(e){return new Promise((function(t,o){if(window.jsInterface&&window.jsInterface.getLocationInfo){var n=setTimeout((function(){o(new Error("定位超时"))}),15e3);window.callbackLocation=function(a){var r=a;if("string"==typeof r&&(r=JSON.parse(r)),r)if(r.error)o(new Error(""+r.error)),clearTimeout(n);else{var i=Vb(r.longitude,r.latitude);(!i||i.length<2)&&(o(new Error("定位失败")),clearTimeout(n));var l={longitude:i[0]+"",latitude:i[1]+"",address:""+r.address,accuracy:"",horizontalAccuracy:""};e&&e.success&&e.success(l),t(l),clearTimeout(n)}else o(new Error("定位失败")),clearTimeout(n)},window.jsInterface&&window.jsInterface.getLocationInfo()}else o(new Error("不存在对应方法,无法调用定位"))}))}var Sb=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Tb=function(e){function t(){var t=e.call(this)||this;return t.location={getLocation:Ab},t}return Sb(t,e),t.prototype.isEnvironmentEnabled=function(){return!0},t}(Zm),Ob=function(){return new Promise((function(e,t){try{var o=document.createElement("script");o.type="text/javascript",o.src="https://g.alicdn.com/dingding/dingtalk-jsapi/3.0.12/dingtalk.open.js",document.body.appendChild(o),o.onload=function(){e()}}catch(n){t()}}))};function Mb(e,t){void 0===t&&(t=0);var o=parseInt(e);return isNaN(o)?t:o}var Pb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Ib=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Bb(e){return Pb(this,void 0,void 0,(function(){return Ib(this,(function(t){switch(t.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t,o){window.dd.device.geolocation.get({targetAccuracy:200,coordinate:1,withReGeocode:Mb(e.resultType)>0,useCache:!1,onSuccess:function(o){var n=xb(o.longitude,o.latitude),a={longitude:(null==n?void 0:n[0])||o.longitude,latitude:(null==n?void 0:n[1])||o.latitude,accuracy:o.accuracy,horizontalAccuracy:"",address:o.address,province:o.province,city:o.city,district:o.district,road:o.road,netType:o.netType,operatorType:o.operatorType,isWifiEnabled:o.isWifiEnabled,isGpsEnabled:o.isGpsEnabled,isFromMock:o.isFromMock,provider:o.provider,isMobileEnabled:o.isMobileEnabled};e.success&&e.success(a),t(a)},onFail:function(t){e.fail&&e.fail(t),o(t)}})}))]}}))}))}var Db=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Eb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function zb(e){return Db(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c;return Eb(this,(function(u){switch(u.label){case 0:return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,i=n||t||-1,l=a||o||-1,window.dd?[3,2]:[4,Ob()];case 1:u.sent(),u.label=2;case 2:return s=window.dd&&window.dd.biz.map.view,c=Lb(i,l),s&&s({latitude:c[1],longitude:c[0],title:r}),[2]}}))}))}var _b=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},jb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Fb(e){var t=e.title,o=e.success,n=void 0===o?function(){}:o,a=e.complete,r=void 0===a?function(){}:a;return _b(this,void 0,void 0,(function(){var e;return jb(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),window.dd?[3,2]:[4,Ob()];case 1:o.sent(),o.label=2;case 2:return window.dd.biz.navigation.setTitle({title:t}),n(),r(),[3,4];case 3:return e=o.sent(),console.error(e),[3,4];case 4:return[2]}}))}))}var Rb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Hb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function $b(e){return Rb(this,void 0,void 0,(function(){var t,o,n,a;return Hb(this,(function(r){switch(r.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:r.sent(),r.label=2;case 2:return t=e.success,o=e.fail,n=e.phoneNumber,(a=window.dd&&window.dd.biz.telephone.showCallMenu)&&a({phoneNumber:n,code:"+86",showDingCall:!0,onSuccess:t,onFail:o}),[2]}}))}))}var Ub=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Zb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Wb(e){return Ub(this,void 0,void 0,(function(){var t,o,n,a,r,i,l;return Zb(this,(function(s){switch(s.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:s.sent(),s.label=2;case 2:return t=e.success,o=e.fail,n=e.scanType,a=window.dd&&window.dd.biz.util.scan,r="all",n&&(i=n.indexOf("qrCode")>-1,l=n.indexOf("barCode")>-1,i&&!l&&(r="qrCode"),!i&&l&&(r="barCode")),a&&a({type:r,onSuccess:t,onFail:o}),[2]}}))}))}var Yb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},qb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function Gb(e){return Yb(this,void 0,void 0,(function(){var t,o,n;return qb(this,(function(a){switch(a.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:a.sent(),a.label=2;case 2:return t=e.success,o=e.fail,(n=window.dd&&window.dd.device.base.getPhoneInfo)&&n({onSuccess:t,onFail:o}),[2]}}))}))}var Xb=globalThis&&globalThis.__assign||function(){return Xb=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},Xb.apply(this,arguments)},Kb=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},Qb=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}},Jb=function(){return null};function eL(e){var t=e.methodName,o=e.params,n=void 0===o?{}:o,a=e.success,r=void 0===a?Jb:a,i=e.fail,l=void 0===i?Jb:i;return Kb(this,void 0,void 0,(function(){return Qb(this,(function(e){switch(e.label){case 0:return window.dd?[3,2]:[4,Ob()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,o){var a=window.dd&&window.dd.device.audio[t];a||o(t+" library not loaded"),a(Xb(Xb({},n),{onSuccess:function(t){r(t),e(t)},onFail:function(e){l(e),o(e)}}))}))]}}))}))}function tL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function oL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function nL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"onRecordEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function aL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"play",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function rL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"pause",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function iL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{localAudioId:e.localAudioId},methodName:"stop",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function lL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({methodName:"onPlayEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.mediaId})),Promise.resolve({localAudioId:t.mediaId})}))]}))}))}function sL(e){return Kb(this,void 0,void 0,(function(){return Qb(this,(function(t){return[2,eL({params:{mediaId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({content:t.content})),Promise.resolve({content:t.content})}))]}))}))}var cL=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),uL=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:$b,scan:Wb,getSystemInfo:Gb},t.location={getLocation:Bb,navigateTo:zb},t.navigationBar={setNavigationBarTitle:Fb},t.audio={startRecord:tL,stopRecord:oL,onRecordEnd:nL,playVoice:aL,pauseVoice:rL,stopVoice:iL,onPlayEnd:lL,translateVoice:sL},t}return cL(t,e),t.prototype.isEnvironmentEnabled=function(){return tg&&window.dd},t}(Zm),dL=function(){return new Promise((function(e,t){try{var o=document.createElement("script");o.type="text/javascript",o.src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js",document.body.appendChild(o),o.onload=function(){e()}}catch(n){t()}}))},fL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},pL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function hL(e){return fL(this,void 0,void 0,(function(){return pL(this,(function(t){switch(t.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t,o){var n=window.wx&&window.wx.getLocation;n||o("getLocationWeixin library not loaded"),n({type:"wgs84",success:function(n){if(console.log("weixinLocationAPI",n),n.longitude){var a={longitude:n.longitude,latitude:n.latitude,accuracy:n.accuracy,speed:n.speed,horizontalAccuracy:""};return e&&e.success&&e.success(a),t(a)}console.error("get wx location fail"),e&&e.fail&&e.fail("定位失败"),o("定位失败")},fail:function(t){console.error("get wx location fail",t),e&&e.fail&&e.fail(t),o("定位失败")}})}))]}}))}))}var vL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},mL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function gL(e){return vL(this,void 0,void 0,(function(){var t,o,n,a,r,i,l,s,c;return mL(this,(function(u){switch(u.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:u.sent(),u.label=2;case 2:return t=e.endX,o=e.endY,n=e.longitude,a=e.latitude,r=e.endAddress,e.fail,i=n||t||-1,l=a||o||-1,s=window.wx&&window.wx.openLocation,c=Lb(i,l),s&&s({latitude:c[1],longitude:c[0],name:r,address:r}),[2]}}))}))}var yL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},wL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}};function bL(e){return yL(this,void 0,void 0,(function(){var t,o,n,a,r,i;return wL(this,(function(l){switch(l.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:l.sent(),l.label=2;case 2:return t=e.success,o=e.scanType,n=window.wx&&window.wx.scanQRCode,a=["qrCode","barCode"],o&&(r=o.indexOf("qrCode")>-1,i=o.indexOf("barCode")>-1,r&&!i&&(a=["qrCode"]),!r&&i&&(a=["barCode"])),n&&n({needResult:1,scanType:a,success:t}),[2]}}))}))}var LL=globalThis&&globalThis.__assign||function(){return LL=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},LL.apply(this,arguments)},xL=globalThis&&globalThis.__awaiter||function(e,t,o,n){return new(o||(o=Promise))((function(a,r){function i(e){try{s(n.next(e))}catch(t){r(t)}}function l(e){try{s(n.throw(e))}catch(t){r(t)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(i,l)}s((n=n.apply(e,t||[])).next())}))},CL=globalThis&&globalThis.__generator||function(e,t){var o,n,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;i;)try{if(o=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(l){r=[6,l],n=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}},NL=function(){return null};function VL(e){var t=e.methodName,o=e.params,n=void 0===o?{}:o,a=e.success,r=void 0===a?NL:a,i=e.fail,l=void 0===i?NL:i;return xL(this,void 0,void 0,(function(){return CL(this,(function(e){switch(e.label){case 0:return window.wx?[3,2]:[4,dL()];case 1:e.sent(),e.label=2;case 2:return[2,new Promise((function(e,o){var a=window.wx&&window.wx[t];a||o(t+" library not loaded"),a(LL(LL({},n),{success:function(t){r(t),e(t)},fail:function(e){l(e),o(e)},complete:function(t){e(t)}}))}))]}}))}))}function kL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"startRecord",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function AL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"stopRecord",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function SL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"onVoiceRecordEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function TL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"playVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function OL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"pauseVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function ML(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"stopVoice",success:null==e?void 0:e.success,fail:null==e?void 0:e.fail})]}))}))}function PL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({methodName:"onVoicePlayEnd",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({localAudioId:t.localId})),Promise.resolve({localAudioId:t.localId})}))]}))}))}function IL(e){return xL(this,void 0,void 0,(function(){return CL(this,(function(t){return[2,VL({params:{localId:e.localAudioId},methodName:"translateVoice",fail:null==e?void 0:e.fail}).then((function(t){return(null==e?void 0:e.success)&&(null==e||e.success({content:t.translateResult})),Promise.resolve({content:t.translateResult})}))]}))}))}var BL=globalThis&&globalThis.__extends||function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),DL=function(e){function t(){var t=e.call(this)||this;return t.device={makePhoneCall:rb,scan:bL,getSystemInfo:Ly.getInfo},t.location={getLocation:hL,navigateTo:gL},t.navigationBar={setNavigationBarTitle:Wy.setNavigationBarTitle},t.audio={startRecord:kL,stopRecord:AL,onRecordEnd:SL,playVoice:TL,pauseVoice:OL,stopVoice:ML,onPlayEnd:PL,translateVoice:IL},t}return BL(t,e),t.prototype.isEnvironmentEnabled=function(){return og&&window.wx},t}(Zm),EL=[];const zL=Object.freeze(Object.defineProperty({__proto__:null,JsInterface:Zm,getJSI:function(){if(rg&&window.parent&&window.parent.__mobile__uni__api)return window.parent.__mobile__uni__api;if(!rg&&window.__mobile__uni__api)return window.__mobile__uni__api;for(var e=0;e<EL.length;e++){var t=EL[e];if(t.isEnvironmentEnabled())return window.__mobile__uni__api=t,window.__mobile__uni__api}var o;return o=Rm()?new Og:tg?new uL:og&&window.wx?new DL:eg?new Tb:new gb,window.__mobile__uni__api=o,window.__mobile__uni__api},registerJSI:function(e){EL.push(e)},unregisterJSI:function(e){var t=EL.indexOf(e);t>=0&&EL.splice(t,1)}},Symbol.toStringTag,{value:"Module"}));e.ActionSheet=_t,e.Audio=Gt,e.Avatar=ao,e.Badge=Ue,e.Button=po,e.Calendar=ln,e.Cascader=Gn,e.Cell=ra,e.CellGroup=ca,e.Checkbox=ba,e.CheckboxGroup=xa,e.Col=Ma,e.Collapse=Ea,e.CollapseItem=Fa,e.ConfigProvider=Ra,e.DateTimePicker=_r,e.Dialog=Xr,e.Divider=Un,e.DrawerSelect=yi,e.DropdownItem=Ai,e.DropdownMenu=Si,e.Empty=Di,e.Field=ti,e.FloatingBubble=ji,e.Form=$i,e.Grid=qi,e.GridItem=Ji,e.HierarchySelect=cl,e.Icon=rt,e.Image=Jt,e.ImagePreview=Ll,e.IndexAnchor=Ol,e.IndexBar=Ml,e.Lazyload=zm,e.List=El,e.Loading=Pt,e.Locale=Ce,e.MediaPicker=pd,e.MediaPlayer=Rl,e.MultiplePicker=Ld,e.NavBar=kd,e.NoticeBar=Od,e.Notify=jd,e.NumberKeyboard=qd,e.Overlay=bt,e.PasswordInput=Qd,e.Picker=wr,e.Popover=eh,e.Popup=Vt,e.PullRefresh=ih,e.Radio=vh,e.RadioGroup=mh,e.RadioPicker=zh,e.Rate=Rh,e.Row=Hh,e.Search=ii,e.Signature=Kh,e.Skeleton=ov,e.Slider=$t,e.SpeechRecognizer=lv,e.Step=mv,e.Stepper=Lv,e.Steps=xv,e.Sticky=hn,e.Swipe=xn,e.SwipeCell=kv,e.SwipeItem=Bn,e.Switch=Ov,e.Tab=_n,e.Tabbar=Ev,e.TabbarItem=Fv,e.Table=Kv,e.Tabs=jn,e.Tag=fi,e.TextEllipsis=Zv,e.TimePicker=Tr,e.Timeline=tm,e.Toast=Xo,e.Uploader=dm,e.Video=Am,e.ZT_AUDIO_KEY=Zt,e.actionSheetProps=Et,e.allowMultipleToast=(e=!0)=>{jo=e},e.calendarProps=rn,e.cascaderProps=qn,e.closeDialog=()=>{Zr&&Zr.toggle(!1)},e.closeNotify=_d,e.closeToast=Go,e.collapseItemProps=ja,e.collapseProps=Da,e.dateTimePickerProps=Br,e.default=Fm,e.defaultMedia={uniqueCode:"",fileSize:0,fileName:"",originalName:"",originalSize:0,lastModified:0,deletable:!1},e.dialogProps=Hr,e.dropdownItemProps=ki,e.dropdownMenuProps=Li,e.floatingBubbleProps=Ei,e.gridItemProps=Qi,e.gridProps=Wi,e.imagePreviewProps=ml,e.indexAnchorProps=Tl,e.indexBarProps=Nl,e.install=jm,e.pickerProps=pr,e.popoverProps=Jp,e.radioPickerProps=Eh,e.resetDialogDefaultOptions=()=>{Yr=d({},Wr)},e.resetNotifyDefaultOptions=()=>{zd={type:"danger",color:void 0,message:"",onClose:void 0,onClick:void 0,onOpened:void 0,duration:3e3,position:void 0,className:"",lockScroll:!1,background:void 0}},e.resetToastDefaultOptions=e=>{"string"==typeof e?Ro.delete(e):(Fo=d({},zo),Ro.clear())},e.searchProps=ri,e.setDialogDefaultOptions=e=>{d(Yr,e)},e.setNotifyDefaultOptions=e=>d(zd,e),e.setToastDefaultOptions=function(e,t){"string"==typeof e?Ro.set(e,t):d(Fo,e)},e.showConfirmDialog=Gr,e.showDialog=qr,e.showFailToast=qo,e.showImagePreview=bl,e.showLoadingToast=Wo,e.showNotify=function(e){var o;if(f)return Ed||({instance:Ed}=Eo({setup(){const{state:e,toggle:o}=Do();return()=>t.createVNode(Bd,t.mergeProps(e,{"onUpdate:show":o}),null)}})),e=d({},zd,a(o=e)?o:{message:o}),Ed.open(e),clearTimeout(Dd),e.duration>0&&(Dd=window.setTimeout(_d,e.duration)),Ed},e.showSuccessToast=Yo,e.showToast=Uo,e.signatureProps=Xh,e.skeletonProps=tv,e.sliderProps=Ht,e.stepsProps=uv,e.swipeCellProps=Vv,e.tableProps=Xv,e.tagProps=di,e.textEllipsisProps=Uv,e.timePickerProps=Sr,e.timelineProps=em,e.uploaderProps=um,e.version=_m,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|