!function(){function e(t){return e="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(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return o};var o={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,o){e[t]=o.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(P){c=function(e,t,o){return e[t]=o}}function d(e,t,o,n){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),l=new I(n||[]);return a(i,"_invoke",{value:A(e,o,l)}),i}function f(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(P){return{type:"throw",arg:P}}}o.wrap=d;var p={};function v(){}function m(){}function h(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(z([])));b&&b!==n&&r.call(b,l)&&(g=b);var w=h.prototype=v.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(t,o){function n(a,i,l,u){var s=f(t[a],t,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==e(d)&&r.call(d,"__await")?o.resolve(d.__await).then((function(e){n("next",e,l,u)}),(function(e){n("throw",e,l,u)})):o.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,u)}))}u(s.arg)}var i;a(this,"_invoke",{value:function(e,t){function r(){return new o((function(o,r){n(e,t,o,r)}))}return i=i?i.then(r,r):r()}})}function A(e,t,o){var n="suspendedStart";return function(r,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw a;return F()}for(o.method=r,o.arg=a;;){var i=o.delegate;if(i){var l=C(i,o);if(l){if(l===p)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===n)throw n="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n="executing";var u=f(e,t,o);if("normal"===u.type){if(n=o.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n="completed",o.method="throw",o.arg=u.arg)}}}function C(e,t){var o=t.method,n=e.iterator[o];if(void 0===n)return t.delegate=null,"throw"===o&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==o&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+o+"' method")),p;var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function z(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,n=function t(){for(;++o=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),k(o),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc===e){var n=o.completion;if("throw"===n.type){var r=n.arg;k(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:z(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=void 0),p}},o}function o(e,t,o,n,r,a,i){try{var l=e[a](i),u=l.value}catch(s){return void o(s)}l.done?t(u):Promise.resolve(u).then(n,r)}function n(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function l(e){o(i,r,a,l,u,"next",e)}function u(e){o(i,r,a,l,u,"throw",e)}l(void 0)}))}}function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a,i,l=[],u=!0,s=!1;try{if(a=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;u=!1}else for(;!(u=(n=a.call(o)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(c){s=!0,r=c}finally{try{if(!u&&null!=o.return&&(i=o.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);oo})),k=p((function(){var e=_.scale,t=_.moveX,o=_.moveY,n=_.moving,r={transitionDuration:_.zooming||n?"0s":".3s"};if(1!==e){var a=t/e,i=o/e;r.transform="scale(".concat(e,", ").concat(e,") translate(").concat(a,"px, ").concat(i,"px)")}return r})),I=p((function(){if(_.imageRatio){var t=e.rootWidth,o=e.rootHeight,n=S.value?o/_.imageRatio:t;return Math.max(0,(_.scale*n-t)/2)}return 0})),z=p((function(){if(_.imageRatio){var t=e.rootWidth,o=e.rootHeight,n=S.value?o:t*_.imageRatio;return Math.max(0,(_.scale*n-o)/2)}return 0})),F=function(t){(t=y(t,+e.minZoom,+e.maxZoom+1))!==_.scale&&(_.scale=t,s("scale",{scale:t,index:e.active}))},P=function(){F(1),_.moveX=0,_.moveY=0},E=!1,L=function(t){var l=t.touches;if(2!==(o=l.length)||!e.disableZoom){var s=A.offsetX;A.start(t),n=_.moveX,r=_.moveY,u=Date.now(),E=!1,_.moving=1===o&&1!==_.scale,_.zooming=2===o&&!s.value,_.zooming&&(a=_.scale,i=se(t.touches))}},V=function(){if(!(o>1)){var e,t=A.offsetX,n=A.offsetY,r=Date.now()-u;t.value<5&&n.value<5&&(r<250?l?(clearTimeout(l),l=null,e=_.scale>1?1:2,F(e),_.moveX=0,_.moveY=0):l=setTimeout((function(){s("close"),l=null}),250):r>w&&s("longPress"))}},j=function(t){var o=!1;if((_.moving||_.zooming)&&(o=!0,_.moving&&n===_.moveX&&r===_.moveY&&(o=!1),!t.touches.length)){_.zooming&&(_.moveX=y(_.moveX,-I.value,I.value),_.moveY=y(_.moveY,-z.value,z.value),_.zooming=!1),_.moving=!1,n=0,r=0,a=1,_.scale<1&&P();var i=+e.maxZoom;_.scale>i&&(_.scale=i)}g(t,o),V(),A.reset()},O=function(e){var t=e.target,o=t.naturalWidth,n=t.naturalHeight;_.imageRatio=n/o};return v((function(){return e.active}),P),v((function(){return e.show}),(function(e){e||P()})),m("touchmove",(function(e){var t=e.touches;if(A.move(e),_.moving){var o=A.deltaX,l=A.deltaY,u=o.value+n,s=l.value+r;if((u>I.value||u<-I.value)&&!E&&A.isHorizontal())return void(_.moving=!1);E=!0,g(e,!0),_.moveX=y(u,-I.value,I.value),_.moveY=y(s,-z.value,z.value)}if(_.zooming&&(g(e,!0),2===t.length)){var c=se(t);F(a*c/i)}}),{target:p((function(){var e;return null==(e=C.value)?void 0:e.$el}))}),function(){var t={loading:function(){return h(b,{type:"spinner"},null)}};return h(ie,{ref:C,class:ce("swipe-item"),onTouchstartPassive:L,onTouchend:j,onTouchcancel:j},{default:function(){return[x.image?h("div",{class:ce("image-wrap")},[x.image({src:e.src})]):h(ue,{src:e.src,fit:"contain",class:ce("image",{vertical:S.value}),style:k.value,onLoad:O},t)]}})}}}),fe=a(i("image-preview"),2),pe=fe[0],ve=fe[1],me=["show","teleport","transition","overlayStyle","closeOnPopstate"],he={show:Boolean,loop:x,images:_(),minZoom:A(1/3),maxZoom:A(3),overlay:x,closeable:Boolean,showIndex:x,className:C,closeIcon:S("clear"),transition:String,beforeClose:Function,overlayClass:C,overlayStyle:Object,swipeDuration:A(300),startPosition:A(0),showIndicators:Boolean,closeOnPopstate:x,closeIconPosition:S("top-right"),teleport:[String,Object]},ge=l({name:pe,props:he,emits:["scale","close","closed","change","longPress","update:show"],setup:function(e,t){var o=t.emit,n=t.slots,r=f(),a=c({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),i=function(){if(r.value){var e=j(r.value.$el);a.rootWidth=e.width,a.rootHeight=e.height,r.value.resize()}},l=function(e){return o("scale",e)},u=function(e){return o("update:show",e)},s=function(){M(e.beforeClose,{args:[a.active],done:function(){return u(!1)}})},d=function(e){e!==a.active&&(a.active=e,o("change",e))},p=function(){if(e.showIndex)return h("div",{class:ve("index")},[n.index?n.index({index:a.active}):"".concat(a.active+1," / ").concat(e.images.length)])},m=function(){if(n.cover)return h("div",{class:ve("cover")},[n.cover()])},g=function(){a.disableZoom=!0},y=function(){a.disableZoom=!1},b=function(){if(e.closeable)return h(q,{role:"button",name:e.closeIcon,class:[ve("close-icon",e.closeIconPosition),O],onClick:s},null)},w=function(){return o("closed")},x=function(e,t){var o;return null==(o=r.value)?void 0:o.swipeTo(e,t)};return k({swipeTo:x}),I(i),v([z,F],i),v((function(){return e.startPosition}),(function(e){return d(+e)})),v((function(){return e.show}),(function(t){var n=e.images,r=e.startPosition;t?(d(+r),P((function(){i(),x(+r,{immediate:!0})}))):o("close",{index:a.active,url:n[a.active]})})),function(){return h(V,E({class:[ve(),e.className],overlayClass:[ve("overlay"),e.overlayClass],onClosed:w,"onUpdate:show":u},L(e,me)),{default:function(){return[b(),h(le,{ref:r,lazyRender:!0,loop:e.loop,class:ve("swipe"),duration:e.swipeDuration,initialSwipe:e.startPosition,showIndicators:e.showIndicators,indicatorColor:"white",onChange:d,onDragEnd:y,onDragStart:g},{default:function(){return[e.images.map((function(t,r){return h(de,{src:t,show:e.show,active:a.active,maxZoom:e.maxZoom,minZoom:e.minZoom,rootWidth:a.rootWidth,rootHeight:a.rootHeight,disableZoom:a.disableZoom,onScale:l,onClose:s,onLongPress:function(){return o("longPress",{index:r})}},{image:n.image})}))]}}),p(),m()]}})}}}),ye={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"};var be=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(T)return o||(t=U({setup:function(){var e=N(),t=e.state,o=e.toggle,n=function(){t.images=[]};return function(){return h(ge,E(t,{onClosed:n,"onUpdate:show":o}),null)}}}),o=t.instance),e=Array.isArray(e)?{images:e,startPosition:n}:e,o.open(Y({},ye,e)),o};R(ge);var we=a(i("uploader"),3),xe=we[0],_e=we[1],Ae=we[2];function Ce(e,t){return new Promise((function(o){if("file"!==t){var n=new FileReader;n.onload=function(e){o(e.target.result)},"dataUrl"===t?n.readAsDataURL(e):"text"===t&&n.readAsText(e)}else o()}))}function Se(e,t){return H(e).some((function(e){return!!e.file&&(D(t)?t(e.file):e.file.size>+t)}))}var ke=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;function Ie(e){return!!e.isImage||(e.file&&e.file.type?0===e.file.type.indexOf("image"):e.url?(t=e.url,ke.test(t)):"string"==typeof e.content&&0===e.content.indexOf("data:image"));var t}var ze=l({props:{name:s,item:u(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:[Number,String,Array],beforeDelete:Function},emits:["delete","preview"],setup:function(e,t){var o=t.emit,n=t.slots,r=function(){var t=e.item,o=t.status,n=t.message;if("uploading"===o||"failed"===o){var r="failed"===o?h(q,{name:"close",class:_e("mask-icon")},null):h(b,{class:_e("loading")},null),a=X(n)&&""!==n;return h("div",{class:_e("mask")},[r,a&&h("div",{class:_e("mask-message")},[n])])}},a=function(t){var n=e.name,r=e.item,a=e.index,i=e.beforeDelete;t.stopPropagation(),M(i,{args:[r,{name:n,index:a}],done:function(){return o("delete")}})},i=function(){return o("preview")},l=function(){if(e.deletable&&"uploading"!==e.item.status){var t=n["preview-delete"];return h("div",{role:"button",class:_e("preview-delete",{shadow:!t}),tabindex:0,"aria-label":Ae("delete"),onClick:a},[t?t():h(q,{name:"cross",class:_e("preview-delete-icon")},null)])}},u=function(){if(n["preview-cover"]){var t=e.index,o=e.item;return h("div",{class:_e("preview-cover")},[n["preview-cover"](Y({index:t},o))])}};return function(){return h("div",{class:_e("preview")},[(t=e.item,o=e.lazyLoad,n=e.imageFit,a=e.previewSize,Ie(t)?h(ue,{fit:n,src:t.content||t.url,class:_e("preview-image"),width:Array.isArray(a)?a[0]:a,height:Array.isArray(a)?a[1]:a,lazyLoad:o,onClick:i},{default:u}):h("div",{class:_e("file"),style:B(e.previewSize)},[h(q,{class:_e("file-icon"),name:"description"},null),h("div",{class:[_e("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),u()])),r(),l()]);var t,o,n,a}}}),Fe={name:A(""),accept:S("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:A(1/0),imageFit:S("cover"),resultType:S("dataUrl"),uploadIcon:S("photograph"),uploadText:String,deletable:x,afterRead:Function,showUpload:x,modelValue:_(),beforeRead:Function,beforeDelete:Function,previewSize:[Number,String,Array],previewImage:x,previewOptions:Object,previewFullImage:x,maxSize:{type:[Number,String,Function],default:1/0}},Pe=l({name:xe,props:Fe,emits:["delete","oversize","clickUpload","closePreview","clickPreview","update:modelValue"],setup:function(e,t){var o,n=t.emit,a=t.slots,i=f(),l=[],u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.modelValue.length;return{name:e.name,index:t}},s=function(){i.value&&(i.value.value="")},d=function(t){if(s(),Se(t,e.maxSize)){if(!Array.isArray(t))return void n("oversize",t,u());var o=function(e,t){var o=[],n=[];return e.forEach((function(e){Se(e,t)?n.push(e):o.push(e)})),{valid:o,invalid:n}}(t,e.maxSize);if(t=o.valid,n("oversize",o.invalid,u()),!t.length)return}t=c(t),n("update:modelValue",[].concat(r(e.modelValue),r(H(t)))),e.afterRead&&e.afterRead(t,u())},p=function(t){var o=e.maxCount,n=e.modelValue,r=e.resultType;if(Array.isArray(t)){var a=+o-n.length;t.length>a&&(t=t.slice(0,a)),Promise.all(t.map((function(e){return Ce(e,r)}))).then((function(e){var o=t.map((function(t,o){var n={file:t,status:"",message:""};return e[o]&&(n.content=e[o]),n}));d(o)}))}else Ce(t,r).then((function(e){var o={file:t,status:"",message:""};e&&(o.content=e),d(o)}))},v=function(t){var o=t.target.files;if(!e.disabled&&o&&o.length){var n=1===o.length?o[0]:[].slice.call(o);if(e.beforeRead){var r=e.beforeRead(n,u());if(!r)return void s();if(K(r))return void r.then((function(e){p(e||n)})).catch(s)}p(n)}},m=function(){return n("closePreview")},g=function(t,r){var i=["imageFit","deletable","previewSize","beforeDelete"],s=Y(L(e,i),L(t,i,!0));return h(ze,E({item:t,index:r,onClick:function(){return n("clickPreview",t,u(r))},onDelete:function(){return function(t,o){var r=e.modelValue.slice(0);r.splice(o,1),n("update:modelValue",r),n("delete",t,u(o))}(t,r)},onPreview:function(){return function(t){if(e.previewFullImage){var n=e.modelValue.filter(Ie),r=n.map((function(e){return e.file&&!e.url&&"failed"!==e.status&&(e.url=URL.createObjectURL(e.file),l.push(e.url)),e.url})).filter(Boolean);o=be(Y({images:r,startPosition:n.indexOf(t),onClose:m},e.previewOptions))}}(t)}},L(e,["name","lazyLoad"]),s),L(a,["preview-cover","preview-delete"]))},y=function(){if(e.previewImage)return e.modelValue.map(g)},b=function(e){return n("clickUpload",e)},w=function(){if(!(e.modelValue.length>=+e.maxCount)){var t=e.readonly?null:h("input",{ref:i,type:"file",class:_e("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:v},null);return a.default?h("div",{class:_e("input-wrapper"),onClick:b},[a.default(),t]):G(h("div",{class:_e("upload",{readonly:e.readonly}),style:B(e.previewSize),onClick:b},[h(q,{name:e.uploadIcon,class:_e("upload-icon")},null),e.uploadText&&h("span",{class:_e("upload-text")},[e.uploadText]),t]),[[J,e.showUpload]])}};return Z((function(){l.forEach((function(e){return URL.revokeObjectURL(e)}))})),k({chooseFile:function(){i.value&&!e.disabled&&i.value.click()},closeImagePreview:function(){o&&o.close()}}),W((function(){return e.modelValue})),function(){return h("div",{class:_e()},[h("div",{class:_e("wrapper",{disabled:e.disabled})},[y(),w()])])}}}),Ee=e("U",R(Pe)),Le=e("s",{"uploader-section":"_uploader-section_qlgeb_1","img-close":"_img-close_qlgeb_9",singleImgClose:"_singleImgClose_qlgeb_25",uploader:"_uploader_qlgeb_1",default:"_default_qlgeb_31",previewImg:"_previewImg_qlgeb_36",uploadImg:"_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teGZYliUsW3ro1u3WN1a51gw1oIDiMBfkSjfbFP6VcSXm/MqbZ1cPgSlRh7yn5RtgUSp/3673x9cNYFTZMP44Pko6wtzSYNLIrh9n0md8RNqGWN1cOe23VHOpXYdPpdF+GpffKrglbpwt5EF09rNEjX4BtfcXAxK8ZUCStUBt1hnnBT4bJSPVs0vsAihRo88zPt7EPR2FdfjJsQtO+FHe0kqi4uYR03peL6ZIPl7mNyoDM88Ks8GfC5HZH+ZqcABWxX/Em98smeg2YNBQoxbTGeWH4HsOqjGhtNYw6TBHje6I33tGX9AuuydSPwzveMjGg6JwwGX4/zKET/HYYE+8LmiZQlhSqWxbHe+kAvN0Vc7WG+egIO2sRz/onRHVYQ/KlJsCMao2P1Orjk1S/gW84bzidnx12oe0GLaaJkkgMFRqVSXFcxgoTzAvREm7N7rBEy+djf/0fvF1uYX+ctmGvY03DdH7Or21Y4EFLuj61jnQN0/g5fyihIW1vsLewW9gX/p8wnddKbcNi7YYVlrRdxF/HmobpvIhDS9rex25h/1LYwxga4iGiT0bQkPfywbOelmvSUx7tm0A3arTvg1eP8K0hxwswoyb4YH7ukOMQzG5O0T77/KtTLA7DkC0ehsweP33x3Do5FtoEi+ojUVa2x0J7p8dCz3FyLHR9Crs+MMqw+iADM1vjoz8BuFyFexahL+UAAAAASUVORK5CYII=");e("M",l({name:"col-upload",props:{modelValue:{type:Array,default:function(){return[]}},deletable:{type:Boolean,default:!0},maxCount:{type:Number,default:1},native:{type:Boolean,default:!1},uploadSize:{type:Number,default:5},uploadType:{type:String,default:"IMAGE"},accept:{type:String,default:"image/*"},bucket:{type:String,default:"gyt"},path:{type:String,default:""},uploadIcon:{type:String,default:Ve},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1},position:{type:String,default:"outside"}},emits:["uploadChange","update:modelValue"],methods:{nativeUpload:function(){var e=this;if(!this.disabled){var t="VIDEO"===this.uploadType?"video":"img";Q({api:"chooseFile",content:{type:t,max:this.maxCount,bucket:this.bucket,path:this.path}},(function(t){console.log(t,"fileUrl"),e.maxCount>1?(e.$emit("update:modelValue",[].concat(r(e.modelValue),[t.fileUrl])),e.$emit("uploadChange",[].concat(r(e.modelValue),[t.fileUrl]))):(e.$emit("update:modelValue",[t.fileUrl]),e.$emit("uploadChange",[t.fileUrl]))}))}},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024-1&&(o.splice(n,1),this.$emit("update:modelValue",o),this.$emit("uploadChange")),e.stopPropagation()},getFile:function(e){var o=this;return n(t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.uploadFile(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),n,null,[[0,5]])})))()},uploadFile:function(e){var o=this;return n(t().mark((function n(){var a,i,l,u,s,c,d,f;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,"/api-web/getUploadSign",a=e.name||"",i=o.path+"/"+(a&&a.replace(/ /gi,"_")),l=(new Date).getTime()+i,console.log(e),t.next=8,te.post("/api-web/getUploadSign",{data:{filename:i,bucketName:o.bucket,postData:{filename:i,acl:"public-read",key:l,unknowValueField:[]}}});case 8:for(d in u=t.sent,oe({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),s={policy:u.data.policy,signature:u.data.signature,key:l,KSSAccessKeyId:u.data.kssAccessKeyId,acl:"public-read",name:i},c=new FormData,s)c.append(d,s[d]);return c.append("file",e,i),t.next=16,ne(re(o.bucket),{method:"POST",data:c});case 16:console.log(re(o.bucket)+l),f=re(o.bucket)+l,ee(),o.maxCount>1?(o.$emit("update:modelValue",[].concat(r(o.modelValue),[f])),o.$emit("uploadChange",[].concat(r(o.modelValue),[f]))):(o.$emit("update:modelValue",[f]),o.$emit("uploadChange",[f])),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(0),console.log(t.t0,"uploadFile");case 25:case"end":return t.stop()}}),n,null,[[0,22]])})))()}},render:function(){var e=this;return W((function(){return e.modelValue})),h("div",{class:Le["uploader-section"]},[this.modelValue.length>0&&this.maxCount>1&&this.modelValue.map((function(t){return h("div",{class:["van-uploader",Le.uploader,Le[e.size]]},[e.deletable&&!e.disabled&&h(q,{name:"cross",onClick:function(o){return e.onClose(o,t)},class:Le["img-close"]},null),h("div",{class:["van-uploader__upload"]},["IMAGE"===e.uploadType?h(ue,{src:t,class:Le.previewImg,fit:"cover"},null):h("video",{ref:"videoUpload",style:{backgroundColor:"#F8F8F8"},class:Le.previewImg,src:t+"#t=1,4"},null)])])})),this.native?this.maxCount>1?this.modelValue.length0?h("div",{class:["van-uploader__upload"]},[this.modelValue.map((function(t){return h(ae,null,[e.deletable&&!e.disabled&&h(q,{name:"cross",onClick:function(o){return e.onClose(o,t)},class:[Le["img-close"],Le.singleImgClose]},null),"IMAGE"===e.uploadType?h(ue,{fit:"cover",position:"center",class:Le.uploadImg,src:t},null):h("video",{ref:"videoUpload",class:Le.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):h(q,{name:this.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]):this.maxCount>1?this.modelValue.length0?h("div",{class:["van-uploader__upload"]},[e.modelValue.map((function(t){return h(ae,null,[e.deletable&&!e.disabled&&h(q,{name:"cross",onClick:function(o){return e.onClose(o,t)},class:[Le["img-close"],Le.singleImgClose]},null),"IMAGE"===e.uploadType?h(ue,{fit:"cover",position:"center",class:Le.uploadImg,src:t},null):h("video",{ref:"videoUpload",class:Le.uploadImg,style:{backgroundColor:"#F8F8F8"},src:t+"#t=1,4"},null)])}))]):h(q,{name:e.uploadIcon,class:["van-uploader__upload"],size:"32"},null)]}}),this.$slots.default&&this.$slots.default()])}}))}}}))}();