bkui-vue 0.0.1-beta.388 → 0.0.1-beta.389

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.
Files changed (150) hide show
  1. package/dist/index.cjs.js +22 -22
  2. package/dist/index.esm.js +1 -0
  3. package/dist/index.umd.js +23 -23
  4. package/lib/affix/index.js +353 -1
  5. package/lib/alert/index.js +251 -1
  6. package/lib/animate-number/index.js +226 -1
  7. package/lib/backtop/index.js +260 -1
  8. package/lib/badge/index.js +274 -1
  9. package/lib/breadcrumb/index.js +329 -1
  10. package/lib/button/index.js +371 -1
  11. package/lib/card/index.js +326 -1
  12. package/lib/cascader/index.js +2168 -1
  13. package/lib/checkbox/index.js +571 -1
  14. package/lib/code-diff/index.js +5520 -1
  15. package/lib/collapse/index.js +698 -1
  16. package/lib/color-picker/index.js +2816 -1
  17. package/lib/components.js +759 -1
  18. package/lib/container/index.js +369 -1
  19. package/lib/date-picker/index.js +5601 -1
  20. package/lib/dialog/index.js +545 -1
  21. package/lib/directives/index.js +1428 -2
  22. package/lib/dist.index.js +166 -1
  23. package/lib/divider/index.js +512 -1
  24. package/lib/dropdown/index.js +414 -1
  25. package/lib/exception/index.js +405 -1
  26. package/lib/fixed-navbar/index.js +214 -1
  27. package/lib/form/index.js +986 -1
  28. package/lib/icon/angle-double-down-line.js +426 -1
  29. package/lib/icon/angle-double-left-line.js +426 -1
  30. package/lib/icon/angle-double-left.js +426 -1
  31. package/lib/icon/angle-double-right-line.js +426 -1
  32. package/lib/icon/angle-double-right.js +426 -1
  33. package/lib/icon/angle-double-up-line.js +426 -1
  34. package/lib/icon/angle-down-fill.js +426 -1
  35. package/lib/icon/angle-down-line.js +426 -1
  36. package/lib/icon/angle-down.js +426 -1
  37. package/lib/icon/angle-left.js +426 -1
  38. package/lib/icon/angle-right.js +426 -1
  39. package/lib/icon/angle-up-fill.js +426 -1
  40. package/lib/icon/angle-up.js +426 -1
  41. package/lib/icon/archive-fill.js +426 -1
  42. package/lib/icon/arrows-left.js +426 -1
  43. package/lib/icon/arrows-right.js +426 -1
  44. package/lib/icon/audio-fill.js +426 -1
  45. package/lib/icon/bk.js +426 -1
  46. package/lib/icon/circle.js +426 -1
  47. package/lib/icon/close-line.js +426 -1
  48. package/lib/icon/close.js +426 -1
  49. package/lib/icon/code.js +426 -1
  50. package/lib/icon/cog-shape.js +426 -1
  51. package/lib/icon/collapse-left.js +426 -1
  52. package/lib/icon/copy.js +426 -1
  53. package/lib/icon/data-shape.js +426 -1
  54. package/lib/icon/del.js +426 -1
  55. package/lib/icon/doc-fill.js +426 -1
  56. package/lib/icon/done.js +426 -1
  57. package/lib/icon/down-shape.js +426 -1
  58. package/lib/icon/down-small.js +426 -1
  59. package/lib/icon/edit-line.js +426 -1
  60. package/lib/icon/ellipsis.js +426 -1
  61. package/lib/icon/enlarge-line.js +426 -1
  62. package/lib/icon/error.js +426 -1
  63. package/lib/icon/excel-fill.js +426 -1
  64. package/lib/icon/exclamation-circle-shape.js +426 -1
  65. package/lib/icon/eye.js +426 -1
  66. package/lib/icon/filliscreen-line.js +426 -1
  67. package/lib/icon/folder-open.js +426 -1
  68. package/lib/icon/folder-shape-open.js +426 -1
  69. package/lib/icon/folder-shape.js +426 -1
  70. package/lib/icon/folder.js +426 -1
  71. package/lib/icon/funnel.js +426 -1
  72. package/lib/icon/help-document-fill.js +426 -1
  73. package/lib/icon/help-fill.js +426 -1
  74. package/lib/icon/help.js +426 -1
  75. package/lib/icon/image-fill.js +426 -1
  76. package/lib/icon/img-placehoulder.js +448 -1
  77. package/lib/icon/index.js +2275 -1
  78. package/lib/icon/info-line.js +448 -1
  79. package/lib/icon/info.js +448 -1
  80. package/lib/icon/left-shape.js +448 -1
  81. package/lib/icon/left-turn-line.js +448 -1
  82. package/lib/icon/narrow-line.js +448 -1
  83. package/lib/icon/original.js +448 -1
  84. package/lib/icon/pdf-fill.js +448 -1
  85. package/lib/icon/play-shape.js +448 -1
  86. package/lib/icon/plus.js +448 -1
  87. package/lib/icon/ppt-fill.js +448 -1
  88. package/lib/icon/qq.js +448 -1
  89. package/lib/icon/right-shape.js +448 -1
  90. package/lib/icon/right-turn-line.js +448 -1
  91. package/lib/icon/search.js +448 -1
  92. package/lib/icon/share.js +448 -1
  93. package/lib/icon/spinner.js +448 -1
  94. package/lib/icon/success.js +448 -1
  95. package/lib/icon/switcher-loading.js +448 -1
  96. package/lib/icon/text-file.js +448 -1
  97. package/lib/icon/text-fill.js +448 -1
  98. package/lib/icon/transfer.js +448 -1
  99. package/lib/icon/tree-application-shape.js +448 -1
  100. package/lib/icon/unfull-screen.js +448 -1
  101. package/lib/icon/unvisible.js +448 -1
  102. package/lib/icon/up-shape.js +448 -1
  103. package/lib/icon/upload.js +448 -1
  104. package/lib/icon/video-fill.js +448 -1
  105. package/lib/icon/warn.js +448 -1
  106. package/lib/icon/weixin.js +448 -1
  107. package/lib/image/index.js +873 -1
  108. package/lib/index.js +169 -1
  109. package/lib/info-box/index.js +1784 -1
  110. package/lib/input/index.js +846 -1
  111. package/lib/link/index.js +226 -1
  112. package/lib/loading/index.js +309 -1
  113. package/lib/menu/index.js +796 -1
  114. package/lib/message/index.js +401 -1
  115. package/lib/modal/index.js +395 -1
  116. package/lib/navigation/index.js +431 -1
  117. package/lib/notify/index.js +430 -1
  118. package/lib/overflow-title/index.js +512 -1
  119. package/lib/pagination/index.js +1026 -1
  120. package/lib/plugin-popover/index.js +2448 -1
  121. package/lib/plugins/index.js +130 -1
  122. package/lib/popover/index.js +2454 -1
  123. package/lib/popover2/index.js +172 -1
  124. package/lib/preset.js +129 -1
  125. package/lib/process/index.js +1417 -1
  126. package/lib/progress/index.js +479 -1
  127. package/lib/radio/index.js +649 -1
  128. package/lib/rate/index.js +358 -1
  129. package/lib/resize-layout/index.js +495 -1
  130. package/lib/search-select/index.js +3388 -1
  131. package/lib/select/index.js +2819 -1
  132. package/lib/shared/index.js +2813 -1
  133. package/lib/sideslider/index.js +1362 -1
  134. package/lib/slider/index.js +2060 -1
  135. package/lib/steps/index.js +1504 -1
  136. package/lib/swiper/index.js +374 -1
  137. package/lib/switcher/index.js +308 -1
  138. package/lib/tab/index.js +919 -1
  139. package/lib/table/index.js +6635 -1
  140. package/lib/table-column/index.js +737 -1
  141. package/lib/tag/index.js +278 -1
  142. package/lib/tag-input/index.js +1897 -1
  143. package/lib/time-picker/index.js +142 -1
  144. package/lib/timeline/index.js +315 -1
  145. package/lib/transfer/index.js +658 -1
  146. package/lib/tree/index.js +2917 -1
  147. package/lib/upload/index.js +3735 -1
  148. package/lib/virtual-render/index.js +825 -1
  149. package/package.json +1 -1
  150. package/lib/directives/index.js.LICENSE.txt +0 -14
