index-legacy-5ce2cc89.js 76 KB

12345678910
  1. System.register(["./index-legacy-f073bf97.js"],(function(t,e){"use strict";var i,n,o,r,a,s,c,h,l,p,d,u,f,m,g;return{setters:[t=>{i=t.B,n=t.d,o=t.e,r=t.r,a=t.f,s=t.cg,c=t.ch,h=t.w,l=t.j,p=t.k,d=t.E,u=t.b,f=t.y,m=t.C,g=t.v}],execute:function(){var e=document.createElement("style");e.textContent='/*!\n * Cropper.js v1.5.13\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2022-11-20T05:30:43.444Z\n */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-.15625vw;top:0;width:.36458333vw}.cropper-center:after{height:.36458333vw;left:0;top:-.15625vw;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-.15625vw;top:0;width:.26041667vw}.cropper-line.line-n{cursor:ns-resize;height:.26041667vw;left:0;top:-.15625vw}.cropper-line.line-w{cursor:ew-resize;left:-.15625vw;top:0;width:.26041667vw}.cropper-line.line-s{bottom:-.15625vw;cursor:ns-resize;height:.26041667vw;left:0}.cropper-point{background-color:#39f;height:.26041667vw;opacity:.75;width:.26041667vw}.cropper-point.point-e{cursor:ew-resize;margin-top:-.15625vw;right:-.15625vw;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-.15625vw;top:-.15625vw}.cropper-point.point-w{cursor:ew-resize;left:-.15625vw;margin-top:-.15625vw;top:50%}.cropper-point.point-s{bottom:-.15625vw;cursor:s-resize;left:50%;margin-left:-.15625vw}.cropper-point.point-ne{cursor:nesw-resize;right:-.15625vw;top:-.15625vw}.cropper-point.point-nw{cursor:nwse-resize;left:-.15625vw;top:-.15625vw}.cropper-point.point-sw{bottom:-.15625vw;cursor:nesw-resize;left:-.15625vw}.cropper-point.point-se{bottom:-.15625vw;cursor:nwse-resize;height:1.04166667vw;opacity:1;right:-.15625vw;width:1.04166667vw}@media (min-width: 768px){.cropper-point.point-se{height:.78125vw;width:.78125vw}}@media (min-width: 992px){.cropper-point.point-se{height:.52083333vw;width:.52083333vw}}@media (min-width: 1200px){.cropper-point.point-se{height:.26041667vw;opacity:.75;width:.26041667vw}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}\n',document.head.appendChild(e);const w=t("p",(t=>i.post("/edu-app/open/getUploadSign",{data:t})));
  2. /*!
  3. * Cropper.js v1.5.13
  4. * https://fengyuanchen.github.io/cropperjs
  5. *
  6. * Copyright 2015-present Chen Fengyuan
  7. * Released under the MIT license
  8. *
  9. * Date: 2022-11-20T05:30:46.114Z
  10. */function v(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function y(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?v(Object(i),!0).forEach((function(e){C(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function x(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function C(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function E(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?O(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var A="undefined"!=typeof window&&void 0!==window.document,S=A?window:{},D=!(!A||!S.document.documentElement)&&"ontouchstart"in S.document.documentElement,T=!!A&&"PointerEvent"in S,R="cropper",M="all",k="crop",B="move",N="zoom",L="e",j="w",P="s",z="n",U="ne",H="nw",F="se",W="sw",I="".concat(R,"-crop"),_="".concat(R,"-disabled"),X="".concat(R,"-hidden"),Y="".concat(R,"-hide"),q="".concat(R,"-invisible"),K="".concat(R,"-modal"),J="".concat(R,"-move"),V="".concat(R,"Action"),$="".concat(R,"Preview"),G="crop",Q="move",Z="none",tt="crop",et="cropend",it="cropmove",nt="cropstart",ot="dblclick",rt=T?"pointerdown":D?"touchstart":"mousedown",at=T?"pointermove":D?"touchmove":"mousemove",st=T?"pointerup pointercancel":D?"touchend touchcancel":"mouseup",ct="ready",ht="resize",lt="wheel",pt="zoom",dt="image/jpeg",ut=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ft=/^data:/,mt=/^data:image\/jpeg;base64,/,gt=/^img|canvas$/i,wt={viewMode:0,dragMode:G,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:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},vt=Number.isNaN||S.isNaN;function yt(t){return"number"==typeof t&&!vt(t)}var bt=function(t){return t>0&&t<1/0};function xt(t){return void 0===t}function Ct(t){return"object"===b(t)&&null!==t}var Et=Object.prototype.hasOwnProperty;function Ot(t){if(!Ct(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&Et.call(i,"isPrototypeOf")}catch(n){return!1}}function At(t){return"function"==typeof t}var St=Array.prototype.slice;function Dt(t){return Array.from?Array.from(t):St.call(t)}function Tt(t,e){return t&&At(e)&&(Array.isArray(t)||yt(t.length)?Dt(t).forEach((function(i,n){e.call(t,i,n,t)})):Ct(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Rt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Ct(t)&&i.length>0&&i.forEach((function(e){Ct(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Mt=/\.\d*(?:0|9){12}\d*$/;function kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Mt.test(t)?Math.round(t*e)/e:t}var Bt=/^width|height|left|top|marginLeft|marginTop$/;function Nt(t,e){var i=t.style;Tt(e,(function(t,e){Bt.test(e)&&yt(t)&&(t="".concat(t,"px")),i[e]=t}))}function Lt(t,e){if(e)if(yt(t.length))Tt(t,(function(t){Lt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function jt(t,e){e&&(yt(t.length)?Tt(t,(function(t){jt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Pt(t,e,i){e&&(yt(t.length)?Tt(t,(function(t){Pt(t,e,i)})):i?Lt(t,e):jt(t,e))}var zt=/([a-z\d])([A-Z])/g;function Ut(t){return t.replace(zt,"$1-$2").toLowerCase()}function Ht(t,e){return Ct(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Ut(e)))}function Ft(t,e,i){Ct(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Ut(e)),i)}var Wt=/\s\s*/,It=function(){var t=!1;if(A){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});S.addEventListener("test",i,n),S.removeEventListener("test",i,n)}return t}();function _t(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(Wt).forEach((function(e){if(!It){var r=t.listeners;r&&r[e]&&r[e][i]&&(o=r[e][i],delete r[e][i],0===Object.keys(r[e]).length&&delete r[e],0===Object.keys(r).length&&delete t.listeners)}t.removeEventListener(e,o,n)}))}function Xt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i;e.trim().split(Wt).forEach((function(e){if(n.once&&!It){var r=t.listeners,a=void 0===r?{}:r;o=function(){delete a[e][i],t.removeEventListener(e,o,n);for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];i.apply(t,s)},a[e]||(a[e]={}),a[e][i]&&t.removeEventListener(e,a[e][i],n),a[e][i]=o,t.listeners=a}t.addEventListener(e,o,n)}))}function Yt(t,e,i){var n;return At(Event)&&At(CustomEvent)?n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(n)}function qt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Kt=S.location,Jt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Vt(t){var e=t.match(Jt);return null!==e&&(e[1]!==Kt.protocol||e[2]!==Kt.hostname||e[3]!==Kt.port)}function $t(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Gt(t){var e=t.rotate,i=t.scaleX,n=t.scaleY,o=t.translateX,r=t.translateY,a=[];yt(o)&&0!==o&&a.push("translateX(".concat(o,"px)")),yt(r)&&0!==r&&a.push("translateY(".concat(r,"px)")),yt(e)&&0!==e&&a.push("rotate(".concat(e,"deg)")),yt(i)&&1!==i&&a.push("scaleX(".concat(i,")")),yt(n)&&1!==n&&a.push("scaleY(".concat(n,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Qt(t,e){var i=t.pageX,n=t.pageY,o={endX:i,endY:n};return e?o:y({startX:i,startY:n},o)}function Zt(t){var e=t.aspectRatio,i=t.height,n=t.width,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",r=bt(n),a=bt(i);if(r&&a){var s=i*e;"contain"===o&&s>n||"cover"===o&&s<n?i=n/e:n=i*e}else r?i=n/e:a&&(n=i*e);return{width:n,height:i}}var te=String.fromCharCode,ee=/^data:.*,/;function ie(t){var e,i=new DataView(t);try{var n,o,r;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var a=i.byteLength,s=2;s+1<a;){if(255===i.getUint8(s)&&225===i.getUint8(s+1)){o=s;break}s+=1}if(o){var c=o+10;if("Exif"===function(t,e,i){var n="";i+=e;for(var o=e;o<i;o+=1)n+=te(t.getUint8(o));return n}(i,o+4,4)){var h=i.getUint16(c);if(((n=18761===h)||19789===h)&&42===i.getUint16(c+2,n)){var l=i.getUint32(c+4,n);l>=8&&(r=c+l)}}}if(r){var p,d,u=i.getUint16(r,n);for(d=0;d<u;d+=1)if(p=r+12*d+2,274===i.getUint16(p,n)){p+=8,e=i.getUint16(p,n),i.setUint16(p,1,n);break}}}catch(f){e=1}return e}var ne={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,n=this.cropper,o=Number(e.minContainerWidth),r=Number(e.minContainerHeight);Lt(n,X),jt(t,X);var a={width:Math.max(i.offsetWidth,o>=0?o:200),height:Math.max(i.offsetHeight,r>=0?r:100)};this.containerData=a,Nt(n,{width:a.width,height:a.height}),Lt(t,X),jt(n,X)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,o=n?e.naturalHeight:e.naturalWidth,r=n?e.naturalWidth:e.naturalHeight,a=o/r,s=t.width,c=t.height;t.height*a>t.width?3===i?s=t.height*a:c=t.width/a:3===i?c=t.width/a:s=t.height*a;var h={aspectRatio:a,naturalWidth:o,naturalHeight:r,width:s,height:c};this.canvasData=h,this.limited=1===i||2===i,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=Rt({},h)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,r=this.cropBoxData,a=i.viewMode,s=o.aspectRatio,c=this.cropped&&r;if(t){var h=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;a>1?(h=Math.max(h,n.width),l=Math.max(l,n.height),3===a&&(l*s>h?h=l*s:l=h/s)):a>0&&(h?h=Math.max(h,c?r.width:0):l?l=Math.max(l,c?r.height:0):c&&(h=r.width,(l=r.height)*s>h?h=l*s:l=h/s));var p=Zt({aspectRatio:s,width:h,height:l});h=p.width,l=p.height,o.minWidth=h,o.minHeight=l,o.maxWidth=1/0,o.maxHeight=1/0}if(e)if(a>(c?0:1)){var d=n.width-o.width,u=n.height-o.height;o.minLeft=Math.min(0,d),o.minTop=Math.min(0,u),o.maxLeft=Math.max(0,d),o.maxTop=Math.max(0,u),c&&this.limited&&(o.minLeft=Math.min(r.left,r.left+(r.width-o.width)),o.minTop=Math.min(r.top,r.top+(r.height-o.height)),o.maxLeft=r.left,o.maxTop=r.top,2===a&&(o.width>=n.width&&(o.minLeft=Math.min(0,d),o.maxLeft=Math.max(0,d)),o.height>=n.height&&(o.minTop=Math.min(0,u),o.maxTop=Math.max(0,u))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=n.width,o.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var o=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var o=n%90*Math.PI/180,r=Math.sin(o),a=Math.cos(o),s=e*a+i*r,c=e*r+i*a;return n>90?{width:c,height:s}:{width:s,height:c}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),r=o.width,a=o.height,s=i.width*(r/i.naturalWidth),c=i.height*(a/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,i.aspectRatio=r/a,i.naturalWidth=r,i.naturalHeight=a,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,Nt(this.canvas,Rt({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,n=i.naturalWidth*(e.width/e.naturalWidth),o=i.naturalHeight*(e.height/e.naturalHeight);Rt(i,{width:n,height:o,left:(e.width-n)/2,top:(e.height-o)/2}),Nt(this.image,Rt({width:i.width,height:i.height},Gt(Rt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,o={width:e.width,height:e.height};i&&(e.height*i>e.width?o.height=o.width/i:o.width=o.height*i),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*n),o.height=Math.max(o.minHeight,o.height*n),o.left=e.left+(e.width-o.width)/2,o.top=e.top+(e.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=Rt({},o)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,o=this.canvasData,r=this.cropBoxData,a=this.limited,s=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,h=Number(i.minCropBoxHeight)||0,l=a?Math.min(n.width,o.width,o.width+o.left,n.width-o.left):n.width,p=a?Math.min(n.height,o.height,o.height+o.top,n.height-o.top):n.height;c=Math.min(c,n.width),h=Math.min(h,n.height),s&&(c&&h?h*s>c?h=c/s:c=h*s:c?h=c/s:h&&(c=h*s),p*s>l?p=l/s:l=p*s),r.minWidth=Math.min(c,l),r.minHeight=Math.min(h,p),r.maxWidth=l,r.maxHeight=p}e&&(a?(r.minLeft=Math.max(0,o.left),r.minTop=Math.max(0,o.top),r.maxLeft=Math.min(n.width,o.left+o.width)-r.width,r.maxTop=Math.min(n.height,o.top+o.height)-r.height):(r.minLeft=0,r.minTop=0,r.maxLeft=n.width-r.width,r.maxTop=n.height-r.height))},renderCropBox:function(){var t=this.options,e=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&&Ft(this.face,V,i.width>=e.width&&i.height>=e.height?B:M),Nt(this.cropBox,Rt({width:i.width,height:i.height},Gt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Yt(this.element,tt,this.getData())}},oe={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,o=t.alt||"The image to preview",r=document.createElement("img");if(e&&(r.crossOrigin=e),r.src=n,r.alt=o,this.viewBox.appendChild(r),this.viewBoxImage=r,i){var a=i;"string"==typeof i?a=t.ownerDocument.querySelectorAll(i):i.querySelector&&(a=[i]),this.previews=a,Tt(a,(function(t){var i=document.createElement("img");Ft(t,$,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=o,i.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;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){Tt(this.previews,(function(t){var e=Ht(t,$);Nt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(Ct(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Ut(e)))}(t,$)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,o=i.height,r=t.width,a=t.height,s=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(Nt(this.viewBoxImage,Rt({width:r,height:a},Gt(Rt({translateX:-s,translateY:-c},t)))),Tt(this.previews,(function(e){var i=Ht(e,$),h=i.width,l=i.height,p=h,d=l,u=1;n&&(d=o*(u=h/n)),o&&d>l&&(p=n*(u=l/o),d=l),Nt(e,{width:p,height:d}),Nt(e.getElementsByTagName("img")[0],Rt({width:r*u,height:a*u},Gt(Rt({translateX:-s*u,translateY:-c*u},t))))})))}},re={bind:function(){var t=this.element,e=this.options,i=this.cropper;At(e.cropstart)&&Xt(t,nt,e.cropstart),At(e.cropmove)&&Xt(t,it,e.cropmove),At(e.cropend)&&Xt(t,et,e.cropend),At(e.crop)&&Xt(t,tt,e.crop),At(e.zoom)&&Xt(t,pt,e.zoom),Xt(i,rt,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Xt(i,lt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Xt(i,ot,this.onDblclick=this.dblclick.bind(this)),Xt(t.ownerDocument,at,this.onCropMove=this.cropMove.bind(this)),Xt(t.ownerDocument,st,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Xt(window,ht,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;At(e.cropstart)&&_t(t,nt,e.cropstart),At(e.cropmove)&&_t(t,it,e.cropmove),At(e.cropend)&&_t(t,et,e.cropend),At(e.crop)&&_t(t,tt,e.crop),At(e.zoom)&&_t(t,pt,e.zoom),_t(i,rt,this.onCropStart),e.zoomable&&e.zoomOnWheel&&_t(i,lt,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&_t(i,ot,this.onDblclick),_t(t.ownerDocument,at,this.onCropMove),_t(t.ownerDocument,st,this.onCropEnd),e.responsive&&_t(window,ht,this.onResize)}},ae={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,o=this.containerData,r=n.offsetWidth/o.width,a=n.offsetHeight/o.height,s=Math.abs(r-1)>Math.abs(a-1)?r:a;1!==s&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(Tt(t,(function(e,i){t[i]=e*s}))),this.setCropBoxData(Tt(e,(function(t,i){e[i]=t*s})))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===Z||this.setDragMode((t=this.dragBox,e=I,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?Q:G))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(yt(e)&&1!==e||yt(i)&&0!==i||t.ctrlKey))){var n,o=this.options,r=this.pointers;t.changedTouches?Tt(t.changedTouches,(function(t){r[t.identifier]=Qt(t)})):r[t.pointerId||0]=Qt(t),n=Object.keys(r).length>1&&o.zoomable&&o.zoomOnTouch?N:Ht(t.target,V),ut.test(n)&&!1!==Yt(this.element,nt,{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,n===k&&(this.cropping=!0,Lt(this.dragBox,K)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Yt(this.element,it,{originalEvent:t,action:e})&&(t.changedTouches?Tt(t.changedTouches,(function(t){Rt(i[t.identifier]||{},Qt(t,!0))})):Rt(i[t.pointerId||0]||{},Qt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?Tt(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Pt(this.dragBox,K,this.cropped&&this.options.modal)),Yt(this.element,et,{originalEvent:t,action:e}))}}},se={change:function(t){var e,i=this.options,n=this.canvasData,o=this.containerData,r=this.cropBoxData,a=this.pointers,s=this.action,c=i.aspectRatio,h=r.left,l=r.top,p=r.width,d=r.height,u=h+p,f=l+d,m=0,g=0,w=o.width,v=o.height,b=!0;!c&&t.shiftKey&&(c=p&&d?p/d:1),this.limited&&(m=r.minLeft,g=r.minTop,w=m+Math.min(o.width,n.width,n.left+n.width),v=g+Math.min(o.height,n.height,n.top+n.height));var x=a[Object.keys(a)[0]],C={x:x.endX-x.startX,y:x.endY-x.startY},E=function(t){switch(t){case L:u+C.x>w&&(C.x=w-u);break;case j:h+C.x<m&&(C.x=m-h);break;case z:l+C.y<g&&(C.y=g-l);break;case P:f+C.y>v&&(C.y=v-f)}};switch(s){case M:h+=C.x,l+=C.y;break;case L:if(C.x>=0&&(u>=w||c&&(l<=g||f>=v))){b=!1;break}E(L),(p+=C.x)<0&&(s=j,h-=p=-p),c&&(d=p/c,l+=(r.height-d)/2);break;case z:if(C.y<=0&&(l<=g||c&&(h<=m||u>=w))){b=!1;break}E(z),d-=C.y,l+=C.y,d<0&&(s=P,l-=d=-d),c&&(p=d*c,h+=(r.width-p)/2);break;case j:if(C.x<=0&&(h<=m||c&&(l<=g||f>=v))){b=!1;break}E(j),p-=C.x,h+=C.x,p<0&&(s=L,h-=p=-p),c&&(d=p/c,l+=(r.height-d)/2);break;case P:if(C.y>=0&&(f>=v||c&&(h<=m||u>=w))){b=!1;break}E(P),(d+=C.y)<0&&(s=z,l-=d=-d),c&&(p=d*c,h+=(r.width-p)/2);break;case U:if(c){if(C.y<=0&&(l<=g||u>=w)){b=!1;break}E(z),d-=C.y,l+=C.y,p=d*c}else E(z),E(L),C.x>=0?u<w?p+=C.x:C.y<=0&&l<=g&&(b=!1):p+=C.x,C.y<=0?l>g&&(d-=C.y,l+=C.y):(d-=C.y,l+=C.y);p<0&&d<0?(s=W,l-=d=-d,h-=p=-p):p<0?(s=H,h-=p=-p):d<0&&(s=F,l-=d=-d);break;case H:if(c){if(C.y<=0&&(l<=g||h<=m)){b=!1;break}E(z),d-=C.y,l+=C.y,p=d*c,h+=r.width-p}else E(z),E(j),C.x<=0?h>m?(p-=C.x,h+=C.x):C.y<=0&&l<=g&&(b=!1):(p-=C.x,h+=C.x),C.y<=0?l>g&&(d-=C.y,l+=C.y):(d-=C.y,l+=C.y);p<0&&d<0?(s=F,l-=d=-d,h-=p=-p):p<0?(s=U,h-=p=-p):d<0&&(s=W,l-=d=-d);break;case W:if(c){if(C.x<=0&&(h<=m||f>=v)){b=!1;break}E(j),p-=C.x,h+=C.x,d=p/c}else E(P),E(j),C.x<=0?h>m?(p-=C.x,h+=C.x):C.y>=0&&f>=v&&(b=!1):(p-=C.x,h+=C.x),C.y>=0?f<v&&(d+=C.y):d+=C.y;p<0&&d<0?(s=U,l-=d=-d,h-=p=-p):p<0?(s=F,h-=p=-p):d<0&&(s=H,l-=d=-d);break;case F:if(c){if(C.x>=0&&(u>=w||f>=v)){b=!1;break}E(L),d=(p+=C.x)/c}else E(P),E(L),C.x>=0?u<w?p+=C.x:C.y>=0&&f>=v&&(b=!1):p+=C.x,C.y>=0?f<v&&(d+=C.y):d+=C.y;p<0&&d<0?(s=H,l-=d=-d,h-=p=-p):p<0?(s=W,h-=p=-p):d<0&&(s=U,l-=d=-d);break;case B:this.move(C.x,C.y),b=!1;break;case N:this.zoom(function(t){var e=y({},t),i=0;return Tt(t,(function(t,n){delete e[n],Tt(e,(function(e){var n=Math.abs(t.startX-e.startX),o=Math.abs(t.startY-e.startY),r=Math.abs(t.endX-e.endX),a=Math.abs(t.endY-e.endY),s=Math.sqrt(n*n+o*o),c=(Math.sqrt(r*r+a*a)-s)/s;Math.abs(c)>Math.abs(i)&&(i=c)}))})),i}(a),t),b=!1;break;case k:if(!C.x||!C.y){b=!1;break}e=qt(this.cropper),h=x.startX-e.left,l=x.startY-e.top,p=r.minWidth,d=r.minHeight,C.x>0?s=C.y>0?F:U:C.x<0&&(h-=p,s=C.y>0?W:H),C.y<0&&(l-=d),this.cropped||(jt(this.cropBox,X),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(r.width=p,r.height=d,r.left=h,r.top=l,this.action=s,this.renderCropBox()),Tt(a,(function(t){t.startX=t.endX,t.startY=t.endY}))}},ce={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Lt(this.dragBox,K),jt(this.cropBox,X),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Rt({},this.initialImageData),this.canvasData=Rt({},this.initialCanvasData),this.cropBoxData=Rt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Rt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),jt(this.dragBox,K),Lt(this.cropBox,X)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,Tt(this.previews,(function(e){e.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,jt(this.cropper,_)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Lt(this.cropper,_)),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 e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,o=i.top;return this.moveTo(xt(t)?t:n+Number(t),xt(e)?e:o+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(yt(t)&&(i.left=t,n=!0),yt(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,o=this.canvasData,r=o.width,a=o.height,s=o.naturalWidth,c=o.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var h=s*t,l=c*t;if(!1===Yt(this.element,pt,{ratio:t,oldRatio:r/s,originalEvent:i}))return this;if(i){var p=this.pointers,d=qt(this.cropper),u=p&&Object.keys(p).length?function(t){var e=0,i=0,n=0;return Tt(t,(function(t){var o=t.startX,r=t.startY;e+=o,i+=r,n+=1})),{pageX:e/=n,pageY:i/=n}}(p):{pageX:i.pageX,pageY:i.pageY};o.left-=(h-r)*((u.pageX-d.left-o.left)/r),o.top-=(l-a)*((u.pageY-d.top-o.top)/a)}else Ot(e)&&yt(e.x)&&yt(e.y)?(o.left-=(h-r)*((e.x-o.left)/r),o.top-=(l-a)*((e.y-o.top)/a)):(o.left-=(h-r)/2,o.top-=(l-a)/2);o.width=h,o.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return yt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,yt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(yt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(yt(t)&&(i.scaleX=t,n=!0),yt(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,o=this.canvasData,r=this.cropBoxData;if(this.ready&&this.cropped){t={x:r.left-o.left,y:r.top-o.top,width:r.width,height:r.height};var a=n.width/n.naturalWidth;if(Tt(t,(function(e,i){t[i]=e/a})),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,o={};if(this.ready&&!this.disabled&&Ot(t)){var r=!1;e.rotatable&&yt(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,r=!0),e.scalable&&(yt(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,r=!0),yt(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,r=!0)),r&&this.renderCanvas(!0,!0);var a=i.width/i.naturalWidth;yt(t.x)&&(o.left=t.x*a+n.left),yt(t.y)&&(o.top=t.y*a+n.top),yt(t.width)&&(o.width=t.width*a),yt(t.height)&&(o.height=t.height*a),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?Rt({},this.containerData):{}},getImageData:function(){return this.sized?Rt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&Tt(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&Ot(t)&&(yt(t.left)&&(e.left=t.left),yt(t.top)&&(e.top=t.top),yt(t.width)?(e.width=t.width,e.height=t.width/i):yt(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&Ot(t)&&(yt(t.left)&&(n.left=t.left),yt(t.top)&&(n.top=t.top),yt(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),yt(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),o&&(e?n.height=n.width/o:i&&(n.width=n.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,n){var o=e.aspectRatio,r=e.naturalWidth,a=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,h=e.scaleX,l=void 0===h?1:h,p=e.scaleY,d=void 0===p?1:p,u=i.aspectRatio,f=i.naturalWidth,m=i.naturalHeight,g=n.fillColor,w=void 0===g?"transparent":g,v=n.imageSmoothingEnabled,y=void 0===v||v,b=n.imageSmoothingQuality,x=void 0===b?"low":b,C=n.maxWidth,O=void 0===C?1/0:C,A=n.maxHeight,S=void 0===A?1/0:A,D=n.minWidth,T=void 0===D?0:D,R=n.minHeight,M=void 0===R?0:R,k=document.createElement("canvas"),B=k.getContext("2d"),N=Zt({aspectRatio:u,width:O,height:S}),L=Zt({aspectRatio:u,width:T,height:M},"cover"),j=Math.min(N.width,Math.max(L.width,f)),P=Math.min(N.height,Math.max(L.height,m)),z=Zt({aspectRatio:o,width:O,height:S}),U=Zt({aspectRatio:o,width:T,height:M},"cover"),H=Math.min(z.width,Math.max(U.width,r)),F=Math.min(z.height,Math.max(U.height,a)),W=[-H/2,-F/2,H,F];return k.width=kt(j),k.height=kt(P),B.fillStyle=w,B.fillRect(0,0,j,P),B.save(),B.translate(j/2,P/2),B.rotate(c*Math.PI/180),B.scale(l,d),B.imageSmoothingEnabled=y,B.imageSmoothingQuality=x,B.drawImage.apply(B,[t].concat(E(W.map((function(t){return Math.floor(kt(t))}))))),B.restore(),k}(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),o=n.x,r=n.y,a=n.width,s=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(o*=c,r*=c,a*=c,s*=c);var h=a/s,l=Zt({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Zt({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),d=Zt({aspectRatio:h,width:t.width||(1!==c?i.width:a),height:t.height||(1!==c?i.height:s)}),u=d.width,f=d.height;u=Math.min(l.width,Math.max(p.width,u)),f=Math.min(l.height,Math.max(p.height,f));var m=document.createElement("canvas"),g=m.getContext("2d");m.width=kt(u),m.height=kt(f),g.fillStyle=t.fillColor||"transparent",g.fillRect(0,0,u,f);var w=t.imageSmoothingEnabled,v=void 0===w||w,y=t.imageSmoothingQuality;g.imageSmoothingEnabled=v,y&&(g.imageSmoothingQuality=y);var b,x,C,O,A,S,D=i.width,T=i.height,R=o,M=r;R<=-a||R>D?(R=0,b=0,C=0,A=0):R<=0?(C=-R,R=0,A=b=Math.min(D,a+R)):R<=D&&(C=0,A=b=Math.min(a,D-R)),b<=0||M<=-s||M>T?(M=0,x=0,O=0,S=0):M<=0?(O=-M,M=0,S=x=Math.min(T,s+M)):M<=T&&(O=0,S=x=Math.min(s,T-M));var k=[R,M,b,x];if(A>0&&S>0){var B=u/a;k.push(C*B,O*B,A*B,S*B)}return g.drawImage.apply(g,[i].concat(E(k.map((function(t){return Math.floor(kt(t))}))))),m},setAspectRatio:function(t){var e=this.options;return this.disabled||xt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var o=t===G,r=e.movable&&t===Q;t=o||r?t:Z,e.dragMode=t,Ft(i,V,t),Pt(i,I,o),Pt(i,J,r),e.cropBoxMovable||(Ft(n,V,t),Pt(n,I,o),Pt(n,J,r))}return this}},he=S.Cropper,le=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!gt.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Rt({},wt,Ot(i)&&i),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()}var e,i,n;return e=t,i=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[R]){if(e[R]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(ft.test(t))mt.test(t)?this.read((o=t.replace(ee,""),r=atob(o),a=new ArrayBuffer(r.length),Tt(s=new Uint8Array(a),(function(t,e){s[e]=r.charCodeAt(e)})),a)):this.clone();else{var o,r,a,s,c=new XMLHttpRequest,h=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=h,c.onerror=h,c.ontimeout=h,c.onprogress=function(){c.getResponseHeader("content-type")!==dt&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&Vt(t)&&i.crossOrigin&&(t=$t(t)),c.open("GET",t,!0),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=ie(t),o=0,r=1,a=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(te.apply(null,Dt(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,dt);var s=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);o=s.rotate,r=s.scaleX,a=s.scaleY}e.rotatable&&(i.rotate=o),e.scalable&&(i.scaleX=r,i.scaleY=a),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&Vt(e)&&(i||(i="anonymous"),n=$t(e)),this.crossOrigin=i,this.crossOriginUrl=n;var o=document.createElement("img");i&&(o.crossOrigin=i),o.src=n||e,o.alt=t.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Lt(o,Y),t.parentNode.insertBefore(o,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=S.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(S.navigator.userAgent),n=function(e,i){Rt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Rt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var o=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),i||r.removeChild(o)},o.src=e.src,i||(o.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;",r.appendChild(o))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,o=document.createElement("div");o.innerHTML='<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>';var r=o.querySelector(".".concat(R,"-container")),a=r.querySelector(".".concat(R,"-canvas")),s=r.querySelector(".".concat(R,"-drag-box")),c=r.querySelector(".".concat(R,"-crop-box")),h=c.querySelector(".".concat(R,"-face"));this.container=n,this.cropper=r,this.canvas=a,this.dragBox=s,this.cropBox=c,this.viewBox=r.querySelector(".".concat(R,"-view-box")),this.face=h,a.appendChild(i),Lt(t,X),n.insertBefore(r,t.nextSibling),jt(i,Y),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,Lt(c,X),e.guides||Lt(c.getElementsByClassName("".concat(R,"-dashed")),X),e.center||Lt(c.getElementsByClassName("".concat(R,"-center")),X),e.background&&Lt(r,"".concat(R,"-bg")),e.highlight||Lt(h,q),e.cropBoxMovable&&(Lt(h,J),Ft(h,V,M)),e.cropBoxResizable||(Lt(c.getElementsByClassName("".concat(R,"-line")),X),Lt(c.getElementsByClassName("".concat(R,"-point")),X)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),At(e.ready)&&Xt(t,ct,e.ready,{once:!0}),Yt(t,ct)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),jt(this.element,X)}}},{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()}}],n=[{key:"noConflict",value:function(){return window.Cropper=he,t}},{key:"setDefaults",value:function(t){Rt(wt,Ot(t)&&t)}}],i&&x(e.prototype,i),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();Rt(le.prototype,ne,oe,re,ae,se,ce);const pe=n({name:"copper-image",emits:["close","cropperNo","cropperOk"],setup(t,{emit:e,expose:i}){const n=o({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}),u=r(),f=()=>{n.myCropper=new le(u.value,{viewMode:1,dragMode:"move",aspectRatio:n.options.autoCropWidth/n.options.autoCropHeight,initialAspectRatio:1,autoCropArea:1,cropBoxMovable:!0,cropBoxResizable:!1,background:!0,movable:!0,modal:!0,preview:".before"})},m=t=>{switch(t){case"left":n.myCropper.rotate(90);break;case"right":n.myCropper.rotate(-90);break;case"zoomIn":n.myCropper.zoom(.1);break;case"zoomOut":n.myCropper.zoom(-.1)}},g=()=>{n.confirmLoading=!0,n.myCropper.getCroppedCanvas({imageSmoothingQuality:"high"}).toBlob((t=>{console.log(t,"1212"),e("cropperOk",t),n.confirmLoading=!1}))};return i({edit:t=>{const{options:e}=n;n.visible=!0,n.options=Object.assign({},e,t),d((()=>{f()}))}}),()=>a("div",null,[a(s,{cols:2,xGap:24,style:{paddingTop:"12px"}},{default:()=>[a(c,null,{default:()=>[a("div",{style:"width: 100%; height: 300px"},[a("img",{ref:u,id:"myImages",src:n.options.img,alt:""},null)]),a(h,{justify:"center",style:{paddingTop:"12px"}},{default:()=>[a(l,{type:"primary",size:"small",onClick:()=>m("left")},{default:()=>[p("逆时针旋转")]}),a(l,{type:"primary",size:"small",onClick:()=>m("right")},{default:()=>[p("顺时针旋转")]}),a(l,{type:"primary",size:"small",onClick:()=>m("zoomIn")},{default:()=>[p("放大")]}),a(l,{type:"primary",size:"small",onClick:()=>m("zoomOut")},{default:()=>[p("缩小")]})]})]}),a(c,null,{default:()=>[a("span",{style:{fontSize:"15px",fontWeight:600,paddingBottom:"8px",display:"inline-block"}},[p("预览图片")]),a("div",{class:"before",style:{width:n.options.autoCropWidth+"px",height:n.options.autoCropHeight+"px",overflow:"hidden"}},null)]})]}),a(h,{justify:"end"},{default:()=>[a(l,{type:"default",onClick:()=>{n.confirmLoading=!1,e("close"),e("cropperNo")}},{default:()=>[p("取消")]}),a(l,{type:"primary",loading:n.confirmLoading,onClick:g},{default:()=>[p("确认")]})]})])}});function de(t,e){return function(){return t.apply(e,arguments)}}const{toString:ue}=Object.prototype,{getPrototypeOf:fe}=Object,me=(ge=Object.create(null),t=>{const e=ue.call(t);return ge[e]||(ge[e]=e.slice(8,-1).toLowerCase())});var ge;const we=t=>(t=t.toLowerCase(),e=>me(e)===t),ve=t=>e=>typeof e===t,{isArray:ye}=Array,be=ve("undefined"),xe=we("ArrayBuffer"),Ce=ve("string"),Ee=ve("function"),Oe=ve("number"),Ae=t=>null!==t&&"object"==typeof t,Se=t=>{if("object"!==me(t))return!1;const e=fe(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},De=we("Date"),Te=we("File"),Re=we("Blob"),Me=we("FileList"),ke=we("URLSearchParams");function Be(t,e,{allOwnKeys:i=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),ye(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=i?Object.getOwnPropertyNames(t):Object.keys(t),r=o.length;let a;for(n=0;n<r;n++)a=o[n],e.call(null,t[a],a,t)}}function Ne(t,e){e=e.toLowerCase();const i=Object.keys(t);let n,o=i.length;for(;o-- >0;)if(n=i[o],e===n.toLowerCase())return n;return null}const Le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,je=t=>!be(t)&&t!==Le,Pe=(ze="undefined"!=typeof Uint8Array&&fe(Uint8Array),t=>ze&&t instanceof ze);var ze;const Ue=we("HTMLFormElement"),He=(({hasOwnProperty:t})=>(e,i)=>t.call(e,i))(Object.prototype),Fe=we("RegExp"),We=(t,e)=>{const i=Object.getOwnPropertyDescriptors(t),n={};Be(i,((i,o)=>{!1!==e(i,o,t)&&(n[o]=i)})),Object.defineProperties(t,n)},Ie="abcdefghijklmnopqrstuvwxyz",_e="0123456789",Xe={DIGIT:_e,ALPHA:Ie,ALPHA_DIGIT:Ie+Ie.toUpperCase()+_e},Ye=we("AsyncFunction"),qe={isArray:ye,isArrayBuffer:xe,isBuffer:function(t){return null!==t&&!be(t)&&null!==t.constructor&&!be(t.constructor)&&Ee(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Ee(t.append)&&("formdata"===(e=me(t))||"object"===e&&Ee(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&xe(t.buffer),e},isString:Ce,isNumber:Oe,isBoolean:t=>!0===t||!1===t,isObject:Ae,isPlainObject:Se,isUndefined:be,isDate:De,isFile:Te,isBlob:Re,isRegExp:Fe,isFunction:Ee,isStream:t=>Ae(t)&&Ee(t.pipe),isURLSearchParams:ke,isTypedArray:Pe,isFileList:Me,forEach:Be,merge:function t(){const{caseless:e}=je(this)&&this||{},i={},n=(n,o)=>{const r=e&&Ne(i,o)||o;Se(i[r])&&Se(n)?i[r]=t(i[r],n):Se(n)?i[r]=t({},n):ye(n)?i[r]=n.slice():i[r]=n};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Be(arguments[o],n);return i},extend:(t,e,i,{allOwnKeys:n}={})=>(Be(e,((e,n)=>{i&&Ee(e)?t[n]=de(e,i):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,i,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),i&&Object.assign(t.prototype,i)},toFlatObject:(t,e,i,n)=>{let o,r,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),r=o.length;r-- >0;)a=o[r],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==i&&fe(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},kindOf:me,kindOfTest:we,endsWith:(t,e,i)=>{t=String(t),(void 0===i||i>t.length)&&(i=t.length),i-=e.length;const n=t.indexOf(e,i);return-1!==n&&n===i},toArray:t=>{if(!t)return null;if(ye(t))return t;let e=t.length;if(!Oe(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=t[e];return i},forEachEntry:(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=i.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},matchAll:(t,e)=>{let i;const n=[];for(;null!==(i=t.exec(e));)n.push(i);return n},isHTMLForm:Ue,hasOwnProperty:He,hasOwnProp:He,reduceDescriptors:We,freezeMethods:t=>{We(t,((e,i)=>{if(Ee(t)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=t[i];Ee(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(t,e)=>{const i={},n=t=>{t.forEach((t=>{i[t]=!0}))};return ye(t)?n(t):n(String(t).split(e)),i},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,i){return e.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Ne,global:Le,isContextDefined:je,ALPHABET:Xe,generateString:(t=16,e=Xe.ALPHA_DIGIT)=>{let i="";const{length:n}=e;for(;t--;)i+=e[Math.random()*n|0];return i},isSpecCompliantForm:function(t){return!!(t&&Ee(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),i=(t,n)=>{if(Ae(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=ye(t)?[]:{};return Be(t,((t,e)=>{const r=i(t,n+1);!be(r)&&(o[e]=r)})),e[n]=void 0,o}}return t};return i(t,0)},isAsyncFn:Ye,isThenable:t=>t&&(Ae(t)||Ee(t))&&Ee(t.then)&&Ee(t.catch)};function Ke(t,e,i,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),n&&(this.request=n),o&&(this.response=o)}qe.inherits(Ke,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:qe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Je=Ke.prototype,Ve={};function $e(t){return qe.isPlainObject(t)||qe.isArray(t)}function Ge(t){return qe.endsWith(t,"[]")?t.slice(0,-2):t}function Qe(t,e,i){return t?t.concat(e).map((function(t,e){return t=Ge(t),!i&&e?"["+t+"]":t})).join(i?".":""):e}["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((t=>{Ve[t]={value:t}})),Object.defineProperties(Ke,Ve),Object.defineProperty(Je,"isAxiosError",{value:!0}),Ke.from=(t,e,i,n,o,r)=>{const a=Object.create(Je);return qe.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Ke.call(a,t.message,e,i,n,o),a.cause=t,a.name=t.name,r&&Object.assign(a,r),a};const Ze=qe.toFlatObject(qe,{},null,(function(t){return/^is[A-Z]/.test(t)}));function ti(t,e,i){if(!qe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(i=qe.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!qe.isUndefined(e[t])}))).metaTokens,o=i.visitor||h,r=i.dots,a=i.indexes,s=(i.Blob||"undefined"!=typeof Blob&&Blob)&&qe.isSpecCompliantForm(e);if(!qe.isFunction(o))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(qe.isDate(t))return t.toISOString();if(!s&&qe.isBlob(t))throw new Ke("Blob is not supported. Use a Buffer instead.");return qe.isArrayBuffer(t)||qe.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function h(t,i,o){let s=t;if(t&&!o&&"object"==typeof t)if(qe.endsWith(i,"{}"))i=n?i:i.slice(0,-2),t=JSON.stringify(t);else if(qe.isArray(t)&&function(t){return qe.isArray(t)&&!t.some($e)}(t)||(qe.isFileList(t)||qe.endsWith(i,"[]"))&&(s=qe.toArray(t)))return i=Ge(i),s.forEach((function(t,n){!qe.isUndefined(t)&&null!==t&&e.append(!0===a?Qe([i],n,r):null===a?i:i+"[]",c(t))})),!1;return!!$e(t)||(e.append(Qe(o,i,r),c(t)),!1)}const l=[],p=Object.assign(Ze,{defaultVisitor:h,convertValue:c,isVisitable:$e});if(!qe.isObject(t))throw new TypeError("data must be an object");return function t(i,n){if(!qe.isUndefined(i)){if(-1!==l.indexOf(i))throw Error("Circular reference detected in "+n.join("."));l.push(i),qe.forEach(i,(function(i,r){!0===(!(qe.isUndefined(i)||null===i)&&o.call(e,i,qe.isString(r)?r.trim():r,n,p))&&t(i,n?n.concat(r):[r])})),l.pop()}}(t),e}function ei(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ii(t,e){this._pairs=[],t&&ti(t,this,e)}const ni=ii.prototype;function oi(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ri(t,e,i){if(!e)return t;const n=i&&i.encode||oi,o=i&&i.serialize;let r;if(r=o?o(e,i):qe.isURLSearchParams(e)?e.toString():new ii(e,i).toString(n),r){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t}ni.append=function(t,e){this._pairs.push([t,e])},ni.toString=function(t){const e=t?function(e){return t.call(this,e,ei)}:ei;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ai=class{constructor(){this.handlers=[]}use(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!i&&i.synchronous,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){qe.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},si={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ci={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ii,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function hi(t){function e(t,i,n,o){let r=t[o++];const a=Number.isFinite(+r),s=o>=t.length;return r=!r&&qe.isArray(n)?n.length:r,s?(qe.hasOwnProp(n,r)?n[r]=[n[r],i]:n[r]=i,!a):(n[r]&&qe.isObject(n[r])||(n[r]=[]),e(t,i,n[r],o)&&qe.isArray(n[r])&&(n[r]=function(t){const e={},i=Object.keys(t);let n;const o=i.length;let r;for(n=0;n<o;n++)r=i[n],e[r]=t[r];return e}(n[r])),!a)}if(qe.isFormData(t)&&qe.isFunction(t.entries)){const i={};return qe.forEachEntry(t,((t,n)=>{e(function(t){return qe.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,i,0)})),i}return null}const li={"Content-Type":void 0},pi={transitional:si,adapter:["xhr","http"],transformRequest:[function(t,e){const i=e.getContentType()||"",n=i.indexOf("application/json")>-1,o=qe.isObject(t);if(o&&qe.isHTMLForm(t)&&(t=new FormData(t)),qe.isFormData(t))return n&&n?JSON.stringify(hi(t)):t;if(qe.isArrayBuffer(t)||qe.isBuffer(t)||qe.isStream(t)||qe.isFile(t)||qe.isBlob(t))return t;if(qe.isArrayBufferView(t))return t.buffer;if(qe.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ti(t,new ci.classes.URLSearchParams,Object.assign({visitor:function(t,e,i,n){return ci.isNode&&qe.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((r=qe.isFileList(t))||i.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ti(r?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,i){if(qe.isString(t))try{return(e||JSON.parse)(t),qe.trim(t)}catch(n){if("SyntaxError"!==n.name)throw n}return(i||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||pi.transitional,i=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&qe.isString(t)&&(i&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(o){if(i){if("SyntaxError"===o.name)throw Ke.from(o,Ke.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ci.classes.FormData,Blob:ci.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};qe.forEach(["delete","get","head"],(function(t){pi.headers[t]={}})),qe.forEach(["post","put","patch"],(function(t){pi.headers[t]=qe.merge(li)}));const di=pi,ui=qe.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"]),fi=Symbol("internals");function mi(t){return t&&String(t).trim().toLowerCase()}function gi(t){return!1===t||null==t?t:qe.isArray(t)?t.map(gi):String(t)}function wi(t,e,i,n,o){return qe.isFunction(n)?n.call(this,e,i):(o&&(e=i),qe.isString(e)?qe.isString(n)?-1!==e.indexOf(n):qe.isRegExp(n)?n.test(e):void 0:void 0)}class vi{constructor(t){t&&this.set(t)}set(t,e,i){const n=this;function o(t,e,i){const o=mi(e);if(!o)throw new Error("header name must be a non-empty string");const r=qe.findKey(n,o);(!r||void 0===n[r]||!0===i||void 0===i&&!1!==n[r])&&(n[r||e]=gi(t))}const r=(t,e)=>qe.forEach(t,((t,i)=>o(t,i,e)));return qe.isPlainObject(t)||t instanceof this.constructor?r(t,e):qe.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?r((t=>{const e={};let i,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),i=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!i||e[i]&&ui[i]||("set-cookie"===i?e[i]?e[i].push(n):e[i]=[n]:e[i]=e[i]?e[i]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,i),this}get(t,e){if(t=mi(t)){const i=qe.findKey(this,t);if(i){const t=this[i];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(t);)e[n[1]]=n[2];return e}(t);if(qe.isFunction(e))return e.call(this,t,i);if(qe.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=mi(t)){const i=qe.findKey(this,t);return!(!i||void 0===this[i]||e&&!wi(0,this[i],i,e))}return!1}delete(t,e){const i=this;let n=!1;function o(t){if(t=mi(t)){const o=qe.findKey(i,t);!o||e&&!wi(0,i[o],o,e)||(delete i[o],n=!0)}}return qe.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let i=e.length,n=!1;for(;i--;){const o=e[i];t&&!wi(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,i={};return qe.forEach(this,((n,o)=>{const r=qe.findKey(i,o);if(r)return e[r]=gi(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,i)=>e.toUpperCase()+i))}(o):String(o).trim();a!==o&&delete e[o],e[a]=gi(n),i[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return qe.forEach(this,((i,n)=>{null!=i&&!1!==i&&(e[n]=t&&qe.isArray(i)?i.join(", "):i)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const i=new this(t);return e.forEach((t=>i.set(t))),i}static accessor(t){const e=(this[fi]=this[fi]={accessors:{}}).accessors,i=this.prototype;function n(t){const n=mi(t);e[n]||(function(t,e){const i=qe.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+i,{value:function(t,i,o){return this[n].call(this,e,t,i,o)},configurable:!0})}))}(i,t),e[n]=!0)}return qe.isArray(t)?t.forEach(n):n(t),this}}vi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),qe.freezeMethods(vi.prototype),qe.freezeMethods(vi);const yi=vi;function bi(t,e){const i=this||di,n=e||i,o=yi.from(n.headers);let r=n.data;return qe.forEach(t,(function(t){r=t.call(i,r,o.normalize(),e?e.status:void 0)})),o.normalize(),r}function xi(t){return!(!t||!t.__CANCEL__)}function Ci(t,e,i){Ke.call(this,null==t?"canceled":t,Ke.ERR_CANCELED,e,i),this.name="CanceledError"}qe.inherits(Ci,Ke,{__CANCEL__:!0});const Ei=ci.isStandardBrowserEnv?{write:function(t,e,i,n,o,r){const a=[];a.push(t+"="+encodeURIComponent(e)),qe.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),qe.isString(n)&&a.push("path="+n),qe.isString(o)&&a.push("domain="+o),!0===r&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Oi(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ai=ci.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let i;function n(i){let n=i;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return i=n(window.location.href),function(t){const e=qe.isString(t)?n(t):t;return e.protocol===i.protocol&&e.host===i.host}}():function(){return!0};function Si(t,e){let i=0;const n=function(t,e){t=t||10;const i=new Array(t),n=new Array(t);let o,r=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),h=n[a];o||(o=c),i[r]=s,n[r]=c;let l=a,p=0;for(;l!==r;)p+=i[l++],l%=t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),c-o<e)return;const d=h&&c-h;return d?Math.round(1e3*p/d):void 0}}(50,250);return o=>{const r=o.loaded,a=o.lengthComputable?o.total:void 0,s=r-i,c=n(s);i=r;const h={loaded:r,total:a,progress:a?r/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&r<=a?(a-r)/c:void 0,event:o};h[e?"download":"upload"]=!0,t(h)}}const Di="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,i){let n=t.data;const o=yi.from(t.headers).normalize(),r=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}qe.isFormData(n)&&(ci.isStandardBrowserEnv||ci.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",i=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+i))}const h=Oi(t.baseURL,t.url);function l(){if(!c)return;const n=yi.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?e(new Ke("Request failed with status code "+i.status,[Ke.ERR_BAD_REQUEST,Ke.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}((function(t){e(t),s()}),(function(t){i(t),s()}),{data:r&&"text"!==r&&"json"!==r?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),ri(h,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(i(new Ke("Request aborted",Ke.ECONNABORTED,t,c)),c=null)},c.onerror=function(){i(new Ke("Network Error",Ke.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||si;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(new Ke(e,n.clarifyTimeoutError?Ke.ETIMEDOUT:Ke.ECONNABORTED,t,c)),c=null},ci.isStandardBrowserEnv){const e=(t.withCredentials||Ai(h))&&t.xsrfCookieName&&Ei.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&qe.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),qe.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),r&&"json"!==r&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Si(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Si(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(i(!e||e.type?new Ci(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);p&&-1===ci.protocols.indexOf(p)?i(new Ke("Unsupported protocol "+p+":",Ke.ERR_BAD_REQUEST,t)):c.send(n||null)}))},Ti={http:null,xhr:Di};qe.forEach(Ti,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(i){}Object.defineProperty(t,"adapterName",{value:e})}}));const Ri=t=>{t=qe.isArray(t)?t:[t];const{length:e}=t;let i,n;for(let o=0;o<e&&(i=t[o],!(n=qe.isString(i)?Ti[i.toLowerCase()]:i));o++);if(!n){if(!1===n)throw new Ke(`Adapter ${i} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(qe.hasOwnProp(Ti,i)?`Adapter '${i}' is not available in the build`:`Unknown adapter '${i}'`)}if(!qe.isFunction(n))throw new TypeError("adapter is not a function");return n};function Mi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ci(null,t)}function ki(t){return Mi(t),t.headers=yi.from(t.headers),t.data=bi.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ri(t.adapter||di.adapter)(t).then((function(e){return Mi(t),e.data=bi.call(t,t.transformResponse,e),e.headers=yi.from(e.headers),e}),(function(e){return xi(e)||(Mi(t),e&&e.response&&(e.response.data=bi.call(t,t.transformResponse,e.response),e.response.headers=yi.from(e.response.headers))),Promise.reject(e)}))}const Bi=t=>t instanceof yi?t.toJSON():t;function Ni(t,e){e=e||{};const i={};function n(t,e,i){return qe.isPlainObject(t)&&qe.isPlainObject(e)?qe.merge.call({caseless:i},t,e):qe.isPlainObject(e)?qe.merge({},e):qe.isArray(e)?e.slice():e}function o(t,e,i){return qe.isUndefined(e)?qe.isUndefined(t)?void 0:n(void 0,t,i):n(t,e,i)}function r(t,e){if(!qe.isUndefined(e))return n(void 0,e)}function a(t,e){return qe.isUndefined(e)?qe.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(i,o,r){return r in e?n(i,o):r in t?n(void 0,i):void 0}const c={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Bi(t),Bi(e),!0)};return qe.forEach(Object.keys(Object.assign({},t,e)),(function(n){const r=c[n]||o,a=r(t[n],e[n],n);qe.isUndefined(a)&&r!==s||(i[n]=a)})),i}const Li="1.4.0",ji={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ji[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}}));const Pi={};ji.transitional=function(t,e,i){function n(t,e){return"[Axios v1.4.0] Transitional option '"+t+"'"+e+(i?". "+i:"")}return(i,o,r)=>{if(!1===t)throw new Ke(n(o," has been removed"+(e?" in "+e:"")),Ke.ERR_DEPRECATED);return e&&!Pi[o]&&(Pi[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(i,o,r)}};const zi={assertOptions:function(t,e,i){if("object"!=typeof t)throw new Ke("options must be an object",Ke.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const r=n[o],a=e[r];if(a){const e=t[r],i=void 0===e||a(e,r,t);if(!0!==i)throw new Ke("option "+r+" must be "+i,Ke.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new Ke("Unknown option "+r,Ke.ERR_BAD_OPTION)}},validators:ji},Ui=zi.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new ai,response:new ai}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ni(this.defaults,e);const{transitional:i,paramsSerializer:n,headers:o}=e;let r;void 0!==i&&zi.assertOptions(i,{silentJSONParsing:Ui.transitional(Ui.boolean),forcedJSONParsing:Ui.transitional(Ui.boolean),clarifyTimeoutError:Ui.transitional(Ui.boolean)},!1),null!=n&&(qe.isFunction(n)?e.paramsSerializer={serialize:n}:zi.assertOptions(n,{encode:Ui.function,serialize:Ui.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),r=o&&qe.merge(o.common,o[e.method]),r&&qe.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=yi.concat(r,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let h;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,p=0;if(!s){const t=[ki.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,h=Promise.resolve(e);p<l;)h=h.then(t[p++],t[p++]);return h}l=a.length;let d=e;for(p=0;p<l;){const t=a[p++],e=a[p++];try{d=t(d)}catch(u){e.call(this,u);break}}try{h=ki.call(this,d)}catch(u){return Promise.reject(u)}for(p=0,l=c.length;p<l;)h=h.then(c[p++],c[p++]);return h}getUri(t){return ri(Oi((t=Ni(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}qe.forEach(["delete","get","head","options"],(function(t){Hi.prototype[t]=function(e,i){return this.request(Ni(i||{},{method:t,url:e,data:(i||{}).data}))}})),qe.forEach(["post","put","patch"],(function(t){function e(e){return function(i,n,o){return this.request(Ni(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Hi.prototype[t]=e(),Hi.prototype[t+"Form"]=e(!0)}));const Fi=Hi;class Wi{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const i=this;this.promise.then((t=>{if(!i._listeners)return;let e=i._listeners.length;for(;e-- >0;)i._listeners[e](t);i._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{i.subscribe(t),e=t})).then(t);return n.cancel=function(){i.unsubscribe(e)},n},t((function(t,n,o){i.reason||(i.reason=new Ci(t,n,o),e(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Wi((function(e){t=e})),cancel:t}}}const Ii=Wi,_i={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(_i).forEach((([t,e])=>{_i[e]=t}));const Xi=_i,Yi=function t(e){const i=new Fi(e),n=de(Fi.prototype.request,i);return qe.extend(n,Fi.prototype,i,{allOwnKeys:!0}),qe.extend(n,i,null,{allOwnKeys:!0}),n.create=function(i){return t(Ni(e,i))},n}(di);Yi.Axios=Fi,Yi.CanceledError=Ci,Yi.CancelToken=Ii,Yi.isCancel=xi,Yi.VERSION=Li,Yi.toFormData=ti,Yi.AxiosError=Ke,Yi.Cancel=Yi.CanceledError,Yi.all=function(t){return Promise.all(t)},Yi.spread=function(t){return function(e){return t.apply(null,e)}},Yi.isAxiosError=function(t){return qe.isObject(t)&&!0===t.isAxiosError},Yi.mergeConfig=Ni,Yi.AxiosHeaders=yi,Yi.formToJSON=t=>hi(qe.isHTMLForm(t)?new FormData(t):t),Yi.HttpStatusCode=Xi,Yi.default=Yi;const qi=t("a",Yi);t("U",n({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(t,{emit:e,expose:i,slots:n}){const s=`https://${t.bucketName}.ks3-cn-beijing.ksyuncs.com/`,c=u(),h=r(!1),p=r(!1),d=r(),v=r(),y=o({policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""}),b=r([]),x=()=>{if(t.fileList){const e=t.fileList.split("/");b.value=[{id:(new Date).getTime().toString(),name:e[e.length-1],status:"finished",url:t.fileList}]}else if(Array.isArray(t.imageList)){const e=[];t.imageList.forEach((t=>{const i=t.split("/");e.push({id:Date.now().toString(),name:i[i.length-1],status:"finished",url:t})})),b.value=e}else b.value=[]};x(),f((()=>t.imageList),(()=>{x()})),f((()=>t.fileList),(()=>{console.log("list"),x()})),i({handleClearFile:()=>{v.value?.clear(),console.log("清空",v.value)}});const C=r(),E=async(t,e)=>{const i=new FileReader;i.addEventListener("load",(()=>e(i.result))),i.readAsDataURL(t)},O=async i=>{try{const n=`${t.path}${t.fileName||(new Date).getTime()+".png"}`,o={filename:n,bucketName:t.bucketName,postData:{filename:n,acl:"public-read",key:n,unknowValueField:[]}},{data:r}=await w(o);y.policy=r.policy,y.signature=r.signature,y.key=n,y.KSSAccessKeyId=r.kssAccessKeyId,y.name=n;const a=new FormData;for(const t in y)a.append(t,y[t]);a.append("file",i),await qi.post(s,a).then((()=>{const t=s+y.key;console.log(t,"url");const i=t.split("/");b.value=[{id:(new Date).getTime().toString(),name:i[i.length-1],status:"finished",url:t}],e("update:fileList",t),h.value=!1}))}catch{return!1}};return()=>a("div",null,[a(m,{ref:v,action:s,data:y,fileList:b.value,"onUpdate:fileList":t=>b.value=t,listType:t.listType,accept:t.accept,multiple:t.multiple,max:t.max,disabled:t.disabled,showFileList:t.showFileList,showPreviewButton:!0,onBeforeUpload:e=>(async e=>{const i=e.file;let n=!0;if(t.size&&(n=i.file.size/1024/1024<t.size,!n))return c.error(`文件大小不能超过${t.size}M`),!1;if(!n)return n;if(t.cropper)return E(i.file,(e=>{const n=Object.assign({},t.options,{img:e,name:i.file.name});h.value=!0,setTimeout((()=>{C.value?.edit(n),console.log(C.value,"cropper")}),100)})),!1;try{p.value=!0,console.log(t.path,i.file);const e=i.file.name,n=e.slice(e.lastIndexOf(".")),o=`${t.path}${t.fileName||Date.now()+n}`,r={filename:o,bucketName:t.bucketName,postData:{filename:o,acl:"public-read",key:o,unknowValueField:[]}},{data:a}=await w(r);y.policy=a.policy,y.signature=a.signature,y.key=o,y.KSSAccessKeyId=a.kssAccessKeyId,y.name=o,d.value=i.file}catch{return p.value=!1,!1}return!0})(e),onFinish:t=>(t=>{const i=s+y.key;console.log(i,"url"),e("update:fileList",i),e("readFileInputEventAsArrayBuffer",d.value),t.file.url=i,h.value=!1,p.value=!1})(t),onRemove:t=>(async t=>{console.log("🚀 ~ options",t),e("update:fileList",""),e("remove"),p.value=!1})(t)},{default:()=>["default"===t.showType&&"image"===t.listType&&a(l,{loading:p.value,type:"primary"},{default:()=>[t.text]}),"custom"===t.showType&&n.custom&&n.custom()]}),t.tips&&a("p",{style:"font-size: 13px; color: #666; padding-top: 4px;"},[t.tips]),a(g,{show:h.value,"onUpdate:show":t=>h.value=t,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[a(pe,{ref:C,onClose:()=>h.value=!1,onCropperOk:O},null)]})])}}))}}}));