index-b6590296.js 72 KB

123456789
  1. import{B as Ui,d as ti,e as ei,r as at,f as M,cg as Fi,ch as De,w as Te,j as st,k as it,E as zi,b as Hi,y as Se,C as ji,v as Wi}from"./index-779ffae6.js";const Ce=e=>Ui.post("/edu-app/open/getUploadSign",{data:e});/*!
  2. * Cropper.js v1.5.13
  3. * https://fengyuanchen.github.io/cropperjs
  4. *
  5. * Copyright 2015-present Chen Fengyuan
  6. * Released under the MIT license
  7. *
  8. * Date: 2022-11-20T05:30:46.114Z
  9. */function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,i)}return r}function ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(i){$i(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Jt(e){"@babel/helpers - typeof";return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function Xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Yi(e,t,r){return t&&Re(e.prototype,t),r&&Re(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ri(e){return Vi(e)||qi(e)||Gi(e)||Ji()}function Vi(e){if(Array.isArray(e))return Kt(e)}function qi(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gi(e,t){if(e){if(typeof e=="string")return Kt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kt(e,t)}}function Kt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function Ji(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var kt=typeof window<"u"&&typeof window.document<"u",$=kt?window:{},he=kt&&$.document.documentElement?"ontouchstart"in $.document.documentElement:!1,ue=kt?"PointerEvent"in $:!1,R="cropper",fe="all",ni="crop",ai="move",si="zoom",rt="e",nt="w",ct="s",J="n",mt="ne",gt="nw",vt="se",yt="sw",Qt="".concat(R,"-crop"),Ne="".concat(R,"-disabled"),U="".concat(R,"-hidden"),Me="".concat(R,"-hide"),Ki="".concat(R,"-invisible"),Bt="".concat(R,"-modal"),Zt="".concat(R,"-move"),Et="".concat(R,"Action"),Ct="".concat(R,"Preview"),de="crop",oi="move",ci="none",te="crop",ee="cropend",ie="cropmove",re="cropstart",Le="dblclick",Qi=he?"touchstart":"mousedown",Zi=he?"touchmove":"mousemove",tr=he?"touchend touchcancel":"mouseup",Be=ue?"pointerdown":Qi,Pe=ue?"pointermove":Zi,ke=ue?"pointerup pointercancel":tr,_e="ready",Ie="resize",Ue="wheel",ne="zoom",Fe="image/jpeg",er=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ir=/^data:/,rr=/^data:image\/jpeg;base64,/,nr=/^img|canvas$/i,li=200,hi=100,ze={viewMode:0,dragMode:de,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:li,minContainerHeight:hi,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ar='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',sr=Number.isNaN||$.isNaN;function x(e){return typeof e=="number"&&!sr(e)}var He=function(t){return t>0&&t<1/0};function Xt(e){return typeof e>"u"}function ot(e){return Jt(e)==="object"&&e!==null}var or=Object.prototype.hasOwnProperty;function lt(e){if(!ot(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&or.call(r,"isPrototypeOf")}catch(i){return!1}}function I(e){return typeof e=="function"}var cr=Array.prototype.slice;function ui(e){return Array.from?Array.from(e):cr.call(e)}function L(e,t){return e&&I(t)&&(Array.isArray(e)||x(e.length)?ui(e).forEach(function(r,i){t.call(e,r,i,e)}):ot(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var N=Object.assign||function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return ot(t)&&i.length>0&&i.forEach(function(n){ot(n)&&Object.keys(n).forEach(function(s){t[s]=n[s]})}),t},lr=/\.\d*(?:0|9){12}\d*$/;function ut(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return lr.test(e)?Math.round(e*t)/t:e}var hr=/^width|height|left|top|marginLeft|marginTop$/;function Q(e,t){var r=e.style;L(t,function(i,a){hr.test(a)&&x(i)&&(i="".concat(i,"px")),r[a]=i})}function ur(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function P(e,t){if(t){if(x(e.length)){L(e,function(i){P(i,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function Y(e,t){if(t){if(x(e.length)){L(e,function(r){Y(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function ht(e,t,r){if(t){if(x(e.length)){L(e,function(i){ht(i,t,r)});return}r?P(e,t):Y(e,t)}}var fr=/([a-z\d])([A-Z])/g;function pe(e){return e.replace(fr,"$1-$2").toLowerCase()}function ae(e,t){return ot(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(pe(t)))}function xt(e,t,r){ot(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(pe(t)),r)}function dr(e,t){if(ot(e[t]))try{delete e[t]}catch(r){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(r){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(pe(t)))}var fi=/\s\s*/,di=function(){var e=!1;if(kt){var t=!1,r=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(n){t=n}});$.addEventListener("test",r,i),$.removeEventListener("test",r,i)}return e}();function j(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(fi).forEach(function(n){if(!di){var s=e.listeners;s&&s[n]&&s[n][r]&&(a=s[n][r],delete s[n][r],Object.keys(s[n]).length===0&&delete s[n],Object.keys(s).length===0&&delete e.listeners)}e.removeEventListener(n,a,i)})}function F(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(fi).forEach(function(n){if(i.once&&!di){var s=e.listeners,o=s===void 0?{}:s;a=function(){delete o[n][r],e.removeEventListener(n,a,i);for(var c=arguments.length,l=new Array(c),h=0;h<c;h++)l[h]=arguments[h];r.apply(e,l)},o[n]||(o[n]={}),o[n][r]&&e.removeEventListener(n,o[n][r],i),o[n][r]=a,e.listeners=o}e.addEventListener(n,a,i)})}function ft(e,t,r){var i;return I(Event)&&I(CustomEvent)?i=new CustomEvent(t,{detail:r,bubbles:!0,cancelable:!0}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,r)),e.dispatchEvent(i)}function pi(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Yt=$.location,pr=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function je(e){var t=e.match(pr);return t!==null&&(t[1]!==Yt.protocol||t[2]!==Yt.hostname||t[3]!==Yt.port)}function We(e){var t="timestamp=".concat(new Date().getTime());return e+(e.indexOf("?")===-1?"?":"&")+t}function bt(e){var t=e.rotate,r=e.scaleX,i=e.scaleY,a=e.translateX,n=e.translateY,s=[];x(a)&&a!==0&&s.push("translateX(".concat(a,"px)")),x(n)&&n!==0&&s.push("translateY(".concat(n,"px)")),x(t)&&t!==0&&s.push("rotate(".concat(t,"deg)")),x(r)&&r!==1&&s.push("scaleX(".concat(r,")")),x(i)&&i!==1&&s.push("scaleY(".concat(i,")"));var o=s.length?s.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function mr(e){var t=ii({},e),r=0;return L(e,function(i,a){delete t[a],L(t,function(n){var s=Math.abs(i.startX-n.startX),o=Math.abs(i.startY-n.startY),u=Math.abs(i.endX-n.endX),c=Math.abs(i.endY-n.endY),l=Math.sqrt(s*s+o*o),h=Math.sqrt(u*u+c*c),f=(h-l)/l;Math.abs(f)>Math.abs(r)&&(r=f)})}),r}function At(e,t){var r=e.pageX,i=e.pageY,a={endX:r,endY:i};return t?a:ii({startX:r,startY:i},a)}function gr(e){var t=0,r=0,i=0;return L(e,function(a){var n=a.startX,s=a.startY;t+=n,r+=s,i+=1}),t/=i,r/=i,{pageX:t,pageY:r}}function Z(e){var t=e.aspectRatio,r=e.height,i=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",n=He(i),s=He(r);if(n&&s){var o=r*t;a==="contain"&&o>i||a==="cover"&&o<i?r=i/t:i=r*t}else n?r=i/t:s&&(i=r*t);return{width:i,height:r}}function vr(e){var t=e.width,r=e.height,i=e.degree;if(i=Math.abs(i)%180,i===90)return{width:r,height:t};var a=i%90*Math.PI/180,n=Math.sin(a),s=Math.cos(a),o=t*s+r*n,u=t*n+r*s;return i>90?{width:u,height:o}:{width:o,height:u}}function yr(e,t,r,i){var a=t.aspectRatio,n=t.naturalWidth,s=t.naturalHeight,o=t.rotate,u=o===void 0?0:o,c=t.scaleX,l=c===void 0?1:c,h=t.scaleY,f=h===void 0?1:h,v=r.aspectRatio,m=r.naturalWidth,g=r.naturalHeight,y=i.fillColor,O=y===void 0?"transparent":y,S=i.imageSmoothingEnabled,C=S===void 0?!0:S,w=i.imageSmoothingQuality,E=w===void 0?"low":w,p=i.maxWidth,b=p===void 0?1/0:p,A=i.maxHeight,T=A===void 0?1/0:A,k=i.minWidth,H=k===void 0?0:k,tt=i.minHeight,G=tt===void 0?0:tt,W=document.createElement("canvas"),_=W.getContext("2d"),et=Z({aspectRatio:v,width:b,height:T}),St=Z({aspectRatio:v,width:H,height:G},"cover"),jt=Math.min(et.width,Math.max(St.width,m)),Wt=Math.min(et.height,Math.max(St.height,g)),be=Z({aspectRatio:a,width:b,height:T}),Ee=Z({aspectRatio:a,width:H,height:G},"cover"),xe=Math.min(be.width,Math.max(Ee.width,n)),Oe=Math.min(be.height,Math.max(Ee.height,s)),_i=[-xe/2,-Oe/2,xe,Oe];return W.width=ut(jt),W.height=ut(Wt),_.fillStyle=O,_.fillRect(0,0,jt,Wt),_.save(),_.translate(jt/2,Wt/2),_.rotate(u*Math.PI/180),_.scale(l,f),_.imageSmoothingEnabled=C,_.imageSmoothingQuality=E,_.drawImage.apply(_,[e].concat(ri(_i.map(function(Ii){return Math.floor(ut(Ii))})))),_.restore(),W}var mi=String.fromCharCode;function wr(e,t,r){var i="";r+=t;for(var a=t;a<r;a+=1)i+=mi(e.getUint8(a));return i}var br=/^data:.*,/;function Er(e){var t=e.replace(br,""),r=atob(t),i=new ArrayBuffer(r.length),a=new Uint8Array(i);return L(a,function(n,s){a[s]=r.charCodeAt(s)}),i}function xr(e,t){for(var r=[],i=8192,a=new Uint8Array(e);a.length>0;)r.push(mi.apply(null,ui(a.subarray(0,i)))),a=a.subarray(i);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function Or(e){var t=new DataView(e),r;try{var i,a,n;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var s=t.byteLength,o=2;o+1<s;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){a=o;break}o+=1}if(a){var u=a+4,c=a+10;if(wr(t,u,4)==="Exif"){var l=t.getUint16(c);if(i=l===18761,(i||l===19789)&&t.getUint16(c+2,i)===42){var h=t.getUint32(c+4,i);h>=8&&(n=c+h)}}}if(n){var f=t.getUint16(n,i),v,m;for(m=0;m<f;m+=1)if(v=n+m*12+2,t.getUint16(v,i)===274){v+=8,r=t.getUint16(v,i),t.setUint16(v,1,i);break}}}catch(g){r=1}return r}function Dr(e){var t=0,r=1,i=1;switch(e){case 2:r=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,r=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:r,scaleY:i}}var Tr={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,r=this.options,i=this.container,a=this.cropper,n=Number(r.minContainerWidth),s=Number(r.minContainerHeight);P(a,U),Y(t,U);var o={width:Math.max(i.offsetWidth,n>=0?n:li),height:Math.max(i.offsetHeight,s>=0?s:hi)};this.containerData=o,Q(a,{width:o.width,height:o.height}),P(t,U),Y(a,U)},initCanvas:function(){var t=this.containerData,r=this.imageData,i=this.options.viewMode,a=Math.abs(r.rotate)%180===90,n=a?r.naturalHeight:r.naturalWidth,s=a?r.naturalWidth:r.naturalHeight,o=n/s,u=t.width,c=t.height;t.height*o>t.width?i===3?u=t.height*o:c=t.width/o:i===3?c=t.width/o:u=t.height*o;var l={aspectRatio:o,naturalWidth:n,naturalHeight:s,width:u,height:c};this.canvasData=l,this.limited=i===1||i===2,this.limitCanvas(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.left=(t.width-l.width)/2,l.top=(t.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCanvasData=N({},l)},limitCanvas:function(t,r){var i=this.options,a=this.containerData,n=this.canvasData,s=this.cropBoxData,o=i.viewMode,u=n.aspectRatio,c=this.cropped&&s;if(t){var l=Number(i.minCanvasWidth)||0,h=Number(i.minCanvasHeight)||0;o>1?(l=Math.max(l,a.width),h=Math.max(h,a.height),o===3&&(h*u>l?l=h*u:h=l/u)):o>0&&(l?l=Math.max(l,c?s.width:0):h?h=Math.max(h,c?s.height:0):c&&(l=s.width,h=s.height,h*u>l?l=h*u:h=l/u));var f=Z({aspectRatio:u,width:l,height:h});l=f.width,h=f.height,n.minWidth=l,n.minHeight=h,n.maxWidth=1/0,n.maxHeight=1/0}if(r)if(o>(c?0:1)){var v=a.width-n.width,m=a.height-n.height;n.minLeft=Math.min(0,v),n.minTop=Math.min(0,m),n.maxLeft=Math.max(0,v),n.maxTop=Math.max(0,m),c&&this.limited&&(n.minLeft=Math.min(s.left,s.left+(s.width-n.width)),n.minTop=Math.min(s.top,s.top+(s.height-n.height)),n.maxLeft=s.left,n.maxTop=s.top,o===2&&(n.width>=a.width&&(n.minLeft=Math.min(0,v),n.maxLeft=Math.max(0,v)),n.height>=a.height&&(n.minTop=Math.min(0,m),n.maxTop=Math.max(0,m))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,r){var i=this.canvasData,a=this.imageData;if(r){var n=vr({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),s=n.width,o=n.height,u=i.width*(s/i.naturalWidth),c=i.height*(o/i.naturalHeight);i.left-=(u-i.width)/2,i.top-=(c-i.height)/2,i.width=u,i.height=c,i.aspectRatio=s/o,i.naturalWidth=s,i.naturalHeight=o,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Q(this.canvas,N({width:i.width,height:i.height},bt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var r=this.canvasData,i=this.imageData,a=i.naturalWidth*(r.width/r.naturalWidth),n=i.naturalHeight*(r.height/r.naturalHeight);N(i,{width:a,height:n,left:(r.width-a)/2,top:(r.height-n)/2}),Q(this.image,N({width:i.width,height:i.height},bt(N({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,r=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:r.width,height:r.height};i&&(r.height*i>r.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=r.left+(r.width-n.width)/2,n.top=r.top+(r.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=N({},n)},limitCropBox:function(t,r){var i=this.options,a=this.containerData,n=this.canvasData,s=this.cropBoxData,o=this.limited,u=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,h=o?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,f=o?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;c=Math.min(c,a.width),l=Math.min(l,a.height),u&&(c&&l?l*u>c?l=c/u:c=l*u:c?l=c/u:l&&(c=l*u),f*u>h?f=h/u:h=f*u),s.minWidth=Math.min(c,h),s.minHeight=Math.min(l,f),s.maxWidth=h,s.maxHeight=f}r&&(o?(s.minLeft=Math.max(0,n.left),s.minTop=Math.max(0,n.top),s.maxLeft=Math.min(a.width,n.left+n.width)-s.width,s.maxTop=Math.min(a.height,n.top+n.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=a.width-s.width,s.maxTop=a.height-s.height))},renderCropBox:function(){var t=this.options,r=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&xt(this.face,Et,i.width>=r.width&&i.height>=r.height?ai:fe),Q(this.cropBox,N({width:i.width,height:i.height},bt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ft(this.element,te,this.getData())}},Sr={initPreview:function(){var t=this.element,r=this.crossOrigin,i=this.options.preview,a=r?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",s=document.createElement("img");if(r&&(s.crossOrigin=r),s.src=a,s.alt=n,this.viewBox.appendChild(s),this.viewBoxImage=s,!!i){var o=i;typeof i=="string"?o=t.ownerDocument.querySelectorAll(i):i.querySelector&&(o=[i]),this.previews=o,L(o,function(u){var c=document.createElement("img");xt(u,Ct,{width:u.offsetWidth,height:u.offsetHeight,html:u.innerHTML}),r&&(c.crossOrigin=r),c.src=a,c.alt=n,c.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',u.innerHTML="",u.appendChild(c)})}},resetPreview:function(){L(this.previews,function(t){var r=ae(t,Ct);Q(t,{width:r.width,height:r.height}),t.innerHTML=r.html,dr(t,Ct)})},preview:function(){var t=this.imageData,r=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,s=t.width,o=t.height,u=i.left-r.left-t.left,c=i.top-r.top-t.top;!this.cropped||this.disabled||(Q(this.viewBoxImage,N({width:s,height:o},bt(N({translateX:-u,translateY:-c},t)))),L(this.previews,function(l){var h=ae(l,Ct),f=h.width,v=h.height,m=f,g=v,y=1;a&&(y=f/a,g=n*y),n&&g>v&&(y=v/n,m=a*y,g=v),Q(l,{width:m,height:g}),Q(l.getElementsByTagName("img")[0],N({width:s*y,height:o*y},bt(N({translateX:-u*y,translateY:-c*y},t))))}))}},Cr={bind:function(){var t=this.element,r=this.options,i=this.cropper;I(r.cropstart)&&F(t,re,r.cropstart),I(r.cropmove)&&F(t,ie,r.cropmove),I(r.cropend)&&F(t,ee,r.cropend),I(r.crop)&&F(t,te,r.crop),I(r.zoom)&&F(t,ne,r.zoom),F(i,Be,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&F(i,Ue,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&F(i,Le,this.onDblclick=this.dblclick.bind(this)),F(t.ownerDocument,Pe,this.onCropMove=this.cropMove.bind(this)),F(t.ownerDocument,ke,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&F(window,Ie,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,i=this.cropper;I(r.cropstart)&&j(t,re,r.cropstart),I(r.cropmove)&&j(t,ie,r.cropmove),I(r.cropend)&&j(t,ee,r.cropend),I(r.crop)&&j(t,te,r.crop),I(r.zoom)&&j(t,ne,r.zoom),j(i,Be,this.onCropStart),r.zoomable&&r.zoomOnWheel&&j(i,Ue,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&j(i,Le,this.onDblclick),j(t.ownerDocument,Pe,this.onCropMove),j(t.ownerDocument,ke,this.onCropEnd),r.responsive&&j(window,Ie,this.onResize)}},Ar={resize:function(){if(!this.disabled){var t=this.options,r=this.container,i=this.containerData,a=r.offsetWidth/i.width,n=r.offsetHeight/i.height,s=Math.abs(a-1)>Math.abs(n-1)?a:n;if(s!==1){var o,u;t.restore&&(o=this.getCanvasData(),u=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(L(o,function(c,l){o[l]=c*s})),this.setCropBoxData(L(u,function(c,l){u[l]=c*s})))}}},dblclick:function(){this.disabled||this.options.dragMode===ci||this.setDragMode(ur(this.dragBox,Qt)?oi:de)},wheel:function(t){var r=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var r=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(x(r)&&r!==1||x(i)&&i!==0||t.ctrlKey))){var a=this.options,n=this.pointers,s;t.changedTouches?L(t.changedTouches,function(o){n[o.identifier]=At(o)}):n[t.pointerId||0]=At(t),Object.keys(n).length>1&&a.zoomable&&a.zoomOnTouch?s=si:s=ae(t.target,Et),er.test(s)&&ft(this.element,re,{originalEvent:t,action:s})!==!1&&(t.preventDefault(),this.action=s,this.cropping=!1,s===ni&&(this.cropping=!0,P(this.dragBox,Bt)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var i=this.pointers;t.preventDefault(),ft(this.element,ie,{originalEvent:t,action:r})!==!1&&(t.changedTouches?L(t.changedTouches,function(a){N(i[a.identifier]||{},At(a,!0))}):N(i[t.pointerId||0]||{},At(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,i=this.pointers;t.changedTouches?L(t.changedTouches,function(a){delete i[a.identifier]}):delete i[t.pointerId||0],r&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,ht(this.dragBox,Bt,this.cropped&&this.options.modal)),ft(this.element,ee,{originalEvent:t,action:r}))}}},Rr={change:function(t){var r=this.options,i=this.canvasData,a=this.containerData,n=this.cropBoxData,s=this.pointers,o=this.action,u=r.aspectRatio,c=n.left,l=n.top,h=n.width,f=n.height,v=c+h,m=l+f,g=0,y=0,O=a.width,S=a.height,C=!0,w;!u&&t.shiftKey&&(u=h&&f?h/f:1),this.limited&&(g=n.minLeft,y=n.minTop,O=g+Math.min(a.width,i.width,i.left+i.width),S=y+Math.min(a.height,i.height,i.top+i.height));var E=s[Object.keys(s)[0]],p={x:E.endX-E.startX,y:E.endY-E.startY},b=function(T){switch(T){case rt:v+p.x>O&&(p.x=O-v);break;case nt:c+p.x<g&&(p.x=g-c);break;case J:l+p.y<y&&(p.y=y-l);break;case ct:m+p.y>S&&(p.y=S-m);break}};switch(o){case fe:c+=p.x,l+=p.y;break;case rt:if(p.x>=0&&(v>=O||u&&(l<=y||m>=S))){C=!1;break}b(rt),h+=p.x,h<0&&(o=nt,h=-h,c-=h),u&&(f=h/u,l+=(n.height-f)/2);break;case J:if(p.y<=0&&(l<=y||u&&(c<=g||v>=O))){C=!1;break}b(J),f-=p.y,l+=p.y,f<0&&(o=ct,f=-f,l-=f),u&&(h=f*u,c+=(n.width-h)/2);break;case nt:if(p.x<=0&&(c<=g||u&&(l<=y||m>=S))){C=!1;break}b(nt),h-=p.x,c+=p.x,h<0&&(o=rt,h=-h,c-=h),u&&(f=h/u,l+=(n.height-f)/2);break;case ct:if(p.y>=0&&(m>=S||u&&(c<=g||v>=O))){C=!1;break}b(ct),f+=p.y,f<0&&(o=J,f=-f,l-=f),u&&(h=f*u,c+=(n.width-h)/2);break;case mt:if(u){if(p.y<=0&&(l<=y||v>=O)){C=!1;break}b(J),f-=p.y,l+=p.y,h=f*u}else b(J),b(rt),p.x>=0?v<O?h+=p.x:p.y<=0&&l<=y&&(C=!1):h+=p.x,p.y<=0?l>y&&(f-=p.y,l+=p.y):(f-=p.y,l+=p.y);h<0&&f<0?(o=yt,f=-f,h=-h,l-=f,c-=h):h<0?(o=gt,h=-h,c-=h):f<0&&(o=vt,f=-f,l-=f);break;case gt:if(u){if(p.y<=0&&(l<=y||c<=g)){C=!1;break}b(J),f-=p.y,l+=p.y,h=f*u,c+=n.width-h}else b(J),b(nt),p.x<=0?c>g?(h-=p.x,c+=p.x):p.y<=0&&l<=y&&(C=!1):(h-=p.x,c+=p.x),p.y<=0?l>y&&(f-=p.y,l+=p.y):(f-=p.y,l+=p.y);h<0&&f<0?(o=vt,f=-f,h=-h,l-=f,c-=h):h<0?(o=mt,h=-h,c-=h):f<0&&(o=yt,f=-f,l-=f);break;case yt:if(u){if(p.x<=0&&(c<=g||m>=S)){C=!1;break}b(nt),h-=p.x,c+=p.x,f=h/u}else b(ct),b(nt),p.x<=0?c>g?(h-=p.x,c+=p.x):p.y>=0&&m>=S&&(C=!1):(h-=p.x,c+=p.x),p.y>=0?m<S&&(f+=p.y):f+=p.y;h<0&&f<0?(o=mt,f=-f,h=-h,l-=f,c-=h):h<0?(o=vt,h=-h,c-=h):f<0&&(o=gt,f=-f,l-=f);break;case vt:if(u){if(p.x>=0&&(v>=O||m>=S)){C=!1;break}b(rt),h+=p.x,f=h/u}else b(ct),b(rt),p.x>=0?v<O?h+=p.x:p.y>=0&&m>=S&&(C=!1):h+=p.x,p.y>=0?m<S&&(f+=p.y):f+=p.y;h<0&&f<0?(o=gt,f=-f,h=-h,l-=f,c-=h):h<0?(o=yt,h=-h,c-=h):f<0&&(o=mt,f=-f,l-=f);break;case ai:this.move(p.x,p.y),C=!1;break;case si:this.zoom(mr(s),t),C=!1;break;case ni:if(!p.x||!p.y){C=!1;break}w=pi(this.cropper),c=E.startX-w.left,l=E.startY-w.top,h=n.minWidth,f=n.minHeight,p.x>0?o=p.y>0?vt:mt:p.x<0&&(c-=h,o=p.y>0?yt:gt),p.y<0&&(l-=f),this.cropped||(Y(this.cropBox,U),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}C&&(n.width=h,n.height=f,n.left=c,n.top=l,this.action=o,this.renderCropBox()),L(s,function(A){A.startX=A.endX,A.startY=A.endY})}},Nr={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&P(this.dragBox,Bt),Y(this.cropBox,U),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=N({},this.initialImageData),this.canvasData=N({},this.initialCanvasData),this.cropBoxData=N({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(N(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Y(this.dragBox,Bt),P(this.cropBox,U)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,L(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Y(this.cropper,Ne)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,P(this.cropper,Ne)),this},destroy:function(){var t=this.element;return t[R]?(t[R]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(Xt(t)?t:a+Number(t),Xt(r)?r:n+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(x(t)&&(i.left=t,a=!0),x(r)&&(i.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,r)},zoomTo:function(t,r,i){var a=this.options,n=this.canvasData,s=n.width,o=n.height,u=n.naturalWidth,c=n.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var l=u*t,h=c*t;if(ft(this.element,ne,{ratio:t,oldRatio:s/u,originalEvent:i})===!1)return this;if(i){var f=this.pointers,v=pi(this.cropper),m=f&&Object.keys(f).length?gr(f):{pageX:i.pageX,pageY:i.pageY};n.left-=(l-s)*((m.pageX-v.left-n.left)/s),n.top-=(h-o)*((m.pageY-v.top-n.top)/o)}else lt(r)&&x(r.x)&&x(r.y)?(n.left-=(l-s)*((r.x-n.left)/s),n.top-=(h-o)*((r.y-n.top)/o)):(n.left-=(l-s)/2,n.top-=(h-o)/2);n.width=l,n.height=h,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),x(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,x(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(x(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(x(t)&&(i.scaleX=t,a=!0),x(r)&&(i.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,i=this.imageData,a=this.canvasData,n=this.cropBoxData,s;if(this.ready&&this.cropped){s={x:n.left-a.left,y:n.top-a.top,width:n.width,height:n.height};var o=i.width/i.naturalWidth;if(L(s,function(l,h){s[h]=l/o}),t){var u=Math.round(s.y+s.height),c=Math.round(s.x+s.width);s.x=Math.round(s.x),s.y=Math.round(s.y),s.width=c-s.x,s.height=u-s.y}}else s={x:0,y:0,width:0,height:0};return r.rotatable&&(s.rotate=i.rotate||0),r.scalable&&(s.scaleX=i.scaleX||1,s.scaleY=i.scaleY||1),s},setData:function(t){var r=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&lt(t)){var s=!1;r.rotatable&&x(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,s=!0),r.scalable&&(x(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,s=!0),x(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var o=i.width/i.naturalWidth;x(t.x)&&(n.left=t.x*o+a.left),x(t.y)&&(n.top=t.y*o+a.top),x(t.width)&&(n.width=t.width*o),x(t.height)&&(n.height=t.height*o),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?N({},this.containerData):{}},getImageData:function(){return this.sized?N({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&L(["left","top","width","height","naturalWidth","naturalHeight"],function(i){r[i]=t[i]}),r},setCanvasData:function(t){var r=this.canvasData,i=r.aspectRatio;return this.ready&&!this.disabled&&lt(t)&&(x(t.left)&&(r.left=t.left),x(t.top)&&(r.top=t.top),x(t.width)?(r.width=t.width,r.height=t.width/i):x(t.height)&&(r.height=t.height,r.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,i=this.options.aspectRatio,a,n;return this.ready&&this.cropped&&!this.disabled&&lt(t)&&(x(t.left)&&(r.left=t.left),x(t.top)&&(r.top=t.top),x(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),x(t.height)&&t.height!==r.height&&(n=!0,r.height=t.height),i&&(a?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,i=yr(this.image,this.imageData,r,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,s=a.y,o=a.width,u=a.height,c=i.width/Math.floor(r.naturalWidth);c!==1&&(n*=c,s*=c,o*=c,u*=c);var l=o/u,h=Z({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),f=Z({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),v=Z({aspectRatio:l,width:t.width||(c!==1?i.width:o),height:t.height||(c!==1?i.height:u)}),m=v.width,g=v.height;m=Math.min(h.width,Math.max(f.width,m)),g=Math.min(h.height,Math.max(f.height,g));var y=document.createElement("canvas"),O=y.getContext("2d");y.width=ut(m),y.height=ut(g),O.fillStyle=t.fillColor||"transparent",O.fillRect(0,0,m,g);var S=t.imageSmoothingEnabled,C=S===void 0?!0:S,w=t.imageSmoothingQuality;O.imageSmoothingEnabled=C,w&&(O.imageSmoothingQuality=w);var E=i.width,p=i.height,b=n,A=s,T,k,H,tt,G,W;b<=-o||b>E?(b=0,T=0,H=0,G=0):b<=0?(H=-b,b=0,T=Math.min(E,o+b),G=T):b<=E&&(H=0,T=Math.min(o,E-b),G=T),T<=0||A<=-u||A>p?(A=0,k=0,tt=0,W=0):A<=0?(tt=-A,A=0,k=Math.min(p,u+A),W=k):A<=p&&(tt=0,k=Math.min(u,p-A),W=k);var _=[b,A,T,k];if(G>0&&W>0){var et=m/o;_.push(H*et,tt*et,G*et,W*et)}return O.drawImage.apply(O,[i].concat(ri(_.map(function(St){return Math.floor(ut(St))})))),y},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!Xt(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===de,s=r.movable&&t===oi;t=n||s?t:ci,r.dragMode=t,xt(i,Et,t),ht(i,Qt,n),ht(i,Zt,s),r.cropBoxMovable||(xt(a,Et,t),ht(a,Qt,n),ht(a,Zt,s))}return this}},Mr=$.Cropper,gi=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Xi(this,e),!t||!nr.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=N({},ze,lt(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Yi(e,[{key:"init",value:function(){var r=this.element,i=r.tagName.toLowerCase(),a;if(!r[R]){if(r[R]=this,i==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else i==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var i=this;if(r){this.url=r,this.imageData={};var a=this.element,n=this.options;if(!n.rotatable&&!n.scalable&&(n.checkOrientation=!1),!n.checkOrientation||!window.ArrayBuffer){this.clone();return}if(ir.test(r)){rr.test(r)?this.read(Er(r)):this.clone();return}var s=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=o,s.onerror=o,s.ontimeout=o,s.onprogress=function(){s.getResponseHeader("content-type")!==Fe&&s.abort()},s.onload=function(){i.read(s.response)},s.onloadend=function(){i.reloading=!1,i.xhr=null},n.checkCrossOrigin&&je(r)&&a.crossOrigin&&(r=We(r)),s.open("GET",r,!0),s.responseType="arraybuffer",s.withCredentials=a.crossOrigin==="use-credentials",s.send()}}},{key:"read",value:function(r){var i=this.options,a=this.imageData,n=Or(r),s=0,o=1,u=1;if(n>1){this.url=xr(r,Fe);var c=Dr(n);s=c.rotate,o=c.scaleX,u=c.scaleY}i.rotatable&&(a.rotate=s),i.scalable&&(a.scaleX=o,a.scaleY=u),this.clone()}},{key:"clone",value:function(){var r=this.element,i=this.url,a=r.crossOrigin,n=i;this.options.checkCrossOrigin&&je(i)&&(a||(a="anonymous"),n=We(i)),this.crossOrigin=a,this.crossOriginUrl=n;var s=document.createElement("img");a&&(s.crossOrigin=a),s.src=n||i,s.alt=r.alt||"The image to crop",this.image=s,s.onload=this.start.bind(this),s.onerror=this.stop.bind(this),P(s,Me),r.parentNode.insertBefore(s,r.nextSibling)}},{key:"start",value:function(){var r=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var a=$.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test($.navigator.userAgent),n=function(c,l){N(r.imageData,{naturalWidth:c,naturalHeight:l,aspectRatio:c/l}),r.initialImageData=N({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(i.naturalWidth&&!a){n(i.naturalWidth,i.naturalHeight);return}var s=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=s,s.onload=function(){n(s.width,s.height),a||o.removeChild(s)},s.src=i.src,a||(s.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(s))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,i=this.options,a=this.image,n=r.parentNode,s=document.createElement("div");s.innerHTML=ar;var o=s.querySelector(".".concat(R,"-container")),u=o.querySelector(".".concat(R,"-canvas")),c=o.querySelector(".".concat(R,"-drag-box")),l=o.querySelector(".".concat(R,"-crop-box")),h=l.querySelector(".".concat(R,"-face"));this.container=n,this.cropper=o,this.canvas=u,this.dragBox=c,this.cropBox=l,this.viewBox=o.querySelector(".".concat(R,"-view-box")),this.face=h,u.appendChild(a),P(r,U),n.insertBefore(o,r.nextSibling),Y(a,Me),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,P(l,U),i.guides||P(l.getElementsByClassName("".concat(R,"-dashed")),U),i.center||P(l.getElementsByClassName("".concat(R,"-center")),U),i.background&&P(o,"".concat(R,"-bg")),i.highlight||P(h,Ki),i.cropBoxMovable&&(P(h,Zt),xt(h,Et,fe)),i.cropBoxResizable||(P(l.getElementsByClassName("".concat(R,"-line")),U),P(l.getElementsByClassName("".concat(R,"-point")),U)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),I(i.ready)&&F(r,_e,i.ready,{once:!0}),ft(r,_e)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),Y(this.element,U)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Mr,e}},{key:"setDefaults",value:function(r){N(ze,lt(r)&&r)}}]),e}();N(gi.prototype,Tr,Sr,Cr,Ar,Rr,Nr);const Lr=ti({name:"copper-image",emits:["close","cropperNo","cropperOk"],setup(e,{emit:t,expose:r}){const i=ei({visible:!1,img:null,confirmLoading:!1,options:{img:"",autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,full:!1,enlarge:1,previewsCircle:!0,centerBox:!0,outputType:"png",title:"修改头像",name:null},previews:{},url:{upload:"/sys/common/saveToImgByStr"},myCropper:null}),a=at(),n=c=>{const{options:l}=i;i.visible=!0,i.options=Object.assign({},l,c),zi(()=>{s()})},s=()=>{i.myCropper=new gi(a.value,{viewMode:1,dragMode:"move",aspectRatio:i.options.autoCropWidth/i.options.autoCropHeight,initialAspectRatio:1,autoCropArea:1,cropBoxMovable:!0,cropBoxResizable:!1,background:!0,movable:!0,modal:!0,preview:".before"})},o=c=>{switch(c){case"left":i.myCropper.rotate(90);break;case"right":i.myCropper.rotate(-90);break;case"zoomIn":i.myCropper.zoom(.1);break;case"zoomOut":i.myCropper.zoom(-.1);break}},u=()=>{i.confirmLoading=!0,i.myCropper.getCroppedCanvas({imageSmoothingQuality:"high"}).toBlob(c=>{console.log(c,"1212"),t("cropperOk",c),i.confirmLoading=!1})};return r({edit:n}),()=>M("div",null,[M(Fi,{cols:2,xGap:24,style:{paddingTop:"12px"}},{default:()=>[M(De,null,{default:()=>[M("div",{style:"width: 100%; height: 300px"},[M("img",{ref:a,id:"myImages",src:i.options.img,alt:""},null)]),M(Te,{justify:"center",style:{paddingTop:"12px"}},{default:()=>[M(st,{type:"primary",size:"small",onClick:()=>o("left")},{default:()=>[it("逆时针旋转")]}),M(st,{type:"primary",size:"small",onClick:()=>o("right")},{default:()=>[it("顺时针旋转")]}),M(st,{type:"primary",size:"small",onClick:()=>o("zoomIn")},{default:()=>[it("放大")]}),M(st,{type:"primary",size:"small",onClick:()=>o("zoomOut")},{default:()=>[it("缩小")]})]})]}),M(De,null,{default:()=>[M("span",{style:{fontSize:"15px",fontWeight:600,paddingBottom:"8px",display:"inline-block"}},[it("预览图片")]),M("div",{class:"before",style:{width:i.options.autoCropWidth+"px",height:i.options.autoCropHeight+"px",overflow:"hidden"}},null)]})]}),M(Te,{justify:"end"},{default:()=>[M(st,{type:"default",onClick:()=>{i.confirmLoading=!1,t("close"),t("cropperNo")}},{default:()=>[it("取消")]}),M(st,{type:"primary",loading:i.confirmLoading,onClick:u},{default:()=>[it("确认")]})]})])}});function vi(e,t){return function(){return e.apply(t,arguments)}}const{toString:Br}=Object.prototype,{getPrototypeOf:me}=Object,_t=(e=>t=>{const r=Br.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),V=e=>(e=e.toLowerCase(),t=>_t(t)===e),It=e=>t=>typeof t===e,{isArray:pt}=Array,Ot=It("undefined");function Pr(e){return e!==null&&!Ot(e)&&e.constructor!==null&&!Ot(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yi=V("ArrayBuffer");function kr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yi(e.buffer),t}const _r=It("string"),z=It("function"),wi=It("number"),Ut=e=>e!==null&&typeof e=="object",Ir=e=>e===!0||e===!1,Rt=e=>{if(_t(e)!=="object")return!1;const t=me(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ur=V("Date"),Fr=V("File"),zr=V("Blob"),Hr=V("FileList"),jr=e=>Ut(e)&&z(e.pipe),Wr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=_t(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},Xr=V("URLSearchParams"),Yr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,a;if(typeof e!="object"&&(e=[e]),pt(e))for(i=0,a=e.length;i<a;i++)t.call(null,e[i],i,e);else{const n=r?Object.getOwnPropertyNames(e):Object.keys(e),s=n.length;let o;for(i=0;i<s;i++)o=n[i],t.call(null,e[o],o,e)}}function bi(e,t){t=t.toLowerCase();const r=Object.keys(e);let i=r.length,a;for(;i-- >0;)if(a=r[i],t===a.toLowerCase())return a;return null}const Ei=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),xi=e=>!Ot(e)&&e!==Ei;function se(){const{caseless:e}=xi(this)&&this||{},t={},r=(i,a)=>{const n=e&&bi(t,a)||a;Rt(t[n])&&Rt(i)?t[n]=se(t[n],i):Rt(i)?t[n]=se({},i):pt(i)?t[n]=i.slice():t[n]=i};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Dt(arguments[i],r);return t}const $r=(e,t,r,{allOwnKeys:i}={})=>(Dt(t,(a,n)=>{r&&z(a)?e[n]=vi(a,r):e[n]=a},{allOwnKeys:i}),e),Vr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qr=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Gr=(e,t,r,i)=>{let a,n,s;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),n=a.length;n-- >0;)s=a[n],(!i||i(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=r!==!1&&me(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Jr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},Kr=e=>{if(!e)return null;if(pt(e))return e;let t=e.length;if(!wi(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Qr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&me(Uint8Array)),Zr=(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=i.next())&&!a.done;){const n=a.value;t.call(e,n[0],n[1])}},tn=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},en=V("HTMLFormElement"),rn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,a){return i.toUpperCase()+a}),Xe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),nn=V("RegExp"),Oi=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};Dt(r,(a,n)=>{t(a,n,e)!==!1&&(i[n]=a)}),Object.defineProperties(e,i)},an=e=>{Oi(e,(t,r)=>{if(z(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(z(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},sn=(e,t)=>{const r={},i=a=>{a.forEach(n=>{r[n]=!0})};return pt(e)?i(e):i(String(e).split(t)),r},on=()=>{},cn=(e,t)=>(e=+e,Number.isFinite(e)?e:t),$t="abcdefghijklmnopqrstuvwxyz",Ye="0123456789",Di={DIGIT:Ye,ALPHA:$t,ALPHA_DIGIT:$t+$t.toUpperCase()+Ye},ln=(e=16,t=Di.ALPHA_DIGIT)=>{let r="";const{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function hn(e){return!!(e&&z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const un=e=>{const t=new Array(10),r=(i,a)=>{if(Ut(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[a]=i;const n=pt(i)?[]:{};return Dt(i,(s,o)=>{const u=r(s,a+1);!Ot(u)&&(n[o]=u)}),t[a]=void 0,n}}return i};return r(e,0)},fn=V("AsyncFunction"),dn=e=>e&&(Ut(e)||z(e))&&z(e.then)&&z(e.catch),d={isArray:pt,isArrayBuffer:yi,isBuffer:Pr,isFormData:Wr,isArrayBufferView:kr,isString:_r,isNumber:wi,isBoolean:Ir,isObject:Ut,isPlainObject:Rt,isUndefined:Ot,isDate:Ur,isFile:Fr,isBlob:zr,isRegExp:nn,isFunction:z,isStream:jr,isURLSearchParams:Xr,isTypedArray:Qr,isFileList:Hr,forEach:Dt,merge:se,extend:$r,trim:Yr,stripBOM:Vr,inherits:qr,toFlatObject:Gr,kindOf:_t,kindOfTest:V,endsWith:Jr,toArray:Kr,forEachEntry:Zr,matchAll:tn,isHTMLForm:en,hasOwnProperty:Xe,hasOwnProp:Xe,reduceDescriptors:Oi,freezeMethods:an,toObjectSet:sn,toCamelCase:rn,noop:on,toFiniteNumber:cn,findKey:bi,global:Ei,isContextDefined:xi,ALPHABET:Di,generateString:ln,isSpecCompliantForm:hn,toJSONObject:un,isAsyncFn:fn,isThenable:dn};function D(e,t,r,i,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a)}d.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ti=D.prototype,Si={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Si[e]={value:e}});Object.defineProperties(D,Si);Object.defineProperty(Ti,"isAxiosError",{value:!0});D.from=(e,t,r,i,a,n)=>{const s=Object.create(Ti);return d.toFlatObject(e,s,function(u){return u!==Error.prototype},o=>o!=="isAxiosError"),D.call(s,e.message,t,r,i,a),s.cause=e,s.name=e.name,n&&Object.assign(s,n),s};const pn=null;function oe(e){return d.isPlainObject(e)||d.isArray(e)}function Ci(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function $e(e,t,r){return e?e.concat(t).map(function(a,n){return a=Ci(a),!r&&n?"["+a+"]":a}).join(r?".":""):t}function mn(e){return d.isArray(e)&&!e.some(oe)}const gn=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ft(e,t,r){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!d.isUndefined(y[g])});const i=r.metaTokens,a=r.visitor||l,n=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(a))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(d.isDate(m))return m.toISOString();if(!u&&d.isBlob(m))throw new D("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(m)||d.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,y){let O=m;if(m&&!y&&typeof m=="object"){if(d.endsWith(g,"{}"))g=i?g:g.slice(0,-2),m=JSON.stringify(m);else if(d.isArray(m)&&mn(m)||(d.isFileList(m)||d.endsWith(g,"[]"))&&(O=d.toArray(m)))return g=Ci(g),O.forEach(function(C,w){!(d.isUndefined(C)||C===null)&&t.append(s===!0?$e([g],w,n):s===null?g:g+"[]",c(C))}),!1}return oe(m)?!0:(t.append($e(y,g,n),c(m)),!1)}const h=[],f=Object.assign(gn,{defaultVisitor:l,convertValue:c,isVisitable:oe});function v(m,g){if(!d.isUndefined(m)){if(h.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(m),d.forEach(m,function(O,S){(!(d.isUndefined(O)||O===null)&&a.call(t,O,d.isString(S)?S.trim():S,g,f))===!0&&v(O,g?g.concat(S):[S])}),h.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Ve(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function ge(e,t){this._pairs=[],e&&Ft(e,this,t)}const Ai=ge.prototype;Ai.append=function(t,r){this._pairs.push([t,r])};Ai.toString=function(t){const r=t?function(i){return t.call(this,i,Ve)}:Ve;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function vn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ri(e,t,r){if(!t)return e;const i=r&&r.encode||vn,a=r&&r.serialize;let n;if(a?n=a(t,r):n=d.isURLSearchParams(t)?t.toString():new ge(t,r).toString(i),n){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+n}return e}class yn{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(i){i!==null&&t(i)})}}const qe=yn,Ni={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wn=typeof URLSearchParams<"u"?URLSearchParams:ge,bn=typeof FormData<"u"?FormData:null,En=typeof Blob<"u"?Blob:null,xn=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),On=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),X={isBrowser:!0,classes:{URLSearchParams:wn,FormData:bn,Blob:En},isStandardBrowserEnv:xn,isStandardBrowserWebWorkerEnv:On,protocols:["http","https","file","blob","url","data"]};function Dn(e,t){return Ft(e,new X.classes.URLSearchParams,Object.assign({visitor:function(r,i,a,n){return X.isNode&&d.isBuffer(r)?(this.append(i,r.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}function Tn(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sn(e){const t={},r=Object.keys(e);let i;const a=r.length;let n;for(i=0;i<a;i++)n=r[i],t[n]=e[n];return t}function Mi(e){function t(r,i,a,n){let s=r[n++];const o=Number.isFinite(+s),u=n>=r.length;return s=!s&&d.isArray(a)?a.length:s,u?(d.hasOwnProp(a,s)?a[s]=[a[s],i]:a[s]=i,!o):((!a[s]||!d.isObject(a[s]))&&(a[s]=[]),t(r,i,a[s],n)&&d.isArray(a[s])&&(a[s]=Sn(a[s])),!o)}if(d.isFormData(e)&&d.isFunction(e.entries)){const r={};return d.forEachEntry(e,(i,a)=>{t(Tn(i),a,r,0)}),r}return null}const Cn={"Content-Type":void 0};function An(e,t,r){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const zt={transitional:Ni,adapter:["xhr","http"],transformRequest:[function(t,r){const i=r.getContentType()||"",a=i.indexOf("application/json")>-1,n=d.isObject(t);if(n&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return a&&a?JSON.stringify(Mi(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Dn(t,this.formSerializer).toString();if((o=d.isFileList(t))||i.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ft(o?{"files[]":t}:t,u&&new u,this.formSerializer)}}return n||a?(r.setContentType("application/json",!1),An(t)):t}],transformResponse:[function(t){const r=this.transitional||zt.transitional,i=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&d.isString(t)&&(i&&!this.responseType||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?D.from(o,D.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:X.classes.FormData,Blob:X.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};d.forEach(["delete","get","head"],function(t){zt.headers[t]={}});d.forEach(["post","put","patch"],function(t){zt.headers[t]=d.merge(Cn)});const ve=zt,Rn=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nn=e=>{const t={};let r,i,a;return e&&e.split("\n").forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),i=s.substring(a+1).trim(),!(!r||t[r]&&Rn[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Ge=Symbol("internals");function wt(e){return e&&String(e).trim().toLowerCase()}function Nt(e){return e===!1||e==null?e:d.isArray(e)?e.map(Nt):String(e)}function Mn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const Ln=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vt(e,t,r,i,a){if(d.isFunction(i))return i.call(this,t,r);if(a&&(t=r),!!d.isString(t)){if(d.isString(i))return t.indexOf(i)!==-1;if(d.isRegExp(i))return i.test(t)}}function Bn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function Pn(e,t){const r=d.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(a,n,s){return this[i].call(this,t,a,n,s)},configurable:!0})})}class Ht{constructor(t){t&&this.set(t)}set(t,r,i){const a=this;function n(o,u,c){const l=wt(u);if(!l)throw new Error("header name must be a non-empty string");const h=d.findKey(a,l);(!h||a[h]===void 0||c===!0||c===void 0&&a[h]!==!1)&&(a[h||u]=Nt(o))}const s=(o,u)=>d.forEach(o,(c,l)=>n(c,l,u));return d.isPlainObject(t)||t instanceof this.constructor?s(t,r):d.isString(t)&&(t=t.trim())&&!Ln(t)?s(Nn(t),r):t!=null&&n(r,t,i),this}get(t,r){if(t=wt(t),t){const i=d.findKey(this,t);if(i){const a=this[i];if(!r)return a;if(r===!0)return Mn(a);if(d.isFunction(r))return r.call(this,a,i);if(d.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=wt(t),t){const i=d.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Vt(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let a=!1;function n(s){if(s=wt(s),s){const o=d.findKey(i,s);o&&(!r||Vt(i,i[o],o,r))&&(delete i[o],a=!0)}}return d.isArray(t)?t.forEach(n):n(t),a}clear(t){const r=Object.keys(this);let i=r.length,a=!1;for(;i--;){const n=r[i];(!t||Vt(this,this[n],n,t,!0))&&(delete this[n],a=!0)}return a}normalize(t){const r=this,i={};return d.forEach(this,(a,n)=>{const s=d.findKey(i,n);if(s){r[s]=Nt(a),delete r[n];return}const o=t?Bn(n):String(n).trim();o!==n&&delete r[n],r[o]=Nt(a),i[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return d.forEach(this,(i,a)=>{i!=null&&i!==!1&&(r[a]=t&&d.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(a=>i.set(a)),i}static accessor(t){const i=(this[Ge]=this[Ge]={accessors:{}}).accessors,a=this.prototype;function n(s){const o=wt(s);i[o]||(Pn(a,s),i[o]=!0)}return d.isArray(t)?t.forEach(n):n(t),this}}Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.freezeMethods(Ht.prototype);d.freezeMethods(Ht);const q=Ht;function qt(e,t){const r=this||ve,i=t||r,a=q.from(i.headers);let n=i.data;return d.forEach(e,function(o){n=o.call(r,n,a.normalize(),t?t.status:void 0)}),a.normalize(),n}function Li(e){return!!(e&&e.__CANCEL__)}function Tt(e,t,r){D.call(this,e==null?"canceled":e,D.ERR_CANCELED,t,r),this.name="CanceledError"}d.inherits(Tt,D,{__CANCEL__:!0});function kn(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new D("Request failed with status code "+r.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const _n=X.isStandardBrowserEnv?function(){return{write:function(r,i,a,n,s,o){const u=[];u.push(r+"="+encodeURIComponent(i)),d.isNumber(a)&&u.push("expires="+new Date(a).toGMTString()),d.isString(n)&&u.push("path="+n),d.isString(s)&&u.push("domain="+s),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){const i=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function In(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Un(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Bi(e,t){return e&&!In(t)?Un(e,t):t}const Fn=X.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let i;function a(n){let s=n;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=a(window.location.href),function(s){const o=d.isString(s)?a(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}();function zn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hn(e,t){e=e||10;const r=new Array(e),i=new Array(e);let a=0,n=0,s;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),l=i[n];s||(s=c),r[a]=u,i[a]=c;let h=n,f=0;for(;h!==a;)f+=r[h++],h=h%e;if(a=(a+1)%e,a===n&&(n=(n+1)%e),c-s<t)return;const v=l&&c-l;return v?Math.round(f*1e3/v):void 0}}function Je(e,t){let r=0;const i=Hn(50,250);return a=>{const n=a.loaded,s=a.lengthComputable?a.total:void 0,o=n-r,u=i(o),c=n<=s;r=n;const l={loaded:n,total:s,progress:s?n/s:void 0,bytes:o,rate:u||void 0,estimated:u&&s&&c?(s-n)/u:void 0,event:a};l[t?"download":"upload"]=!0,e(l)}}const jn=typeof XMLHttpRequest<"u",Wn=jn&&function(e){return new Promise(function(r,i){let a=e.data;const n=q.from(e.headers).normalize(),s=e.responseType;let o;function u(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}d.isFormData(a)&&(X.isStandardBrowserEnv||X.isStandardBrowserWebWorkerEnv?n.setContentType(!1):n.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";n.set("Authorization","Basic "+btoa(v+":"+m))}const l=Bi(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ri(l,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function h(){if(!c)return;const v=q.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:v,config:e,request:c};kn(function(O){r(O),u()},function(O){i(O),u()},g),c=null}if("onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(h)},c.onabort=function(){c&&(i(new D("Request aborted",D.ECONNABORTED,e,c)),c=null)},c.onerror=function(){i(new D("Network Error",D.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||Ni;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),i(new D(m,g.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,c)),c=null},X.isStandardBrowserEnv){const v=(e.withCredentials||Fn(l))&&e.xsrfCookieName&&_n.read(e.xsrfCookieName);v&&n.set(e.xsrfHeaderName,v)}a===void 0&&n.setContentType(null),"setRequestHeader"in c&&d.forEach(n.toJSON(),function(m,g){c.setRequestHeader(g,m)}),d.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&s!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Je(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Je(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=v=>{c&&(i(!v||v.type?new Tt(null,e,c):v),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const f=zn(l);if(f&&X.protocols.indexOf(f)===-1){i(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e));return}c.send(a||null)})},Mt={http:pn,xhr:Wn};d.forEach(Mt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const Xn={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let r,i;for(let a=0;a<t&&(r=e[a],!(i=d.isString(r)?Mt[r.toLowerCase()]:r));a++);if(!i)throw i===!1?new D("Adapter ".concat(r," is not supported by the environment"),"ERR_NOT_SUPPORT"):new Error(d.hasOwnProp(Mt,r)?"Adapter '".concat(r,"' is not available in the build"):"Unknown adapter '".concat(r,"'"));if(!d.isFunction(i))throw new TypeError("adapter is not a function");return i},adapters:Mt};function Gt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Tt(null,e)}function Ke(e){return Gt(e),e.headers=q.from(e.headers),e.data=qt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Xn.getAdapter(e.adapter||ve.adapter)(e).then(function(i){return Gt(e),i.data=qt.call(e,e.transformResponse,i),i.headers=q.from(i.headers),i},function(i){return Li(i)||(Gt(e),i&&i.response&&(i.response.data=qt.call(e,e.transformResponse,i.response),i.response.headers=q.from(i.response.headers))),Promise.reject(i)})}const Qe=e=>e instanceof q?e.toJSON():e;function dt(e,t){t=t||{};const r={};function i(c,l,h){return d.isPlainObject(c)&&d.isPlainObject(l)?d.merge.call({caseless:h},c,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function a(c,l,h){if(d.isUndefined(l)){if(!d.isUndefined(c))return i(void 0,c,h)}else return i(c,l,h)}function n(c,l){if(!d.isUndefined(l))return i(void 0,l)}function s(c,l){if(d.isUndefined(l)){if(!d.isUndefined(c))return i(void 0,c)}else return i(void 0,l)}function o(c,l,h){if(h in t)return i(c,l);if(h in e)return i(void 0,c)}const u={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,l)=>a(Qe(c),Qe(l),!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(l){const h=u[l]||a,f=h(e[l],t[l],l);d.isUndefined(f)&&h!==o||(r[l]=f)}),r}const Pi="1.4.0",ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ye[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Ze={};ye.transitional=function(t,r,i){function a(n,s){return"[Axios v"+Pi+"] Transitional option '"+n+"'"+s+(i?". "+i:"")}return(n,s,o)=>{if(t===!1)throw new D(a(s," has been removed"+(r?" in "+r:"")),D.ERR_DEPRECATED);return r&&!Ze[s]&&(Ze[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(n,s,o):!0}};function Yn(e,t,r){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let a=i.length;for(;a-- >0;){const n=i[a],s=t[n];if(s){const o=e[n],u=o===void 0||s(o,n,e);if(u!==!0)throw new D("option "+n+" must be "+u,D.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new D("Unknown option "+n,D.ERR_BAD_OPTION)}}const ce={assertOptions:Yn,validators:ye},K=ce.validators;class Pt{constructor(t){this.defaults=t,this.interceptors={request:new qe,response:new qe}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=dt(this.defaults,r);const{transitional:i,paramsSerializer:a,headers:n}=r;i!==void 0&&ce.assertOptions(i,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean)},!1),a!=null&&(d.isFunction(a)?r.paramsSerializer={serialize:a}:ce.assertOptions(a,{encode:K.function,serialize:K.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s;s=n&&d.merge(n.common,n[r.method]),s&&d.forEach(["delete","get","head","post","put","patch","common"],m=>{delete n[m]}),r.headers=q.concat(s,n);const o=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(u=u&&g.synchronous,o.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let l,h=0,f;if(!u){const m=[Ke.bind(this),void 0];for(m.unshift.apply(m,o),m.push.apply(m,c),f=m.length,l=Promise.resolve(r);h<f;)l=l.then(m[h++],m[h++]);return l}f=o.length;let v=r;for(h=0;h<f;){const m=o[h++],g=o[h++];try{v=m(v)}catch(y){g.call(this,y);break}}try{l=Ke.call(this,v)}catch(m){return Promise.reject(m)}for(h=0,f=c.length;h<f;)l=l.then(c[h++],c[h++]);return l}getUri(t){t=dt(this.defaults,t);const r=Bi(t.baseURL,t.url);return Ri(r,t.params,t.paramsSerializer)}}d.forEach(["delete","get","head","options"],function(t){Pt.prototype[t]=function(r,i){return this.request(dt(i||{},{method:t,url:r,data:(i||{}).data}))}});d.forEach(["post","put","patch"],function(t){function r(i){return function(n,s,o){return this.request(dt(o||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}Pt.prototype[t]=r(),Pt.prototype[t+"Form"]=r(!0)});const Lt=Pt;class we{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const i=this;this.promise.then(a=>{if(!i._listeners)return;let n=i._listeners.length;for(;n-- >0;)i._listeners[n](a);i._listeners=null}),this.promise.then=a=>{let n;const s=new Promise(o=>{i.subscribe(o),n=o}).then(a);return s.cancel=function(){i.unsubscribe(n)},s},t(function(n,s,o){i.reason||(i.reason=new Tt(n,s,o),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new we(function(a){t=a}),cancel:t}}}const $n=we;function Vn(e){return function(r){return e.apply(null,r)}}function qn(e){return d.isObject(e)&&e.isAxiosError===!0}const le={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(le).forEach(([e,t])=>{le[t]=e});const Gn=le;function ki(e){const t=new Lt(e),r=vi(Lt.prototype.request,t);return d.extend(r,Lt.prototype,t,{allOwnKeys:!0}),d.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return ki(dt(e,a))},r}const B=ki(ve);B.Axios=Lt;B.CanceledError=Tt;B.CancelToken=$n;B.isCancel=Li;B.VERSION=Pi;B.toFormData=Ft;B.AxiosError=D;B.Cancel=B.CanceledError;B.all=function(t){return Promise.all(t)};B.spread=Vn;B.isAxiosError=qn;B.mergeConfig=dt;B.AxiosHeaders=q;B.formToJSON=e=>Mi(d.isHTMLForm(e)?new FormData(e):e);B.HttpStatusCode=Gn;B.default=B;const Jn=B,Qn=ti({name:"upload-file",props:{fileList:{type:String,default:""},imageList:{type:Array,default:()=>[]},accept:{type:String,default:".jpg,.png,.jpeg,.gif"},listType:{type:String,default:"image-card"},showType:{type:String,default:"default"},showFileList:{type:Boolean,default:!0},text:{type:String,default:"上传文件"},size:{type:Number,default:5},max:{type:Number,default:1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},tips:{type:String,default:""},bucketName:{type:String,default:"gyt"},path:{type:String,default:""},fileName:{type:String,default:""},cropper:{type:Boolean,default:!1},options:{type:Object,default:()=>({viewMode:0,autoCrop:!0,enlarge:1,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,previewsCircle:!0,title:"上传图片"})}},emits:["update:fileList","close","readFileInputEventAsArrayBuffer","remove"],setup(e,{emit:t,expose:r,slots:i}){const a="https://".concat(e.bucketName,".ks3-cn-beijing.ksyuncs.com/"),n=Hi(),s=at(!1),o=at(!1),u=at(),c=at(),l=ei({policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""}),h=at([]),f=()=>{if(e.fileList){const w=e.fileList.split("/");h.value=[{id:new Date().getTime().toString(),name:w[w.length-1],status:"finished",url:e.fileList}]}else if(Array.isArray(e.imageList)){const w=[];e.imageList.forEach(E=>{const p=E.split("/");w.push({id:Date.now().toString(),name:p[p.length-1],status:"finished",url:E})}),h.value=w}else h.value=[]};f(),Se(()=>e.imageList,()=>{f()}),Se(()=>e.fileList,()=>{console.log("list"),f()}),r({handleClearFile:()=>{var w;(w=c.value)==null||w.clear(),console.log("清空",c.value)}});const m=at(),g=async w=>{const E=w.file;let p=!0;if(e.size&&(p=E.file.size/1024/1024<e.size,!p))return n.error("文件大小不能超过".concat(e.size,"M")),!1;if(!p)return p;if(e.cropper)return y(E.file,b=>{const A=Object.assign({},e.options,{img:b,name:E.file.name});s.value=!0,setTimeout(()=>{var T;(T=m.value)==null||T.edit(A),console.log(m.value,"cropper")},100)}),!1;try{o.value=!0,console.log(e.path,E.file);const b=E.file.name,A=b.slice(b.lastIndexOf(".")),T="".concat(e.path).concat(e.fileName||Date.now()+A),k={filename:T,bucketName:e.bucketName,postData:{filename:T,acl:"public-read",key:T,unknowValueField:[]}},{data:H}=await Ce(k);l.policy=H.policy,l.signature=H.signature,l.key=T,l.KSSAccessKeyId=H.kssAccessKeyId,l.name=T,u.value=E.file}catch(b){return o.value=!1,!1}return!0},y=async(w,E)=>{const p=new FileReader;p.addEventListener("load",()=>E(p.result)),p.readAsDataURL(w)},O=w=>{const E=a+l.key;console.log(E,"url"),t("update:fileList",E),t("readFileInputEventAsArrayBuffer",u.value),w.file.url=E,s.value=!1,o.value=!1},S=async w=>{console.log("🚀 ~ options",w),t("update:fileList",""),t("remove"),o.value=!1},C=async w=>{try{const E="".concat(e.path).concat(e.fileName||new Date().getTime()+".png"),p={filename:E,bucketName:e.bucketName,postData:{filename:E,acl:"public-read",key:E,unknowValueField:[]}},{data:b}=await Ce(p);l.policy=b.policy,l.signature=b.signature,l.key=E,l.KSSAccessKeyId=b.kssAccessKeyId,l.name=E;const A=new FormData;for(const T in l)A.append(T,l[T]);A.append("file",w),await Jn.post(a,A).then(()=>{const T=a+l.key;console.log(T,"url");const k=T.split("/");h.value=[{id:new Date().getTime().toString(),name:k[k.length-1],status:"finished",url:T}],t("update:fileList",T),s.value=!1})}catch(E){return!1}};return()=>M("div",null,[M(ji,{ref:c,action:a,data:l,fileList:h.value,"onUpdate:fileList":w=>h.value=w,listType:e.listType,accept:e.accept,multiple:e.multiple,max:e.max,disabled:e.disabled,showFileList:e.showFileList,showPreviewButton:!0,onBeforeUpload:w=>g(w),onFinish:w=>O(w),onRemove:w=>S(w)},{default:()=>[e.showType==="default"&&e.listType==="image"&&M(st,{loading:o.value,type:"primary"},{default:()=>[e.text]}),e.showType==="custom"&&i.custom&&i.custom()]}),e.tips&&M("p",{style:"font-size: 13px; color: #666; padding-top: 4px;"},[e.tips]),M(Wi,{show:s.value,"onUpdate:show":w=>s.value=w,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[M(Lr,{ref:m,onClose:()=>s.value=!1,onCropperOk:C},null)]})])}});export{Qn as U,Jn as a,Ce as p};