@@ -1 +1,3735 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon"),require("../progress"),require("../button"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon","../progress","../button"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon"),require("../progress"),require("../button")):t(e["../shared"],e.vue,e["../icon"],e["../progress"],e["../button"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,a)=>(()=>{var o={7162:(e,t,r)=>{e.exports=r(5047)},5047:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new V(n||[]);return o._invoke=function(e,t,r){var n=f;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===a)throw o;return R()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var u=N(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(e,t,r);if("normal"===c.type){if(n=r.done?h:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function m(){}function y(){}function g(){}var b={};c(b,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,o)&&(b=_);var x=g.prototype=m.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(a,o,i,u){var c=s(e[a],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var a;this._invoke=function(e,n){function o(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(o,o):o()}}function N(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=s(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:R}}function R(){return{value:t,done:!0}}return y.prototype=g,c(x,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(S.prototype),c(S.prototype,i,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new S(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(x),c(x,u,"Generator"),c(x,o,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return u.type="throw",u.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},4791:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],a=e[2],o=e[3];n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&a)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|a>>>15)+o|0)&o|~a&r)+t[3]-1044525330|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&a)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|a>>>15)+o|0)&o|~a&r)+t[7]-45705983|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&a)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|a>>>15)+o|0)&o|~a&r)+t[11]-1990404162|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&a)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|a>>>15)+o|0)&o|~a&r)+t[15]+1236535329|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&a|n&~a)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|a>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&a|n&~a)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|a>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&a|n&~a)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|a>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&a|n&~a)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|a>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^a)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|a>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^a)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|a>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^a)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|a>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^a)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|a>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~a))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[14]-1416354905|0)<<15|a>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~a))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[10]-1051523|0)<<15|a>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~a))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[6]-1560198380|0)<<15|a>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~a))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[2]+718787259|0)<<15|a>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+a|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=a+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function a(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,a,o,i,u,c,l=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)r(s,n(e.substring(t-64,t)));for(a=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<a;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*l).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),c=parseInt(i[1],16)||0,o[14]=u,o[15]=c,r(s,o),s}function i(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=i(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function s(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,a,o,i,u=this.byteLength,c=e(t,u),l=u;return undefined!==r&&(l=e(r,u)),c>l?new ArrayBuffer(0):(n=l-c,a=new ArrayBuffer(n),o=new Uint8Array(a),i=new Uint8Array(this,c,n),o.set(i),a)}}(),s.prototype.append=function(e){return this.appendBinary(c(e)),this},s.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,a=this._buff.length;for(t=64;t<=a;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},s.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=l(r)),this.reset(),r},s.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},s.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},s.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},s.prototype._finish=function(e,t){var n,a,o,i=t;if(e[i>>2]|=128<<(i%4<<3),i>55)for(r(this._hash,e),i=0;i<16;i+=1)e[i]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=a,e[15]=o,r(this._hash,e)},s.hash=function(e,t){return s.hashBinary(c(e),t)},s.hashBinary=function(e,t){var r=u(o(e));return t?l(r):r},s.ArrayBuffer=function(){this.reset()},s.ArrayBuffer.prototype.append=function(e){var t,n,o,i,u,c=(n=this._buff.buffer,o=e,i=!0,(u=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),u.set(new Uint8Array(o),n.byteLength),i?u:u.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)r(this._hash,a(c.subarray(t-64,t)));return this._buff=t-64<l?new Uint8Array(c.buffer.slice(t-64)):new Uint8Array(0),this},s.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=l(r)),this.reset(),r},s.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.ArrayBuffer.prototype.getState=function(){var e,t=s.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},s.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,a=new ArrayBuffer(n),o=new Uint8Array(a);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:a}(e.buff,!0),s.prototype.setState.call(this,e)},s.ArrayBuffer.prototype.destroy=s.prototype.destroy,s.ArrayBuffer.prototype._finish=s.prototype._finish,s.ArrayBuffer.hash=function(e,t){var n=u(function(e){var t,n,o,i,u,c,l=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)r(s,a(e.subarray(t-64,t)));for(n=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*l).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),c=parseInt(i[1],16)||0,o[14]=u,o[15]=c,r(s,o),s}(new Uint8Array(e)));return t?l(n):n},s}()},4976:e=>{"use strict";e.exports=a},6870:e=>{"use strict";e.exports=r},3522:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";u.r(c),u.d(c,{default:()=>k});var e=u(4212);function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var r=u(748),n=u(7162),a=u.n(n);function o(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function u(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))}Object.create,Object.create;var i,l,s="bk-upload";!function(e){e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture"}(i||(i={})),function(e){e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail"}(l||(l={}));var f=[i.BUTTON,i.DRAGGABLE,i.PICTURE];const d={theme:{type:String,default:"draggable",validator:function(e){return!(e&&!f.includes(e)&&(console.error("invalid theme, ".concat(e,", the theme must be one of 【").concat(f.join(" | "),"】")),1))}},files:{type:Array,default:function(){return[]}},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default:function(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default:function(e){return!(!e||0!==e.code)}},headers:{type:Object,default:function(){return{}}},header:{type:[Array,Object],default:function(){return[]}},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:function(){return[]}},formDataAttributes:{type:[Array,Object],default:function(){return[]}},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=u(6870),y=u(3522),g=u.n(y);function b(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,r.isVNode)(e)}const w=(0,r.defineComponent)({name:"UploadList",props:{theme:d.theme,disabled:d.disabled,files:d.files,multiple:d.multiple},emits:["remove","retry"],setup:function(n,a){var o=a.slots,u=a.emit,c=(0,r.toRefs)(n),l=c.theme,f=c.disabled,d=c.multiple,p="".concat(s,"-list"),h=(0,r.computed)((function(){return l.value===i.PICTURE})),y=(0,r.computed)((function(){return h.value&&!d.value})),w=(0,r.computed)((function(){var r;return(0,e.classes)((t(r={},p,!0),t(r,"".concat(p,"--").concat(l.value),!0),t(r,"".concat(p,"--disabled"),f.value),r))}));function _(e,t){u("remove",e,t)}var x=function(e){return[(0,r.withDirectives)((0,r.createVNode)("img",{src:e.url,class:"".concat(p,"__picture-item-thumbnail"),alt:""},null),[[r.vShow,"uploading"!==e.status]]),(0,r.createVNode)(r.Fragment,null,["uploading"===e.status&&(0,r.createVNode)(g(),{class:"".concat(p,"__picture-item-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:e.percentage},null)]),(0,r.createVNode)(r.Fragment,null,[!f.value&&(0,r.createVNode)("div",{class:"".concat(p,"__picture-item-actions")},[(0,r.createVNode)(m.Del,{class:"action-icon",onClick:function(t){return _(e,t)}},null)])])]},A=function(e){var t,n=null===(t=null==e?void 0:e.raw)||void 0===t?void 0:t.type,a=v((null==n?void 0:n.split("/"))||"",1)[0],o={text:m.TextFill,image:m.ImageFill,application:m.TextFill,video:m.VideoFill,audio:m.AudioFill}[a]||m.TextFill;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(n)&&(o=m.ArchiveFill),(0,r.h)(o,{class:"".concat(p,"__item-file-icon")})},S=function(e){return[(0,r.createVNode)("div",{class:"".concat(p,"__item-icon")},[e.isPic?(0,r.createVNode)("img",{src:e.url,class:"".concat(p,"__item-thumbnail"),alt:""},null):A(e)]),(0,r.createVNode)("div",{class:"".concat(p,"__item-summary")},[(0,r.createVNode)("div",{class:"".concat(p,"__item-name"),title:e.name},[e.name]),"uploading"!==e.status&&(0,r.createVNode)("div",{class:"".concat(p,"__item-message"),title:e.statusText},["success"===e.status&&(0,r.createVNode)("span",null,[(0,r.createVNode)(m.Done,{class:"".concat(p,"__item-message-success-icon")},null),e.statusText||"上传成功"]),"fail"===e.status&&(0,r.createVNode)("span",null,[e.statusText||"上传失败"])]),"uploading"===e.status&&(0,r.createVNode)(g(),{class:"".concat(p,"__item-progress"),showText:!1,percent:e.percentage,size:"small"},null),"fail"!==e.status&&(0,r.createVNode)("div",{class:"".concat(p,"__item-speed")},[(0,r.withDirectives)((0,r.createVNode)("span",{class:"".concat(p,"__item-speed-size")},[(t=e.size,n=Math.floor(Math.log(t)/Math.log(1024)),a=t/Math.pow(1024,n),"".concat(a.toFixed(2)).concat(["Bytes","KB","MB","GB","TB"][n]))]),[[r.vShow,e.size]]),(0,r.withDirectives)((0,r.createVNode)("span",{class:"".concat(p,"__item-speed-percentage")},[e.percentage,(0,r.createTextVNode)("%")]),[[r.vShow,"uploading"===e.status]])]),!f.value&&(0,r.createVNode)("div",{class:"".concat(p,"__item-actions")},["fail"===e.status&&(0,r.createVNode)(m.RightTurnLine,{class:"".concat(p,"__item-retry-icon"),onClick:function(t){return function(e,t){u("retry",e,t)}(e,t)}},null),(0,r.createVNode)(m.Del,{class:"".concat(p,"__item-del-icon"),onClick:function(t){return _(e,t)}},null)])])];var t,n,a};return function(){var a,i,u;return(0,r.createVNode)(r.Fragment,null,[y.value?(null==o?void 0:o.innerTrigger)&&(null==o?void 0:o.innerTrigger(null===(a=n.files)||void 0===a?void 0:a[0])):(0,r.createVNode)("ul",{class:w.value},[h.value?(0,r.createVNode)(r.TransitionGroup,{name:"".concat(p,"__item")},b(u=n.files.map((function(n){var a,i=(0,e.classes)((t(a={},"".concat(p,"__item"),!0),t(a,"".concat(p,"__item-picture"),!0),t(a,"".concat(p,"__item--").concat(n.status),!0),a));return(0,r.createVNode)("li",{key:n.uid,class:i},[(null==o?void 0:o.file)?o.file({file:n}):x(n)])})))?u:{default:function(){return[u]}}):(0,r.createVNode)(r.TransitionGroup,{name:"".concat(p,"__item")},b(i=n.files.map((function(n){var a,i=(0,e.classes)((t(a={},"".concat(p,"__item"),!0),t(a,"".concat(p,"__item--").concat(n.status),!0),a));return(0,r.createVNode)("li",{key:n.uid,class:i},[(null==o?void 0:o.file)?o.file({file:n}):S(n)])})))?i:{default:function(){return[i]}}),(null==o?void 0:o.innerTrigger)&&(null==o?void 0:o.innerTrigger())])])}}});var _=u(4976),x=u.n(_);const A=(0,r.defineComponent)({name:"UploadTrigger",props:{theme:d.theme,disabled:d.disabled,multiple:d.multiple,accept:d.accept,file:{type:Object}},emits:["change","remove"],setup:function(n,a){var o=a.slots,u=a.emit,c=(0,r.toRefs)(n),l=c.theme,f=c.disabled,d=c.file,p=c.multiple,h=c.accept,v="".concat(s,"-trigger"),y=(0,r.computed)((function(){return l.value===i.BUTTON})),b=(0,r.computed)((function(){return l.value===i.DRAGGABLE})),w=(0,r.computed)((function(){return l.value===i.PICTURE})),_=(0,r.computed)((function(){return w.value&&!p.value})),A=(0,r.computed)((function(){return w.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value})),S=(0,r.ref)(null),N=(0,r.computed)((function(){var r,n,a,o;return(0,e.classes)((t(r={},v,!0),t(r,"".concat(v,"--").concat(l.value),!0),t(r,"".concat(v,"--single-picture"),_.value),t(r,"".concat(v,"--has-file"),null!==(n=d.value)&&void 0!==n&&n),t(r,"".concat(v,"--").concat(null===(a=d.value)||void 0===a?void 0:a.status),null!==(o=d.value)&&void 0!==o&&o),t(r,"".concat(v,"--dragover"),R.value),t(r,"".concat(v,"--disabled"),f.value),r))})),E=function(){S.value.value=null,S.value.click()},L=function(e){var t=e.target.files;u("change",Array.from(t))},V=function(){n.disabled||E()},T=function(e){e.defaultPrevented||e.target!==e.currentTarget||("Enter"!==e.code&&"Space"!==e.code||E(),e.preventDefault())},R=(0,r.ref)(!1),U=function(e){return[(0,r.withDirectives)((0,r.createVNode)("img",{src:e.url,class:"".concat(v,"__picture-thumbnail"),alt:""},null),[[r.vShow,"uploading"!==e.status]]),(0,r.createVNode)(r.Fragment,null,["uploading"===e.status&&(0,r.createVNode)(g(),{class:"".concat(v,"__picture-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:e.percentage},null)]),(0,r.createVNode)(r.Fragment,null,[!n.disabled&&(0,r.createVNode)("div",{class:"".concat(v,"__picture-actions")},[(0,r.createVNode)(m.Del,{class:"action-icon",onClick:function(t){return function(e,t){u("remove",e,t),t.stopPropagation(),t.preventDefault()}(e,t)}},null)])])]};return function(){var a;return(0,r.createVNode)("div",{class:N.value,tabindex:"0",onClick:V,onKeydown:T},[o.trigger?[o.trigger(),null===(a=null==o?void 0:o.default)||void 0===a?void 0:a.call(o)]:y.value?(0,r.createVNode)(x(),{disabled:f.value},{default:function(){return[(0,r.createVNode)(m.Upload,{class:"".concat(v,"__button-icon")},null),(0,r.createVNode)("span",{class:"".concat(v,"__button-text")},[(0,r.createTextVNode)("上传文件")])]}}):b.value?function(){var n=(0,e.classes)(t({},"".concat(v,"__draggable"),!0));return(0,r.createVNode)("div",{class:n,onDrop:function(e){if(!f.value){e.preventDefault(),R.value=!1;var t=Array.from(e.dataTransfer.files);if(A.value){var r=t.filter((function(e){var t=e.type,r=e.name,n=r.includes(".")?".".concat(r.split(".").pop()):"",a=t.replace(/\/.*$/,"");return A.value.split(",").map((function(e){return e.trim()})).filter((function(e){return e})).some((function(e){return e.startsWith(".")?n===e:/\/\*$/.test(e)?a===e.replace(/\/\*$/,""):!!/^[^/]+\/[^/]+$/.test(e)&&t===e}))}));u("change",r)}else u("change",t)}},onDragover:function(e){e.preventDefault(),R.value=!0},onDragleave:function(){R.value=!1}},[o.default?o.default():(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(m.Upload,{class:"".concat(v,"__draggable-icon")},null),(0,r.createVNode)("div",{class:"".concat(v,"__draggable-text")},[(0,r.createTextVNode)("将文件拖到此处或"),(0,r.createVNode)("span",{class:"".concat(v,"__draggable-upload-link")},[(0,r.createTextVNode)("点击上传")])])])])}():w.value?(0,r.createVNode)(r.Fragment,null,[_.value&&n.file?U(n.file):(0,r.createVNode)(r.Fragment,null,[o.default?o.default():(0,r.createVNode)("div",{class:"".concat(v,"__picture-inner")},[(0,r.createVNode)(m.Plus,{class:"".concat(v,"__picture-icon")},null),(0,r.createVNode)("div",{class:"".concat(v,"__picture-text")},[(0,r.createTextVNode)("点击上传")])])])]):void 0,(0,r.createVNode)("input",{ref:S,class:"".concat(v,"__input-file"),tabindex:"-1",onChange:L,accept:A.value,multiple:p.value,disabled:f.value,type:"file"},null)])}}});function S(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=u(4791),E=u.n(N);function L(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}var V=function(t){if("undefined"==typeof XMLHttpRequest)throw new Error("XMLHttpRequest is undefined");var r=new XMLHttpRequest,n=t.action;r.upload&&r.upload.addEventListener("progress",(function(e){var r=e;r.percent=e.total>0?e.loaded/e.total*100:0,t.onProgress(r)}));var a=new FormData;if(t.data){var o=t.data;Array.isArray(o)||(o=[o]),o.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=v(r[t],2),o=n[0],i=n[1];Array.isArray(i)?a.append.apply(a,[o].concat(S(i))):a.append(o,i)}}))}if(t.formDataAttributes){var i=t.formDataAttributes;Array.isArray(i)||(i=[i]),i.forEach((function(e){Array.isArray(e.value)?a.append.apply(a,[e.name].concat(S(e.value))):a.append(e.name,e.value)}))}if(a.append(t.filename,t.file,t.file.name),r.addEventListener("error",(function(){t.onError(new Error("An error occurred during upload"))})),r.addEventListener("load",(function(){if(r.status<200||r.status>=300)return t.onError(new Error("An error occurred during upload"));t.onSuccess(L(r))})),r.addEventListener("loadend",(function(){t.onComplete()})),r.open(t.method,n,!0),t.withCredentials&&"withCredentials"in r&&(r.withCredentials=!0),t.header)if(Array.isArray(t.header))t.header.forEach((function(e){var t=e.name,n=e.value;r.setRequestHeader(t,n)}));else{var u=t.header.name,c=t.header.value;r.setRequestHeader(u,c)}var l=t.headers||{};if(l instanceof Headers)l.forEach((function(e,t){return r.setRequestHeader(t,e)}));else for(var s=0,f=Object.entries(l);s<f.length;s++){var d=v(f[s],2),p=d[0],h=d[1];(0,e.isNullOrUndef)(h)||r.setRequestHeader(p,String(h))}return r.send(a),r},T=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,R=function(e){return o(void 0,void 0,void 0,a().mark((function t(){var r,n,o,i,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1024*e.chunkSize*1024,n=e.file){t.next=4;break}throw new Error("File not found");case 4:return o=Math.ceil(n.size/r),t.next=7,C(n,r);case 7:return i=t.sent,U(e,n,o,i,u=[],r),t.next=12,Promise.all(u).then((function(){var t={size:n.size,name:n.name,total:o,hash:i},r=new XMLHttpRequest;r.open(e.method,e.mergeUrl,!0),r.onreadystatechange=function(){if(4===r.readyState){if(r.status<200||r.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(L(r))}},r.onloadend=function(){e.onComplete()},r.setRequestHeader("Content-type","application/JSON"),r.send(JSON.stringify(t))}));case 12:case"end":return t.stop()}}),t)})))},U=function(t,r,n,a,o,i){for(var u=function(u){var c=new Promise((function(o,c){var l=u*i,s=Math.min(r.size,l+i),f=new FormData;if(t.data){var d=t.data;Array.isArray(d)||(d=[d]),d.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=v(r[t],2),a=n[0],o=n[1];Array.isArray(o)?f.append.apply(f,[a].concat(S(o))):f.append(a,o)}}))}if(t.formDataAttributes){var p=t.formDataAttributes;Array.isArray(p)||(p=[p]),p.forEach((function(e){Array.isArray(e.value)?f.append.apply(f,[e.name].concat(S(e.value))):f.append(e.name,e.value)}))}f.append("file",T.call(r,l,s)),f.append("name",r.name),f.append("total",n.toString()),f.append("index",u.toString()),f.append("size",r.size.toString()),f.append("hash",a.toString());var h=new XMLHttpRequest;if(h.onreadystatechange=function(){if(4===h.readyState){var e=L(h);h.status<200||h.status>=300?(c(e),t.onError(new Error("An error occurred during upload"))):o("reponseText")}},h.upload.addEventListener("progress",(function(e){var r=e;t.onProgress(r,u)}),!1),t.withCredentials&&"withCredentials"in h&&(h.withCredentials=!0),h.open(t.method,t.sliceUrl,!0),t.header)if(Array.isArray(t.header))t.header.forEach((function(e){var t=e.name,r=e.value;h.setRequestHeader(t,r)}));else{var m=t.header.name,y=t.header.value;h.setRequestHeader(m,y)}var g=t.headers||{};if(g instanceof Headers)g.forEach((function(e,t){return h.setRequestHeader(t,e)}));else for(var b=0,w=Object.entries(g);b<w.length;b++){var _=v(w[b],2),x=_[0],A=_[1];(0,e.isNullOrUndef)(A)||h.setRequestHeader(x,String(A))}h.send(f)}));o.push(c)},c=0;c<n;c++)u(c)},C=function(e,t){return new Promise((function(r,n){var a=Math.ceil(e.size/t),o=0,i=new(E().ArrayBuffer),u=new FileReader;function c(){var r=o*t,n=r+t>=e.size?e.size:r+t;u.readAsArrayBuffer(T.call(e,r,n))}u.onload=function(t){if(i.append(t.target.result),(o+=1)<a)c();else{var n=i.end(),u=new(E());u.append(n),u.append(e.name);var l=u.end();r(l)}},u.onerror=function(){n(new Error("File slcie failed"))},c()})).catch((function(e){console.log(e)}))};function j(e){return Date.now()+e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const F=(0,r.defineComponent)({name:"Upload",props:d,emits:["exceed","progress","success","error","delete","done"],setup:function(n,u){var c=u.slots,f=u.emit,d=u.expose,p=(0,r.shallowRef)({}),h=(0,r.computed)((function(){return n.theme===i.PICTURE})),v=(0,r.computed)((function(){return h.value&&!n.multiple})),m=(0,r.computed)((function(){var r,a;return(0,e.classes)((t(r={},s,!0),t(r,"".concat(s,"--").concat(n.theme),!0),t(r,"".concat(s,"--disabled"),n.disabled),t(r,"".concat(s,"--single-picture"),v.value),t(r,n.extCls,null!==(a=n.extCls)&&void 0!==a&&a),r))})),y=(0,r.computed)((function(){return{theme:n.theme,multiple:n.multiple,disabled:n.disabled,accept:n.accept}})),g=function(e,t){var n=(0,r.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),i=(0,r.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),u=(0,r.ref)([]);function c(e){return u.value.find((function(t){return t.uid===e.uid}))}var s=0;return(0,r.watch)((function(){return e.files}),(function(e){u.value=e.map((function(e){var t,r;return s+=1,Object.assign(Object.assign({},e),{uid:null!==(t=e.uid)&&void 0!==t?t:j(s),status:null!==(r=e.status)&&void 0!==r?r:l.SUCCESS})}))}),{immediate:!0,deep:!0}),{fileList:u,handlePreprocess:function(t){var r;s+=1,t.uid=j(s);var a={uid:t.uid,name:t.name,status:l.NEW,size:t.size,raw:t},o=t.type.startsWith("image/"),c=null;if(o){try{a.url=window.URL.createObjectURL(t)}catch(e){console.error(e)}a.isPic=!0}return e.validateName&&!(null===(r=e.validateName)||void 0===r?void 0:r.test(a.name))&&(a.status=l.FAIL,a.statusText="invalid filename",c=new Error(a.statusText)),o&&t.size>n.value*Math.pow(1024,2)&&(a.status=l.FAIL,a.statusText="invalid file size",c=new Error(a.statusText)),!o&&t.size>i.value*Math.pow(1024,2)&&(a.status=l.FAIL,a.statusText="invalid file size",c=new Error(a.statusText)),u.value.push(a),c},handleRemove:function(r){var n;return o(this,void 0,void 0,a().mark((function o(){var i,l;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(i=r instanceof File?c(r):r,l=function(e){var r;t.onRemove(e,u.value),u.value.splice(u.value.indexOf(i),1),(null===(r=e.url)||void 0===r?void 0:r.startsWith("blob:"))&&URL.revokeObjectURL(e.url)},!e.beforeRemove){a.next=9;break}return a.next=5,null===(n=e.beforeRemove)||void 0===n?void 0:n.call(e,i,u.value);case 5:!1!==a.sent&&l(i),a.next=10;break;case 9:l(i);case 10:case"end":return a.stop()}}),o)})))},handleError:function(e,t,r){return o(this,void 0,void 0,a().mark((function n(){var o;return a().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=c(t)){n.next=3;break}return n.abrupt("return");case 3:o.status="fail",o.statusText=e.message,o.response=r;case 6:case"end":return n.stop()}}),n)})))},handleSuccess:function(e,t){return o(this,void 0,void 0,a().mark((function r(){var n;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=c(t)){r.next=3;break}return r.abrupt("return");case 3:n.status="success",n.response=e;case 5:case"end":return r.stop()}}),r)})))},handleProgress:function(e,t){return o(this,void 0,void 0,a().mark((function r(){var n;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=c(t)){r.next=3;break}return r.abrupt("return");case 3:n.status="uploading",n.percentage=Math.round(e.percent);case 5:case"end":return r.stop()}}),r)})))}}}(n,{onRemove:function(e,r){!function(e){var r=p.value;e&&(r=t({},e.uid,p.value[e.uid])),Object.keys(r).forEach((function(e){if(r[e]instanceof XMLHttpRequest){var t=r[e];null==t||t.abort()}delete p.value[e]}))}(e),f("delete",e,r)}}),b=g.fileList,_=g.handlePreprocess,x=g.handleRemove,S=g.handleProgress,N=g.handleSuccess,E=g.handleError;function L(e){if(e.length)if(n.limit&&b.value.length+e.length>n.limit)f("exceed",e,b.value);else{var t=e;n.multiple&&1!==n.limit||(t=e.slice(0,1));var r,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=r.value,i=_(o);if(i)return void f("error",o,b.value,i);n.autoUpload&&U(o,t)}}catch(e){a.e(e)}finally{a.f()}}}function T(e){C(e.raw)}function U(e,t){var r;return o(this,void 0,void 0,a().mark((function o(){var i;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(n.beforeUpload){a.next=2;break}return a.abrupt("return",C(e,t));case 2:return a.prev=2,a.next=5,null===(r=n.beforeUpload)||void 0===r?void 0:r.call(n,e);case 5:i=a.sent,a.next=11;break;case 8:a.prev=8,a.t0=a.catch(2),i=!1;case 11:if(!1!==i){a.next=14;break}return x(e),a.abrupt("return");case 14:C(e,t);case 15:case"end":return a.stop()}}),o,null,[[2,8]])})))}function C(e,t){var r=n.headers,a=n.header,o=n.data,i=n.formDataAttributes,u=n.method,c=n.withCredentials,l=n.name,s=n.url,d=n.sliceUrl,h=n.mergeUrl,v=n.chunkSize,m=n.customRequest,y=e.uid,g={headers:r,header:a,withCredentials:c,file:e,data:o,formDataAttributes:i,method:u,filename:l,action:s,sliceUrl:d,mergeUrl:h,chunkSize:v,onProgress:function(t){S(t,e),f("progress",t,e,b.value)},onSuccess:function(t){var r,a=t;if(null===(r=null==n?void 0:n.handleResCode)||void 0===r?void 0:r.call(n,a))N(t,e),f("success",t,e,b.value);else{var o=new Error((null==a?void 0:a.message)||"unknow error");E(o,e,t),f("error",e,b.value,o)}delete p.value[y]},onError:function(t){E(t,e),f("error",e,b.value,t),delete p.value[y]},onComplete:function(){t&&t.indexOf(e)===t.length-1&&f("done",b.value)}},w=n.sliceUpload?R:V;m&&(w=m);var _=w(g);p.value[y]=_,_ instanceof Promise&&_.then(g.onSuccess,g.onError)}return(0,r.onBeforeUnmount)((function(){b.value.forEach((function(e){var t=e.url;(null==t?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(t)}))})),d({handleRemove:x,handleRetry:T}),function(){return(0,r.createVNode)("div",{class:m.value},[!h.value&&(0,r.createVNode)(A,(0,r.mergeProps)(y.value,{onChange:L}),c),c.tip?c.tip():n.tip&&(0,r.createVNode)("div",{class:"".concat(s,"__tip")},[n.tip]),(0,r.createVNode)(w,{files:b.value,theme:n.theme,disabled:n.disabled,multiple:n.multiple,onRemove:x,onRetry:T},{innerTrigger:function(e){return h.value&&(0,r.createVNode)(A,(0,r.mergeProps)(y.value,{file:e,onChange:L,onRemove:x}),c)},file:c.file})])}}}),k=(0,e.withInstall)(F)})(),c})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../icon"), require("../progress"), require("../button"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../icon", "../progress", "../button"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../icon"), require("../progress"), require("../button")) : factory(root["../shared"], root["vue"], root["../icon"], root["../progress"], root["../button"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__3522__, __WEBPACK_EXTERNAL_MODULE__4976__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 7162:
15
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
+
17
+ module.exports = __webpack_require__(5047);
18
+
19
+
20
+ /***/ }),
21
+
22
+ /***/ 5047:
23
+ /***/ ((module) => {
24
+
25
+ /**
26
+ * Copyright (c) 2014-present, Facebook, Inc.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ */
31
+
32
+ var runtime = (function (exports) {
33
+ "use strict";
34
+
35
+ var Op = Object.prototype;
36
+ var hasOwn = Op.hasOwnProperty;
37
+ var undefined; // More compressible than void 0.
38
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
39
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
40
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
41
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
42
+
43
+ function define(obj, key, value) {
44
+ Object.defineProperty(obj, key, {
45
+ value: value,
46
+ enumerable: true,
47
+ configurable: true,
48
+ writable: true
49
+ });
50
+ return obj[key];
51
+ }
52
+ try {
53
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
54
+ define({}, "");
55
+ } catch (err) {
56
+ define = function(obj, key, value) {
57
+ return obj[key] = value;
58
+ };
59
+ }
60
+
61
+ function wrap(innerFn, outerFn, self, tryLocsList) {
62
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
63
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
64
+ var generator = Object.create(protoGenerator.prototype);
65
+ var context = new Context(tryLocsList || []);
66
+
67
+ // The ._invoke method unifies the implementations of the .next,
68
+ // .throw, and .return methods.
69
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
70
+
71
+ return generator;
72
+ }
73
+ exports.wrap = wrap;
74
+
75
+ // Try/catch helper to minimize deoptimizations. Returns a completion
76
+ // record like context.tryEntries[i].completion. This interface could
77
+ // have been (and was previously) designed to take a closure to be
78
+ // invoked without arguments, but in all the cases we care about we
79
+ // already have an existing method we want to call, so there's no need
80
+ // to create a new function object. We can even get away with assuming
81
+ // the method takes exactly one argument, since that happens to be true
82
+ // in every case, so we don't have to touch the arguments object. The
83
+ // only additional allocation required is the completion record, which
84
+ // has a stable shape and so hopefully should be cheap to allocate.
85
+ function tryCatch(fn, obj, arg) {
86
+ try {
87
+ return { type: "normal", arg: fn.call(obj, arg) };
88
+ } catch (err) {
89
+ return { type: "throw", arg: err };
90
+ }
91
+ }
92
+
93
+ var GenStateSuspendedStart = "suspendedStart";
94
+ var GenStateSuspendedYield = "suspendedYield";
95
+ var GenStateExecuting = "executing";
96
+ var GenStateCompleted = "completed";
97
+
98
+ // Returning this object from the innerFn has the same effect as
99
+ // breaking out of the dispatch switch statement.
100
+ var ContinueSentinel = {};
101
+
102
+ // Dummy constructor functions that we use as the .constructor and
103
+ // .constructor.prototype properties for functions that return Generator
104
+ // objects. For full spec compliance, you may wish to configure your
105
+ // minifier not to mangle the names of these two functions.
106
+ function Generator() {}
107
+ function GeneratorFunction() {}
108
+ function GeneratorFunctionPrototype() {}
109
+
110
+ // This is a polyfill for %IteratorPrototype% for environments that
111
+ // don't natively support it.
112
+ var IteratorPrototype = {};
113
+ define(IteratorPrototype, iteratorSymbol, function () {
114
+ return this;
115
+ });
116
+
117
+ var getProto = Object.getPrototypeOf;
118
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
119
+ if (NativeIteratorPrototype &&
120
+ NativeIteratorPrototype !== Op &&
121
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
122
+ // This environment has a native %IteratorPrototype%; use it instead
123
+ // of the polyfill.
124
+ IteratorPrototype = NativeIteratorPrototype;
125
+ }
126
+
127
+ var Gp = GeneratorFunctionPrototype.prototype =
128
+ Generator.prototype = Object.create(IteratorPrototype);
129
+ GeneratorFunction.prototype = GeneratorFunctionPrototype;
130
+ define(Gp, "constructor", GeneratorFunctionPrototype);
131
+ define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
132
+ GeneratorFunction.displayName = define(
133
+ GeneratorFunctionPrototype,
134
+ toStringTagSymbol,
135
+ "GeneratorFunction"
136
+ );
137
+
138
+ // Helper for defining the .next, .throw, and .return methods of the
139
+ // Iterator interface in terms of a single ._invoke method.
140
+ function defineIteratorMethods(prototype) {
141
+ ["next", "throw", "return"].forEach(function(method) {
142
+ define(prototype, method, function(arg) {
143
+ return this._invoke(method, arg);
144
+ });
145
+ });
146
+ }
147
+
148
+ exports.isGeneratorFunction = function(genFun) {
149
+ var ctor = typeof genFun === "function" && genFun.constructor;
150
+ return ctor
151
+ ? ctor === GeneratorFunction ||
152
+ // For the native GeneratorFunction constructor, the best we can
153
+ // do is to check its .name property.
154
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
155
+ : false;
156
+ };
157
+
158
+ exports.mark = function(genFun) {
159
+ if (Object.setPrototypeOf) {
160
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
161
+ } else {
162
+ genFun.__proto__ = GeneratorFunctionPrototype;
163
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
164
+ }
165
+ genFun.prototype = Object.create(Gp);
166
+ return genFun;
167
+ };
168
+
169
+ // Within the body of any async function, `await x` is transformed to
170
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
171
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
172
+ // meant to be awaited.
173
+ exports.awrap = function(arg) {
174
+ return { __await: arg };
175
+ };
176
+
177
+ function AsyncIterator(generator, PromiseImpl) {
178
+ function invoke(method, arg, resolve, reject) {
179
+ var record = tryCatch(generator[method], generator, arg);
180
+ if (record.type === "throw") {
181
+ reject(record.arg);
182
+ } else {
183
+ var result = record.arg;
184
+ var value = result.value;
185
+ if (value &&
186
+ typeof value === "object" &&
187
+ hasOwn.call(value, "__await")) {
188
+ return PromiseImpl.resolve(value.__await).then(function(value) {
189
+ invoke("next", value, resolve, reject);
190
+ }, function(err) {
191
+ invoke("throw", err, resolve, reject);
192
+ });
193
+ }
194
+
195
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
196
+ // When a yielded Promise is resolved, its final value becomes
197
+ // the .value of the Promise<{value,done}> result for the
198
+ // current iteration.
199
+ result.value = unwrapped;
200
+ resolve(result);
201
+ }, function(error) {
202
+ // If a rejected Promise was yielded, throw the rejection back
203
+ // into the async generator function so it can be handled there.
204
+ return invoke("throw", error, resolve, reject);
205
+ });
206
+ }
207
+ }
208
+
209
+ var previousPromise;
210
+
211
+ function enqueue(method, arg) {
212
+ function callInvokeWithMethodAndArg() {
213
+ return new PromiseImpl(function(resolve, reject) {
214
+ invoke(method, arg, resolve, reject);
215
+ });
216
+ }
217
+
218
+ return previousPromise =
219
+ // If enqueue has been called before, then we want to wait until
220
+ // all previous Promises have been resolved before calling invoke,
221
+ // so that results are always delivered in the correct order. If
222
+ // enqueue has not been called before, then it is important to
223
+ // call invoke immediately, without waiting on a callback to fire,
224
+ // so that the async generator function has the opportunity to do
225
+ // any necessary setup in a predictable way. This predictability
226
+ // is why the Promise constructor synchronously invokes its
227
+ // executor callback, and why async functions synchronously
228
+ // execute code before the first await. Since we implement simple
229
+ // async functions in terms of async generators, it is especially
230
+ // important to get this right, even though it requires care.
231
+ previousPromise ? previousPromise.then(
232
+ callInvokeWithMethodAndArg,
233
+ // Avoid propagating failures to Promises returned by later
234
+ // invocations of the iterator.
235
+ callInvokeWithMethodAndArg
236
+ ) : callInvokeWithMethodAndArg();
237
+ }
238
+
239
+ // Define the unified helper method that is used to implement .next,
240
+ // .throw, and .return (see defineIteratorMethods).
241
+ this._invoke = enqueue;
242
+ }
243
+
244
+ defineIteratorMethods(AsyncIterator.prototype);
245
+ define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
246
+ return this;
247
+ });
248
+ exports.AsyncIterator = AsyncIterator;
249
+
250
+ // Note that simple async functions are implemented on top of
251
+ // AsyncIterator objects; they just return a Promise for the value of
252
+ // the final result produced by the iterator.
253
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
254
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
255
+
256
+ var iter = new AsyncIterator(
257
+ wrap(innerFn, outerFn, self, tryLocsList),
258
+ PromiseImpl
259
+ );
260
+
261
+ return exports.isGeneratorFunction(outerFn)
262
+ ? iter // If outerFn is a generator, return the full iterator.
263
+ : iter.next().then(function(result) {
264
+ return result.done ? result.value : iter.next();
265
+ });
266
+ };
267
+
268
+ function makeInvokeMethod(innerFn, self, context) {
269
+ var state = GenStateSuspendedStart;
270
+
271
+ return function invoke(method, arg) {
272
+ if (state === GenStateExecuting) {
273
+ throw new Error("Generator is already running");
274
+ }
275
+
276
+ if (state === GenStateCompleted) {
277
+ if (method === "throw") {
278
+ throw arg;
279
+ }
280
+
281
+ // Be forgiving, per 25.3.3.3.3 of the spec:
282
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
283
+ return doneResult();
284
+ }
285
+
286
+ context.method = method;
287
+ context.arg = arg;
288
+
289
+ while (true) {
290
+ var delegate = context.delegate;
291
+ if (delegate) {
292
+ var delegateResult = maybeInvokeDelegate(delegate, context);
293
+ if (delegateResult) {
294
+ if (delegateResult === ContinueSentinel) continue;
295
+ return delegateResult;
296
+ }
297
+ }
298
+
299
+ if (context.method === "next") {
300
+ // Setting context._sent for legacy support of Babel's
301
+ // function.sent implementation.
302
+ context.sent = context._sent = context.arg;
303
+
304
+ } else if (context.method === "throw") {
305
+ if (state === GenStateSuspendedStart) {
306
+ state = GenStateCompleted;
307
+ throw context.arg;
308
+ }
309
+
310
+ context.dispatchException(context.arg);
311
+
312
+ } else if (context.method === "return") {
313
+ context.abrupt("return", context.arg);
314
+ }
315
+
316
+ state = GenStateExecuting;
317
+
318
+ var record = tryCatch(innerFn, self, context);
319
+ if (record.type === "normal") {
320
+ // If an exception is thrown from innerFn, we leave state ===
321
+ // GenStateExecuting and loop back for another invocation.
322
+ state = context.done
323
+ ? GenStateCompleted
324
+ : GenStateSuspendedYield;
325
+
326
+ if (record.arg === ContinueSentinel) {
327
+ continue;
328
+ }
329
+
330
+ return {
331
+ value: record.arg,
332
+ done: context.done
333
+ };
334
+
335
+ } else if (record.type === "throw") {
336
+ state = GenStateCompleted;
337
+ // Dispatch the exception by looping back around to the
338
+ // context.dispatchException(context.arg) call above.
339
+ context.method = "throw";
340
+ context.arg = record.arg;
341
+ }
342
+ }
343
+ };
344
+ }
345
+
346
+ // Call delegate.iterator[context.method](context.arg) and handle the
347
+ // result, either by returning a { value, done } result from the
348
+ // delegate iterator, or by modifying context.method and context.arg,
349
+ // setting context.delegate to null, and returning the ContinueSentinel.
350
+ function maybeInvokeDelegate(delegate, context) {
351
+ var method = delegate.iterator[context.method];
352
+ if (method === undefined) {
353
+ // A .throw or .return when the delegate iterator has no .throw
354
+ // method always terminates the yield* loop.
355
+ context.delegate = null;
356
+
357
+ if (context.method === "throw") {
358
+ // Note: ["return"] must be used for ES3 parsing compatibility.
359
+ if (delegate.iterator["return"]) {
360
+ // If the delegate iterator has a return method, give it a
361
+ // chance to clean up.
362
+ context.method = "return";
363
+ context.arg = undefined;
364
+ maybeInvokeDelegate(delegate, context);
365
+
366
+ if (context.method === "throw") {
367
+ // If maybeInvokeDelegate(context) changed context.method from
368
+ // "return" to "throw", let that override the TypeError below.
369
+ return ContinueSentinel;
370
+ }
371
+ }
372
+
373
+ context.method = "throw";
374
+ context.arg = new TypeError(
375
+ "The iterator does not provide a 'throw' method");
376
+ }
377
+
378
+ return ContinueSentinel;
379
+ }
380
+
381
+ var record = tryCatch(method, delegate.iterator, context.arg);
382
+
383
+ if (record.type === "throw") {
384
+ context.method = "throw";
385
+ context.arg = record.arg;
386
+ context.delegate = null;
387
+ return ContinueSentinel;
388
+ }
389
+
390
+ var info = record.arg;
391
+
392
+ if (! info) {
393
+ context.method = "throw";
394
+ context.arg = new TypeError("iterator result is not an object");
395
+ context.delegate = null;
396
+ return ContinueSentinel;
397
+ }
398
+
399
+ if (info.done) {
400
+ // Assign the result of the finished delegate to the temporary
401
+ // variable specified by delegate.resultName (see delegateYield).
402
+ context[delegate.resultName] = info.value;
403
+
404
+ // Resume execution at the desired location (see delegateYield).
405
+ context.next = delegate.nextLoc;
406
+
407
+ // If context.method was "throw" but the delegate handled the
408
+ // exception, let the outer generator proceed normally. If
409
+ // context.method was "next", forget context.arg since it has been
410
+ // "consumed" by the delegate iterator. If context.method was
411
+ // "return", allow the original .return call to continue in the
412
+ // outer generator.
413
+ if (context.method !== "return") {
414
+ context.method = "next";
415
+ context.arg = undefined;
416
+ }
417
+
418
+ } else {
419
+ // Re-yield the result returned by the delegate method.
420
+ return info;
421
+ }
422
+
423
+ // The delegate iterator is finished, so forget it and continue with
424
+ // the outer generator.
425
+ context.delegate = null;
426
+ return ContinueSentinel;
427
+ }
428
+
429
+ // Define Generator.prototype.{next,throw,return} in terms of the
430
+ // unified ._invoke helper method.
431
+ defineIteratorMethods(Gp);
432
+
433
+ define(Gp, toStringTagSymbol, "Generator");
434
+
435
+ // A Generator should always return itself as the iterator object when the
436
+ // @@iterator function is called on it. Some browsers' implementations of the
437
+ // iterator prototype chain incorrectly implement this, causing the Generator
438
+ // object to not be returned from this call. This ensures that doesn't happen.
439
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
440
+ define(Gp, iteratorSymbol, function() {
441
+ return this;
442
+ });
443
+
444
+ define(Gp, "toString", function() {
445
+ return "[object Generator]";
446
+ });
447
+
448
+ function pushTryEntry(locs) {
449
+ var entry = { tryLoc: locs[0] };
450
+
451
+ if (1 in locs) {
452
+ entry.catchLoc = locs[1];
453
+ }
454
+
455
+ if (2 in locs) {
456
+ entry.finallyLoc = locs[2];
457
+ entry.afterLoc = locs[3];
458
+ }
459
+
460
+ this.tryEntries.push(entry);
461
+ }
462
+
463
+ function resetTryEntry(entry) {
464
+ var record = entry.completion || {};
465
+ record.type = "normal";
466
+ delete record.arg;
467
+ entry.completion = record;
468
+ }
469
+
470
+ function Context(tryLocsList) {
471
+ // The root entry object (effectively a try statement without a catch
472
+ // or a finally block) gives us a place to store values thrown from
473
+ // locations where there is no enclosing try statement.
474
+ this.tryEntries = [{ tryLoc: "root" }];
475
+ tryLocsList.forEach(pushTryEntry, this);
476
+ this.reset(true);
477
+ }
478
+
479
+ exports.keys = function(object) {
480
+ var keys = [];
481
+ for (var key in object) {
482
+ keys.push(key);
483
+ }
484
+ keys.reverse();
485
+
486
+ // Rather than returning an object with a next method, we keep
487
+ // things simple and return the next function itself.
488
+ return function next() {
489
+ while (keys.length) {
490
+ var key = keys.pop();
491
+ if (key in object) {
492
+ next.value = key;
493
+ next.done = false;
494
+ return next;
495
+ }
496
+ }
497
+
498
+ // To avoid creating an additional object, we just hang the .value
499
+ // and .done properties off the next function object itself. This
500
+ // also ensures that the minifier will not anonymize the function.
501
+ next.done = true;
502
+ return next;
503
+ };
504
+ };
505
+
506
+ function values(iterable) {
507
+ if (iterable) {
508
+ var iteratorMethod = iterable[iteratorSymbol];
509
+ if (iteratorMethod) {
510
+ return iteratorMethod.call(iterable);
511
+ }
512
+
513
+ if (typeof iterable.next === "function") {
514
+ return iterable;
515
+ }
516
+
517
+ if (!isNaN(iterable.length)) {
518
+ var i = -1, next = function next() {
519
+ while (++i < iterable.length) {
520
+ if (hasOwn.call(iterable, i)) {
521
+ next.value = iterable[i];
522
+ next.done = false;
523
+ return next;
524
+ }
525
+ }
526
+
527
+ next.value = undefined;
528
+ next.done = true;
529
+
530
+ return next;
531
+ };
532
+
533
+ return next.next = next;
534
+ }
535
+ }
536
+
537
+ // Return an iterator with no values.
538
+ return { next: doneResult };
539
+ }
540
+ exports.values = values;
541
+
542
+ function doneResult() {
543
+ return { value: undefined, done: true };
544
+ }
545
+
546
+ Context.prototype = {
547
+ constructor: Context,
548
+
549
+ reset: function(skipTempReset) {
550
+ this.prev = 0;
551
+ this.next = 0;
552
+ // Resetting context._sent for legacy support of Babel's
553
+ // function.sent implementation.
554
+ this.sent = this._sent = undefined;
555
+ this.done = false;
556
+ this.delegate = null;
557
+
558
+ this.method = "next";
559
+ this.arg = undefined;
560
+
561
+ this.tryEntries.forEach(resetTryEntry);
562
+
563
+ if (!skipTempReset) {
564
+ for (var name in this) {
565
+ // Not sure about the optimal order of these conditions:
566
+ if (name.charAt(0) === "t" &&
567
+ hasOwn.call(this, name) &&
568
+ !isNaN(+name.slice(1))) {
569
+ this[name] = undefined;
570
+ }
571
+ }
572
+ }
573
+ },
574
+
575
+ stop: function() {
576
+ this.done = true;
577
+
578
+ var rootEntry = this.tryEntries[0];
579
+ var rootRecord = rootEntry.completion;
580
+ if (rootRecord.type === "throw") {
581
+ throw rootRecord.arg;
582
+ }
583
+
584
+ return this.rval;
585
+ },
586
+
587
+ dispatchException: function(exception) {
588
+ if (this.done) {
589
+ throw exception;
590
+ }
591
+
592
+ var context = this;
593
+ function handle(loc, caught) {
594
+ record.type = "throw";
595
+ record.arg = exception;
596
+ context.next = loc;
597
+
598
+ if (caught) {
599
+ // If the dispatched exception was caught by a catch block,
600
+ // then let that catch block handle the exception normally.
601
+ context.method = "next";
602
+ context.arg = undefined;
603
+ }
604
+
605
+ return !! caught;
606
+ }
607
+
608
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
609
+ var entry = this.tryEntries[i];
610
+ var record = entry.completion;
611
+
612
+ if (entry.tryLoc === "root") {
613
+ // Exception thrown outside of any try block that could handle
614
+ // it, so set the completion value of the entire function to
615
+ // throw the exception.
616
+ return handle("end");
617
+ }
618
+
619
+ if (entry.tryLoc <= this.prev) {
620
+ var hasCatch = hasOwn.call(entry, "catchLoc");
621
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
622
+
623
+ if (hasCatch && hasFinally) {
624
+ if (this.prev < entry.catchLoc) {
625
+ return handle(entry.catchLoc, true);
626
+ } else if (this.prev < entry.finallyLoc) {
627
+ return handle(entry.finallyLoc);
628
+ }
629
+
630
+ } else if (hasCatch) {
631
+ if (this.prev < entry.catchLoc) {
632
+ return handle(entry.catchLoc, true);
633
+ }
634
+
635
+ } else if (hasFinally) {
636
+ if (this.prev < entry.finallyLoc) {
637
+ return handle(entry.finallyLoc);
638
+ }
639
+
640
+ } else {
641
+ throw new Error("try statement without catch or finally");
642
+ }
643
+ }
644
+ }
645
+ },
646
+
647
+ abrupt: function(type, arg) {
648
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
649
+ var entry = this.tryEntries[i];
650
+ if (entry.tryLoc <= this.prev &&
651
+ hasOwn.call(entry, "finallyLoc") &&
652
+ this.prev < entry.finallyLoc) {
653
+ var finallyEntry = entry;
654
+ break;
655
+ }
656
+ }
657
+
658
+ if (finallyEntry &&
659
+ (type === "break" ||
660
+ type === "continue") &&
661
+ finallyEntry.tryLoc <= arg &&
662
+ arg <= finallyEntry.finallyLoc) {
663
+ // Ignore the finally entry if control is not jumping to a
664
+ // location outside the try/catch block.
665
+ finallyEntry = null;
666
+ }
667
+
668
+ var record = finallyEntry ? finallyEntry.completion : {};
669
+ record.type = type;
670
+ record.arg = arg;
671
+
672
+ if (finallyEntry) {
673
+ this.method = "next";
674
+ this.next = finallyEntry.finallyLoc;
675
+ return ContinueSentinel;
676
+ }
677
+
678
+ return this.complete(record);
679
+ },
680
+
681
+ complete: function(record, afterLoc) {
682
+ if (record.type === "throw") {
683
+ throw record.arg;
684
+ }
685
+
686
+ if (record.type === "break" ||
687
+ record.type === "continue") {
688
+ this.next = record.arg;
689
+ } else if (record.type === "return") {
690
+ this.rval = this.arg = record.arg;
691
+ this.method = "return";
692
+ this.next = "end";
693
+ } else if (record.type === "normal" && afterLoc) {
694
+ this.next = afterLoc;
695
+ }
696
+
697
+ return ContinueSentinel;
698
+ },
699
+
700
+ finish: function(finallyLoc) {
701
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
702
+ var entry = this.tryEntries[i];
703
+ if (entry.finallyLoc === finallyLoc) {
704
+ this.complete(entry.completion, entry.afterLoc);
705
+ resetTryEntry(entry);
706
+ return ContinueSentinel;
707
+ }
708
+ }
709
+ },
710
+
711
+ "catch": function(tryLoc) {
712
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
713
+ var entry = this.tryEntries[i];
714
+ if (entry.tryLoc === tryLoc) {
715
+ var record = entry.completion;
716
+ if (record.type === "throw") {
717
+ var thrown = record.arg;
718
+ resetTryEntry(entry);
719
+ }
720
+ return thrown;
721
+ }
722
+ }
723
+
724
+ // The context.catch method must only be called with a location
725
+ // argument that corresponds to a known catch block.
726
+ throw new Error("illegal catch attempt");
727
+ },
728
+
729
+ delegateYield: function(iterable, resultName, nextLoc) {
730
+ this.delegate = {
731
+ iterator: values(iterable),
732
+ resultName: resultName,
733
+ nextLoc: nextLoc
734
+ };
735
+
736
+ if (this.method === "next") {
737
+ // Deliberately forget the last sent value so that we don't
738
+ // accidentally pass it on to the delegate.
739
+ this.arg = undefined;
740
+ }
741
+
742
+ return ContinueSentinel;
743
+ }
744
+ };
745
+
746
+ // Regardless of whether this script is executing as a CommonJS module
747
+ // or not, return the runtime object so that we can declare the variable
748
+ // regeneratorRuntime in the outer scope, which allows this module to be
749
+ // injected easily by `bin/regenerator --include-runtime script.js`.
750
+ return exports;
751
+
752
+ }(
753
+ // If this script is executing as a CommonJS module, use module.exports
754
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
755
+ // object. Either way, the resulting object will be used to initialize
756
+ // the regeneratorRuntime variable at the top of this file.
757
+ true ? module.exports : 0
758
+ ));
759
+
760
+ try {
761
+ regeneratorRuntime = runtime;
762
+ } catch (accidentalStrictMode) {
763
+ // This module should not be running in strict mode, so the above
764
+ // assignment should always work unless something is misconfigured. Just
765
+ // in case runtime.js accidentally runs in strict mode, in modern engines
766
+ // we can explicitly access globalThis. In older engines we can escape
767
+ // strict mode using a global Function call. This could conceivably fail
768
+ // if a Content Security Policy forbids using Function, but in that case
769
+ // the proper solution is to fix the accidental strict mode problem. If
770
+ // you've misconfigured your bundler to force strict mode and applied a
771
+ // CSP to forbid Function, and you're not willing to fix either of those
772
+ // problems, please detail your unique predicament in a GitHub issue.
773
+ if (typeof globalThis === "object") {
774
+ globalThis.regeneratorRuntime = runtime;
775
+ } else {
776
+ Function("r", "regeneratorRuntime = r")(runtime);
777
+ }
778
+ }
779
+
780
+
781
+ /***/ }),
782
+
783
+ /***/ 4791:
784
+ /***/ ((module) => {
785
+
786
+ (function (factory) {
787
+ if (true) {
788
+ // Node/CommonJS
789
+ module.exports = factory();
790
+ } else { var glob; }
791
+ }(function (undefined) {
792
+
793
+ 'use strict';
794
+
795
+ /*
796
+ * Fastest md5 implementation around (JKM md5).
797
+ * Credits: Joseph Myers
798
+ *
799
+ * @see http://www.myersdaily.org/joseph/javascript/md5-text.html
800
+ * @see http://jsperf.com/md5-shootout/7
801
+ */
802
+
803
+ /* this function is much faster,
804
+ so if possible we use it. Some IEs
805
+ are the only ones I know of that
806
+ need the idiotic second function,
807
+ generated by an if clause. */
808
+ var add32 = function (a, b) {
809
+ return (a + b) & 0xFFFFFFFF;
810
+ },
811
+ hex_chr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
812
+
813
+
814
+ function cmn(q, a, b, x, s, t) {
815
+ a = add32(add32(a, q), add32(x, t));
816
+ return add32((a << s) | (a >>> (32 - s)), b);
817
+ }
818
+
819
+ function md5cycle(x, k) {
820
+ var a = x[0],
821
+ b = x[1],
822
+ c = x[2],
823
+ d = x[3];
824
+
825
+ a += (b & c | ~b & d) + k[0] - 680876936 | 0;
826
+ a = (a << 7 | a >>> 25) + b | 0;
827
+ d += (a & b | ~a & c) + k[1] - 389564586 | 0;
828
+ d = (d << 12 | d >>> 20) + a | 0;
829
+ c += (d & a | ~d & b) + k[2] + 606105819 | 0;
830
+ c = (c << 17 | c >>> 15) + d | 0;
831
+ b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
832
+ b = (b << 22 | b >>> 10) + c | 0;
833
+ a += (b & c | ~b & d) + k[4] - 176418897 | 0;
834
+ a = (a << 7 | a >>> 25) + b | 0;
835
+ d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
836
+ d = (d << 12 | d >>> 20) + a | 0;
837
+ c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
838
+ c = (c << 17 | c >>> 15) + d | 0;
839
+ b += (c & d | ~c & a) + k[7] - 45705983 | 0;
840
+ b = (b << 22 | b >>> 10) + c | 0;
841
+ a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
842
+ a = (a << 7 | a >>> 25) + b | 0;
843
+ d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
844
+ d = (d << 12 | d >>> 20) + a | 0;
845
+ c += (d & a | ~d & b) + k[10] - 42063 | 0;
846
+ c = (c << 17 | c >>> 15) + d | 0;
847
+ b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
848
+ b = (b << 22 | b >>> 10) + c | 0;
849
+ a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
850
+ a = (a << 7 | a >>> 25) + b | 0;
851
+ d += (a & b | ~a & c) + k[13] - 40341101 | 0;
852
+ d = (d << 12 | d >>> 20) + a | 0;
853
+ c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
854
+ c = (c << 17 | c >>> 15) + d | 0;
855
+ b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
856
+ b = (b << 22 | b >>> 10) + c | 0;
857
+
858
+ a += (b & d | c & ~d) + k[1] - 165796510 | 0;
859
+ a = (a << 5 | a >>> 27) + b | 0;
860
+ d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
861
+ d = (d << 9 | d >>> 23) + a | 0;
862
+ c += (d & b | a & ~b) + k[11] + 643717713 | 0;
863
+ c = (c << 14 | c >>> 18) + d | 0;
864
+ b += (c & a | d & ~a) + k[0] - 373897302 | 0;
865
+ b = (b << 20 | b >>> 12) + c | 0;
866
+ a += (b & d | c & ~d) + k[5] - 701558691 | 0;
867
+ a = (a << 5 | a >>> 27) + b | 0;
868
+ d += (a & c | b & ~c) + k[10] + 38016083 | 0;
869
+ d = (d << 9 | d >>> 23) + a | 0;
870
+ c += (d & b | a & ~b) + k[15] - 660478335 | 0;
871
+ c = (c << 14 | c >>> 18) + d | 0;
872
+ b += (c & a | d & ~a) + k[4] - 405537848 | 0;
873
+ b = (b << 20 | b >>> 12) + c | 0;
874
+ a += (b & d | c & ~d) + k[9] + 568446438 | 0;
875
+ a = (a << 5 | a >>> 27) + b | 0;
876
+ d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
877
+ d = (d << 9 | d >>> 23) + a | 0;
878
+ c += (d & b | a & ~b) + k[3] - 187363961 | 0;
879
+ c = (c << 14 | c >>> 18) + d | 0;
880
+ b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
881
+ b = (b << 20 | b >>> 12) + c | 0;
882
+ a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
883
+ a = (a << 5 | a >>> 27) + b | 0;
884
+ d += (a & c | b & ~c) + k[2] - 51403784 | 0;
885
+ d = (d << 9 | d >>> 23) + a | 0;
886
+ c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
887
+ c = (c << 14 | c >>> 18) + d | 0;
888
+ b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
889
+ b = (b << 20 | b >>> 12) + c | 0;
890
+
891
+ a += (b ^ c ^ d) + k[5] - 378558 | 0;
892
+ a = (a << 4 | a >>> 28) + b | 0;
893
+ d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
894
+ d = (d << 11 | d >>> 21) + a | 0;
895
+ c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
896
+ c = (c << 16 | c >>> 16) + d | 0;
897
+ b += (c ^ d ^ a) + k[14] - 35309556 | 0;
898
+ b = (b << 23 | b >>> 9) + c | 0;
899
+ a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
900
+ a = (a << 4 | a >>> 28) + b | 0;
901
+ d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
902
+ d = (d << 11 | d >>> 21) + a | 0;
903
+ c += (d ^ a ^ b) + k[7] - 155497632 | 0;
904
+ c = (c << 16 | c >>> 16) + d | 0;
905
+ b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
906
+ b = (b << 23 | b >>> 9) + c | 0;
907
+ a += (b ^ c ^ d) + k[13] + 681279174 | 0;
908
+ a = (a << 4 | a >>> 28) + b | 0;
909
+ d += (a ^ b ^ c) + k[0] - 358537222 | 0;
910
+ d = (d << 11 | d >>> 21) + a | 0;
911
+ c += (d ^ a ^ b) + k[3] - 722521979 | 0;
912
+ c = (c << 16 | c >>> 16) + d | 0;
913
+ b += (c ^ d ^ a) + k[6] + 76029189 | 0;
914
+ b = (b << 23 | b >>> 9) + c | 0;
915
+ a += (b ^ c ^ d) + k[9] - 640364487 | 0;
916
+ a = (a << 4 | a >>> 28) + b | 0;
917
+ d += (a ^ b ^ c) + k[12] - 421815835 | 0;
918
+ d = (d << 11 | d >>> 21) + a | 0;
919
+ c += (d ^ a ^ b) + k[15] + 530742520 | 0;
920
+ c = (c << 16 | c >>> 16) + d | 0;
921
+ b += (c ^ d ^ a) + k[2] - 995338651 | 0;
922
+ b = (b << 23 | b >>> 9) + c | 0;
923
+
924
+ a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
925
+ a = (a << 6 | a >>> 26) + b | 0;
926
+ d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
927
+ d = (d << 10 | d >>> 22) + a | 0;
928
+ c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
929
+ c = (c << 15 | c >>> 17) + d | 0;
930
+ b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
931
+ b = (b << 21 |b >>> 11) + c | 0;
932
+ a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
933
+ a = (a << 6 | a >>> 26) + b | 0;
934
+ d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
935
+ d = (d << 10 | d >>> 22) + a | 0;
936
+ c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
937
+ c = (c << 15 | c >>> 17) + d | 0;
938
+ b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
939
+ b = (b << 21 |b >>> 11) + c | 0;
940
+ a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
941
+ a = (a << 6 | a >>> 26) + b | 0;
942
+ d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
943
+ d = (d << 10 | d >>> 22) + a | 0;
944
+ c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
945
+ c = (c << 15 | c >>> 17) + d | 0;
946
+ b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
947
+ b = (b << 21 |b >>> 11) + c | 0;
948
+ a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
949
+ a = (a << 6 | a >>> 26) + b | 0;
950
+ d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
951
+ d = (d << 10 | d >>> 22) + a | 0;
952
+ c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
953
+ c = (c << 15 | c >>> 17) + d | 0;
954
+ b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
955
+ b = (b << 21 | b >>> 11) + c | 0;
956
+
957
+ x[0] = a + x[0] | 0;
958
+ x[1] = b + x[1] | 0;
959
+ x[2] = c + x[2] | 0;
960
+ x[3] = d + x[3] | 0;
961
+ }
962
+
963
+ function md5blk(s) {
964
+ var md5blks = [],
965
+ i; /* Andy King said do it this way. */
966
+
967
+ for (i = 0; i < 64; i += 4) {
968
+ md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
969
+ }
970
+ return md5blks;
971
+ }
972
+
973
+ function md5blk_array(a) {
974
+ var md5blks = [],
975
+ i; /* Andy King said do it this way. */
976
+
977
+ for (i = 0; i < 64; i += 4) {
978
+ md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);
979
+ }
980
+ return md5blks;
981
+ }
982
+
983
+ function md51(s) {
984
+ var n = s.length,
985
+ state = [1732584193, -271733879, -1732584194, 271733878],
986
+ i,
987
+ length,
988
+ tail,
989
+ tmp,
990
+ lo,
991
+ hi;
992
+
993
+ for (i = 64; i <= n; i += 64) {
994
+ md5cycle(state, md5blk(s.substring(i - 64, i)));
995
+ }
996
+ s = s.substring(i - 64);
997
+ length = s.length;
998
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
999
+ for (i = 0; i < length; i += 1) {
1000
+ tail[i >> 2] |= s.charCodeAt(i) << ((i % 4) << 3);
1001
+ }
1002
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
1003
+ if (i > 55) {
1004
+ md5cycle(state, tail);
1005
+ for (i = 0; i < 16; i += 1) {
1006
+ tail[i] = 0;
1007
+ }
1008
+ }
1009
+
1010
+ // Beware that the final length might not fit in 32 bits so we take care of that
1011
+ tmp = n * 8;
1012
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
1013
+ lo = parseInt(tmp[2], 16);
1014
+ hi = parseInt(tmp[1], 16) || 0;
1015
+
1016
+ tail[14] = lo;
1017
+ tail[15] = hi;
1018
+
1019
+ md5cycle(state, tail);
1020
+ return state;
1021
+ }
1022
+
1023
+ function md51_array(a) {
1024
+ var n = a.length,
1025
+ state = [1732584193, -271733879, -1732584194, 271733878],
1026
+ i,
1027
+ length,
1028
+ tail,
1029
+ tmp,
1030
+ lo,
1031
+ hi;
1032
+
1033
+ for (i = 64; i <= n; i += 64) {
1034
+ md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
1035
+ }
1036
+
1037
+ // Not sure if it is a bug, however IE10 will always produce a sub array of length 1
1038
+ // containing the last element of the parent array if the sub array specified starts
1039
+ // beyond the length of the parent array - weird.
1040
+ // https://connect.microsoft.com/IE/feedback/details/771452/typed-array-subarray-issue
1041
+ a = (i - 64) < n ? a.subarray(i - 64) : new Uint8Array(0);
1042
+
1043
+ length = a.length;
1044
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
1045
+ for (i = 0; i < length; i += 1) {
1046
+ tail[i >> 2] |= a[i] << ((i % 4) << 3);
1047
+ }
1048
+
1049
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
1050
+ if (i > 55) {
1051
+ md5cycle(state, tail);
1052
+ for (i = 0; i < 16; i += 1) {
1053
+ tail[i] = 0;
1054
+ }
1055
+ }
1056
+
1057
+ // Beware that the final length might not fit in 32 bits so we take care of that
1058
+ tmp = n * 8;
1059
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
1060
+ lo = parseInt(tmp[2], 16);
1061
+ hi = parseInt(tmp[1], 16) || 0;
1062
+
1063
+ tail[14] = lo;
1064
+ tail[15] = hi;
1065
+
1066
+ md5cycle(state, tail);
1067
+
1068
+ return state;
1069
+ }
1070
+
1071
+ function rhex(n) {
1072
+ var s = '',
1073
+ j;
1074
+ for (j = 0; j < 4; j += 1) {
1075
+ s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] + hex_chr[(n >> (j * 8)) & 0x0F];
1076
+ }
1077
+ return s;
1078
+ }
1079
+
1080
+ function hex(x) {
1081
+ var i;
1082
+ for (i = 0; i < x.length; i += 1) {
1083
+ x[i] = rhex(x[i]);
1084
+ }
1085
+ return x.join('');
1086
+ }
1087
+
1088
+ // In some cases the fast add32 function cannot be used..
1089
+ if (hex(md51('hello')) !== '5d41402abc4b2a76b9719d911017c592') {
1090
+ add32 = function (x, y) {
1091
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF),
1092
+ msw = (x >> 16) + (y >> 16) + (lsw >> 16);
1093
+ return (msw << 16) | (lsw & 0xFFFF);
1094
+ };
1095
+ }
1096
+
1097
+ // ---------------------------------------------------
1098
+
1099
+ /**
1100
+ * ArrayBuffer slice polyfill.
1101
+ *
1102
+ * @see https://github.com/ttaubert/node-arraybuffer-slice
1103
+ */
1104
+
1105
+ if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
1106
+ (function () {
1107
+ function clamp(val, length) {
1108
+ val = (val | 0) || 0;
1109
+
1110
+ if (val < 0) {
1111
+ return Math.max(val + length, 0);
1112
+ }
1113
+
1114
+ return Math.min(val, length);
1115
+ }
1116
+
1117
+ ArrayBuffer.prototype.slice = function (from, to) {
1118
+ var length = this.byteLength,
1119
+ begin = clamp(from, length),
1120
+ end = length,
1121
+ num,
1122
+ target,
1123
+ targetArray,
1124
+ sourceArray;
1125
+
1126
+ if (to !== undefined) {
1127
+ end = clamp(to, length);
1128
+ }
1129
+
1130
+ if (begin > end) {
1131
+ return new ArrayBuffer(0);
1132
+ }
1133
+
1134
+ num = end - begin;
1135
+ target = new ArrayBuffer(num);
1136
+ targetArray = new Uint8Array(target);
1137
+
1138
+ sourceArray = new Uint8Array(this, begin, num);
1139
+ targetArray.set(sourceArray);
1140
+
1141
+ return target;
1142
+ };
1143
+ })();
1144
+ }
1145
+
1146
+ // ---------------------------------------------------
1147
+
1148
+ /**
1149
+ * Helpers.
1150
+ */
1151
+
1152
+ function toUtf8(str) {
1153
+ if (/[\u0080-\uFFFF]/.test(str)) {
1154
+ str = unescape(encodeURIComponent(str));
1155
+ }
1156
+
1157
+ return str;
1158
+ }
1159
+
1160
+ function utf8Str2ArrayBuffer(str, returnUInt8Array) {
1161
+ var length = str.length,
1162
+ buff = new ArrayBuffer(length),
1163
+ arr = new Uint8Array(buff),
1164
+ i;
1165
+
1166
+ for (i = 0; i < length; i += 1) {
1167
+ arr[i] = str.charCodeAt(i);
1168
+ }
1169
+
1170
+ return returnUInt8Array ? arr : buff;
1171
+ }
1172
+
1173
+ function arrayBuffer2Utf8Str(buff) {
1174
+ return String.fromCharCode.apply(null, new Uint8Array(buff));
1175
+ }
1176
+
1177
+ function concatenateArrayBuffers(first, second, returnUInt8Array) {
1178
+ var result = new Uint8Array(first.byteLength + second.byteLength);
1179
+
1180
+ result.set(new Uint8Array(first));
1181
+ result.set(new Uint8Array(second), first.byteLength);
1182
+
1183
+ return returnUInt8Array ? result : result.buffer;
1184
+ }
1185
+
1186
+ function hexToBinaryString(hex) {
1187
+ var bytes = [],
1188
+ length = hex.length,
1189
+ x;
1190
+
1191
+ for (x = 0; x < length - 1; x += 2) {
1192
+ bytes.push(parseInt(hex.substr(x, 2), 16));
1193
+ }
1194
+
1195
+ return String.fromCharCode.apply(String, bytes);
1196
+ }
1197
+
1198
+ // ---------------------------------------------------
1199
+
1200
+ /**
1201
+ * SparkMD5 OOP implementation.
1202
+ *
1203
+ * Use this class to perform an incremental md5, otherwise use the
1204
+ * static methods instead.
1205
+ */
1206
+
1207
+ function SparkMD5() {
1208
+ // call reset to init the instance
1209
+ this.reset();
1210
+ }
1211
+
1212
+ /**
1213
+ * Appends a string.
1214
+ * A conversion will be applied if an utf8 string is detected.
1215
+ *
1216
+ * @param {String} str The string to be appended
1217
+ *
1218
+ * @return {SparkMD5} The instance itself
1219
+ */
1220
+ SparkMD5.prototype.append = function (str) {
1221
+ // Converts the string to utf8 bytes if necessary
1222
+ // Then append as binary
1223
+ this.appendBinary(toUtf8(str));
1224
+
1225
+ return this;
1226
+ };
1227
+
1228
+ /**
1229
+ * Appends a binary string.
1230
+ *
1231
+ * @param {String} contents The binary string to be appended
1232
+ *
1233
+ * @return {SparkMD5} The instance itself
1234
+ */
1235
+ SparkMD5.prototype.appendBinary = function (contents) {
1236
+ this._buff += contents;
1237
+ this._length += contents.length;
1238
+
1239
+ var length = this._buff.length,
1240
+ i;
1241
+
1242
+ for (i = 64; i <= length; i += 64) {
1243
+ md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));
1244
+ }
1245
+
1246
+ this._buff = this._buff.substring(i - 64);
1247
+
1248
+ return this;
1249
+ };
1250
+
1251
+ /**
1252
+ * Finishes the incremental computation, reseting the internal state and
1253
+ * returning the result.
1254
+ *
1255
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
1256
+ *
1257
+ * @return {String} The result
1258
+ */
1259
+ SparkMD5.prototype.end = function (raw) {
1260
+ var buff = this._buff,
1261
+ length = buff.length,
1262
+ i,
1263
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1264
+ ret;
1265
+
1266
+ for (i = 0; i < length; i += 1) {
1267
+ tail[i >> 2] |= buff.charCodeAt(i) << ((i % 4) << 3);
1268
+ }
1269
+
1270
+ this._finish(tail, length);
1271
+ ret = hex(this._hash);
1272
+
1273
+ if (raw) {
1274
+ ret = hexToBinaryString(ret);
1275
+ }
1276
+
1277
+ this.reset();
1278
+
1279
+ return ret;
1280
+ };
1281
+
1282
+ /**
1283
+ * Resets the internal state of the computation.
1284
+ *
1285
+ * @return {SparkMD5} The instance itself
1286
+ */
1287
+ SparkMD5.prototype.reset = function () {
1288
+ this._buff = '';
1289
+ this._length = 0;
1290
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
1291
+
1292
+ return this;
1293
+ };
1294
+
1295
+ /**
1296
+ * Gets the internal state of the computation.
1297
+ *
1298
+ * @return {Object} The state
1299
+ */
1300
+ SparkMD5.prototype.getState = function () {
1301
+ return {
1302
+ buff: this._buff,
1303
+ length: this._length,
1304
+ hash: this._hash.slice()
1305
+ };
1306
+ };
1307
+
1308
+ /**
1309
+ * Gets the internal state of the computation.
1310
+ *
1311
+ * @param {Object} state The state
1312
+ *
1313
+ * @return {SparkMD5} The instance itself
1314
+ */
1315
+ SparkMD5.prototype.setState = function (state) {
1316
+ this._buff = state.buff;
1317
+ this._length = state.length;
1318
+ this._hash = state.hash;
1319
+
1320
+ return this;
1321
+ };
1322
+
1323
+ /**
1324
+ * Releases memory used by the incremental buffer and other additional
1325
+ * resources. If you plan to use the instance again, use reset instead.
1326
+ */
1327
+ SparkMD5.prototype.destroy = function () {
1328
+ delete this._hash;
1329
+ delete this._buff;
1330
+ delete this._length;
1331
+ };
1332
+
1333
+ /**
1334
+ * Finish the final calculation based on the tail.
1335
+ *
1336
+ * @param {Array} tail The tail (will be modified)
1337
+ * @param {Number} length The length of the remaining buffer
1338
+ */
1339
+ SparkMD5.prototype._finish = function (tail, length) {
1340
+ var i = length,
1341
+ tmp,
1342
+ lo,
1343
+ hi;
1344
+
1345
+ tail[i >> 2] |= 0x80 << ((i % 4) << 3);
1346
+ if (i > 55) {
1347
+ md5cycle(this._hash, tail);
1348
+ for (i = 0; i < 16; i += 1) {
1349
+ tail[i] = 0;
1350
+ }
1351
+ }
1352
+
1353
+ // Do the final computation based on the tail and length
1354
+ // Beware that the final length may not fit in 32 bits so we take care of that
1355
+ tmp = this._length * 8;
1356
+ tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
1357
+ lo = parseInt(tmp[2], 16);
1358
+ hi = parseInt(tmp[1], 16) || 0;
1359
+
1360
+ tail[14] = lo;
1361
+ tail[15] = hi;
1362
+ md5cycle(this._hash, tail);
1363
+ };
1364
+
1365
+ /**
1366
+ * Performs the md5 hash on a string.
1367
+ * A conversion will be applied if utf8 string is detected.
1368
+ *
1369
+ * @param {String} str The string
1370
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
1371
+ *
1372
+ * @return {String} The result
1373
+ */
1374
+ SparkMD5.hash = function (str, raw) {
1375
+ // Converts the string to utf8 bytes if necessary
1376
+ // Then compute it using the binary function
1377
+ return SparkMD5.hashBinary(toUtf8(str), raw);
1378
+ };
1379
+
1380
+ /**
1381
+ * Performs the md5 hash on a binary string.
1382
+ *
1383
+ * @param {String} content The binary string
1384
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex string
1385
+ *
1386
+ * @return {String} The result
1387
+ */
1388
+ SparkMD5.hashBinary = function (content, raw) {
1389
+ var hash = md51(content),
1390
+ ret = hex(hash);
1391
+
1392
+ return raw ? hexToBinaryString(ret) : ret;
1393
+ };
1394
+
1395
+ // ---------------------------------------------------
1396
+
1397
+ /**
1398
+ * SparkMD5 OOP implementation for array buffers.
1399
+ *
1400
+ * Use this class to perform an incremental md5 ONLY for array buffers.
1401
+ */
1402
+ SparkMD5.ArrayBuffer = function () {
1403
+ // call reset to init the instance
1404
+ this.reset();
1405
+ };
1406
+
1407
+ /**
1408
+ * Appends an array buffer.
1409
+ *
1410
+ * @param {ArrayBuffer} arr The array to be appended
1411
+ *
1412
+ * @return {SparkMD5.ArrayBuffer} The instance itself
1413
+ */
1414
+ SparkMD5.ArrayBuffer.prototype.append = function (arr) {
1415
+ var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),
1416
+ length = buff.length,
1417
+ i;
1418
+
1419
+ this._length += arr.byteLength;
1420
+
1421
+ for (i = 64; i <= length; i += 64) {
1422
+ md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));
1423
+ }
1424
+
1425
+ this._buff = (i - 64) < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);
1426
+
1427
+ return this;
1428
+ };
1429
+
1430
+ /**
1431
+ * Finishes the incremental computation, reseting the internal state and
1432
+ * returning the result.
1433
+ *
1434
+ * @param {Boolean} raw True to get the raw string, false to get the hex string
1435
+ *
1436
+ * @return {String} The result
1437
+ */
1438
+ SparkMD5.ArrayBuffer.prototype.end = function (raw) {
1439
+ var buff = this._buff,
1440
+ length = buff.length,
1441
+ tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1442
+ i,
1443
+ ret;
1444
+
1445
+ for (i = 0; i < length; i += 1) {
1446
+ tail[i >> 2] |= buff[i] << ((i % 4) << 3);
1447
+ }
1448
+
1449
+ this._finish(tail, length);
1450
+ ret = hex(this._hash);
1451
+
1452
+ if (raw) {
1453
+ ret = hexToBinaryString(ret);
1454
+ }
1455
+
1456
+ this.reset();
1457
+
1458
+ return ret;
1459
+ };
1460
+
1461
+ /**
1462
+ * Resets the internal state of the computation.
1463
+ *
1464
+ * @return {SparkMD5.ArrayBuffer} The instance itself
1465
+ */
1466
+ SparkMD5.ArrayBuffer.prototype.reset = function () {
1467
+ this._buff = new Uint8Array(0);
1468
+ this._length = 0;
1469
+ this._hash = [1732584193, -271733879, -1732584194, 271733878];
1470
+
1471
+ return this;
1472
+ };
1473
+
1474
+ /**
1475
+ * Gets the internal state of the computation.
1476
+ *
1477
+ * @return {Object} The state
1478
+ */
1479
+ SparkMD5.ArrayBuffer.prototype.getState = function () {
1480
+ var state = SparkMD5.prototype.getState.call(this);
1481
+
1482
+ // Convert buffer to a string
1483
+ state.buff = arrayBuffer2Utf8Str(state.buff);
1484
+
1485
+ return state;
1486
+ };
1487
+
1488
+ /**
1489
+ * Gets the internal state of the computation.
1490
+ *
1491
+ * @param {Object} state The state
1492
+ *
1493
+ * @return {SparkMD5.ArrayBuffer} The instance itself
1494
+ */
1495
+ SparkMD5.ArrayBuffer.prototype.setState = function (state) {
1496
+ // Convert string to buffer
1497
+ state.buff = utf8Str2ArrayBuffer(state.buff, true);
1498
+
1499
+ return SparkMD5.prototype.setState.call(this, state);
1500
+ };
1501
+
1502
+ SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;
1503
+
1504
+ SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;
1505
+
1506
+ /**
1507
+ * Performs the md5 hash on an array buffer.
1508
+ *
1509
+ * @param {ArrayBuffer} arr The array buffer
1510
+ * @param {Boolean} [raw] True to get the raw string, false to get the hex one
1511
+ *
1512
+ * @return {String} The result
1513
+ */
1514
+ SparkMD5.ArrayBuffer.hash = function (arr, raw) {
1515
+ var hash = md51_array(new Uint8Array(arr)),
1516
+ ret = hex(hash);
1517
+
1518
+ return raw ? hexToBinaryString(ret) : ret;
1519
+ };
1520
+
1521
+ return SparkMD5;
1522
+ }));
1523
+
1524
+
1525
+ /***/ }),
1526
+
1527
+ /***/ 4976:
1528
+ /***/ ((module) => {
1529
+
1530
+ "use strict";
1531
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4976__;
1532
+
1533
+ /***/ }),
1534
+
1535
+ /***/ 6870:
1536
+ /***/ ((module) => {
1537
+
1538
+ "use strict";
1539
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
1540
+
1541
+ /***/ }),
1542
+
1543
+ /***/ 3522:
1544
+ /***/ ((module) => {
1545
+
1546
+ "use strict";
1547
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3522__;
1548
+
1549
+ /***/ }),
1550
+
1551
+ /***/ 4212:
1552
+ /***/ ((module) => {
1553
+
1554
+ "use strict";
1555
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
1556
+
1557
+ /***/ }),
1558
+
1559
+ /***/ 748:
1560
+ /***/ ((module) => {
1561
+
1562
+ "use strict";
1563
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
1564
+
1565
+ /***/ })
1566
+
1567
+ /******/ });
1568
+ /************************************************************************/
1569
+ /******/ // The module cache
1570
+ /******/ var __webpack_module_cache__ = {};
1571
+ /******/
1572
+ /******/ // The require function
1573
+ /******/ function __webpack_require__(moduleId) {
1574
+ /******/ // Check if module is in cache
1575
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1576
+ /******/ if (cachedModule !== undefined) {
1577
+ /******/ return cachedModule.exports;
1578
+ /******/ }
1579
+ /******/ // Create a new module (and put it into the cache)
1580
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1581
+ /******/ // no module.id needed
1582
+ /******/ // no module.loaded needed
1583
+ /******/ exports: {}
1584
+ /******/ };
1585
+ /******/
1586
+ /******/ // Execute the module function
1587
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1588
+ /******/
1589
+ /******/ // Return the exports of the module
1590
+ /******/ return module.exports;
1591
+ /******/ }
1592
+ /******/
1593
+ /************************************************************************/
1594
+ /******/ /* webpack/runtime/compat get default export */
1595
+ /******/ (() => {
1596
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
1597
+ /******/ __webpack_require__.n = (module) => {
1598
+ /******/ var getter = module && module.__esModule ?
1599
+ /******/ () => (module['default']) :
1600
+ /******/ () => (module);
1601
+ /******/ __webpack_require__.d(getter, { a: getter });
1602
+ /******/ return getter;
1603
+ /******/ };
1604
+ /******/ })();
1605
+ /******/
1606
+ /******/ /* webpack/runtime/define property getters */
1607
+ /******/ (() => {
1608
+ /******/ // define getter functions for harmony exports
1609
+ /******/ __webpack_require__.d = (exports, definition) => {
1610
+ /******/ for(var key in definition) {
1611
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1612
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1613
+ /******/ }
1614
+ /******/ }
1615
+ /******/ };
1616
+ /******/ })();
1617
+ /******/
1618
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1619
+ /******/ (() => {
1620
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1621
+ /******/ })();
1622
+ /******/
1623
+ /******/ /* webpack/runtime/make namespace object */
1624
+ /******/ (() => {
1625
+ /******/ // define __esModule on exports
1626
+ /******/ __webpack_require__.r = (exports) => {
1627
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1628
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1629
+ /******/ }
1630
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1631
+ /******/ };
1632
+ /******/ })();
1633
+ /******/
1634
+ /************************************************************************/
1635
+ var __webpack_exports__ = {};
1636
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1637
+ (() => {
1638
+ "use strict";
1639
+ // ESM COMPAT FLAG
1640
+ __webpack_require__.r(__webpack_exports__);
1641
+
1642
+ // EXPORTS
1643
+ __webpack_require__.d(__webpack_exports__, {
1644
+ "default": () => (/* binding */ src)
1645
+ });
1646
+
1647
+ // EXTERNAL MODULE: external "../shared"
1648
+ var external_shared_ = __webpack_require__(4212);
1649
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
1650
+ function _defineProperty(obj, key, value) {
1651
+ if (key in obj) {
1652
+ Object.defineProperty(obj, key, {
1653
+ value: value,
1654
+ enumerable: true,
1655
+ configurable: true,
1656
+ writable: true
1657
+ });
1658
+ } else {
1659
+ obj[key] = value;
1660
+ }
1661
+
1662
+ return obj;
1663
+ }
1664
+ // EXTERNAL MODULE: external "vue"
1665
+ var external_vue_ = __webpack_require__(748);
1666
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
1667
+ var regenerator = __webpack_require__(7162);
1668
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
1669
+ ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.js
1670
+ /******************************************************************************
1671
+ Copyright (c) Microsoft Corporation.
1672
+
1673
+ Permission to use, copy, modify, and/or distribute this software for any
1674
+ purpose with or without fee is hereby granted.
1675
+
1676
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1677
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1678
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1679
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1680
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1681
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1682
+ PERFORMANCE OF THIS SOFTWARE.
1683
+ ***************************************************************************** */
1684
+ /* global Reflect, Promise */
1685
+
1686
+ var extendStatics = function(d, b) {
1687
+ extendStatics = Object.setPrototypeOf ||
1688
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1689
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1690
+ return extendStatics(d, b);
1691
+ };
1692
+
1693
+ function __extends(d, b) {
1694
+ if (typeof b !== "function" && b !== null)
1695
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1696
+ extendStatics(d, b);
1697
+ function __() { this.constructor = d; }
1698
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1699
+ }
1700
+
1701
+ var __assign = function() {
1702
+ __assign = Object.assign || function __assign(t) {
1703
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1704
+ s = arguments[i];
1705
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1706
+ }
1707
+ return t;
1708
+ }
1709
+ return __assign.apply(this, arguments);
1710
+ }
1711
+
1712
+ function __rest(s, e) {
1713
+ var t = {};
1714
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1715
+ t[p] = s[p];
1716
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1717
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1718
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1719
+ t[p[i]] = s[p[i]];
1720
+ }
1721
+ return t;
1722
+ }
1723
+
1724
+ function __decorate(decorators, target, key, desc) {
1725
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1726
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1727
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1728
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1729
+ }
1730
+
1731
+ function __param(paramIndex, decorator) {
1732
+ return function (target, key) { decorator(target, key, paramIndex); }
1733
+ }
1734
+
1735
+ function __metadata(metadataKey, metadataValue) {
1736
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
1737
+ }
1738
+
1739
+ function __awaiter(thisArg, _arguments, P, generator) {
1740
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1741
+ return new (P || (P = Promise))(function (resolve, reject) {
1742
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1743
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1744
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1745
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1746
+ });
1747
+ }
1748
+
1749
+ function __generator(thisArg, body) {
1750
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1751
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1752
+ function verb(n) { return function (v) { return step([n, v]); }; }
1753
+ function step(op) {
1754
+ if (f) throw new TypeError("Generator is already executing.");
1755
+ while (_) try {
1756
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1757
+ if (y = 0, t) op = [op[0] & 2, t.value];
1758
+ switch (op[0]) {
1759
+ case 0: case 1: t = op; break;
1760
+ case 4: _.label++; return { value: op[1], done: false };
1761
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1762
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1763
+ default:
1764
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1765
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1766
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1767
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1768
+ if (t[2]) _.ops.pop();
1769
+ _.trys.pop(); continue;
1770
+ }
1771
+ op = body.call(thisArg, _);
1772
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1773
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1774
+ }
1775
+ }
1776
+
1777
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
1778
+ if (k2 === undefined) k2 = k;
1779
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1780
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1781
+ desc = { enumerable: true, get: function() { return m[k]; } };
1782
+ }
1783
+ Object.defineProperty(o, k2, desc);
1784
+ }) : (function(o, m, k, k2) {
1785
+ if (k2 === undefined) k2 = k;
1786
+ o[k2] = m[k];
1787
+ });
1788
+
1789
+ function __exportStar(m, o) {
1790
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1791
+ }
1792
+
1793
+ function __values(o) {
1794
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1795
+ if (m) return m.call(o);
1796
+ if (o && typeof o.length === "number") return {
1797
+ next: function () {
1798
+ if (o && i >= o.length) o = void 0;
1799
+ return { value: o && o[i++], done: !o };
1800
+ }
1801
+ };
1802
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1803
+ }
1804
+
1805
+ function __read(o, n) {
1806
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1807
+ if (!m) return o;
1808
+ var i = m.call(o), r, ar = [], e;
1809
+ try {
1810
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1811
+ }
1812
+ catch (error) { e = { error: error }; }
1813
+ finally {
1814
+ try {
1815
+ if (r && !r.done && (m = i["return"])) m.call(i);
1816
+ }
1817
+ finally { if (e) throw e.error; }
1818
+ }
1819
+ return ar;
1820
+ }
1821
+
1822
+ /** @deprecated */
1823
+ function __spread() {
1824
+ for (var ar = [], i = 0; i < arguments.length; i++)
1825
+ ar = ar.concat(__read(arguments[i]));
1826
+ return ar;
1827
+ }
1828
+
1829
+ /** @deprecated */
1830
+ function __spreadArrays() {
1831
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1832
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1833
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1834
+ r[k] = a[j];
1835
+ return r;
1836
+ }
1837
+
1838
+ function __spreadArray(to, from, pack) {
1839
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1840
+ if (ar || !(i in from)) {
1841
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1842
+ ar[i] = from[i];
1843
+ }
1844
+ }
1845
+ return to.concat(ar || Array.prototype.slice.call(from));
1846
+ }
1847
+
1848
+ function __await(v) {
1849
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1850
+ }
1851
+
1852
+ function __asyncGenerator(thisArg, _arguments, generator) {
1853
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1854
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1855
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1856
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1857
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1858
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1859
+ function fulfill(value) { resume("next", value); }
1860
+ function reject(value) { resume("throw", value); }
1861
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1862
+ }
1863
+
1864
+ function __asyncDelegator(o) {
1865
+ var i, p;
1866
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1867
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
1868
+ }
1869
+
1870
+ function __asyncValues(o) {
1871
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1872
+ var m = o[Symbol.asyncIterator], i;
1873
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1874
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1875
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1876
+ }
1877
+
1878
+ function __makeTemplateObject(cooked, raw) {
1879
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1880
+ return cooked;
1881
+ };
1882
+
1883
+ var __setModuleDefault = Object.create ? (function(o, v) {
1884
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1885
+ }) : function(o, v) {
1886
+ o["default"] = v;
1887
+ };
1888
+
1889
+ function __importStar(mod) {
1890
+ if (mod && mod.__esModule) return mod;
1891
+ var result = {};
1892
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1893
+ __setModuleDefault(result, mod);
1894
+ return result;
1895
+ }
1896
+
1897
+ function __importDefault(mod) {
1898
+ return (mod && mod.__esModule) ? mod : { default: mod };
1899
+ }
1900
+
1901
+ function __classPrivateFieldGet(receiver, state, kind, f) {
1902
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1903
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1904
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1905
+ }
1906
+
1907
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
1908
+ if (kind === "m") throw new TypeError("Private method is not writable");
1909
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1910
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1911
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1912
+ }
1913
+
1914
+ function __classPrivateFieldIn(state, receiver) {
1915
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1916
+ return typeof state === "function" ? receiver === state : state.has(receiver);
1917
+ }
1918
+
1919
+ ;// CONCATENATED MODULE: ../../packages/upload/src/upload.type.ts
1920
+ /*
1921
+ * Tencent is pleased to support the open source community by making
1922
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1923
+ *
1924
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1925
+ *
1926
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1927
+ *
1928
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1929
+ *
1930
+ * ---------------------------------------------------
1931
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1932
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1933
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1934
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1935
+ *
1936
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1937
+ * the Software.
1938
+ *
1939
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1940
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1941
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1942
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1943
+ * IN THE SOFTWARE.
1944
+ */
1945
+ var CLASS_PREFIX = 'bk-upload';
1946
+ var EThemes;
1947
+
1948
+ (function (EThemes) {
1949
+ EThemes["BUTTON"] = "button";
1950
+ EThemes["DRAGGABLE"] = "draggable";
1951
+ EThemes["PICTURE"] = "picture";
1952
+ })(EThemes || (EThemes = {}));
1953
+
1954
+ var EUploadStatus;
1955
+
1956
+ (function (EUploadStatus) {
1957
+ EUploadStatus["NEW"] = "new";
1958
+ EUploadStatus["UPLOADING"] = "uploading";
1959
+ EUploadStatus["SUCCESS"] = "success";
1960
+ EUploadStatus["FAIL"] = "fail";
1961
+ })(EUploadStatus || (EUploadStatus = {}));
1962
+
1963
+ ;
1964
+ ;
1965
+ ;
1966
+ ;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
1967
+ /*
1968
+ * Tencent is pleased to support the open source community by making
1969
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1970
+ *
1971
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1972
+ *
1973
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1974
+ *
1975
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1976
+ *
1977
+ * ---------------------------------------------------
1978
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1979
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1980
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1981
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1982
+ *
1983
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1984
+ * the Software.
1985
+ *
1986
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1987
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1988
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1989
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1990
+ * IN THE SOFTWARE.
1991
+ */
1992
+
1993
+ var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
1994
+ /* harmony default export */ const props = ({
1995
+ theme: {
1996
+ type: String,
1997
+ "default": 'draggable',
1998
+ validator: function validator(val) {
1999
+ if (!val || themes.includes(val)) {
2000
+ return true;
2001
+ }
2002
+
2003
+ console.error("invalid theme, ".concat(val, ", the theme must be one of \u3010").concat(themes.join(' | '), "\u3011"));
2004
+ return false;
2005
+ }
2006
+ },
2007
+ files: {
2008
+ type: Array,
2009
+ "default": function _default() {
2010
+ return [];
2011
+ }
2012
+ },
2013
+ name: {
2014
+ type: String,
2015
+ "default": 'upload_file'
2016
+ },
2017
+ multiple: {
2018
+ type: Boolean,
2019
+ "default": true
2020
+ },
2021
+ disabled: {
2022
+ type: Boolean,
2023
+ "default": false
2024
+ },
2025
+ autoUpload: {
2026
+ type: Boolean,
2027
+ "default": true
2028
+ },
2029
+ accept: {
2030
+ type: String
2031
+ },
2032
+ delayTime: {
2033
+ type: Number,
2034
+ "default": 0
2035
+ },
2036
+ url: {
2037
+ type: String,
2038
+ required: false
2039
+ },
2040
+ method: {
2041
+ type: String,
2042
+ "default": 'post'
2043
+ },
2044
+ size: {
2045
+ type: [Number, Object],
2046
+ "default": function _default() {
2047
+ return {
2048
+ maxFileSize: 5,
2049
+ maxImgSize: 1
2050
+ };
2051
+ }
2052
+ },
2053
+ handleResCode: {
2054
+ type: Function,
2055
+ "default": function _default(res) {
2056
+ if (res && res.code === 0) {
2057
+ return true;
2058
+ }
2059
+
2060
+ return false;
2061
+ }
2062
+ },
2063
+ headers: {
2064
+ type: Object,
2065
+ "default": function _default() {
2066
+ return {};
2067
+ }
2068
+ },
2069
+ header: {
2070
+ type: [Array, Object],
2071
+ "default": function _default() {
2072
+ return [];
2073
+ }
2074
+ },
2075
+ tip: {
2076
+ type: String,
2077
+ "default": ''
2078
+ },
2079
+ validateName: {
2080
+ type: RegExp
2081
+ },
2082
+ withCredentials: {
2083
+ type: Boolean,
2084
+ "default": false
2085
+ },
2086
+ limit: Number,
2087
+ data: {
2088
+ type: [Array, Object],
2089
+ "default": function _default() {
2090
+ return [];
2091
+ }
2092
+ },
2093
+ formDataAttributes: {
2094
+ type: [Array, Object],
2095
+ "default": function _default() {
2096
+ return [];
2097
+ }
2098
+ },
2099
+ extCls: {
2100
+ type: String,
2101
+ "default": ''
2102
+ },
2103
+ customRequest: Function,
2104
+ beforeUpload: {
2105
+ type: Function
2106
+ },
2107
+ beforeRemove: {
2108
+ type: Function
2109
+ },
2110
+ sliceUpload: {
2111
+ type: Boolean,
2112
+ "default": false
2113
+ },
2114
+ sliceUrl: {
2115
+ type: String,
2116
+ "default": ''
2117
+ },
2118
+ mergeUrl: {
2119
+ type: String,
2120
+ "default": ''
2121
+ },
2122
+ chunkSize: {
2123
+ type: Number,
2124
+ "default": 10
2125
+ }
2126
+ });
2127
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
2128
+ function _arrayWithHoles(arr) {
2129
+ if (Array.isArray(arr)) return arr;
2130
+ }
2131
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
2132
+ function _iterableToArrayLimit(arr, i) {
2133
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2134
+
2135
+ if (_i == null) return;
2136
+ var _arr = [];
2137
+ var _n = true;
2138
+ var _d = false;
2139
+
2140
+ var _s, _e;
2141
+
2142
+ try {
2143
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2144
+ _arr.push(_s.value);
2145
+
2146
+ if (i && _arr.length === i) break;
2147
+ }
2148
+ } catch (err) {
2149
+ _d = true;
2150
+ _e = err;
2151
+ } finally {
2152
+ try {
2153
+ if (!_n && _i["return"] != null) _i["return"]();
2154
+ } finally {
2155
+ if (_d) throw _e;
2156
+ }
2157
+ }
2158
+
2159
+ return _arr;
2160
+ }
2161
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
2162
+ function _arrayLikeToArray(arr, len) {
2163
+ if (len == null || len > arr.length) len = arr.length;
2164
+
2165
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2166
+ arr2[i] = arr[i];
2167
+ }
2168
+
2169
+ return arr2;
2170
+ }
2171
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
2172
+
2173
+ function _unsupportedIterableToArray(o, minLen) {
2174
+ if (!o) return;
2175
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2176
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2177
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2178
+ if (n === "Map" || n === "Set") return Array.from(o);
2179
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2180
+ }
2181
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
2182
+ function _nonIterableRest() {
2183
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2184
+ }
2185
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
2186
+
2187
+
2188
+
2189
+
2190
+ function _slicedToArray(arr, i) {
2191
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2192
+ }
2193
+ // EXTERNAL MODULE: external "../icon"
2194
+ var external_icon_ = __webpack_require__(6870);
2195
+ // EXTERNAL MODULE: external "../progress"
2196
+ var external_progress_ = __webpack_require__(3522);
2197
+ var external_progress_default = /*#__PURE__*/__webpack_require__.n(external_progress_);
2198
+ ;// CONCATENATED MODULE: ../../packages/upload/src/upload-list.tsx
2199
+
2200
+
2201
+
2202
+
2203
+ /*
2204
+ * Tencent is pleased to support the open source community by making
2205
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2206
+ *
2207
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2208
+ *
2209
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2210
+ *
2211
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2212
+ *
2213
+ * ---------------------------------------------------
2214
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2215
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2216
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2217
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2218
+ *
2219
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2220
+ * the Software.
2221
+ *
2222
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2223
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2224
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2225
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2226
+ * IN THE SOFTWARE.
2227
+ */
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+
2235
+ function _isSlot(s) {
2236
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
2237
+ }
2238
+
2239
+ /* harmony default export */ const upload_list = ((0,external_vue_.defineComponent)({
2240
+ name: 'UploadList',
2241
+ props: {
2242
+ theme: props.theme,
2243
+ disabled: props.disabled,
2244
+ files: props.files,
2245
+ multiple: props.multiple
2246
+ },
2247
+ emits: ['remove', 'retry'],
2248
+ setup: function setup(props, _ref) {
2249
+ var slots = _ref.slots,
2250
+ emit = _ref.emit;
2251
+
2252
+ var _toRefs = (0,external_vue_.toRefs)(props),
2253
+ theme = _toRefs.theme,
2254
+ disabled = _toRefs.disabled,
2255
+ multiple = _toRefs.multiple;
2256
+
2257
+ var classBlock = "".concat(CLASS_PREFIX, "-list");
2258
+ var isPhotowall = (0,external_vue_.computed)(function () {
2259
+ return theme.value === EThemes.PICTURE;
2260
+ });
2261
+ var isSinglePhoto = (0,external_vue_.computed)(function () {
2262
+ return isPhotowall.value && !multiple.value;
2263
+ });
2264
+ var classNames = (0,external_vue_.computed)(function () {
2265
+ var _classes;
2266
+
2267
+ return (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
2268
+ });
2269
+
2270
+ function formatSize(value) {
2271
+ var uints = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
2272
+ var index = Math.floor(Math.log(value) / Math.log(1024));
2273
+ var size = value / Math.pow(1024, index);
2274
+ return "".concat(size.toFixed(2)).concat(uints[index]);
2275
+ }
2276
+
2277
+ function handleRemove(file, e) {
2278
+ emit('remove', file, e);
2279
+ }
2280
+
2281
+ function handleRetry(file, e) {
2282
+ emit('retry', file, e);
2283
+ }
2284
+
2285
+ var Photowall = function Photowall() {
2286
+ var _slot;
2287
+
2288
+ return (0,external_vue_.createVNode)(external_vue_.TransitionGroup, {
2289
+ "name": "".concat(classBlock, "__item")
2290
+ }, _isSlot(_slot = props.files.map(function (file) {
2291
+ var _classes2;
2292
+
2293
+ var classNames = (0,external_shared_.classes)((_classes2 = {}, _defineProperty(_classes2, "".concat(classBlock, "__item"), true), _defineProperty(_classes2, "".concat(classBlock, "__item-picture"), true), _defineProperty(_classes2, "".concat(classBlock, "__item--").concat(file.status), true), _classes2));
2294
+ return (0,external_vue_.createVNode)("li", {
2295
+ "key": file.uid,
2296
+ "class": classNames
2297
+ }, [(slots === null || slots === void 0 ? void 0 : slots.file) ? slots.file({
2298
+ file: file
2299
+ }) : PhotoItem(file)]);
2300
+ })) ? _slot : {
2301
+ "default": function _default() {
2302
+ return [_slot];
2303
+ }
2304
+ });
2305
+ };
2306
+
2307
+ var PhotoItem = function PhotoItem(file) {
2308
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("img", {
2309
+ "src": file.url,
2310
+ "class": "".concat(classBlock, "__picture-item-thumbnail"),
2311
+ "alt": ""
2312
+ }, null), [[external_vue_.vShow, file.status !== 'uploading']]), (0,external_vue_.createVNode)(external_vue_.Fragment, null, [file.status === 'uploading' && (0,external_vue_.createVNode)((external_progress_default()), {
2313
+ "class": "".concat(classBlock, "__picture-item-progress"),
2314
+ "type": "circle",
2315
+ "color": "#3a84ff",
2316
+ "bgColor": "#333",
2317
+ "width": 50,
2318
+ "titleStyle": {
2319
+ color: '#fff'
2320
+ },
2321
+ "percent": file.percentage
2322
+ }, null)]), (0,external_vue_.createVNode)(external_vue_.Fragment, null, [!disabled.value && (0,external_vue_.createVNode)("div", {
2323
+ "class": "".concat(classBlock, "__picture-item-actions")
2324
+ }, [(0,external_vue_.createVNode)(external_icon_.Del, {
2325
+ "class": "action-icon",
2326
+ "onClick": function onClick(e) {
2327
+ return handleRemove(file, e);
2328
+ }
2329
+ }, null)])])];
2330
+ };
2331
+
2332
+ var Normal = function Normal() {
2333
+ var _slot2;
2334
+
2335
+ return (0,external_vue_.createVNode)(external_vue_.TransitionGroup, {
2336
+ "name": "".concat(classBlock, "__item")
2337
+ }, _isSlot(_slot2 = props.files.map(function (file) {
2338
+ var _classes3;
2339
+
2340
+ var classNames = (0,external_shared_.classes)((_classes3 = {}, _defineProperty(_classes3, "".concat(classBlock, "__item"), true), _defineProperty(_classes3, "".concat(classBlock, "__item--").concat(file.status), true), _classes3));
2341
+ return (0,external_vue_.createVNode)("li", {
2342
+ "key": file.uid,
2343
+ "class": classNames
2344
+ }, [(slots === null || slots === void 0 ? void 0 : slots.file) ? slots.file({
2345
+ file: file
2346
+ }) : NormalItem(file)]);
2347
+ })) ? _slot2 : {
2348
+ "default": function _default() {
2349
+ return [_slot2];
2350
+ }
2351
+ });
2352
+ };
2353
+
2354
+ var FileIcon = function FileIcon(file) {
2355
+ var _a;
2356
+
2357
+ var rawType = (_a = file === null || file === void 0 ? void 0 : file.raw) === null || _a === void 0 ? void 0 : _a.type;
2358
+
2359
+ var _ref2 = (rawType === null || rawType === void 0 ? void 0 : rawType.split('/')) || '',
2360
+ _ref3 = _slicedToArray(_ref2, 1),
2361
+ type = _ref3[0];
2362
+
2363
+ var iconMap = {
2364
+ text: external_icon_.TextFill,
2365
+ image: external_icon_.ImageFill,
2366
+ application: external_icon_.TextFill,
2367
+ video: external_icon_.VideoFill,
2368
+ audio: external_icon_.AudioFill
2369
+ };
2370
+ var icon = iconMap[type] || external_icon_.TextFill;
2371
+ var zipType = ['application/zip', 'application/rar', 'application/tar', 'application/gz', 'application/x-gzip'];
2372
+
2373
+ if (zipType.includes(rawType)) {
2374
+ icon = external_icon_.ArchiveFill;
2375
+ }
2376
+
2377
+ return (0,external_vue_.h)(icon, {
2378
+ "class": "".concat(classBlock, "__item-file-icon")
2379
+ });
2380
+ };
2381
+
2382
+ var NormalItem = function NormalItem(file) {
2383
+ return [(0,external_vue_.createVNode)("div", {
2384
+ "class": "".concat(classBlock, "__item-icon")
2385
+ }, [file.isPic ? (0,external_vue_.createVNode)("img", {
2386
+ "src": file.url,
2387
+ "class": "".concat(classBlock, "__item-thumbnail"),
2388
+ "alt": ""
2389
+ }, null) : FileIcon(file)]), (0,external_vue_.createVNode)("div", {
2390
+ "class": "".concat(classBlock, "__item-summary")
2391
+ }, [(0,external_vue_.createVNode)("div", {
2392
+ "class": "".concat(classBlock, "__item-name"),
2393
+ "title": file.name
2394
+ }, [file.name]), file.status !== 'uploading' && (0,external_vue_.createVNode)("div", {
2395
+ "class": "".concat(classBlock, "__item-message"),
2396
+ "title": file.statusText
2397
+ }, [file.status === 'success' && (0,external_vue_.createVNode)("span", null, [(0,external_vue_.createVNode)(external_icon_.Done, {
2398
+ "class": "".concat(classBlock, "__item-message-success-icon")
2399
+ }, null), file.statusText || '上传成功']), file.status === 'fail' && (0,external_vue_.createVNode)("span", null, [file.statusText || '上传失败'])]), file.status === 'uploading' && (0,external_vue_.createVNode)((external_progress_default()), {
2400
+ "class": "".concat(classBlock, "__item-progress"),
2401
+ "showText": false,
2402
+ "percent": file.percentage,
2403
+ "size": "small"
2404
+ }, null), file.status !== 'fail' && (0,external_vue_.createVNode)("div", {
2405
+ "class": "".concat(classBlock, "__item-speed")
2406
+ }, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
2407
+ "class": "".concat(classBlock, "__item-speed-size")
2408
+ }, [formatSize(file.size)]), [[external_vue_.vShow, file.size]]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("span", {
2409
+ "class": "".concat(classBlock, "__item-speed-percentage")
2410
+ }, [file.percentage, (0,external_vue_.createTextVNode)("%")]), [[external_vue_.vShow, file.status === 'uploading']])]), !disabled.value && (0,external_vue_.createVNode)("div", {
2411
+ "class": "".concat(classBlock, "__item-actions")
2412
+ }, [file.status === 'fail' && (0,external_vue_.createVNode)(external_icon_.RightTurnLine, {
2413
+ "class": "".concat(classBlock, "__item-retry-icon"),
2414
+ "onClick": function onClick(e) {
2415
+ return handleRetry(file, e);
2416
+ }
2417
+ }, null), (0,external_vue_.createVNode)(external_icon_.Del, {
2418
+ "class": "".concat(classBlock, "__item-del-icon"),
2419
+ "onClick": function onClick(e) {
2420
+ return handleRemove(file, e);
2421
+ }
2422
+ }, null)])])];
2423
+ };
2424
+
2425
+ return function () {
2426
+ var _a;
2427
+
2428
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [isSinglePhoto.value ? (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger((_a = props.files) === null || _a === void 0 ? void 0 : _a[0])) : (0,external_vue_.createVNode)("ul", {
2429
+ "class": classNames.value
2430
+ }, [isPhotowall.value ? Photowall() : Normal(), (slots === null || slots === void 0 ? void 0 : slots.innerTrigger) && (slots === null || slots === void 0 ? void 0 : slots.innerTrigger())])]);
2431
+ };
2432
+ }
2433
+ }));
2434
+ // EXTERNAL MODULE: external "../button"
2435
+ var external_button_ = __webpack_require__(4976);
2436
+ var external_button_default = /*#__PURE__*/__webpack_require__.n(external_button_);
2437
+ ;// CONCATENATED MODULE: ../../packages/upload/src/upload-trigger.tsx
2438
+
2439
+
2440
+
2441
+ /*
2442
+ * Tencent is pleased to support the open source community by making
2443
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2444
+ *
2445
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2446
+ *
2447
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2448
+ *
2449
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2450
+ *
2451
+ * ---------------------------------------------------
2452
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2453
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2454
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2455
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2456
+ *
2457
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2458
+ * the Software.
2459
+ *
2460
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2461
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2462
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2463
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2464
+ * IN THE SOFTWARE.
2465
+ */
2466
+
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+ /* harmony default export */ const upload_trigger = ((0,external_vue_.defineComponent)({
2474
+ name: 'UploadTrigger',
2475
+ props: {
2476
+ theme: props.theme,
2477
+ disabled: props.disabled,
2478
+ multiple: props.multiple,
2479
+ accept: props.accept,
2480
+ file: {
2481
+ type: Object
2482
+ }
2483
+ },
2484
+ emits: ['change', 'remove'],
2485
+ setup: function setup(props, _ref) {
2486
+ var slots = _ref.slots,
2487
+ emit = _ref.emit;
2488
+
2489
+ var _toRefs = (0,external_vue_.toRefs)(props),
2490
+ theme = _toRefs.theme,
2491
+ disabled = _toRefs.disabled,
2492
+ file = _toRefs.file,
2493
+ multiple = _toRefs.multiple,
2494
+ accept = _toRefs.accept;
2495
+
2496
+ var classBlock = "".concat(CLASS_PREFIX, "-trigger");
2497
+ var isButton = (0,external_vue_.computed)(function () {
2498
+ return theme.value === EThemes.BUTTON;
2499
+ });
2500
+ var isDrag = (0,external_vue_.computed)(function () {
2501
+ return theme.value === EThemes.DRAGGABLE;
2502
+ });
2503
+ var isPicture = (0,external_vue_.computed)(function () {
2504
+ return theme.value === EThemes.PICTURE;
2505
+ });
2506
+ var isSinglePicture = (0,external_vue_.computed)(function () {
2507
+ return isPicture.value && !multiple.value;
2508
+ });
2509
+ var acceptTypes = (0,external_vue_.computed)(function () {
2510
+ return isPicture.value && !accept.value ? 'image/png,image/jpeg,image/jpg' : accept.value;
2511
+ });
2512
+ var inputEl = (0,external_vue_.ref)(null);
2513
+ var classNames = (0,external_vue_.computed)(function () {
2514
+ var _classes;
2515
+
2516
+ var _a, _b, _c;
2517
+
2518
+ return (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--single-picture"), isSinglePicture.value), _defineProperty(_classes, "".concat(classBlock, "--has-file"), (_a = file.value) !== null && _a !== void 0 ? _a : false), _defineProperty(_classes, "".concat(classBlock, "--").concat((_b = file.value) === null || _b === void 0 ? void 0 : _b.status), (_c = file.value) !== null && _c !== void 0 ? _c : false), _defineProperty(_classes, "".concat(classBlock, "--dragover"), dragover.value), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
2519
+ });
2520
+
2521
+ var invoke = function invoke() {
2522
+ inputEl.value.value = null;
2523
+ inputEl.value.click();
2524
+ };
2525
+
2526
+ var handleFileChange = function handleFileChange(e) {
2527
+ var files = e.target.files;
2528
+ emit('change', Array.from(files));
2529
+ };
2530
+
2531
+ var handleClick = function handleClick() {
2532
+ if (props.disabled) {
2533
+ return;
2534
+ }
2535
+
2536
+ invoke();
2537
+ };
2538
+
2539
+ var handleKeydown = function handleKeydown(e) {
2540
+ if (e.defaultPrevented || e.target !== e.currentTarget) {
2541
+ return;
2542
+ }
2543
+
2544
+ if (e.code === 'Enter' || e.code === 'Space') {
2545
+ invoke();
2546
+ }
2547
+
2548
+ e.preventDefault();
2549
+ };
2550
+
2551
+ function handleRemove(file, e) {
2552
+ emit('remove', file, e);
2553
+ e.stopPropagation();
2554
+ e.preventDefault();
2555
+ }
2556
+
2557
+ var dragover = (0,external_vue_.ref)(false);
2558
+
2559
+ var Dragger = function Dragger() {
2560
+ var handleDrop = function handleDrop(e) {
2561
+ if (disabled.value) {
2562
+ return;
2563
+ }
2564
+
2565
+ e.preventDefault();
2566
+ dragover.value = false;
2567
+ var files = Array.from(e.dataTransfer.files);
2568
+
2569
+ if (!acceptTypes.value) {
2570
+ emit('change', files);
2571
+ return;
2572
+ }
2573
+
2574
+ var filesFiltered = files.filter(function (file) {
2575
+ var type = file.type,
2576
+ name = file.name;
2577
+ var extension = name.includes('.') ? ".".concat(name.split('.').pop()) : '';
2578
+ var baseType = type.replace(/\/.*$/, '');
2579
+ return acceptTypes.value.split(',').map(function (type) {
2580
+ return type.trim();
2581
+ }).filter(function (type) {
2582
+ return type;
2583
+ }).some(function (acceptedType) {
2584
+ if (acceptedType.startsWith('.')) {
2585
+ return extension === acceptedType;
2586
+ }
2587
+
2588
+ if (/\/\*$/.test(acceptedType)) {
2589
+ return baseType === acceptedType.replace(/\/\*$/, '');
2590
+ }
2591
+
2592
+ if (/^[^/]+\/[^/]+$/.test(acceptedType)) {
2593
+ return type === acceptedType;
2594
+ }
2595
+
2596
+ return false;
2597
+ });
2598
+ });
2599
+ emit('change', filesFiltered);
2600
+ };
2601
+
2602
+ var handleDragover = function handleDragover(e) {
2603
+ e.preventDefault();
2604
+ dragover.value = true;
2605
+ };
2606
+
2607
+ var handleDragleave = function handleDragleave() {
2608
+ dragover.value = false;
2609
+ };
2610
+
2611
+ var classNames = (0,external_shared_.classes)(_defineProperty({}, "".concat(classBlock, "__draggable"), true));
2612
+ return (0,external_vue_.createVNode)("div", {
2613
+ "class": classNames,
2614
+ "onDrop": handleDrop,
2615
+ "onDragover": handleDragover,
2616
+ "onDragleave": handleDragleave
2617
+ }, [slots["default"] ? slots["default"]() : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)(external_icon_.Upload, {
2618
+ "class": "".concat(classBlock, "__draggable-icon")
2619
+ }, null), (0,external_vue_.createVNode)("div", {
2620
+ "class": "".concat(classBlock, "__draggable-text")
2621
+ }, [(0,external_vue_.createTextVNode)("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"), (0,external_vue_.createVNode)("span", {
2622
+ "class": "".concat(classBlock, "__draggable-upload-link")
2623
+ }, [(0,external_vue_.createTextVNode)("\u70B9\u51FB\u4E0A\u4F20")])])])]);
2624
+ };
2625
+
2626
+ var Picture = function Picture() {
2627
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [isSinglePicture.value && props.file ? SinglePicture(props.file) : DefaultPicture()]);
2628
+ };
2629
+
2630
+ var DefaultPicture = function DefaultPicture() {
2631
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [slots["default"] ? slots["default"]() : (0,external_vue_.createVNode)("div", {
2632
+ "class": "".concat(classBlock, "__picture-inner")
2633
+ }, [(0,external_vue_.createVNode)(external_icon_.Plus, {
2634
+ "class": "".concat(classBlock, "__picture-icon")
2635
+ }, null), (0,external_vue_.createVNode)("div", {
2636
+ "class": "".concat(classBlock, "__picture-text")
2637
+ }, [(0,external_vue_.createTextVNode)("\u70B9\u51FB\u4E0A\u4F20")])])]);
2638
+ };
2639
+
2640
+ var SinglePicture = function SinglePicture(file) {
2641
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("img", {
2642
+ "src": file.url,
2643
+ "class": "".concat(classBlock, "__picture-thumbnail"),
2644
+ "alt": ""
2645
+ }, null), [[external_vue_.vShow, file.status !== 'uploading']]), (0,external_vue_.createVNode)(external_vue_.Fragment, null, [file.status === 'uploading' && (0,external_vue_.createVNode)((external_progress_default()), {
2646
+ "class": "".concat(classBlock, "__picture-progress"),
2647
+ "type": "circle",
2648
+ "color": "#3a84ff",
2649
+ "bgColor": "#333",
2650
+ "width": 50,
2651
+ "titleStyle": {
2652
+ color: '#fff'
2653
+ },
2654
+ "percent": file.percentage
2655
+ }, null)]), (0,external_vue_.createVNode)(external_vue_.Fragment, null, [!props.disabled && (0,external_vue_.createVNode)("div", {
2656
+ "class": "".concat(classBlock, "__picture-actions")
2657
+ }, [(0,external_vue_.createVNode)(external_icon_.Del, {
2658
+ "class": "action-icon",
2659
+ "onClick": function onClick(e) {
2660
+ return handleRemove(file, e);
2661
+ }
2662
+ }, null)])])];
2663
+ };
2664
+
2665
+ var Button = function Button() {
2666
+ return (0,external_vue_.createVNode)((external_button_default()), {
2667
+ "disabled": disabled.value
2668
+ }, {
2669
+ "default": function _default() {
2670
+ return [(0,external_vue_.createVNode)(external_icon_.Upload, {
2671
+ "class": "".concat(classBlock, "__button-icon")
2672
+ }, null), (0,external_vue_.createVNode)("span", {
2673
+ "class": "".concat(classBlock, "__button-text")
2674
+ }, [(0,external_vue_.createTextVNode)("\u4E0A\u4F20\u6587\u4EF6")])];
2675
+ }
2676
+ });
2677
+ };
2678
+
2679
+ var Trigger = function Trigger() {
2680
+ if (isButton.value) return Button();
2681
+ if (isDrag.value) return Dragger();
2682
+ if (isPicture.value) return Picture();
2683
+ };
2684
+
2685
+ return function () {
2686
+ var _a;
2687
+
2688
+ return (0,external_vue_.createVNode)("div", {
2689
+ "class": classNames.value,
2690
+ "tabindex": "0",
2691
+ "onClick": handleClick,
2692
+ "onKeydown": handleKeydown
2693
+ }, [slots.trigger ? [slots.trigger(), (_a = slots === null || slots === void 0 ? void 0 : slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots)] : Trigger(), (0,external_vue_.createVNode)("input", {
2694
+ "ref": inputEl,
2695
+ "class": "".concat(classBlock, "__input-file"),
2696
+ "tabindex": "-1",
2697
+ "onChange": handleFileChange,
2698
+ "accept": acceptTypes.value,
2699
+ "multiple": multiple.value,
2700
+ "disabled": disabled.value,
2701
+ "type": "file"
2702
+ }, null)]);
2703
+ };
2704
+ }
2705
+ }));
2706
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
2707
+
2708
+ function _arrayWithoutHoles(arr) {
2709
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
2710
+ }
2711
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
2712
+ function _iterableToArray(iter) {
2713
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2714
+ }
2715
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
2716
+ function _nonIterableSpread() {
2717
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2718
+ }
2719
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
2720
+
2721
+
2722
+
2723
+
2724
+ function _toConsumableArray(arr) {
2725
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
2726
+ }
2727
+ // EXTERNAL MODULE: ../../node_modules/spark-md5/spark-md5.js
2728
+ var spark_md5 = __webpack_require__(4791);
2729
+ var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
2730
+ ;// CONCATENATED MODULE: ../../packages/upload/src/use-ajax-upload.ts
2731
+
2732
+
2733
+
2734
+
2735
+ /*
2736
+ * Tencent is pleased to support the open source community by making
2737
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2738
+ *
2739
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2740
+ *
2741
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2742
+ *
2743
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2744
+ *
2745
+ * ---------------------------------------------------
2746
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2747
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2748
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2749
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2750
+ *
2751
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2752
+ * the Software.
2753
+ *
2754
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2755
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2756
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2757
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2758
+ * IN THE SOFTWARE.
2759
+ */
2760
+
2761
+
2762
+
2763
+ ;
2764
+
2765
+ function getRes(xhr) {
2766
+ var res = xhr.responseText || xhr.response;
2767
+
2768
+ if (!res) {
2769
+ return res;
2770
+ }
2771
+
2772
+ try {
2773
+ return JSON.parse(res);
2774
+ } catch (_a) {
2775
+ return res;
2776
+ }
2777
+ }
2778
+
2779
+ var ajaxUpload = function ajaxUpload(option) {
2780
+ if (typeof XMLHttpRequest === 'undefined') {
2781
+ throw new Error('XMLHttpRequest is undefined');
2782
+ }
2783
+
2784
+ var xhr = new XMLHttpRequest();
2785
+ var action = option.action;
2786
+
2787
+ if (xhr.upload) {
2788
+ xhr.upload.addEventListener('progress', function (event) {
2789
+ var progressEvent = event;
2790
+ progressEvent.percent = event.total > 0 ? event.loaded / event.total * 100 : 0;
2791
+ option.onProgress(progressEvent);
2792
+ });
2793
+ }
2794
+
2795
+ var formData = new FormData();
2796
+
2797
+ if (option.data) {
2798
+ var appendData = option.data;
2799
+
2800
+ if (!Array.isArray(appendData)) {
2801
+ appendData = [appendData];
2802
+ }
2803
+
2804
+ appendData.forEach(function (data) {
2805
+ for (var _i = 0, _Object$entries = Object.entries(data); _i < _Object$entries.length; _i++) {
2806
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
2807
+ key = _Object$entries$_i[0],
2808
+ value = _Object$entries$_i[1];
2809
+
2810
+ if (Array.isArray(value)) formData.append.apply(formData, [key].concat(_toConsumableArray(value)));else formData.append(key, value);
2811
+ }
2812
+ });
2813
+ }
2814
+
2815
+ if (option.formDataAttributes) {
2816
+ var _appendData = option.formDataAttributes;
2817
+
2818
+ if (!Array.isArray(_appendData)) {
2819
+ _appendData = [_appendData];
2820
+ }
2821
+
2822
+ _appendData.forEach(function (item) {
2823
+ if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
2824
+ });
2825
+ }
2826
+
2827
+ formData.append(option.filename, option.file, option.file.name);
2828
+ xhr.addEventListener('error', function () {
2829
+ option.onError(new Error('An error occurred during upload'));
2830
+ });
2831
+ xhr.addEventListener('load', function () {
2832
+ if (xhr.status < 200 || xhr.status >= 300) {
2833
+ return option.onError(new Error('An error occurred during upload'));
2834
+ }
2835
+
2836
+ option.onSuccess(getRes(xhr));
2837
+ });
2838
+ xhr.addEventListener('loadend', function () {
2839
+ option.onComplete();
2840
+ });
2841
+ xhr.open(option.method, action, true);
2842
+
2843
+ if (option.withCredentials && 'withCredentials' in xhr) {
2844
+ xhr.withCredentials = true;
2845
+ }
2846
+
2847
+ if (option.header) {
2848
+ if (Array.isArray(option.header)) {
2849
+ option.header.forEach(function (head) {
2850
+ var headerKey = head.name;
2851
+ var headerVal = head.value;
2852
+ xhr.setRequestHeader(headerKey, headerVal);
2853
+ });
2854
+ } else {
2855
+ var headerKey = option.header.name;
2856
+ var headerVal = option.header.value;
2857
+ xhr.setRequestHeader(headerKey, headerVal);
2858
+ }
2859
+ }
2860
+
2861
+ var headers = option.headers || {};
2862
+
2863
+ if (headers instanceof Headers) {
2864
+ headers.forEach(function (value, key) {
2865
+ return xhr.setRequestHeader(key, value);
2866
+ });
2867
+ } else {
2868
+ for (var _i2 = 0, _Object$entries2 = Object.entries(headers); _i2 < _Object$entries2.length; _i2++) {
2869
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
2870
+ key = _Object$entries2$_i[0],
2871
+ value = _Object$entries2$_i[1];
2872
+
2873
+ if ((0,external_shared_.isNullOrUndef)(value)) continue;
2874
+ xhr.setRequestHeader(key, String(value));
2875
+ }
2876
+ }
2877
+
2878
+ xhr.send(formData);
2879
+ return xhr;
2880
+ }; // 该方法用于在不同的浏览器使用不同的方式
2881
+
2882
+ var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
2883
+ var ajaxSliceUpload = function ajaxSliceUpload(option) {
2884
+ return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
2885
+ var chunkSize, file, blockCount, hash, progressList;
2886
+ return regenerator_default().wrap(function _callee$(_context) {
2887
+ while (1) {
2888
+ switch (_context.prev = _context.next) {
2889
+ case 0:
2890
+ chunkSize = option.chunkSize * 1024 * 1024;
2891
+ file = option.file;
2892
+
2893
+ if (file) {
2894
+ _context.next = 4;
2895
+ break;
2896
+ }
2897
+
2898
+ throw new Error('File not found');
2899
+
2900
+ case 4:
2901
+ blockCount = Math.ceil(file.size / chunkSize);
2902
+ _context.next = 7;
2903
+ return hashFile(file, chunkSize);
2904
+
2905
+ case 7:
2906
+ hash = _context.sent;
2907
+ progressList = [];
2908
+ sliceSend(option, file, blockCount, hash, progressList, chunkSize); // 所有分片上传后,请求合并分片文件
2909
+
2910
+ _context.next = 12;
2911
+ return Promise.all(progressList).then(function () {
2912
+ // 合并chunks
2913
+ var data = {
2914
+ size: file.size,
2915
+ name: file.name,
2916
+ total: blockCount,
2917
+ hash: hash
2918
+ };
2919
+ var req = new XMLHttpRequest();
2920
+ req.open(option.method, option.mergeUrl, true);
2921
+
2922
+ req.onreadystatechange = function () {
2923
+ if (req.readyState === 4) {
2924
+ if (req.status < 200 || req.status >= 300) {
2925
+ return option.onError(new Error('An error occurred during upload'));
2926
+ }
2927
+
2928
+ option.onSuccess(getRes(req));
2929
+ }
2930
+ };
2931
+
2932
+ req.onloadend = function () {
2933
+ option.onComplete();
2934
+ };
2935
+
2936
+ req.setRequestHeader('Content-type', 'application/JSON');
2937
+ req.send(JSON.stringify(data));
2938
+ });
2939
+
2940
+ case 12:
2941
+ case "end":
2942
+ return _context.stop();
2943
+ }
2944
+ }
2945
+ }, _callee);
2946
+ }));
2947
+ }; // 请求分片上传,保存在progressList中
2948
+
2949
+ var sliceSend = function sliceSend(option, file, blockCount, hash, progressList, chunkSize) {
2950
+ var _loop = function _loop(i) {
2951
+ // eslint-disable-next-line no-loop-func
2952
+ var pooltask = new Promise(function (resolve, reject) {
2953
+ var start = i * chunkSize;
2954
+ var end = Math.min(file.size, start + chunkSize); // 构建表单
2955
+
2956
+ var formData = new FormData();
2957
+
2958
+ if (option.data) {
2959
+ var appendData = option.data;
2960
+
2961
+ if (!Array.isArray(appendData)) {
2962
+ appendData = [appendData];
2963
+ }
2964
+
2965
+ appendData.forEach(function (data) {
2966
+ for (var _i3 = 0, _Object$entries3 = Object.entries(data); _i3 < _Object$entries3.length; _i3++) {
2967
+ var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
2968
+ key = _Object$entries3$_i[0],
2969
+ value = _Object$entries3$_i[1];
2970
+
2971
+ if (Array.isArray(value)) formData.append.apply(formData, [key].concat(_toConsumableArray(value)));else formData.append(key, value);
2972
+ }
2973
+ });
2974
+ }
2975
+
2976
+ if (option.formDataAttributes) {
2977
+ var _appendData2 = option.formDataAttributes;
2978
+
2979
+ if (!Array.isArray(_appendData2)) {
2980
+ _appendData2 = [_appendData2];
2981
+ }
2982
+
2983
+ _appendData2.forEach(function (item) {
2984
+ if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
2985
+ });
2986
+ }
2987
+
2988
+ formData.append('file', blobSlice.call(file, start, end));
2989
+ formData.append('name', file.name);
2990
+ formData.append('total', blockCount.toString());
2991
+ formData.append('index', i.toString());
2992
+ formData.append('size', file.size.toString());
2993
+ formData.append('hash', hash.toString());
2994
+ var xhr = new XMLHttpRequest();
2995
+
2996
+ xhr.onreadystatechange = function () {
2997
+ if (xhr.readyState === 4) {
2998
+ var res = getRes(xhr);
2999
+
3000
+ if (xhr.status < 200 || xhr.status >= 300) {
3001
+ reject(res);
3002
+ option.onError(new Error('An error occurred during upload'));
3003
+ } else {
3004
+ resolve('reponseText');
3005
+ }
3006
+ }
3007
+ };
3008
+
3009
+ xhr.upload.addEventListener('progress', function (event) {
3010
+ var progressEvent = event;
3011
+ option.onProgress(progressEvent, i);
3012
+ }, false);
3013
+
3014
+ if (option.withCredentials && 'withCredentials' in xhr) {
3015
+ xhr.withCredentials = true;
3016
+ }
3017
+
3018
+ xhr.open(option.method, option.sliceUrl, true);
3019
+
3020
+ if (option.header) {
3021
+ if (Array.isArray(option.header)) {
3022
+ option.header.forEach(function (head) {
3023
+ var headerKey = head.name;
3024
+ var headerVal = head.value;
3025
+ xhr.setRequestHeader(headerKey, headerVal);
3026
+ });
3027
+ } else {
3028
+ var headerKey = option.header.name;
3029
+ var headerVal = option.header.value;
3030
+ xhr.setRequestHeader(headerKey, headerVal);
3031
+ }
3032
+ }
3033
+
3034
+ var headers = option.headers || {};
3035
+
3036
+ if (headers instanceof Headers) {
3037
+ headers.forEach(function (value, key) {
3038
+ return xhr.setRequestHeader(key, value);
3039
+ });
3040
+ } else {
3041
+ for (var _i4 = 0, _Object$entries4 = Object.entries(headers); _i4 < _Object$entries4.length; _i4++) {
3042
+ var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
3043
+ key = _Object$entries4$_i[0],
3044
+ value = _Object$entries4$_i[1];
3045
+
3046
+ if ((0,external_shared_.isNullOrUndef)(value)) continue;
3047
+ xhr.setRequestHeader(key, String(value));
3048
+ }
3049
+ }
3050
+
3051
+ xhr.send(formData);
3052
+ });
3053
+ progressList.push(pooltask);
3054
+ };
3055
+
3056
+ for (var i = 0; i < blockCount; i++) {
3057
+ _loop(i);
3058
+ }
3059
+ }; // SparkMD5分片文件
3060
+
3061
+
3062
+ var hashFile = function hashFile(file, chunkSize) {
3063
+ return new Promise(function (resolve, reject) {
3064
+ var chunks = Math.ceil(file.size / chunkSize);
3065
+ var currentChunk = 0;
3066
+ var spark = new (spark_md5_default()).ArrayBuffer();
3067
+ var fileReader = new FileReader();
3068
+
3069
+ function loadNext() {
3070
+ var start = currentChunk * chunkSize;
3071
+ var end = start + chunkSize >= file.size ? file.size : start + chunkSize;
3072
+ fileReader.readAsArrayBuffer(blobSlice.call(file, start, end));
3073
+ }
3074
+
3075
+ fileReader.onload = function (e) {
3076
+ spark.append(e.target.result); // Append array buffer
3077
+
3078
+ currentChunk += 1;
3079
+
3080
+ if (currentChunk < chunks) {
3081
+ loadNext();
3082
+ } else {
3083
+ var result = spark.end(); // 如果单纯的使用result 作为hash值的时候, 如果文件内容相同,而名称不同的时候
3084
+ // 想保留两个文件无法保留。所以把文件名称加上。
3085
+
3086
+ var sparkMd5 = new (spark_md5_default())();
3087
+ sparkMd5.append(result);
3088
+ sparkMd5.append(file.name);
3089
+ var hexHash = sparkMd5.end();
3090
+ resolve(hexHash);
3091
+ }
3092
+ };
3093
+
3094
+ fileReader.onerror = function () {
3095
+ reject(new Error('File slcie failed'));
3096
+ };
3097
+
3098
+ loadNext();
3099
+ })["catch"](function (err) {
3100
+ console.log(err);
3101
+ });
3102
+ };
3103
+ ;// CONCATENATED MODULE: ../../packages/upload/src/use-file-handler.ts
3104
+
3105
+
3106
+ /*
3107
+ * Tencent is pleased to support the open source community by making
3108
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3109
+ *
3110
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3111
+ *
3112
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3113
+ *
3114
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3115
+ *
3116
+ * ---------------------------------------------------
3117
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3118
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3119
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3120
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3121
+ *
3122
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3123
+ * the Software.
3124
+ *
3125
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3126
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3127
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3128
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3129
+ * IN THE SOFTWARE.
3130
+ */
3131
+
3132
+
3133
+
3134
+
3135
+ function buildFileId(index) {
3136
+ return Date.now() + index;
3137
+ }
3138
+
3139
+ /* harmony default export */ const use_file_handler = (function (props, hooks) {
3140
+ var maxImgSize = (0,external_vue_.computed)(function () {
3141
+ var _a;
3142
+
3143
+ if (typeof props.size === 'number') {
3144
+ return props.size;
3145
+ }
3146
+
3147
+ return (_a = props === null || props === void 0 ? void 0 : props.size) === null || _a === void 0 ? void 0 : _a.maxImgSize;
3148
+ });
3149
+ var maxFileSize = (0,external_vue_.computed)(function () {
3150
+ var _a;
3151
+
3152
+ if (typeof props.size === 'number') {
3153
+ return props.size;
3154
+ }
3155
+
3156
+ return (_a = props === null || props === void 0 ? void 0 : props.size) === null || _a === void 0 ? void 0 : _a.maxImgSize;
3157
+ }); // 文件列表,包括选择的和已上传
3158
+
3159
+ var fileList = (0,external_vue_.ref)([]);
3160
+
3161
+ function findFile(rawFile) {
3162
+ return fileList.value.find(function (item) {
3163
+ return item.uid === rawFile.uid;
3164
+ });
3165
+ }
3166
+
3167
+ var activeIndex = 0;
3168
+
3169
+ function handlePreprocess(file) {
3170
+ var _a;
3171
+
3172
+ activeIndex += 1;
3173
+ file.uid = buildFileId(activeIndex);
3174
+ var uploadFile = {
3175
+ uid: file.uid,
3176
+ name: file.name,
3177
+ status: EUploadStatus.NEW,
3178
+ size: file.size,
3179
+ raw: file
3180
+ };
3181
+ var isImage = file.type.startsWith('image/');
3182
+ var error = null; // 图片缩略图处理
3183
+
3184
+ if (isImage) {
3185
+ try {
3186
+ uploadFile.url = window.URL.createObjectURL(file);
3187
+ } catch (err) {
3188
+ console.error(err);
3189
+ }
3190
+
3191
+ uploadFile.isPic = true;
3192
+ } // 文件名称校验
3193
+
3194
+
3195
+ if (props.validateName && !((_a = props.validateName) === null || _a === void 0 ? void 0 : _a.test(uploadFile.name))) {
3196
+ uploadFile.status = EUploadStatus.FAIL;
3197
+ uploadFile.statusText = 'invalid filename';
3198
+ error = new Error(uploadFile.statusText);
3199
+ }
3200
+
3201
+ if (isImage && file.size > maxImgSize.value * Math.pow(1024, 2)) {
3202
+ uploadFile.status = EUploadStatus.FAIL;
3203
+ uploadFile.statusText = 'invalid file size';
3204
+ error = new Error(uploadFile.statusText);
3205
+ }
3206
+
3207
+ if (!isImage && file.size > maxFileSize.value * Math.pow(1024, 2)) {
3208
+ uploadFile.status = EUploadStatus.FAIL;
3209
+ uploadFile.statusText = 'invalid file size';
3210
+ error = new Error(uploadFile.statusText);
3211
+ }
3212
+
3213
+ fileList.value.push(uploadFile);
3214
+ return error;
3215
+ }
3216
+
3217
+ function handleRemove(file) {
3218
+ var _a;
3219
+
3220
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
3221
+ var uploadFile, remove, before;
3222
+ return regenerator_default().wrap(function _callee$(_context) {
3223
+ while (1) {
3224
+ switch (_context.prev = _context.next) {
3225
+ case 0:
3226
+ uploadFile = file instanceof File ? findFile(file) : file;
3227
+
3228
+ remove = function remove(file) {
3229
+ var _a;
3230
+
3231
+ hooks.onRemove(file, fileList.value);
3232
+ fileList.value.splice(fileList.value.indexOf(uploadFile), 1);
3233
+
3234
+ if ((_a = file.url) === null || _a === void 0 ? void 0 : _a.startsWith('blob:')) {
3235
+ URL.revokeObjectURL(file.url);
3236
+ }
3237
+ };
3238
+
3239
+ if (!props.beforeRemove) {
3240
+ _context.next = 9;
3241
+ break;
3242
+ }
3243
+
3244
+ _context.next = 5;
3245
+ return (_a = props.beforeRemove) === null || _a === void 0 ? void 0 : _a.call(props, uploadFile, fileList.value);
3246
+
3247
+ case 5:
3248
+ before = _context.sent;
3249
+
3250
+ if (before !== false) {
3251
+ remove(uploadFile);
3252
+ }
3253
+
3254
+ _context.next = 10;
3255
+ break;
3256
+
3257
+ case 9:
3258
+ remove(uploadFile);
3259
+
3260
+ case 10:
3261
+ case "end":
3262
+ return _context.stop();
3263
+ }
3264
+ }
3265
+ }, _callee);
3266
+ }));
3267
+ }
3268
+
3269
+ function handleError(err, rawFile, res) {
3270
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee2() {
3271
+ var file;
3272
+ return regenerator_default().wrap(function _callee2$(_context2) {
3273
+ while (1) {
3274
+ switch (_context2.prev = _context2.next) {
3275
+ case 0:
3276
+ file = findFile(rawFile);
3277
+
3278
+ if (file) {
3279
+ _context2.next = 3;
3280
+ break;
3281
+ }
3282
+
3283
+ return _context2.abrupt("return");
3284
+
3285
+ case 3:
3286
+ file.status = 'fail';
3287
+ file.statusText = err.message;
3288
+ file.response = res;
3289
+
3290
+ case 6:
3291
+ case "end":
3292
+ return _context2.stop();
3293
+ }
3294
+ }
3295
+ }, _callee2);
3296
+ }));
3297
+ }
3298
+
3299
+ function handleSuccess(res, rawFile) {
3300
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee3() {
3301
+ var file;
3302
+ return regenerator_default().wrap(function _callee3$(_context3) {
3303
+ while (1) {
3304
+ switch (_context3.prev = _context3.next) {
3305
+ case 0:
3306
+ file = findFile(rawFile);
3307
+
3308
+ if (file) {
3309
+ _context3.next = 3;
3310
+ break;
3311
+ }
3312
+
3313
+ return _context3.abrupt("return");
3314
+
3315
+ case 3:
3316
+ file.status = 'success';
3317
+ file.response = res;
3318
+
3319
+ case 5:
3320
+ case "end":
3321
+ return _context3.stop();
3322
+ }
3323
+ }
3324
+ }, _callee3);
3325
+ }));
3326
+ }
3327
+
3328
+ function handleProgress(event, rawFile) {
3329
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee4() {
3330
+ var file;
3331
+ return regenerator_default().wrap(function _callee4$(_context4) {
3332
+ while (1) {
3333
+ switch (_context4.prev = _context4.next) {
3334
+ case 0:
3335
+ // TODO slideUpload progress
3336
+ file = findFile(rawFile);
3337
+
3338
+ if (file) {
3339
+ _context4.next = 3;
3340
+ break;
3341
+ }
3342
+
3343
+ return _context4.abrupt("return");
3344
+
3345
+ case 3:
3346
+ file.status = 'uploading';
3347
+ file.percentage = Math.round(event.percent);
3348
+
3349
+ case 5:
3350
+ case "end":
3351
+ return _context4.stop();
3352
+ }
3353
+ }
3354
+ }, _callee4);
3355
+ }));
3356
+ }
3357
+
3358
+ (0,external_vue_.watch)(function () {
3359
+ return props.files;
3360
+ }, function (files) {
3361
+ fileList.value = files.map(function (file) {
3362
+ var _a, _b;
3363
+
3364
+ activeIndex += 1;
3365
+ return Object.assign(Object.assign({}, file), {
3366
+ uid: (_a = file.uid) !== null && _a !== void 0 ? _a : buildFileId(activeIndex),
3367
+ status: (_b = file.status) !== null && _b !== void 0 ? _b : EUploadStatus.SUCCESS
3368
+ });
3369
+ });
3370
+ }, {
3371
+ immediate: true,
3372
+ deep: true
3373
+ });
3374
+ return {
3375
+ fileList: fileList,
3376
+ handlePreprocess: handlePreprocess,
3377
+ handleRemove: handleRemove,
3378
+ handleError: handleError,
3379
+ handleSuccess: handleSuccess,
3380
+ handleProgress: handleProgress
3381
+ };
3382
+ });
3383
+ ;// CONCATENATED MODULE: ../../packages/upload/src/upload.tsx
3384
+
3385
+
3386
+
3387
+
3388
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = upload_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
3389
+
3390
+ function upload_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return upload_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return upload_arrayLikeToArray(o, minLen); }
3391
+
3392
+ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
3393
+
3394
+ /*
3395
+ * Tencent is pleased to support the open source community by making
3396
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3397
+ *
3398
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3399
+ *
3400
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3401
+ *
3402
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3403
+ *
3404
+ * ---------------------------------------------------
3405
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3406
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3407
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3408
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3409
+ *
3410
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3411
+ * the Software.
3412
+ *
3413
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3414
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3415
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3416
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3417
+ * IN THE SOFTWARE.
3418
+ */
3419
+
3420
+
3421
+
3422
+
3423
+
3424
+
3425
+
3426
+
3427
+
3428
+ /* harmony default export */ const upload = ((0,external_vue_.defineComponent)({
3429
+ name: 'Upload',
3430
+ props: props,
3431
+ emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done'],
3432
+ setup: function setup(props, _ref) {
3433
+ var slots = _ref.slots,
3434
+ emit = _ref.emit,
3435
+ expose = _ref.expose;
3436
+ var requests = (0,external_vue_.shallowRef)({});
3437
+ var isPhotowall = (0,external_vue_.computed)(function () {
3438
+ return props.theme === EThemes.PICTURE;
3439
+ });
3440
+ var isSinglePhoto = (0,external_vue_.computed)(function () {
3441
+ return isPhotowall.value && !props.multiple;
3442
+ });
3443
+ var classNames = (0,external_vue_.computed)(function () {
3444
+ var _classes;
3445
+
3446
+ var _a;
3447
+
3448
+ return (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, CLASS_PREFIX, true), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--").concat(props.theme), true), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--disabled"), props.disabled), _defineProperty(_classes, "".concat(CLASS_PREFIX, "--single-picture"), isSinglePhoto.value), _defineProperty(_classes, props.extCls, (_a = props.extCls) !== null && _a !== void 0 ? _a : false), _classes));
3449
+ });
3450
+ var triggerProps = (0,external_vue_.computed)(function () {
3451
+ return {
3452
+ theme: props.theme,
3453
+ multiple: props.multiple,
3454
+ disabled: props.disabled,
3455
+ accept: props.accept
3456
+ };
3457
+ });
3458
+
3459
+ function onRemove(file, fileList) {
3460
+ abort(file);
3461
+ emit('delete', file, fileList);
3462
+ }
3463
+
3464
+ var _useFileHandler = use_file_handler(props, {
3465
+ onRemove: onRemove
3466
+ }),
3467
+ fileList = _useFileHandler.fileList,
3468
+ handlePreprocess = _useFileHandler.handlePreprocess,
3469
+ handleRemove = _useFileHandler.handleRemove,
3470
+ handleProgress = _useFileHandler.handleProgress,
3471
+ handleSuccess = _useFileHandler.handleSuccess,
3472
+ handleError = _useFileHandler.handleError;
3473
+
3474
+ function handleFiles(files) {
3475
+ if (!files.length) {
3476
+ return;
3477
+ } // limit检查
3478
+
3479
+
3480
+ if (props.limit && fileList.value.length + files.length > props.limit) {
3481
+ emit('exceed', files, fileList.value);
3482
+ return;
3483
+ }
3484
+
3485
+ var sendFiles = files;
3486
+
3487
+ if (!props.multiple || props.limit === 1) {
3488
+ sendFiles = files.slice(0, 1);
3489
+ }
3490
+
3491
+ var _iterator = _createForOfIteratorHelper(sendFiles),
3492
+ _step;
3493
+
3494
+ try {
3495
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
3496
+ var file = _step.value;
3497
+ var rawFile = file;
3498
+ var error = handlePreprocess(rawFile);
3499
+
3500
+ if (error) {
3501
+ emit('error', rawFile, fileList.value, error);
3502
+ return;
3503
+ }
3504
+
3505
+ if (props.autoUpload) {
3506
+ upload(rawFile, sendFiles);
3507
+ }
3508
+ }
3509
+ } catch (err) {
3510
+ _iterator.e(err);
3511
+ } finally {
3512
+ _iterator.f();
3513
+ }
3514
+ }
3515
+
3516
+ ;
3517
+
3518
+ function handleRetry(file) {
3519
+ send(file.raw);
3520
+ }
3521
+
3522
+ function upload(file, sendFiles) {
3523
+ var _a;
3524
+
3525
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
3526
+ var beforeResult;
3527
+ return regenerator_default().wrap(function _callee$(_context) {
3528
+ while (1) {
3529
+ switch (_context.prev = _context.next) {
3530
+ case 0:
3531
+ if (props.beforeUpload) {
3532
+ _context.next = 2;
3533
+ break;
3534
+ }
3535
+
3536
+ return _context.abrupt("return", send(file, sendFiles));
3537
+
3538
+ case 2:
3539
+ _context.prev = 2;
3540
+ _context.next = 5;
3541
+ return (_a = props.beforeUpload) === null || _a === void 0 ? void 0 : _a.call(props, file);
3542
+
3543
+ case 5:
3544
+ beforeResult = _context.sent;
3545
+ _context.next = 11;
3546
+ break;
3547
+
3548
+ case 8:
3549
+ _context.prev = 8;
3550
+ _context.t0 = _context["catch"](2);
3551
+ beforeResult = false;
3552
+
3553
+ case 11:
3554
+ if (!(beforeResult === false)) {
3555
+ _context.next = 14;
3556
+ break;
3557
+ }
3558
+
3559
+ handleRemove(file);
3560
+ return _context.abrupt("return");
3561
+
3562
+ case 14:
3563
+ send(file, sendFiles);
3564
+
3565
+ case 15:
3566
+ case "end":
3567
+ return _context.stop();
3568
+ }
3569
+ }
3570
+ }, _callee, null, [[2, 8]]);
3571
+ }));
3572
+ }
3573
+
3574
+ function send(file, sendFiles) {
3575
+ var headers = props.headers,
3576
+ header = props.header,
3577
+ data = props.data,
3578
+ formDataAttributes = props.formDataAttributes,
3579
+ method = props.method,
3580
+ withCredentials = props.withCredentials,
3581
+ filename = props.name,
3582
+ url = props.url,
3583
+ sliceUrl = props.sliceUrl,
3584
+ mergeUrl = props.mergeUrl,
3585
+ chunkSize = props.chunkSize,
3586
+ customRequest = props.customRequest;
3587
+ var uid = file.uid;
3588
+ var options = {
3589
+ headers: headers,
3590
+ header: header,
3591
+ withCredentials: withCredentials,
3592
+ file: file,
3593
+ data: data,
3594
+ formDataAttributes: formDataAttributes,
3595
+ method: method,
3596
+ filename: filename,
3597
+ action: url,
3598
+ sliceUrl: sliceUrl,
3599
+ mergeUrl: mergeUrl,
3600
+ chunkSize: chunkSize,
3601
+ onProgress: function onProgress(event) {
3602
+ handleProgress(event, file);
3603
+ emit('progress', event, file, fileList.value);
3604
+ },
3605
+ onSuccess: function onSuccess(res) {
3606
+ var _a;
3607
+
3608
+ var result = res;
3609
+
3610
+ if ((_a = props === null || props === void 0 ? void 0 : props.handleResCode) === null || _a === void 0 ? void 0 : _a.call(props, result)) {
3611
+ handleSuccess(res, file);
3612
+ emit('success', res, file, fileList.value);
3613
+ } else {
3614
+ var err = new Error((result === null || result === void 0 ? void 0 : result.message) || 'unknow error');
3615
+ handleError(err, file, res);
3616
+ emit('error', file, fileList.value, err);
3617
+ }
3618
+
3619
+ delete requests.value[uid];
3620
+ },
3621
+ onError: function onError(err) {
3622
+ handleError(err, file);
3623
+ emit('error', file, fileList.value, err);
3624
+ delete requests.value[uid];
3625
+ },
3626
+ onComplete: function onComplete() {
3627
+ if (sendFiles && sendFiles.indexOf(file) === sendFiles.length - 1) {
3628
+ emit('done', fileList.value);
3629
+ }
3630
+ }
3631
+ };
3632
+ var uploadFn = props.sliceUpload ? ajaxSliceUpload : ajaxUpload;
3633
+
3634
+ if (customRequest) {
3635
+ uploadFn = customRequest;
3636
+ }
3637
+
3638
+ var request = uploadFn(options);
3639
+ requests.value[uid] = request;
3640
+
3641
+ if (request instanceof Promise) {
3642
+ request.then(options.onSuccess, options.onError);
3643
+ }
3644
+ }
3645
+
3646
+ function abort(file) {
3647
+ var reqs = requests.value;
3648
+
3649
+ if (file) {
3650
+ reqs = _defineProperty({}, file.uid, requests.value[file.uid]);
3651
+ }
3652
+
3653
+ Object.keys(reqs).forEach(function (uid) {
3654
+ if (reqs[uid] instanceof XMLHttpRequest) {
3655
+ var xhr = reqs[uid];
3656
+ xhr === null || xhr === void 0 ? void 0 : xhr.abort();
3657
+ }
3658
+
3659
+ delete requests.value[uid];
3660
+ });
3661
+ }
3662
+
3663
+ (0,external_vue_.onBeforeUnmount)(function () {
3664
+ fileList.value.forEach(function (_ref2) {
3665
+ var url = _ref2.url;
3666
+ if (url === null || url === void 0 ? void 0 : url.startsWith('blob:')) URL.revokeObjectURL(url);
3667
+ });
3668
+ });
3669
+ expose({
3670
+ handleRemove: handleRemove,
3671
+ handleRetry: handleRetry
3672
+ });
3673
+ return function () {
3674
+ return (0,external_vue_.createVNode)("div", {
3675
+ "class": classNames.value
3676
+ }, [!isPhotowall.value && (0,external_vue_.createVNode)(upload_trigger, (0,external_vue_.mergeProps)(triggerProps.value, {
3677
+ "onChange": handleFiles
3678
+ }), slots), slots.tip ? slots.tip() : props.tip && (0,external_vue_.createVNode)("div", {
3679
+ "class": "".concat(CLASS_PREFIX, "__tip")
3680
+ }, [props.tip]), (0,external_vue_.createVNode)(upload_list, {
3681
+ "files": fileList.value,
3682
+ "theme": props.theme,
3683
+ "disabled": props.disabled,
3684
+ "multiple": props.multiple,
3685
+ "onRemove": handleRemove,
3686
+ "onRetry": handleRetry
3687
+ }, {
3688
+ innerTrigger: function innerTrigger(file) {
3689
+ return isPhotowall.value && (0,external_vue_.createVNode)(upload_trigger, (0,external_vue_.mergeProps)(triggerProps.value, {
3690
+ "file": file,
3691
+ "onChange": handleFiles,
3692
+ "onRemove": handleRemove
3693
+ }), slots);
3694
+ },
3695
+ file: slots.file
3696
+ })]);
3697
+ };
3698
+ }
3699
+ }));
3700
+ ;// CONCATENATED MODULE: ../../packages/upload/src/index.ts
3701
+ /*
3702
+ * Tencent is pleased to support the open source community by making
3703
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
3704
+ *
3705
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
3706
+ *
3707
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
3708
+ *
3709
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
3710
+ *
3711
+ * ---------------------------------------------------
3712
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3713
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3714
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3715
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3716
+ *
3717
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3718
+ * the Software.
3719
+ *
3720
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3721
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3722
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3723
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3724
+ * IN THE SOFTWARE.
3725
+ */
3726
+
3727
+
3728
+ var Upload = (0,external_shared_.withInstall)(upload);
3729
+ /* harmony default export */ const src = (Upload);
3730
+ })();
3731
+
3732
+ /******/ return __webpack_exports__;
3733
+ /******/ })()
3734
+ ;
3735
+ });