@sbs-plugin/vue2-image-process 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["Vue2ImageProcessing"]=e():t["Vue2ImageProcessing"]=e()})(this,function(){return function(){var t={14:function(t,e,n){"use strict";var r=n(4754),i=n(6671);t.exports=function(t){return r(i(t))}},80:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},136:function(t,e,n){"use strict";var r=n(2848);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},218:function(t,e,n){"use strict";var r=n(9925),i=n(1385),o=n(990),s=n(8938),a=n(9435),c=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,f=function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),h=f&&function(){try{new Int8Array(1)["with"](-.5,1)}catch(t){return!0}}();l("with",{with:function(t,e){var n=c(this),i=s(t),l=o(n)?a(e):+e;return r(n,u(n),i,l)}}["with"],!f||h)},338:function(t){"use strict";t.exports={}},392:function(t){"use strict";var e=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw e("Maximum allowed index exceeded");return t}},408:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},492:function(t,e,n){"use strict";var r=n(8243),i=n(7858),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},768:function(t){"use strict";t.exports=!1},778:function(t,e,n){"use strict";var r=n(8567),i=n(5884),o=n(9945);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},849:function(t,e,n){"use strict";var r=n(8938),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},990:function(t,e,n){"use strict";var r=n(4220);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},1201:function(t,e,n){"use strict";var r=n(2339),i=n(7858),o=n(8911),s=n(1546),a=n(392),c=n(7612),u=c(function(){return 4294967297!==[].push.call({length:4294967296},1)}),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},f=u||!l();r({target:"Array",proto:!0,arity:1,forced:f},{push:function(t){var e=i(this),n=o(e),r=arguments.length;a(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return s(e,n),n}})},1351:function(t,e,n){"use strict";var r=n(2175),i=n(3248);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},1367:function(t,e,n){"use strict";var r=n(9727),i=n(1994),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},1385:function(t,e,n){"use strict";var r,i,o,s=n(4514),a=n(8567),c=n(9727),u=n(1994),l=n(4701),f=n(492),h=n(4220),d=n(80),p=n(778),m=n(4919),g=n(7363),v=n(2984),y=n(9876),b=n(8280),w=n(8040),x=n(2787),S=n(2964),k=S.enforce,E=S.get,R=c.Int8Array,C=R&&R.prototype,O=c.Uint8ClampedArray,A=O&&O.prototype,_=R&&y(R),T=C&&y(C),j=Object.prototype,I=c.TypeError,P=w("toStringTag"),U=x("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",B=s&&!!b&&"Opera"!==h(c.opera),F=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},L=function(t){if(!l(t))return!1;var e=h(t);return"DataView"===e||f(M,e)||f(D,e)},$=function(t){var e=y(t);if(l(e)){var n=E(e);return n&&f(n,N)?n[N]:$(e)}},q=function(t){if(!l(t))return!1;var e=h(t);return f(M,e)||f(D,e)},z=function(t){if(q(t))return t;throw new I("Target is not a typed array")},V=function(t){if(u(t)&&(!b||v(_,t)))return t;throw new I(d(t)+" is not a typed array constructor")},W=function(t,e,n,r){if(a){if(n)for(var i in M){var o=c[i];if(o&&f(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(u){}}}T[t]&&!n||m(T,t,n?e:B&&C[t]||e,r)}},H=function(t,e,n){var r,i;if(a){if(b){if(n)for(r in M)if(i=c[r],i&&f(i,t))try{delete i[t]}catch(o){}if(_[t]&&!n)return;try{return m(_,t,n?e:B&&_[t]||e)}catch(o){}}for(r in M)i=c[r],!i||i[t]&&!n||m(i,t,e)}};for(r in M)i=c[r],o=i&&i.prototype,o?k(o)[N]=i:B=!1;for(r in D)i=c[r],o=i&&i.prototype,o&&(k(o)[N]=i);if((!B||!u(_)||_===Function.prototype)&&(_=function(){throw new I("Incorrect invocation")},B))for(r in M)c[r]&&b(c[r],_);if((!B||!T||T===j)&&(T=_.prototype,B))for(r in M)c[r]&&b(c[r].prototype,T);if(B&&y(A)!==T&&b(A,T),a&&!f(T,P))for(r in F=!0,g(T,P,{configurable:!0,get:function(){return l(this)?this[U]:void 0}}),M)c[r]&&p(c[r],U,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:F&&U,aTypedArray:z,aTypedArrayConstructor:V,exportTypedArrayMethod:W,exportTypedArrayStaticMethod:H,getTypedArrayConstructor:$,isView:L,isTypedArray:q,TypedArray:_,TypedArrayPrototype:T}},1546:function(t,e,n){"use strict";var r=n(8567),i=n(9505),o=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},1994:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2135:function(t,e,n){"use strict";var r=n(8243),i=n(1994),o=n(2848),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},2175:function(t,e,n){"use strict";var r=n(1994),i=n(80),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},2339:function(t,e,n){"use strict";var r=n(9727),i=n(4390).f,o=n(778),s=n(4919),a=n(2980),c=n(8395),u=n(7799);t.exports=function(t,e){var n,l,f,h,d,p,m=t.target,g=t.global,v=t.stat;if(l=g?r:v?r[m]||a(m,{}):r[m]&&r[m].prototype,l)for(f in e){if(d=e[f],t.dontCallGetSet?(p=i(l,f),h=p&&p.value):h=l[f],n=u(g?f:m+(v?".":"#")+f,t.forced),!n&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),s(l,f,d,t)}}},2639:function(t,e,n){"use strict";var r=n(8243),i=n(2175);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(o){}}},2682:function(t,e,n){"use strict";var r=n(136),i=n(2787),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},2787:function(t,e,n){"use strict";var r=n(8243),i=0,o=Math.random(),s=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},2817:function(t,e,n){"use strict";var r=n(8567),i=n(492),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},2848:function(t,e,n){"use strict";var r=n(768),i=n(9727),o=n(2980),s="__core-js_shared__",a=t.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.43.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},2964:function(t,e,n){"use strict";var r,i,o,s=n(1367),a=n(9727),c=n(4701),u=n(778),l=n(492),f=n(2848),h=n(2682),d=n(338),p="Object already initialized",m=a.TypeError,g=a.WeakMap,v=function(t){return o(t)?i(t):r(t,{})},y=function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return n}};if(s||f.state){var b=f.state||(f.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(t,e){if(b.has(t))throw new m(p);return e.facade=t,b.set(t,e),e},i=function(t){return b.get(t)||{}},o=function(t){return b.has(t)}}else{var w=h("state");d[w]=!0,r=function(t,e){if(l(t,w))throw new m(p);return e.facade=t,u(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:r,get:i,has:o,enforce:v,getterFor:y}},2980:function(t,e,n){"use strict";var r=n(9727),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},2984:function(t,e,n){"use strict";var r=n(8243);t.exports=r({}.isPrototypeOf)},3194:function(t,e,n){"use strict";var r=n(9727),i=r.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},3248:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},3473:function(t,e,n){"use strict";var r=n(7612);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},3861:function(t,e,n){"use strict";var r=n(8567),i=n(7612);t.exports=r&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},4066:function(t,e,n){"use strict";var r=n(5022),i=n(8243),o=n(8411),s=n(4082),a=n(5008),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},4082:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},4220:function(t,e,n){"use strict";var r=n(9999),i=n(1994),o=n(5999),s=n(8040),a=s("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=l(e=c(t),a))?n:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},4314:function(t,e,n){"use strict";var r=n(3473),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},4390:function(t,e,n){"use strict";var r=n(8567),i=n(4314),o=n(5102),s=n(9945),a=n(14),c=n(7062),u=n(492),l=n(9248),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(n){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},4514:function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},4701:function(t,e,n){"use strict";var r=n(1994);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},4754:function(t,e,n){"use strict";var r=n(8243),i=n(7612),o=n(5999),s=Object,a=r("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?a(t,""):s(t)}:s},4919:function(t,e,n){"use strict";var r=n(1994),i=n(5884),o=n(8344),s=n(2980);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},5008:function(t,e,n){"use strict";var r=n(4701),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},5022:function(t,e,n){"use strict";var r=n(9727),i=n(1994),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},5102:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},5540:function(t,e,n){"use strict";var r=n(14),i=n(6113),o=n(8911),s=function(t){return function(e,n,s){var a=r(e),c=o(a);if(0===c)return!t&&-1;var u,l=i(s,c);if(t&&n!==n){while(c>l)if(u=a[l++],u!==u)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5884:function(t,e,n){"use strict";var r=n(8567),i=n(9248),o=n(3861),s=n(5008),a=n(7062),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"===typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=l(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:h in n?n[h]:r[h],enumerable:f in n?n[f]:r[f],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},5999:function(t,e,n){"use strict";var r=n(8243),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},6113:function(t,e,n){"use strict";var r=n(8938),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},6608:function(t,e,n){"use strict";var r=n(9727),i=n(4701),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},6616:function(t){(function(e){t.exports=e()})(function(t){"use strict";var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];n+=(r&i|~r&o)+e[0]-680876936|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+e[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+e[2]+606105819|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+e[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+e[4]-176418897|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+e[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+e[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+e[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+e[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+e[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+e[10]-42063|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+e[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&o)+e[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,o+=(n&r|~n&i)+e[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&r)+e[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,r+=(i&o|~i&n)+e[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&o|i&~o)+e[1]-165796510|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+e[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+e[11]+643717713|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+e[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+e[5]-701558691|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+e[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+e[15]-660478335|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+e[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+e[9]+568446438|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+e[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+e[3]-187363961|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+e[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&o|i&~o)+e[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,o+=(n&i|r&~i)+e[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&r|n&~r)+e[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,r+=(i&n|o&~n)+e[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^o)+e[5]-378558|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+e[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+e[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+e[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+e[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+e[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+e[7]-155497632|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+e[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+e[13]+681279174|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+e[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+e[3]-722521979|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+e[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^o)+e[9]-640364487|0,n=(n<<4|n>>>28)+r|0,o+=(n^r^i)+e[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^r)+e[15]+530742520|0,i=(i<<16|i>>>16)+o|0,r+=(i^o^n)+e[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~o))+e[0]-198630844|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+e[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+e[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+e[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+e[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+e[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+e[10]-1051523|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+e[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+e[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+e[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+e[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+e[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~o))+e[4]-145523070|0,n=(n<<6|n>>>26)+r|0,o+=(r^(n|~i))+e[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~r))+e[2]+718787259|0,i=(i<<15|i>>>17)+o|0,r+=(o^(i|~n))+e[9]-343485551|0,r=(r<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,s,a,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)n(l,r(t.substring(e-64,e)));for(t=t.substring(e-64),i=t.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return s=8*u,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(l,o),l}function s(t){var e,r,o,s,a,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)n(l,i(t.subarray(e-64,e)));for(t=e-64<u?t.subarray(e-64):new Uint8Array(0),r=t.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return s=8*u,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(l,o),l}function a(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function c(t){var e;for(e=0;e<t.length;e+=1)t[e]=a(t[e]);return t.join("")}function u(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function h(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function d(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==c(o("hello"))&&function(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return t=0|t||0,t<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,c=this.byteLength,u=e(n,c),l=c;return r!==t&&(l=e(r,c)),u>l?new ArrayBuffer(0):(i=l-u,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,u,i),s.set(a),o)}}(),p.prototype.append=function(t){return this.appendBinary(u(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=c(this._hash),t&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var r,i,o,s=e;if(t[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,t),s=0;s<16;s+=1)t[s]=0;r=8*this._length,r=r.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},p.hash=function(t,e){return p.hashBinary(u(t),e)},p.hashBinary=function(t,e){var n=o(t),r=c(n);return e?d(r):r},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,r=h(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=c(this._hash),t&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=f(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var n=s(new Uint8Array(t)),r=c(n);return e?d(r):r},p})},6671:function(t,e,n){"use strict";var r=n(3248),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6710:function(t,e,n){"use strict";var r=n(7612);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},7062:function(t,e,n){"use strict";var r=n(8300),i=n(7450);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},7363:function(t,e,n){"use strict";var r=n(8344),i=n(5884);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},7422:function(t,e,n){"use strict";var r,i,o=n(9727),s=n(3194),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(r=l.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},7450:function(t,e,n){"use strict";var r=n(5022),i=n(1994),o=n(2984),s=n(9815),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},7467:function(t,e,n){"use strict";var r=n(8946),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},7612:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},7799:function(t,e,n){"use strict";var r=n(7612),i=n(1994),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n===l||n!==u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},7858:function(t,e,n){"use strict";var r=n(6671),i=Object;t.exports=function(t){return i(r(t))}},7925:function(t,e,n){"use strict";var r=n(8243),i=n(492),o=n(14),s=n(5540).indexOf,a=n(338),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);while(e.length>u)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},8040:function(t,e,n){"use strict";var r=n(9727),i=n(136),o=n(492),s=n(2787),a=n(8614),c=n(9815),u=r.Symbol,l=i("wks"),f=c?u["for"]||u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(l[t]=a&&o(u,t)?u[t]:f("Symbol."+t)),l[t]}},8243:function(t,e,n){"use strict";var r=n(3473),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},8280:function(t,e,n){"use strict";var r=n(2639),i=n(4701),o=n(6671),s=n(7467);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=r(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(a){}return function(n,r){return o(n),s(r),i(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},8300:function(t,e,n){"use strict";var r=n(4314),i=n(4701),o=n(7450),s=n(1351),a=n(9989),c=n(8040),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},8312:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8344:function(t,e,n){"use strict";var r=n(8243),i=n(7612),o=n(1994),s=n(492),a=n(8567),c=n(2817).CONFIGURABLE,u=n(2135),l=n(2964),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,m=r("".slice),g=r("".replace),v=r([].join),y=a&&!i(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),w=t.exports=function(t,e,n){"Symbol("===m(d(e),0,7)&&(e="["+g(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&s(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=f(t);return s(r,"source")||(r.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||u(this)},"toString")},8395:function(t,e,n){"use strict";var r=n(492),i=n(4066),o=n(4390),s=n(5884);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},8411:function(t,e,n){"use strict";var r=n(7925),i=n(8312),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},8567:function(t,e,n){"use strict";var r=n(7612);t.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},8614:function(t,e,n){"use strict";var r=n(7422),i=n(7612),o=n(9727),s=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41})},8878:function(t,e,n){var r,i=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function i(t,e){if(!r[t]){r[t]={};for(var n=0;n<t.length;n++)r[t][t.charAt(n)]=n}return r[t][e]}var o={compressToBase64:function(t){if(null==t)return"";var n=o._compress(t,6,function(t){return e.charAt(t)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:o._decompress(t.length,32,function(n){return i(e,t.charAt(n))})},compressToUTF16:function(e){return null==e?"":o._compress(e,15,function(e){return t(e+32)})+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:o._decompress(t.length,16384,function(e){return t.charCodeAt(e)-32})},compressToUint8Array:function(t){for(var e=o.compress(t),n=new Uint8Array(2*e.length),r=0,i=e.length;r<i;r++){var s=e.charCodeAt(r);n[2*r]=s>>>8,n[2*r+1]=s%256}return n},decompressFromUint8Array:function(e){if(null===e||void 0===e)return o.decompress(e);for(var n=new Array(e.length/2),r=0,i=n.length;r<i;r++)n[r]=256*e[2*r]+e[2*r+1];var s=[];return n.forEach(function(e){s.push(t(e))}),o.decompress(s.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":o._compress(t,6,function(t){return n.charAt(t)})},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),o._decompress(t.length,32,function(e){return i(n,t.charAt(e))}))},compress:function(e){return o._compress(e,16,function(e){return t(e)})},_compress:function(t,e,n){if(null==t)return"";var r,i,o,s={},a={},c="",u="",l="",f=2,h=3,d=2,p=[],m=0,g=0;for(o=0;o<t.length;o+=1)if(c=t.charAt(o),Object.prototype.hasOwnProperty.call(s,c)||(s[c]=h++,a[c]=!0),u=l+c,Object.prototype.hasOwnProperty.call(s,u))l=u;else{if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(r=0;r<d;r++)m<<=1,g==e-1?(g=0,p.push(n(m)),m=0):g++;for(i=l.charCodeAt(0),r=0;r<8;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}else{for(i=1,r=0;r<d;r++)m=m<<1|i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}f--,0==f&&(f=Math.pow(2,d),d++),delete a[l]}else for(i=s[l],r=0;r<d;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;f--,0==f&&(f=Math.pow(2,d),d++),s[u]=h++,l=String(c)}if(""!==l){if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(r=0;r<d;r++)m<<=1,g==e-1?(g=0,p.push(n(m)),m=0):g++;for(i=l.charCodeAt(0),r=0;r<8;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}else{for(i=1,r=0;r<d;r++)m=m<<1|i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i=0;for(i=l.charCodeAt(0),r=0;r<16;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1}f--,0==f&&(f=Math.pow(2,d),d++),delete a[l]}else for(i=s[l],r=0;r<d;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;f--,0==f&&(f=Math.pow(2,d),d++)}for(i=2,r=0;r<d;r++)m=m<<1|1&i,g==e-1?(g=0,p.push(n(m)),m=0):g++,i>>=1;while(1){if(m<<=1,g==e-1){p.push(n(m));break}g++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:o._decompress(t.length,32768,function(e){return t.charCodeAt(e)})},_decompress:function(e,n,r){var i,o,s,a,c,u,l,f=[],h=4,d=4,p=3,m="",g=[],v={val:r(0),position:n,index:1};for(i=0;i<3;i+=1)f[i]=i;s=0,c=Math.pow(2,2),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(s){case 0:s=0,c=Math.pow(2,8),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;l=t(s);break;case 1:s=0,c=Math.pow(2,16),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;l=t(s);break;case 2:return""}f[3]=l,o=l,g.push(l);while(1){if(v.index>e)return"";s=0,c=Math.pow(2,p),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(l=s){case 0:s=0,c=Math.pow(2,8),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;f[d++]=t(s),l=d-1,h--;break;case 1:s=0,c=Math.pow(2,16),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*u,u<<=1;f[d++]=t(s),l=d-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,p),p++),f[l])m=f[l];else{if(l!==d)return null;m=o+o.charAt(0)}g.push(m),f[d++]=o+m.charAt(0),h--,o=m,0==h&&(h=Math.pow(2,p),p++)}}};return o}();r=function(){return i}.call(e,n,e,t),void 0===r||(t.exports=r)},8911:function(t,e,n){"use strict";var r=n(849);t.exports=function(t){return r(t.length)}},8938:function(t,e,n){"use strict";var r=n(408);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},8946:function(t,e,n){"use strict";var r=n(4701);t.exports=function(t){return r(t)||null===t}},9248:function(t,e,n){"use strict";var r=n(8567),i=n(7612),o=n(6608);t.exports=!r&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},9435:function(t,e,n){"use strict";var r=n(8300),i=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},9505:function(t,e,n){"use strict";var r=n(5999);t.exports=Array.isArray||function(t){return"Array"===r(t)}},9727:function(t,e,n){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9815:function(t,e,n){"use strict";var r=n(8614);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},9876:function(t,e,n){"use strict";var r=n(492),i=n(1994),o=n(7858),s=n(2682),a=n(6710),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(r(e,c))return e[c];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof u?l:null}},9925:function(t,e,n){"use strict";var r=n(8911),i=n(8938),o=RangeError;t.exports=function(t,e,n,s){var a=r(t),c=i(n),u=c<0?a+c:c;if(u>=a||u<0)throw new o("Incorrect index");for(var l=new e(a),f=0;f<a;f++)l[f]=f===u?s:t[f];return l}},9945:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},9989:function(t,e,n){"use strict";var r=n(4314),i=n(1994),o=n(4701),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw new s("Can't convert object to primitive value")}},9999:function(t,e,n){"use strict";var r=n(8040),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}!function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){n.p=""}();var r={};return function(){"use strict";n.r(r),n.d(r,{default:function(){return ir}});var t={};if(n.r(t),n.d(t,{hasBrowserEnv:function(){return Lt},hasStandardBrowserEnv:function(){return qt},hasStandardBrowserWebWorkerEnv:function(){return zt},navigator:function(){return $t},origin:function(){return Vt}}),"undefined"!==typeof window){var e=window.document.currentScript,i=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var o=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI抠图")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"container",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"title"},[t._v("*鼠标悬停并点击要抠图的部分,可智能识别要抠图的对象。抠图后,点击应用按钮")]),""==t.afterEditSrc?e("div",{staticClass:"workspace"},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.path,expression:"path"}],ref:"imgRef",style:{width:t.w,height:t.h},attrs:{src:t.workspaceSrc,crossorigin:"anonymous"},on:{mousedown:t.handleMouseDown,mouseenter:function(e){t.canvasVisible=!0},mouseout:()=>{t.clicks.length||t.isEverything||(t.canvasVisible=!1)}}}),e("canvas",{directives:[{name:"show",rawName:"v-show",value:t.path&&t.canvasVisible,expression:"path && canvasVisible"}],ref:"canvasRef",attrs:{width:t.originalSize.w,height:t.originalSize.h}}),e("div",{style:{width:t.w,height:t.h},attrs:{id:"point-box"}})]):t._e(),""==t.afterEditSrc?e("div",{staticStyle:{display:"flex","justify-content":"center"}},[e("div",{staticClass:"button",on:{click:t.clearCanvas}},[t._v("重置框选")]),e("div",{staticClass:"button",on:{click:t.imageMatting}},[t._v("开始抠图")])]):t._e(),""!==t.afterEditSrc?e("div",[e("img",{staticStyle:{"min-width":"300px","min-height":"300px","max-width":"600px","max-height":"500px"},attrs:{src:t.afterEditSrc,crossorigin:"anonymous"}})]):t._e(),""!==t.afterEditSrc?e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")]):t._e()]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},s=[];n(1201),n(218);function a(t,e){return function(){return t.apply(e,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:u}=Object,{iterator:l,toStringTag:f}=Symbol,h=(t=>e=>{const n=c.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),d=t=>(t=t.toLowerCase(),e=>h(e)===t),p=t=>e=>typeof e===t,{isArray:m}=Array,g=p("undefined");function v(t){return null!==t&&!g(t)&&null!==t.constructor&&!g(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const y=d("ArrayBuffer");function b(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e}const w=p("string"),x=p("function"),S=p("number"),k=t=>null!==t&&"object"===typeof t,E=t=>!0===t||!1===t,R=t=>{if("object"!==h(t))return!1;const e=u(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(f in t)&&!(l in t)},C=d("Date"),O=d("File"),A=d("Blob"),_=d("FileList"),T=t=>k(t)&&x(t.pipe),j=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=h(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},I=d("URLSearchParams"),[P,U,N,B]=["ReadableStream","Request","Response","Headers"].map(d),F=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function M(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let r,i;if("object"!==typeof t&&(t=[t]),m(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}function D(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;while(i-- >0)if(r=n[i],e===r.toLowerCase())return r;return null}const L=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),$=t=>!g(t)&&t!==L;function q(){const{caseless:t}=$(this)&&this||{},e={},n=(n,r)=>{const i=t&&D(e,r)||r;R(e[i])&&R(n)?e[i]=q(e[i],n):R(n)?e[i]=q({},n):m(n)?e[i]=n.slice():e[i]=n};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&M(arguments[r],n);return e}const z=(t,e,n,{allOwnKeys:r}={})=>(M(e,(e,r)=>{n&&x(e)?t[r]=a(e,n):t[r]=e},{allOwnKeys:r}),t),V=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),W=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},H=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},null==t)return e;do{i=Object.getOwnPropertyNames(t),o=i.length;while(o-- >0)s=i[o],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&u(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},X=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},Y=t=>{if(!t)return null;if(m(t))return t;let e=t.length;if(!S(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},J=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&u(Uint8Array)),K=(t,e)=>{const n=t&&t[l],r=n.call(t);let i;while((i=r.next())&&!i.done){const n=i.value;e.call(t,n[0],n[1])}},G=(t,e)=>{let n;const r=[];while(null!==(n=t.exec(e)))r.push(n);return r},Q=d("HTMLFormElement"),Z=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,n){return e.toUpperCase()+n}),tt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),et=d("RegExp"),nt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};M(n,(n,i)=>{let o;!1!==(o=e(n,i,t))&&(r[i]=o||n)}),Object.defineProperties(t,r)},rt=t=>{nt(t,(e,n)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];x(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},it=(t,e)=>{const n={},r=t=>{t.forEach(t=>{n[t]=!0})};return m(t)?r(t):r(String(t).split(e)),n},ot=()=>{},st=(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e;function at(t){return!!(t&&x(t.append)&&"FormData"===t[f]&&t[l])}const ct=t=>{const e=new Array(10),n=(t,r)=>{if(k(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=m(t)?[]:{};return M(t,(t,e)=>{const o=n(t,r+1);!g(o)&&(i[e]=o)}),e[r]=void 0,i}}return t};return n(t,0)},ut=d("AsyncFunction"),lt=t=>t&&(k(t)||x(t))&&x(t.then)&&x(t.catch),ft=((t,e)=>t?setImmediate:e?((t,e)=>(L.addEventListener("message",({source:n,data:r})=>{n===L&&r===t&&e.length&&e.shift()()},!1),n=>{e.push(n),L.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))("function"===typeof setImmediate,x(L.postMessage)),ht="undefined"!==typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!==typeof process&&process.nextTick||ft,dt=t=>null!=t&&x(t[l]);var pt={isArray:m,isArrayBuffer:y,isBuffer:v,isFormData:j,isArrayBufferView:b,isString:w,isNumber:S,isBoolean:E,isObject:k,isPlainObject:R,isReadableStream:P,isRequest:U,isResponse:N,isHeaders:B,isUndefined:g,isDate:C,isFile:O,isBlob:A,isRegExp:et,isFunction:x,isStream:T,isURLSearchParams:I,isTypedArray:J,isFileList:_,forEach:M,merge:q,extend:z,trim:F,stripBOM:V,inherits:W,toFlatObject:H,kindOf:h,kindOfTest:d,endsWith:X,toArray:Y,forEachEntry:K,matchAll:G,isHTMLForm:Q,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:nt,freezeMethods:rt,toObjectSet:it,toCamelCase:Z,noop:ot,toFiniteNumber:st,findKey:D,global:L,isContextDefined:$,isSpecCompliantForm:at,toJSONObject:ct,isAsyncFn:ut,isThenable:lt,setImmediate:ft,asap:ht,isIterable:dt};function mt(t,e,n,r,i){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),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}pt.inherits(mt,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:pt.toJSONObject(this.config),code:this.code,status:this.status}}});const gt=mt.prototype,vt={};["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=>{vt[t]={value:t}}),Object.defineProperties(mt,vt),Object.defineProperty(gt,"isAxiosError",{value:!0}),mt.from=(t,e,n,r,i,o)=>{const s=Object.create(gt);return pt.toFlatObject(t,s,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),mt.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var yt=mt,bt=null;function wt(t){return pt.isPlainObject(t)||pt.isArray(t)}function xt(t){return pt.endsWith(t,"[]")?t.slice(0,-2):t}function St(t,e,n){return t?t.concat(e).map(function(t,e){return t=xt(t),!n&&e?"["+t+"]":t}).join(n?".":""):e}function kt(t){return pt.isArray(t)&&!t.some(wt)}const Et=pt.toFlatObject(pt,{},null,function(t){return/^is[A-Z]/.test(t)});function Rt(t,e,n){if(!pt.isObject(t))throw new TypeError("target must be an object");e=e||new(bt||FormData),n=pt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!pt.isUndefined(e[t])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,c=a&&pt.isSpecCompliantForm(e);if(!pt.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(pt.isDate(t))return t.toISOString();if(pt.isBoolean(t))return t.toString();if(!c&&pt.isBlob(t))throw new yt("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(t)||pt.isTypedArray(t)?c&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,i){let a=t;if(t&&!i&&"object"===typeof t)if(pt.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(pt.isArray(t)&&kt(t)||(pt.isFileList(t)||pt.endsWith(n,"[]"))&&(a=pt.toArray(t)))return n=xt(n),a.forEach(function(t,r){!pt.isUndefined(t)&&null!==t&&e.append(!0===s?St([n],r,o):null===s?n:n+"[]",u(t))}),!1;return!!wt(t)||(e.append(St(i,n,o),u(t)),!1)}const f=[],h=Object.assign(Et,{defaultVisitor:l,convertValue:u,isVisitable:wt});function d(t,n){if(!pt.isUndefined(t)){if(-1!==f.indexOf(t))throw Error("Circular reference detected in "+n.join("."));f.push(t),pt.forEach(t,function(t,r){const o=!(pt.isUndefined(t)||null===t)&&i.call(e,t,pt.isString(r)?r.trim():r,n,h);!0===o&&d(t,n?n.concat(r):[r])}),f.pop()}}if(!pt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var Ct=Rt;function Ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function At(t,e){this._pairs=[],t&&Ct(t,this,e)}const _t=At.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,Ot)}:Ot;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var Tt=At;function jt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function It(t,e,n){if(!e)return t;const r=n&&n.encode||jt;pt.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(e,n):pt.isURLSearchParams(e)?e.toString():new Tt(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class Pt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pt.forEach(this.handlers,function(e){null!==e&&t(e)})}}var Ut=Pt,Nt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bt="undefined"!==typeof URLSearchParams?URLSearchParams:Tt,Ft="undefined"!==typeof FormData?FormData:null,Mt="undefined"!==typeof Blob?Blob:null,Dt={isBrowser:!0,classes:{URLSearchParams:Bt,FormData:Ft,Blob:Mt},protocols:["http","https","file","blob","url","data"]};const Lt="undefined"!==typeof window&&"undefined"!==typeof document,$t="object"===typeof navigator&&navigator||void 0,qt=Lt&&(!$t||["ReactNative","NativeScript","NS"].indexOf($t.product)<0),zt=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Vt=Lt&&window.location.href||"http://localhost";var Wt={...t,...Dt};function Ht(t,e){return Ct(t,new Wt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Wt.isNode&&pt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function Xt(t){return pt.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}function Yt(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Jt(t){function e(t,n,r,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&pt.isArray(r)?r.length:o,a)return pt.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&pt.isObject(r[o])||(r[o]=[]);const c=e(t,n,r[o],i);return c&&pt.isArray(r[o])&&(r[o]=Yt(r[o])),!s}if(pt.isFormData(t)&&pt.isFunction(t.entries)){const n={};return pt.forEachEntry(t,(t,r)=>{e(Xt(t),r,n,0)}),n}return null}var Kt=Jt;function Gt(t,e,n){if(pt.isString(t))try{return(e||JSON.parse)(t),pt.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}const Qt={transitional:Nt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=pt.isObject(t);i&&pt.isHTMLForm(t)&&(t=new FormData(t));const o=pt.isFormData(t);if(o)return r?JSON.stringify(Kt(t)):t;if(pt.isArrayBuffer(t)||pt.isBuffer(t)||pt.isStream(t)||pt.isFile(t)||pt.isBlob(t)||pt.isReadableStream(t))return t;if(pt.isArrayBufferView(t))return t.buffer;if(pt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ht(t,this.formSerializer).toString();if((s=pt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ct(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),Gt(t)):t}],transformResponse:[function(t){const e=this.transitional||Qt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(pt.isResponse(t)||pt.isReadableStream(t))return t;if(t&&pt.isString(t)&&(n&&!this.responseType||r)){const n=e&&e.silentJSONParsing,o=!n&&r;try{return JSON.parse(t)}catch(i){if(o){if("SyntaxError"===i.name)throw yt.from(i,yt.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch"],t=>{Qt.headers[t]={}});var Zt=Qt;const te=pt.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"]);var ee=t=>{const e={};let n,r,i;return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&te[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};const ne=Symbol("internals");function re(t){return t&&String(t).trim().toLowerCase()}function ie(t){return!1===t||null==t?t:pt.isArray(t)?t.map(ie):String(t)}function oe(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;while(r=n.exec(t))e[r[1]]=r[2];return e}const se=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ae(t,e,n,r,i){return pt.isFunction(r)?r.call(this,e,n):(i&&(e=n),pt.isString(e)?pt.isString(r)?-1!==e.indexOf(r):pt.isRegExp(r)?r.test(e):void 0:void 0)}function ce(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function ue(t,e){const n=pt.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})})}class le{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=re(e);if(!i)throw new Error("header name must be a non-empty string");const o=pt.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=ie(t))}const o=(t,e)=>pt.forEach(t,(t,n)=>i(t,n,e));if(pt.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(pt.isString(t)&&(t=t.trim())&&!se(t))o(ee(t),e);else if(pt.isObject(t)&&pt.isIterable(t)){let n,r,i={};for(const e of t){if(!pt.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[r=e[0]]=(n=i[r])?pt.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,n);return this}get(t,e){if(t=re(t),t){const n=pt.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return oe(t);if(pt.isFunction(e))return e.call(this,t,n);if(pt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=re(t),t){const n=pt.findKey(this,t);return!(!n||void 0===this[n]||e&&!ae(this,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=re(t),t){const i=pt.findKey(n,t);!i||e&&!ae(n,n[i],i,e)||(delete n[i],r=!0)}}return pt.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;while(n--){const i=e[n];t&&!ae(this,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return pt.forEach(this,(r,i)=>{const o=pt.findKey(n,i);if(o)return e[o]=ie(r),void delete e[i];const s=t?ce(i):String(i).trim();s!==i&&delete e[i],e[s]=ie(r),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return pt.forEach(this,(n,r)=>{null!=n&&!1!==n&&(e[r]=t&&pt.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){const e=this[ne]=this[ne]={accessors:{}},n=e.accessors,r=this.prototype;function i(t){const e=re(t);n[e]||(ue(r,t),n[e]=!0)}return pt.isArray(t)?t.forEach(i):i(t),this}}le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pt.reduceDescriptors(le.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),pt.freezeMethods(le);var fe=le;function he(t,e){const n=this||Zt,r=e||n,i=fe.from(r.headers);let o=r.data;return pt.forEach(t,function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function de(t){return!(!t||!t.__CANCEL__)}function pe(t,e,n){yt.call(this,null==t?"canceled":t,yt.ERR_CANCELED,e,n),this.name="CanceledError"}pt.inherits(pe,yt,{__CANCEL__:!0});var me=pe;function ge(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new yt("Request failed with status code "+n.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}function ve(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ye(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=r[s];i||(i=c),n[o]=a,r[o]=c;let l=s,f=0;while(l!==o)f+=n[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}var be=ye;function we(t,e){let n,r,i=0,o=1e3/e;const s=(e,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)},a=(...t)=>{const e=Date.now(),a=e-i;a>=o?s(t,e):(n=t,r||(r=setTimeout(()=>{r=null,s(n)},o-a)))},c=()=>n&&s(n);return[a,c]}var xe=we;const Se=(t,e,n=3)=>{let r=0;const i=be(50,250);return xe(n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,c=i(a),u=o<=s;r=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&u?(s-o)/c:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0};t(l)},n)},ke=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ee=t=>(...e)=>pt.asap(()=>t(...e));var Re=Wt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Wt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Wt.origin),Wt.navigator&&/(msie|trident)/i.test(Wt.navigator.userAgent)):()=>!0,Ce=Wt.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];pt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),pt.isString(r)&&s.push("path="+r),pt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Oe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ae(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _e(t,e,n){let r=!Oe(e);return t&&(r||0==n)?Ae(t,e):e}const Te=t=>t instanceof fe?{...t}:t;function je(t,e){e=e||{};const n={};function r(t,e,n,r){return pt.isPlainObject(t)&&pt.isPlainObject(e)?pt.merge.call({caseless:r},t,e):pt.isPlainObject(e)?pt.merge({},e):pt.isArray(e)?e.slice():e}function i(t,e,n,i){return pt.isUndefined(e)?pt.isUndefined(t)?void 0:r(void 0,t,n,i):r(t,e,n,i)}function o(t,e){if(!pt.isUndefined(e))return r(void 0,e)}function s(t,e){return pt.isUndefined(e)?pt.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken: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:a,headers:(t,e,n)=>i(Te(t),Te(e),n,!0)};return pt.forEach(Object.keys(Object.assign({},t,e)),function(r){const o=c[r]||i,s=o(t[r],e[r],r);pt.isUndefined(s)&&o!==a||(n[r]=s)}),n}var Ie=t=>{const e=je({},t);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=e;if(e.headers=a=fe.from(a),e.url=It(_e(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),pt.isFormData(r))if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map(t=>t.trim()).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Wt.hasStandardBrowserEnv&&(i&&pt.isFunction(i)&&(i=i(e)),i||!1!==i&&Re(e.url))){const t=o&&s&&Ce.read(s);t&&a.set(o,t)}return e};const Pe="undefined"!==typeof XMLHttpRequest;var Ue=Pe&&function(t){return new Promise(function(e,n){const r=Ie(t);let i=r.data;const o=fe.from(r.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=fe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),i=f&&"text"!==f&&"json"!==f?m.response:m.responseText,o={data:i,status:m.status,statusText:m.statusText,headers:r,config:t,request:m};ge(function(t){e(t),p()},function(t){n(t),p()},o),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new yt("Request aborted",yt.ECONNABORTED,t,m)),m=null)},m.onerror=function(){n(new yt("Network Error",yt.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Nt;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new yt(e,i.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,t,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&pt.forEach(o.toJSON(),function(t,e){m.setRequestHeader(e,t)}),pt.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),d&&([c,l]=Se(d,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,u]=Se(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(s=e=>{m&&(n(!e||e.type?new me(null,t,m):e),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const v=ve(r.url);v&&-1===Wt.protocols.indexOf(v)?n(new yt("Unsupported protocol "+v+":",yt.ERR_BAD_REQUEST,t)):m.send(i||null)})};const Ne=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const i=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;r.abort(e instanceof yt?e:new me(e instanceof Error?e.message:e))}};let o=e&&setTimeout(()=>{o=null,i(new yt(`timeout ${e} of ms exceeded`,yt.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)}),t=null)};t.forEach(t=>t.addEventListener("abort",i));const{signal:a}=r;return a.unsubscribe=()=>pt.asap(s),a}};var Be=Ne;const Fe=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,i=0;while(i<n)r=i+e,yield t.slice(i,r),i=r},Me=async function*(t,e){for await(const n of De(t))yield*Fe(n,e)},De=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Le=(t,e,n,r)=>{const i=Me(t,e);let o,s=0,a=t=>{o||(o=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await i.next();if(e)return a(),void t.close();let o=r.byteLength;if(n){let t=s+=o;n(t)}t.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel(t){return a(t),i.return()}},{highWaterMark:2})},$e="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,qe=$e&&"function"===typeof ReadableStream,ze=$e&&("function"===typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Ve=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},We=qe&&Ve(()=>{let t=!1;const e=new Request(Wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),He=65536,Xe=qe&&Ve(()=>pt.isReadableStream(new Response("").body)),Ye={stream:Xe&&(t=>t.body)};$e&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ye[e]&&(Ye[e]=pt.isFunction(t[e])?t=>t[e]():(t,n)=>{throw new yt(`Response type '${e}' is not supported`,yt.ERR_NOT_SUPPORT,n)})})})(new Response);const Je=async t=>{if(null==t)return 0;if(pt.isBlob(t))return t.size;if(pt.isSpecCompliantForm(t)){const e=new Request(Wt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return pt.isArrayBufferView(t)||pt.isArrayBuffer(t)?t.byteLength:(pt.isURLSearchParams(t)&&(t+=""),pt.isString(t)?(await ze(t)).byteLength:void 0)},Ke=async(t,e)=>{const n=pt.toFiniteNumber(t.getContentLength());return null==n?Je(e):n};var Ge=$e&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ie(t);u=u?(u+"").toLowerCase():"text";let d,p=Be([i,o&&o.toAbortSignal()],s);const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(c&&We&&"get"!==n&&"head"!==n&&0!==(g=await Ke(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(pt.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=ke(g,Se(Ee(c)));r=Le(n.body,He,t,e)}}pt.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(e,{...h,signal:p,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:i?f:void 0});let o=await fetch(d,h);const s=Xe&&("stream"===u||"response"===u);if(Xe&&(a||s&&m)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=o[e]});const e=pt.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&ke(e,Se(Ee(a),!0))||[];o=new Response(Le(o.body,He,n,()=>{r&&r(),m&&m()}),t)}u=u||"text";let v=await Ye[pt.findKey(Ye,u)||"text"](o,t);return!s&&m&&m(),await new Promise((e,n)=>{ge(e,n,{data:v,headers:fe.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:d})})}catch(v){if(m&&m(),v&&"TypeError"===v.name&&/Load failed|fetch/i.test(v.message))throw Object.assign(new yt("Network Error",yt.ERR_NETWORK,t,d),{cause:v.cause||v});throw yt.from(v,v&&v.code,t,d)}});const Qe={http:bt,xhr:Ue,fetch:Ge};pt.forEach(Qe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}});const Ze=t=>`- ${t}`,tn=t=>pt.isFunction(t)||null===t||!1===t;var en={getAdapter:t=>{t=pt.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){let e;if(n=t[o],r=n,!tn(n)&&(r=Qe[(e=String(n)).toLowerCase()],void 0===r))throw new yt(`Unknown adapter '${e}'`);if(r)break;i[e||"#"+o]=r}if(!r){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let n=e?t.length>1?"since :\n"+t.map(Ze).join("\n"):" "+Ze(t[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r},adapters:Qe};function nn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new me(null,t)}function rn(t){nn(t),t.headers=fe.from(t.headers),t.data=he.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=en.getAdapter(t.adapter||Zt.adapter);return e(t).then(function(e){return nn(t),e.data=he.call(t,t.transformResponse,e),e.headers=fe.from(e.headers),e},function(e){return de(e)||(nn(t),e&&e.response&&(e.response.data=he.call(t,t.transformResponse,e.response),e.response.headers=fe.from(e.response.headers))),Promise.reject(e)})}const on="1.10.0",sn={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{sn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const an={};function cn(t,e,n){if("object"!==typeof t)throw new yt("options must be an object",yt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;while(i-- >0){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new yt("option "+o+" must be "+n,yt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new yt("Unknown option "+o,yt.ERR_BAD_OPTION)}}sn.transitional=function(t,e,n){function r(t,e){return"[Axios v"+on+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new yt(r(i," has been removed"+(e?" in "+e:"")),yt.ERR_DEPRECATED);return e&&!an[i]&&(an[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}},sn.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var un={assertOptions:cn,validators:sn};const ln=un.validators;class fn{constructor(t){this.defaults=t||{},this.interceptors={request:new Ut,response:new Ut}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(r){}}throw n}}_request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=je(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;void 0!==n&&un.assertOptions(n,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean)},!1),null!=r&&(pt.isFunction(r)?e.paramsSerializer={serialize:r}:un.assertOptions(r,{encode:ln.function,serialize:ln.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),un.assertOptions(e,{baseUrl:ln.spelling("baseURL"),withXsrfToken:ln.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&pt.merge(i.common,i[e.method]);i&&pt.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=fe.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))});const c=[];let u;this.interceptors.response.forEach(function(t){c.push(t.fulfilled,t.rejected)});let l,f=0;if(!a){const t=[rn.bind(this),void 0];t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);while(f<l)u=u.then(t[f++],t[f++]);return u}l=s.length;let h=e;f=0;while(f<l){const t=s[f++],e=s[f++];try{h=t(h)}catch(d){e.call(this,d);break}}try{u=rn.call(this,h)}catch(d){return Promise.reject(d)}f=0,l=c.length;while(f<l)u=u.then(c[f++],c[f++]);return u}getUri(t){t=je(this.defaults,t);const e=_e(t.baseURL,t.url,t.allowAbsoluteUrls);return It(e,t.params,t.paramsSerializer)}}pt.forEach(["delete","get","head","options"],function(t){fn.prototype[t]=function(e,n){return this.request(je(n||{},{method:t,url:e,data:(n||{}).data}))}}),pt.forEach(["post","put","patch"],function(t){function e(e){return function(n,r,i){return this.request(je(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}fn.prototype[t]=e(),fn.prototype[t+"Form"]=e(!0)});var hn=fn;class dn{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 n=this;this.promise.then(t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null}),this.promise.then=t=>{let e;const r=new Promise(t=>{n.subscribe(t),e=t}).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t(function(t,r,i){n.reason||(n.reason=new me(t,r,i),e(n.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)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;const e=new dn(function(e){t=e});return{token:e,cancel:t}}}var pn=dn;function mn(t){return function(e){return t.apply(null,e)}}function gn(t){return pt.isObject(t)&&!0===t.isAxiosError}const vn={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(vn).forEach(([t,e])=>{vn[e]=t});var yn=vn;function bn(t){const e=new hn(t),n=a(hn.prototype.request,e);return pt.extend(n,hn.prototype,e,{allOwnKeys:!0}),pt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return bn(je(t,e))},n}const wn=bn(Zt);wn.Axios=hn,wn.CanceledError=me,wn.CancelToken=pn,wn.isCancel=de,wn.VERSION=on,wn.toFormData=Ct,wn.AxiosError=yt,wn.Cancel=wn.CanceledError,wn.all=function(t){return Promise.all(t)},wn.spread=mn,wn.isAxiosError=gn,wn.mergeConfig=je,wn.AxiosHeaders=fe,wn.formToJSON=t=>Kt(pt.isHTMLForm(t)?new FormData(t):t),wn.getAdapter=en.getAdapter,wn.HttpStatusCode=yn,wn.default=wn;var xn=wn,Sn=n(8878),kn=n.n(Sn);const En={uploadImg:"https://apollo.51kandianshi.com/imageaicutout/sam/api/upload",fakeSegment:"https://apollo.51kandianshi.com/imageaicutout/sam/api/segment",API_IMG:"https://outerh5.51kandianshi.com/staticsaicoutout"};var Rn={name:"ImageMatting",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{workspaceSrc:this.src,path:"",loading:!1,imgRef:null,canvasRef:null,ctx:null,originalSize:{w:0,h:0},w:"0",h:"0",left:0,scale:1,clicks:[],lock:!1,canvasVisible:!0,isEverything:!1,afterEditSrc:""}},watch:{visible:async function(t){t?(await this.$nextTick(),this.ctx=this.$refs.canvasRef.getContext("2d"),this.initImage()):(this.workspaceSrc="",this.afterEditSrc="")}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},async initImage(){const t=await fetch(this.src),e=await t.blob(),{data:n}=await xn.post(En.uploadImg,{file:new File([e],"image.jpg",{type:"image/jpeg"})},{headers:{"Content-Type":"multipart/form-data"}}),r=new Image;r.src=`${En.API_IMG}/sam/api/upload/${n.filename}`,this.workspaceSrc=`${En.API_IMG}/sam/api/upload/${n.filename}`,this.path=n.path,r.onload=()=>{let t,e,n=r.width,i=r.height,o=800,s=500;console.log(o,s);let a=n/i;a*s>o?(t=o,e=o/a):(e=s,t=a*s),this.originalSize={w:n,h:i},t=parseInt(t),e=parseInt(e),this.w=t+"px",this.h=e+"px",this.left=(o-t)/2,this.scale=t/n,this.$refs.imgRef.addEventListener("contextmenu",t=>t.preventDefault()),this.$refs.imgRef.addEventListener("mousemove",this.throttle(this.handleMouseMove,150)),this.$refs.canvasRef.style.transform=`scale(${this.scale})`}},handleMouseMove(t){if(this.isEverything)return;if(0!==this.clicks.length)return;if(this.lock)return;this.lock=!0;let e=this.getClick(t);requestIdleCallback(()=>{this.getMask([e])})},handleMouseDown(t){if(t.preventDefault(),t.stopPropagation(),1===t.button)return;if(this.isEverything)return;if(this.lock)return;this.lock=!0;let e=this.getClick(t);this.placePoint(t.offsetX,t.offsetY,e.clickType),this.clicks.push(e),requestIdleCallback(()=>{this.getMask()})},getClick(t){let e={x:t.offsetX,y:t.offsetY};const n=this.scale;return e.x/=n,e.y/=n,3===t.which?e.clickType=0:1!==t.which&&0!==t.which||(e.clickType=1),e},placePoint(t,e,n){let r=document.getElementById("point-box"),i=document.createElement("div");i.className="segment-point"+(n?"":" negative"),i.style=`position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: ${n?"#409EFF":"#F56C6C "};\n left: ${t-5}px;\n top: ${e-5}px`,i.id="point-"+this.clicks.length,r.appendChild(i)},getMask(t){null==t&&(t=this.clicks);const e={path:this.path,clicks:t};console.log(e),xn.post(En.fakeSegment,e).then(t=>{const e=t.data.shape,n=kn().decompressFromEncodedURIComponent(t.data.mask),r=this.rleFrString(n);this.drawCanvas(e,this.decodeRleCounts(e,r)),this.lock=!1}).catch(t=>{console.error(t),this.lock=!1})},drawCanvas(t,e){let n=t[0],r=t[1],i=this.ctx.getImageData(0,0,r,n),o=i.data,s=0;for(let a=0;a<r;a++)for(let t=0;t<n;t++)0===e[s++]?(o[0+4*(r*t+a)]=40,o[1+4*(r*t+a)]=40,o[2+4*(r*t+a)]=40,o[3+4*(r*t+a)]=190):o[3+4*(r*t+a)]=0;this.ctx.putImageData(i,0,0)},removePoint(t){const e="point-"+t;let n=document.getElementById(e);null!=n&&n.remove()},clearCanvas(){for(let t=0;t<this.clicks.length;t++)this.removePoint(t);this.clicks=[],this.isEverything=!1,this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height)},imageMatting(){this.lock||0===this.clicks.length||this.cutOutImage(this.originalSize,this.$refs.imgRef,this.$refs.canvasRef,t=>{this.afterEditSrc=t})},handleOk(){this.$emit("update:visible",!1,this.afterEditSrc)},throttle(t,e){let n=null;return function(){const r=this,i=arguments;n||(n=setTimeout(()=>{t.apply(r,i),clearTimeout(n),n=null},e))}},rleFrString(t){let e=[],n=0;while(n<t.length){let r=0,i=0,o=1;while(o){let e=t.charCodeAt(n)-48;r|=(31&e)<<5*i,o=32&e,n++,i++,!o&&16&e&&(r|=-1<<5*i)}e.length>2&&(r+=e[e.length-2]),e.push(r)}return e},decodeRleCounts([t,e],n){let r=new Uint8Array(t*e),i=0,o=0;for(let s of n){while(s-- >0)r[i++]=o;o=(o+1)%2}return r},cutOutImage({w:t,h:e},n,r,i){const o=document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0}),a=r.getContext("2d",{willReadFrequently:!0});o.width=t,o.height=e,s.drawImage(n,0,0,t,e);const c=a.getImageData(0,0,t,e).data,u=s.getImageData(0,0,t,e),l=u.data;for(let S=0;S<c.length;S+=4){const t=c[S+3];0!==t&&(l[S+3]=0)}let f=t,h=e,d=0,p=0;for(let S=0;S<e;S++)for(let e=0;e<t;e++){const n=l[4*(S*t+e)+3];0!==n&&(f=Math.min(f,e),h=Math.min(h,S),d=Math.max(d,e),p=Math.max(p,S))}const m=d-f+1,g=p-h+1,v=f,y=h;s.putImageData(u,0,0);const b=document.createElement("canvas"),w=b.getContext("2d");b.width=m,b.height=g,w.drawImage(o,v,y,m,g,0,0,m,g);let x=b.toDataURL("image/png");i(x)}}},Cn=Rn;function On(t,e,n,r,i,o,s,a){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var An=On(Cn,o,s,!1,null,"5caacfc0",null),_n=An.exports,Tn=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[t.visible?e("div",{staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI超分")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"workspace"},[e("div",{staticClass:"imgblock"},[""!==t.afterEditSrc?e("div",{staticClass:"label"},[t._v("超分前")]):t._e(),e("img",{attrs:{src:t.workspaceSrc}})]),""!==t.afterEditSrc?e("div",{staticClass:"imgblock"},[e("div",{staticClass:"label"},[t._v("超分后")]),e("img",{attrs:{src:t.afterEditSrc}})]):t._e()]),""==t.afterEditSrc?e("div",{staticClass:"radiogroup"},t._l(t.duration,function(n){return e("div",{key:n.value,staticClass:"radio",class:t.currentDuration==n.value?"radio-active":"",on:{click:function(e){t.currentDuration=n.value}}},[t._v(" "+t._s(n.text)+" ")])}),0):t._e(),""==t.afterEditSrc?e("div",{staticClass:"button",on:{click:t.expandResolution}},[t._v("立即生成")]):t._e(),""!==t.afterEditSrc?e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")]):t._e()]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])]):t._e()])},jn=[],In=n(6616),Pn=n.n(In);const Un={openTask:"https://apollo.51kandianshi.com/aigc-tools/super-resolve/generate",checkTask:"https://apollo.51kandianshi.com/aigc-tools/super-resolve/query"};var Nn={name:"ExpandResolution",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{loading:!1,workspaceSrc:this.src,afterEditSrc:"",taskId:"",interval:null,currentDuration:"1",duration:[{text:"2倍",value:"1"},{text:"4倍",value:"2"}]}},watch:{visible(t){t?this.workspaceSrc=this.src:(this.workspaceSrc="",this.afterEditSrc="",this.taskId="",this.interval&&(clearInterval(this.interval),this.interval=null))}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},async checkResult(){if(""!=this.taskId)try{const t=await xn.get(`${Un.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.fileUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,this.interval&&(clearInterval(this.interval),this.interval=null),!1}catch(t){this.loading=!1,this.interval&&(clearInterval(this.interval),this.interval=null)}},async expandResolution(){let t=await this.getImageMd5(this.workspaceSrc);this.loading=!0;try{const e=await xn.post(Un.openTask,{fileUrl:this.workspaceSrc,md5:t,mode:1,outScale:this.currentDuration,fileType:3},{headers:{accessToken:this.$token}});0==e.data.code?(this.taskId=e.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.interval=null,this.loading=!1,this.afterEditSrc=t)},2e3)):this.loading=!1}catch(e){this.loading=!1}},handleOk(){this.$emit("update:visible",!1,this.afterEditSrc)},async getImageMd5(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=await e.blob(),r=await n.arrayBuffer(),i=new Uint8Array(r),o=new(Pn().ArrayBuffer);o.append(i);const s=o.end();return console.log("图片的 MD5 值:",s),s}catch(e){console.error("获取图片 MD5 值时出错:",e)}}}},Bn=Nn,Fn=On(Bn,Tn,jn,!1,null,"82f08b1e",null),Mn=Fn.exports,Dn=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI扩图")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"flex",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"workspace"},[e("img",{staticClass:"originalimg",attrs:{src:t.workspaceSrc,alt:"AI扩图"}})]),e("div",{staticClass:"config"},[e("div",{staticClass:"title"},[t._v("尺寸比例")]),e("div",{staticClass:"ratio"},t._l(t.ratio,function(n,r){return e("div",{key:r,staticClass:"ratio-item",on:{click:function(e){t.currentRatio=r}}},[e("img",{staticClass:"ratio-img",attrs:{src:t.currentRatio==r?n.icon_active:n.icon}})])}),0),0==t.currentRatio?e("div",{staticClass:"title"},[t._v("方位扩图百分比")]):t._e(),0==t.currentRatio?e("div",{staticClass:"position"},t._l(t.position,function(n,r){return e("div",{key:r,staticClass:"position-item"},[e("span",[t._v(t._s(n.title))]),e("div",{staticClass:"position-input"},[e("input",{directives:[{name:"model",rawName:"v-model",value:n.value,expression:"item.value"}],domProps:{value:n.value},on:{input:function(e){e.target.composing||t.$set(n,"value",e.target.value)}}}),e("span",{staticClass:"suffix"},[t._v("%")])])])}),0):t._e(),e("div",{staticClass:"button",on:{click:t.expandImg}},[t._v("扩图")]),e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")])])]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},Ln=[],$n={name:"ExpandImg",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{token:this.$token,requestUrl:{openTask:"https://apollo.51kandianshi.com/aigc-tools/text2pic/outPaintImage/task",checkTask:"https://apollo.51kandianshi.com/aigc-tools/text2pic/outPaintImage/info"},currentRatio:0,ratio:[{title:"自定义",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/57c2fa87-8147-4985-b877-0463e438fb9a.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/44453238-c141-4bc7-9a27-87a1520313cc.png"},{title:"16:9",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/eb51514a-b062-4fd9-94ea-63f12f1f58c6.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/2aa48c95-20d6-46bc-95b3-bd1f8996c23b.png",ratio:16/9},{title:"9:16",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/de27bc9c-247a-4e53-ab62-8c23e8acdeeb.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/40d06111-21f6-4893-aefe-2da95043647b.png",ratio:9/16},{title:"1:1",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/4493c8b5-9e44-46d0-aa14-f48fc0220cc3.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/0c0a1962-5e25-419d-8d1a-51cb974aa558.png",ratio:1},{title:"3:2",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/cf85a09f-c902-4858-b535-190353902961.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/45a1fbf6-4aaa-48da-abc7-e7ea5a875739.png",ratio:1.5},{title:"2:3",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/f767a51b-9f83-4069-987a-64f2283c3883.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/5e29a1ae-e0bc-4da6-92ce-6fa44e8a58a8.png",ratio:2/3}],position:[{title:"左",value:0},{title:"右",value:0},{title:"上",value:0},{title:"下",value:0}],workspaceSrc:this.src,loading:!1,taskId:"",interval:null}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},handleSize(){return new Promise((t,e)=>{const n=new Image;n.src=this.workspaceSrc,n.onload=()=>{const r=n.naturalWidth,i=n.naturalHeight,o=r/i;if(0==this.currentRatio)t({left:0,right:0,top:0,bottom:0,maxWidth:r,maxHeight:i});else if(o==Number(this.ratio[this.currentRatio].ratio))e(new Error("目前的比例和原图比例一致,请选择其他比例"));else if(o<this.ratio[this.currentRatio].ratio){let e=i*this.ratio[this.currentRatio].ratio,n=(e-r)/2/r;t({left:n,right:n,top:0,bottom:0,maxWidth:e,maxHeight:i})}else{let e=r/this.ratio[this.currentRatio].ratio,n=(e-i)/2/i;t({left:0,right:0,top:n,bottom:n,maxWidth:r,maxHeight:e})}}})},async checkResult(){if(""!=this.taskId)try{const t=await xn.get(`${this.requestUrl.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.picUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,clearInterval(this.interval),!1}catch(t){this.loading=!1,clearInterval(this.interval)}},async expandImg(){this.loading=!0;let t=0,e=0,n=0,r=0,i=0,o=0;try{const s=await this.handleSize();t=s.left,e=s.right,n=s.top,r=s.bottom,i=s.maxWidth,o=s.maxHeight}catch(s){return void(this.loading=!1)}0==this.currentRatio&&(t=Number(this.position[0].value)/100,e=Number(this.position[1].value)/100,n=Number(this.position[2].value)/100,r=Number(this.position[3].value)/100);try{const s=await xn.post(this.requestUrl.openTask,{imageUrl:this.workspaceSrc,left:t,right:e,top:n,bottom:r,maxWidth:2*i,maxHeight:2*o},{headers:{accessToken:this.$token}});0==s.data.code?(this.taskId=s.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.loading=!1,this.workspaceSrc=t)},2e3)):this.loading=!1}catch(s){this.loading=!1}},handleOk(){this.$emit("update:visible",!1,this.workspaceSrc)}}},qn=$n,zn=On(qn,Dn,Ln,!1,null,"79c4aeb8",null),Vn=zn.exports,Wn=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI消除")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"container",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"title"},[t._v("*鼠标框选需要消除的部分后,点击开始消除。消除后,点击应用按钮")]),e("div",{staticClass:"workspace"},[e("img",{ref:"imgRef",attrs:{src:t.workspaceSrc}}),e("canvas",{ref:"canvasRef",staticStyle:{"z-index":"100",position:"relative"},on:{mousedown:t.startDrawing,mousemove:t.draw,mouseup:t.stopDrawing}})]),e("div",{staticStyle:{display:"flex","justify-content":"center"}},[e("div",{staticClass:"button",on:{click:t.clearCanvas}},[t._v("重置框选")]),e("div",{staticClass:"button",on:{click:t.eraserObject}},[t._v("开始消除")])]),e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")])]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},Hn=[];const Xn={openTask:"https://apollo.51kandianshi.com/aigc-tools/image-retouch/generate",checkTask:"https://apollo.51kandianshi.com/aigc-tools/image-retouch/query"};var Yn={name:"EraserObject",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{workspaceSrc:this.src,loading:!1,taskId:"",interval:null,imgRef:null,canvasRef:null,ctx:null,offscreenCanvas:null,offscreenCtx:null,drawing:!1,startX:0,startY:0,currentX:0,currentY:0,image:new Image}},watch:{visible:async function(t){t?(this.workspaceSrc=this.src,await this.$nextTick(),this.ctx=this.$refs.canvasRef.getContext("2d"),this.initImage()):clearInterval(this.interval)}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},initImage(){this.image.src=this.workspaceSrc,this.image.onload=()=>{this.$refs.canvasRef.width=this.$refs.imgRef.width,this.$refs.canvasRef.height=this.$refs.imgRef.height,this.offscreenCanvas=document.createElement("canvas"),this.offscreenCanvas.width=this.$refs.canvasRef.width,this.offscreenCanvas.height=this.$refs.canvasRef.height,this.offscreenCtx=this.offscreenCanvas.getContext("2d")}},startDrawing(t){this.drawing=!0,this.startX=t.offsetX,this.startY=t.offsetY,this.currentX=t.offsetX,this.currentY=t.offsetY},draw(t){this.drawing&&(this.currentX=t.offsetX,this.currentY=t.offsetY,this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.ctx.drawImage(this.offscreenCanvas,0,0),this.drawRect(this.ctx,this.startX,this.startY,this.currentX-this.startX,this.currentY-this.startY))},drawRect(t,e,n,r,i,o=!1){t.setLineDash([5,5]),t.strokeStyle="rgba(104, 106, 237, 1)",t.lineWidth=2,o&&(t.fillStyle="rgba(104, 106, 237, 0.4)",t.fillRect(e,n,r,i)),t.strokeRect(e,n,r,i),t.setLineDash([])},stopDrawing(){this.drawing&&(this.drawing=!1,this.drawRect(this.offscreenCtx,this.startX,this.startY,this.currentX-this.startX,this.currentY-this.startY,!0),this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.ctx.drawImage(this.offscreenCanvas,0,0))},clearCanvas(){this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.offscreenCtx.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height)},async checkResult(){if(""!=this.taskId)try{const t=await xn.get(`${Xn.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.fileUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,clearInterval(this.interval),!1}catch(t){this.loading=!1,clearInterval(this.interval)}},async eraserObject(){let t=await this.getImageMd5(this.workspaceSrc);this.loading=!0;let e=this.buildBase64();try{const n=await xn.post(Xn.openTask,{sourceFileUrl:this.workspaceSrc,sourceMd5:t,maskFile:e},{headers:{accessToken:this.$token}});0==n.data.code?(this.taskId=n.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.loading=!1,this.clearCanvas(),this.workspaceSrc=t)},2e3)):this.loading=!1}catch(n){this.loading=!1}},handleOk(){this.$emit("update:visible",!1,this.workspaceSrc)},async getImageMd5(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const n=await e.blob(),r=await n.arrayBuffer(),i=new Uint8Array(r),o=new(Pn().ArrayBuffer);o.append(i);const s=o.end();return console.log("图片的 MD5 值:",s),s}catch(e){console.error("获取图片 MD5 值时出错:",e)}},buildBase64(){const t=this.$refs.imgRef.naturalWidth,e=this.$refs.imgRef.naturalHeight,n=this.$refs.canvasRef.width,r=this.$refs.canvasRef.height,i=t/n,o=e/r,s=document.createElement("canvas"),a=s.getContext("2d");s.width=t,s.height=e,a.fillStyle="black",a.fillRect(0,0,s.width,s.height),a.scale(i,o),a.drawImage(this.$refs.canvasRef,0,0),a.scale(1/i,1/o);const c=a.getImageData(0,0,s.width,s.height),u=c.data;for(let l=0;l<u.length;l+=4){const t=u[l],e=u[l+1],n=u[l+2];u[l+3];0===t&&0===e&&0===n||(u[l]=255,u[l+1]=255,u[l+2]=255,u[l+3]=255)}return a.putImageData(c,0,0),s.toDataURL("image/png").replace("data:image/png;base64,","")}}},Jn=Yn,Kn=On(Jn,Wn,Hn,!1,null,"7e913003",null),Gn=Kn.exports;function Qn(t){let e,n,r=parseInt(t.slice(1,3),16)/255,i=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,s=Math.max(r,i,o),a=Math.min(r,i,o),c=(s+a)/2;if(s===a)e=n=0;else{let t=s-a;switch(n=c>.5?t/(2-s-a):t/(s+a),s){case r:e=(i-o)/t+(i<o?6:0);break;case i:e=(o-r)/t+2;break;case o:e=(r-i)/t+4;break}e/=6}return[e,n,c]}function Zn(t,e,n){let r,i,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0===e)r=i=o=n;else{let a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;r=s(c,a,t+1/3),i=s(c,a,t),o=s(c,a,t-1/3)}const a=t=>{const e=Math.round(255*t);return e.toString(16).padStart(2,"0")};return"#"+a(r)+a(i)+a(o)}function tr(t,e){const[n,r,i]=Qn(t),o=Math.min(1,i+e/100);return Zn(n,r,o)}const er=[_n,Mn,Vn,Gn],nr=function(t,e={}){const{theme:n,token:r}=e;nr.installed||(nr.installed=!0,n&&(document.documentElement.style.setProperty("--sbsplugin-primary-color",n.primaryColor||"#1677ff"),document.documentElement.style.setProperty("--sbsplugin-primary-color-hover",tr(n.primaryColor||"#1677ff",10))),t.prototype.$token=r,er.forEach(e=>t.component(e.name,e)))};"undefined"!==typeof window&&window.Vue&&nr(window.Vue);var rr=nr,ir=rr}(),r}()});
|