bkui-vue 0.0.2-beta.35 → 0.0.2-beta.37

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 (182) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +30 -14
  3. package/dist/index.umd.js +44 -44
  4. package/lib/affix/index.js +391 -1
  5. package/lib/alert/index.js +287 -1
  6. package/lib/animate-number/index.js +219 -1
  7. package/lib/backtop/index.js +264 -1
  8. package/lib/badge/index.js +304 -1
  9. package/lib/breadcrumb/index.js +379 -1
  10. package/lib/button/index.js +403 -1
  11. package/lib/card/index.js +369 -1
  12. package/lib/cascader/index.js +2095 -2
  13. package/lib/checkbox/index.js +602 -1
  14. package/lib/code-diff/index.js +5548 -1
  15. package/lib/collapse/index.js +605 -1
  16. package/lib/collapse-transition/index.js +237 -1
  17. package/lib/color-picker/index.js +2735 -1
  18. package/lib/components.js +770 -1
  19. package/lib/config-provider/index.js +377 -1
  20. package/lib/container/index.js +408 -1
  21. package/lib/date-picker/index.js +5576 -1
  22. package/lib/dialog/index.js +1324 -2
  23. package/lib/directives/index.js +1386 -2
  24. package/lib/dist.index.js +179 -1
  25. package/lib/divider/index.js +237 -1
  26. package/lib/dropdown/index.js +455 -1
  27. package/lib/exception/index.js +435 -1
  28. package/lib/fixed-navbar/index.js +222 -1
  29. package/lib/form/index.js +1004 -1
  30. package/lib/hooks.js +133 -1
  31. package/lib/icon/angle-double-down-line.js +541 -1
  32. package/lib/icon/angle-double-left-line.js +541 -1
  33. package/lib/icon/angle-double-left.js +541 -1
  34. package/lib/icon/angle-double-right-line.js +541 -1
  35. package/lib/icon/angle-double-right.js +541 -1
  36. package/lib/icon/angle-double-up-line.js +541 -1
  37. package/lib/icon/angle-down-fill.js +541 -1
  38. package/lib/icon/angle-down-line.js +541 -1
  39. package/lib/icon/angle-down.js +541 -1
  40. package/lib/icon/angle-left.js +541 -1
  41. package/lib/icon/angle-right.js +541 -1
  42. package/lib/icon/angle-up-fill.js +541 -1
  43. package/lib/icon/angle-up.js +541 -1
  44. package/lib/icon/archive-fill.js +541 -1
  45. package/lib/icon/arrows-left.js +541 -1
  46. package/lib/icon/arrows-right.js +541 -1
  47. package/lib/icon/assistant.js +541 -1
  48. package/lib/icon/audio-fill.js +541 -1
  49. package/lib/icon/bk.js +541 -1
  50. package/lib/icon/circle.js +541 -1
  51. package/lib/icon/close-line.js +541 -1
  52. package/lib/icon/close.js +541 -1
  53. package/lib/icon/code.js +541 -1
  54. package/lib/icon/cog-shape.js +541 -1
  55. package/lib/icon/collapse-left.js +541 -1
  56. package/lib/icon/copy-shape.js +541 -1
  57. package/lib/icon/copy.js +541 -1
  58. package/lib/icon/data-shape.js +541 -1
  59. package/lib/icon/del.js +541 -1
  60. package/lib/icon/doc-fill.js +541 -1
  61. package/lib/icon/done.js +541 -1
  62. package/lib/icon/down-shape.js +541 -1
  63. package/lib/icon/down-small.js +541 -1
  64. package/lib/icon/edit-line.js +541 -1
  65. package/lib/icon/ellipsis.js +541 -1
  66. package/lib/icon/enlarge-line.js +541 -1
  67. package/lib/icon/error.js +541 -1
  68. package/lib/icon/excel-fill.js +541 -1
  69. package/lib/icon/exclamation-circle-shape.js +541 -1
  70. package/lib/icon/eye.js +541 -1
  71. package/lib/icon/filliscreen-line.js +541 -1
  72. package/lib/icon/fix-line.js +541 -1
  73. package/lib/icon/fix-shape.js +541 -1
  74. package/lib/icon/folder-open.js +541 -1
  75. package/lib/icon/folder-shape-open.js +541 -1
  76. package/lib/icon/folder-shape.js +541 -1
  77. package/lib/icon/folder.js +541 -1
  78. package/lib/icon/funnel.js +541 -1
  79. package/lib/icon/help-document-fill.js +541 -1
  80. package/lib/icon/help-fill.js +541 -1
  81. package/lib/icon/help.js +541 -1
  82. package/lib/icon/image-fill.js +563 -1
  83. package/lib/icon/img-error.js +563 -1
  84. package/lib/icon/img-placehoulder.js +563 -1
  85. package/lib/icon/index.js +2353 -1
  86. package/lib/icon/info-line.js +563 -1
  87. package/lib/icon/info.js +563 -1
  88. package/lib/icon/left-shape.js +563 -1
  89. package/lib/icon/left-turn-line.js +563 -1
  90. package/lib/icon/narrow-line.js +563 -1
  91. package/lib/icon/original.js +563 -1
  92. package/lib/icon/pdf-fill.js +563 -1
  93. package/lib/icon/play-shape.js +563 -1
  94. package/lib/icon/plus.js +563 -1
  95. package/lib/icon/ppt-fill.js +563 -1
  96. package/lib/icon/qq.js +563 -1
  97. package/lib/icon/right-shape.js +563 -1
  98. package/lib/icon/right-turn-line.js +563 -1
  99. package/lib/icon/search.js +563 -1
  100. package/lib/icon/share.js +563 -1
  101. package/lib/icon/spinner.js +563 -1
  102. package/lib/icon/success.js +563 -1
  103. package/lib/icon/switcher-loading.js +563 -1
  104. package/lib/icon/text-file.js +563 -1
  105. package/lib/icon/text-fill.js +563 -1
  106. package/lib/icon/transfer.js +563 -1
  107. package/lib/icon/tree-application-shape.js +563 -1
  108. package/lib/icon/unfull-screen.js +563 -1
  109. package/lib/icon/unvisible.js +563 -1
  110. package/lib/icon/up-shape.js +563 -1
  111. package/lib/icon/upload.js +563 -1
  112. package/lib/icon/video-fill.js +563 -1
  113. package/lib/icon/warn.js +563 -1
  114. package/lib/icon/weixin-pro.js +563 -1
  115. package/lib/icon/weixin.js +563 -1
  116. package/lib/image/index.js +681 -1
  117. package/lib/index.js +195 -1
  118. package/lib/info-box/index.js +1514 -2
  119. package/lib/input/index.js +1038 -1
  120. package/lib/link/index.js +232 -1
  121. package/lib/loading/index.js +443 -1
  122. package/lib/locale/index.js +489 -1
  123. package/lib/menu/index.js +793 -1
  124. package/lib/message/index.js +1842 -2
  125. package/lib/message/messageConstructor.d.ts +1 -1
  126. package/lib/modal/index.js +407 -1
  127. package/lib/navigation/index.js +439 -1
  128. package/lib/notify/index.js +470 -1
  129. package/lib/overflow-title/index.js +547 -1
  130. package/lib/pagination/index.js +974 -1
  131. package/lib/plugin-popover/index.js +4121 -1
  132. package/lib/plugins/index.js +130 -1
  133. package/lib/pop-confirm/index.js +367 -1
  134. package/lib/popover/content.d.ts +8 -0
  135. package/lib/popover/index.d.ts +12 -0
  136. package/lib/popover/index.js +4127 -1
  137. package/lib/popover/popover.d.ts +7 -0
  138. package/lib/popover/props.d.ts +3 -0
  139. package/lib/popover2/index.js +171 -1
  140. package/lib/preset.js +164 -1
  141. package/lib/process/index.js +1146 -2
  142. package/lib/progress/index.js +495 -1
  143. package/lib/radio/index.js +693 -1
  144. package/lib/rate/index.js +406 -1
  145. package/lib/resize-layout/index.js +499 -1
  146. package/lib/search-select/index.js +3024 -2
  147. package/lib/select/index.d.ts +25 -3
  148. package/lib/select/index.js +2599 -2
  149. package/lib/select/select.d.ts +11 -1
  150. package/lib/shared/index.js +2832 -1
  151. package/lib/sideslider/index.js +1056 -2
  152. package/lib/slider/index.js +1683 -2
  153. package/lib/steps/index.js +1215 -2
  154. package/lib/swiper/index.js +404 -1
  155. package/lib/switcher/index.js +335 -1
  156. package/lib/tab/index.js +935 -1
  157. package/lib/table/index.js +6588 -1
  158. package/lib/table-column/index.js +768 -1
  159. package/lib/tag/index.js +309 -1
  160. package/lib/tag-input/index.d.ts +9 -0
  161. package/lib/tag-input/index.js +1758 -1
  162. package/lib/tag-input/tag-input.d.ts +20 -0
  163. package/lib/tag-input/tag-props.d.ts +3 -0
  164. package/lib/time-picker/index.js +142 -1
  165. package/lib/timeline/index.js +310 -1
  166. package/lib/transfer/index.js +767 -1
  167. package/lib/tree/index.js +2664 -1
  168. package/lib/upload/index.js +3257 -2
  169. package/lib/virtual-render/index.js +806 -1
  170. package/package.json +1 -1
  171. package/lib/cascader/index.js.LICENSE.txt +0 -1
  172. package/lib/dialog/index.js.LICENSE.txt +0 -1
  173. package/lib/directives/index.js.LICENSE.txt +0 -14
  174. package/lib/info-box/index.js.LICENSE.txt +0 -1
  175. package/lib/message/index.js.LICENSE.txt +0 -6
  176. package/lib/process/index.js.LICENSE.txt +0 -1
  177. package/lib/search-select/index.js.LICENSE.txt +0 -1
  178. package/lib/select/index.js.LICENSE.txt +0 -1
  179. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  180. package/lib/slider/index.js.LICENSE.txt +0 -1
  181. package/lib/steps/index.js.LICENSE.txt +0 -1
  182. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1,2 +1,2599 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"),require("../checkbox"),require("../config-provider"),require("../icon"),require("../directives"),require("../input"),require("../loading"),require("../popover"),require("../virtual-render"),require("../tag"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash","../checkbox","../config-provider","../icon","../directives","../input","../loading","../popover","../virtual-render","../tag"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash"),require("../checkbox"),require("../config-provider"),require("../icon"),require("../directives"),require("../input"),require("../loading"),require("../popover"),require("../virtual-render"),require("../tag")):t(e["../shared"],e.vue,e.lodash,e["../checkbox"],e["../config-provider"],e["../icon"],e["../directives"],e["../input"],e["../loading"],e["../popover"],e["../virtual-render"],e["../tag"]);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r,n,l,a,i,u,s,c,d)=>(()=>{var p={5800:e=>{"use strict";e.exports=r},2717:e=>{"use strict";e.exports=n},4061:e=>{"use strict";e.exports=a},6870:e=>{"use strict";e.exports=l},8133:e=>{"use strict";e.exports=i},4870:e=>{"use strict";e.exports=u},5537:e=>{"use strict";e.exports=s},4212:t=>{"use strict";t.exports=e},7739:e=>{"use strict";e.exports=d},3511:e=>{"use strict";e.exports=c},467:e=>{"use strict";e.exports=o},748:e=>{"use strict";e.exports=t},7609:(e,t,o)=>{var r=o(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},o=Object.prototype,l=o.hasOwnProperty,a=Object.defineProperty||function(e,t,o){e[t]=o.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function d(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,o){return e[t]=o}}function p(e,t,o,r){var n=t&&t.prototype instanceof h?t:h,l=Object.create(n.prototype),i=new O(r||[]);return a(l,"_invoke",{value:P(e,o,i)}),l}function v(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var f={};function h(){}function g(){}function y(){}var m={};d(m,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(I([])));w&&w!==o&&l.call(w,u)&&(m=w);var T=y.prototype=h.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(n,a,i,u){var s=v(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==r(d)&&l.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,u)}),(function(e){o("throw",e,i,u)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return o("throw",e,i,u)}))}u(s.arg)}var n;a(this,"_invoke",{value:function(e,r){function l(){return new t((function(t,n){o(e,r,t,n)}))}return n=n?n.then(l,l):l()}})}function P(e,t,o){var r="suspendedStart";return function(n,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw l;return{value:void 0,done:!0}}for(o.method=n,o.arg=l;;){var a=o.delegate;if(a){var i=N(a,o);if(i){if(i===f)continue;return i}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var u=v(e,t,o);if("normal"===u.type){if(r=o.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(r="completed",o.method="throw",o.arg=u.arg)}}}function N(e,t){var o=t.method,r=e.iterator[o];if(void 0===r)return t.delegate=null,"throw"===o&&e.iterator.return&&(t.method="return",t.arg=void 0,N(e,t),"throw"===t.method)||"return"!==o&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+o+"' method")),f;var n=v(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var l=n.arg;return l?l.done?(t[e.resultName]=l.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):l:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function C(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 V(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function t(){for(;++o<e.length;)if(l.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}return g.prototype=y,a(T,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:g,configurable:!0}),g.displayName=d(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,d(e,c,"GeneratorFunction")),e.prototype=Object.create(T),e},t.awrap=function(e){return{__await:e}},x(S.prototype),d(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,o,r,n,l){void 0===l&&(l=Promise);var a=new S(p(e,o,r,n),l);return t.isGeneratorFunction(o)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(T),d(T,c,"Generator"),d(T,u,(function(){return this})),d(T,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),o=[];for(var r in t)o.push(r);return o.reverse(),function e(){for(;o.length;){var r=o.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},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 t=this;function o(o,r){return a.type="throw",a.arg=e,t.next=o,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],a=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var i=l.call(n,"catchLoc"),u=l.call(n,"finallyLoc");if(i&&u){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(i){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var a=n?n.completion:{};return a.type=e,a.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(a)},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),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),V(o),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc===e){var r=o.completion;if("throw"===r.type){var n=r.arg;V(o)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,o){return this.delegate={iterator:I(e),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,o)=>{var r=o(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},v={};function f(e){var t=v[e];if(void 0!==t)return t.exports;var o=v[e]={exports:{}};return p[e](o,o.exports,f),o.exports}f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},f.d=(e,t)=>{for(var o in t)f.o(t,o)&&!f.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};return(()=>{"use strict";f.r(h),f.d(h,{BkOption:()=>m,BkOptionGroup:()=>T,BkSelect:()=>A,default:()=>D});var e=f(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function o(e,o,r){return(o=function(e){var o=function(e,o){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(o)?o:String(o)}(o))in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}var r=f(748),n=f(467),l=f(5800),a=f.n(l),i=f(2717),u=f(6870),s=f(2841),c=f.n(s);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var d=Symbol("BkSelect"),p=Symbol("BkOptionGroup");function v(e){return{register:function(t,o){if(o){if(!e.value.has(t))return e.value.set(t,o);console.warn("repeat ".concat(t),o)}},unregister:function(t){e.value.delete(t)}}}function g(e,t){var o=this,n=function(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=e;return(0,r.customRef)((function(e,r){return{get:function(){return e(),n},set:function(e){clearTimeout(t),void 0===e||""===e?(n=e,r()):t=setTimeout((function(){n=e,r()}),o)}}}))}(""),l=(0,r.ref)(!1);return(0,r.watch)(n,(function(){return r=o,a=void 0,i=void 0,u=c().mark((function o(){return c().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,l.value=!0,o.next=4,e(n.value);case 4:l.value=!1,o.next=10;break;case 7:o.prev=7,o.t0=o.catch(0),console.error(o.t0);case 10:return o.prev=10,null==t||t(),o.finish(10);case 13:case"end":return o.stop()}}),o,null,[[0,7,10,13]])})),new(i||(i=Promise))((function(e,t){function o(e){try{l(u.next(e))}catch(e){t(e)}}function n(e){try{l(u.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof i?r:new i((function(e){e(r)}))).then(o,n)}l((u=u.apply(r,a||[])).next())}));var r,a,i,u})),{searchKey:n,searchLoading:l}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?String(e).trim().toLowerCase():e}const m=(0,r.defineComponent)({name:"Option",props:{id:{type:[String,Number,Object],require:!0},name:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),disabled:e.PropTypes.bool.def(!1)},setup:function(e,t){var o=t.attrs,l=(0,r.getCurrentInstance)().proxy,a=(0,r.reactive)({visible:!0}),u=(0,r.toRefs)(e),s=u.disabled,c=u.id,v=u.name,f=(0,r.computed)((function(){return void 0!==v.value?v.value:o.label})),h=(0,r.computed)((function(){return void 0!==c.value?c.value:o.value})),g=(0,r.inject)(d,null),y=(0,r.inject)(p,null),m=(0,r.computed)((function(){var e;return null===(e=null==g?void 0:g.selected)||void 0===e?void 0:e.some((function(e){return(0,n.isEqual)(e.value,h.value)}))})),b=(0,r.computed)((function(){return null==g?void 0:g.multiple})),w=(0,r.computed)((function(){return(null==g?void 0:g.activeOptionValue)===h.value})),T=(0,r.computed)((function(){return(null==g?void 0:g.showSelectedIcon)&&b.value})),x=(0,r.computed)((function(){return null==g?void 0:g.selectedStyle}));(0,r.onBeforeMount)((function(){null==g||g.register(h.value,l),null==y||y.register(h.value,l)})),(0,r.onBeforeUnmount)((function(){null==g||g.unregister(h.value),null==y||y.unregister(h.value)}));var S=(0,i.usePrefix)().resolveClassName;return Object.assign(Object.assign({},(0,r.toRefs)(a)),{selected:m,multiple:b,isHover:w,showSelectedIcon:T,selectedStyle:x,optionName:f,optionID:h,handleOptionClick:function(){s.value||null==g||g.handleOptionSelected(l)},handleMouseEnter:function(){g.activeOptionValue=h.value},resolveClassName:S})},render:function(){var t,n,l,i=(0,e.classes)(o({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===e.SelectedTypeEnum.CHECKBOX},this.resolveClassName("select-option"),!0));return(0,r.withDirectives)((0,r.createVNode)("li",{class:i,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[this.showSelectedIcon&&this.selectedStyle===e.SelectedTypeEnum.CHECKBOX&&(0,r.createVNode)(a(),{disabled:this.disabled,class:this.resolveClassName("select-checkbox"),modelValue:this.selected},null),null!==(l=null===(n=(t=this.$slots).default)||void 0===n?void 0:n.call(t))&&void 0!==l?l:(0,r.createVNode)("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===e.SelectedTypeEnum.CHECK&&(0,r.createVNode)(u.Done,{class:this.resolveClassName("select-selected-icon"),width:22,height:22},null)]),[[r.vShow,this.visible]])}});function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function w(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?b(e,t):void 0}}(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.")}()}const T=(0,r.defineComponent)({name:"OptionGroup",props:{label:e.PropTypes.string.def(""),disabled:e.PropTypes.bool.def(!1),collapsible:e.PropTypes.bool.def(!1),collapse:e.PropTypes.bool.def(!1)},setup:function(e,t){var o=t.emit,n=(0,r.getCurrentInstance)(),l=n.proxy,a=(0,r.inject)(d,null),u=(0,r.reactive)({groupCollapse:e.collapse,visible:!0}),s=(0,r.ref)(new Map),c=v(s),f=c.register,h=c.unregister,g=(0,r.computed)((function(){return"".concat(e.label," (").concat(w(s.value.values()).filter((function(e){return e.visible})).length,")")}));(0,r.provide)(p,(0,r.reactive)(Object.assign(Object.assign({},(0,r.toRefs)(e)),{register:f,unregister:h,groupCollapse:(0,r.toRef)(u,"groupCollapse")}))),(0,r.onBeforeMount)((function(){null==a||a.registerGroup(n.uid,l)})),(0,r.onBeforeUnmount)((function(){null==a||a.unregisterGroup(n.uid)}));var y=(0,i.usePrefix)().resolveClassName;return Object.assign(Object.assign({},(0,r.toRefs)(u)),{groupLabel:g,handleToggleCollapse:function(){e.collapsible&&!e.disabled&&(u.groupCollapse=!u.groupCollapse,o("update:collapse",u.groupCollapse))},resolveClassName:y})},render:function(){var t,n,l,a,i=(0,e.classes)((o(t={},this.resolveClassName("option-group"),!0),o(t,"collapsible",this.collapsible),o(t,"disabled",this.disabled),t)),s=(0,e.classes)((o(n={},this.resolveClassName("option-group-label"),!0),o(n,"collapsible",this.collapsible),n)),c=(0,e.classes)({"default-group-label-icon":!0,collapse:this.groupCollapse});return(0,r.withDirectives)((0,r.createVNode)("ul",{class:i},[(0,r.createVNode)("li",{class:s,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():(0,r.createVNode)("span",{class:"default-group-label"},[this.collapsible&&(0,r.createVNode)(u.AngleUpFill,{class:c},null),(0,r.createVNode)("span",{class:"default-group-label-title"},[this.groupLabel])])]),(0,r.withDirectives)((0,r.createVNode)("ul",{class:this.resolveClassName("option-group-content")},[null===(a=(l=this.$slots).default)||void 0===a?void 0:a.call(l)]),[[r.vShow,!this.groupCollapse]])]),[[r.vShow,this.visible]])}});var x=f(4061),S=f(8133),P=f.n(S),N=f(4870),C=f.n(N),V=f(5537),O=f.n(V),I=f(3511),E=f.n(I),j=f(7739),L=f.n(j);const R=(0,r.defineComponent)({name:"SelectTagInput",props:{selected:{type:Array,default:function(){return[]}},tagTheme:(0,e.TagThemeType)(),placeholder:e.PropTypes.string.def(""),filterable:e.PropTypes.bool.def(!1),allowCreate:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),modelValue:e.PropTypes.any,collapseTags:e.PropTypes.bool.def(!1)},emits:["update:modelValue","remove","enter","keydown"],setup:function(e,t){var o=t.emit,l=(0,i.usePrefix)().resolveClassName,a=(0,r.inject)(d,null),u=(0,r.toRefs)(e),s=u.modelValue,c=u.collapseTags,p=u.selected,v=(0,r.ref)(s.value),f=(0,r.ref)(),h=(0,r.ref)(null);(0,r.watch)(s,(function(){v.value=s.value})),(0,r.watch)([p,c],(function(){m()}),{flush:"post"});var g=(0,r.ref)([]),y=(0,r.ref)(),m=function(){c.value&&(h.value=null,setTimeout((function(){var e,t,o=g.value.map((function(e){return null==e?void 0:e.$el})).filter((function(e){return!!e})),r=o.findIndex((function(e,t){return!!t&&o[t-1].offsetTop!==e.offsetTop}));h.value=r>0?r:null,(null===(e=o[h.value])||void 0===e?void 0:e.offsetTop)!==(null===(t=y.value)||void 0===t?void 0:t.offsetTop)&&h.value>1&&(h.value-=1)})))},b=(0,n.debounce)(m,150),w=(0,r.ref)(),T=new ResizeObserver((function(){b()}));return(0,r.onMounted)((function(){w.value&&T.observe(w.value)})),(0,r.onBeforeUnmount)((function(){w.value&&T.unobserve(w.value)})),{collapseTagRef:y,tagWrapperRef:w,tagsRefs:g,select:a,overflowTagIndex:h,value:v,inputRef:f,handleRemoveTag:function(e){o("remove",e)},focus:function(){var e;null===(e=f.value)||void 0===e||e.focus()},handleInput:function(e){o("update:modelValue",e.target.value)},handleKeydown:function(e){"Enter"===e.code&&o("enter",e.target.value,e),o("keydown",e.target.value,e)},resolveClassName:l}},render:function(){var t,n,l,a,i,u,s,c,d,p,v=this,f=null===(l=null===(n=this.$slots)||void 0===n?void 0:n.prefix)||void 0===l?void 0:l.call(n),h=(0,e.classes)((o(t={},this.resolveClassName("select-tag"),!0),o(t,this.resolveClassName("select-tag--default"),!0),o(t,"is-disabled",this.disabled),o(t,"collapse-tag",this.collapseTags),o(t,"has-prefix",!!f),t)),g=(0,e.classes)(o({},this.resolveClassName("select-tag-wrapper"),!0)),y={display:this.selected.length&&!this.filterable?"none":""};return(0,r.createVNode)("div",{class:h,ref:"tagWrapperRef"},[null===(i=null===(a=this.$slots)||void 0===a?void 0:a.prefix)||void 0===i?void 0:i.call(a),(0,r.createVNode)("div",{class:g},[null!==(c=null===(s=(u=this.$slots).default)||void 0===s?void 0:s.call(u))&&void 0!==c?c:this.selected.map((function(e,t){var o;return(0,r.createVNode)(L(),{closable:!0,theme:v.tagTheme,style:{display:v.collapseTags&&v.overflowTagIndex&&t>=v.overflowTagIndex?"none":""},ref:function(e){return v.tagsRefs[t]=e},onClose:function(){return v.handleRemoveTag(e.value)}},{default:function(){return[null===(o=v.select)||void 0===o?void 0:o.handleGetLabelByValue(e.value)]}})})),(0,r.createVNode)(L(),{class:this.resolveClassName("select-overflow-tag"),style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},ref:"collapseTagRef"},{default:function(){return[(0,r.createTextVNode)("+"),v.selected.length-v.overflowTagIndex]}}),(0,r.createVNode)("input",{class:this.resolveClassName("select-tag-input"),ref:"inputRef",type:"text",style:y,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),null===(p=null===(d=this.$slots)||void 0===d?void 0:d.suffix)||void 0===p?void 0:p.call(d)])}});function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}const M=(0,r.defineComponent)({name:"Select",directives:{clickoutside:x.clickoutside},props:{modelValue:e.PropTypes.any,multiple:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),size:e.PropTypes.size().def(e.SizeEnum.DEFAULT),clearable:e.PropTypes.bool.def(!0),loading:e.PropTypes.bool.def(!1),filterable:e.PropTypes.bool.def(!1),remoteMethod:e.PropTypes.func,scrollHeight:e.PropTypes.number.def(200),showSelectAll:e.PropTypes.bool.def(!1),popoverMinWidth:e.PropTypes.number.def(0),showOnInit:e.PropTypes.bool.def(!1),multipleMode:e.PropTypes.oneOf(["default","tag"]).def("default"),tagTheme:(0,e.TagThemeType)(),behavior:(0,e.InputBehaviorType)(),collapseTags:e.PropTypes.bool.def(!1),autoHeight:e.PropTypes.bool.def(!0),noDataText:e.PropTypes.string,noMatchText:e.PropTypes.string,loadingText:e.PropTypes.string,placeholder:e.PropTypes.string,searchPlaceholder:e.PropTypes.string,selectAllText:e.PropTypes.string,scrollLoading:e.PropTypes.bool.def(!1),allowCreate:e.PropTypes.bool.def(!1),popoverOptions:Object,customContent:e.PropTypes.bool.def(!1),list:e.PropTypes.arrayOf(e.PropTypes.any).def([]),idKey:e.PropTypes.string.def("value"),displayKey:e.PropTypes.string.def("label"),withValidate:e.PropTypes.bool.def(!0),showSelectedIcon:e.PropTypes.bool.def(!0),inputSearch:e.PropTypes.bool.def(!0),enableVirtualRender:e.PropTypes.bool.def(!1),allowEmptyValues:e.PropTypes.array.def([]),autoFocus:e.PropTypes.bool.def(!1),keepSearchValue:e.PropTypes.bool.def(!1),prefix:e.PropTypes.string,selectedStyle:(0,e.SelectedType)()},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup:function(o,l){var a=l.emit,u=(0,i.useLocale)("select"),s=(0,i.usePrefix)().resolveClassName,c=(0,r.toRefs)(o),p=c.modelValue,f=c.disabled,h=c.filterable,m=c.multiple,b=c.remoteMethod,T=c.loading,x=c.popoverMinWidth,S=c.showOnInit,P=c.multipleMode,N=c.allowCreate,C=c.customContent,V=c.showSelectedIcon,O=c.inputSearch,I=c.enableVirtualRender,E=c.showSelectAll,j=c.scrollHeight,L=c.list,R=c.displayKey,M=c.idKey,A=c.collapseTags,D=c.autoHeight,H=c.popoverOptions,K=c.allowEmptyValues,q=c.autoFocus,_=c.keepSearchValue,$=c.selectedStyle,G=(0,r.computed)((function(){return void 0===o.noDataText?u.value.noData:o.noDataText})),B=(0,r.computed)((function(){return void 0===o.noMatchText?u.value.noMatchedData:o.noMatchText})),F=(0,r.computed)((function(){return void 0===o.loadingText?u.value.loading:o.loadingText})),U=(0,r.computed)((function(){return void 0===o.placeholder?u.value.pleaseSelect:o.placeholder})),z=(0,r.computed)((function(){return void 0===o.searchPlaceholder?u.value.enterKeywords:o.searchPlaceholder})),W=(0,r.computed)((function(){return void 0===o.selectAllText?u.value.all:o.selectAllText})),X=(0,e.useFormItem)(),Y=(0,r.ref)(),J=(0,r.ref)(),Q=(0,r.ref)(),Z=(0,r.ref)(),ee=(0,r.ref)(),te=(0,r.ref)(),oe=(0,r.ref)(),re=(0,r.ref)(new Map),ne=(0,r.computed)((function(){return w(re.value.values())})),le=(0,r.ref)(new Map),ae=(0,r.ref)([]),ie=(0,r.computed)((function(){return ae.value.reduce((function(e,t){return e[t.value]=t.label,e}),{})})),ue=(0,r.ref)(),se=(0,r.computed)((function(){return L.value.reduce((function(e,t){return e[t[M.value]]=t[R.value],e}),{})}));(0,r.watch)(p,(function(){var e;Qe(),o.withValidate&&(null===(e=null==X?void 0:X.validate)||void 0===e||e.call(X,"change"))}),{deep:!0}),(0,r.watch)(ae,(function(){var e;null===(e=oe.value)||void 0===e||e.updatePopover(null,Se.value)}));var ce=(0,r.computed)((function(){return ye.value?L.value:L.value.filter((function(e){var t;return null===(t=y(String(e[R.value])))||void 0===t?void 0:t.includes(y(Ue.value))}))})),de=(0,r.computed)((function(){return f.value||T.value})),pe=(0,r.computed)((function(){return ae.value.map((function(e){var t,o;return(null===(o=null===(t=re.value)||void 0===t?void 0:t.get(e.value))||void 0===o?void 0:o.optionName)||se.value[e.value]||e.label}))})),ve=(0,r.computed)((function(){var e=ne.value.reduce((function(e,t){return t.disabled||e.push(t.optionID),e}),[]);return e.length<=ae.value.length&&e.every((function(e){return ae.value.some((function(t){return t.value===e}))}))})),fe=(0,r.computed)((function(){return!!le.value.size})),he=(0,r.computed)((function(){return!ne.value.length})),ge=(0,r.computed)((function(){return ne.value.length&&ne.value.every((function(e){return!e.visible}))})),ye=(0,r.computed)((function(){return h.value&&"function"==typeof b.value})),me=(0,r.computed)((function(){return!(ze.value||he.value||ge.value)||C.value})),be=(0,r.computed)((function(){return m.value&&E.value&&(!Ue.value||!h.value)})),we=(0,r.computed)((function(){return j.value-12-(be.value?32:0)})),Te=(0,r.computed)((function(){return ze.value?F.value:he.value?G.value:ge.value?B.value:""})),xe=(0,r.computed)((function(){return D.value?A.value&&!Ke.value:A.value})),Se=(0,r.computed)((function(){return(0,n.merge)({theme:"light ".concat(s("select-popover")),trigger:"manual",width:He.value,arrow:!1,placement:"bottom-start",isShow:Ke.value,reference:ee.value,offset:6,popoverDelay:0,renderType:e.RenderType.AUTO},H.value)})),Pe=v(re),Ne=Pe.register,Ce=Pe.unregister,Ve=v(le),Oe=Ve.register,Ie=Ve.unregister,Ee=function(){var e=(0,r.ref)(!1);return{isHover:e,setHover:function(){e.value=!0},cancelHover:function(){e.value=!1}}}(),je=Ee.isHover,Le=Ee.setHover,Re=Ee.cancelHover,ke=(0,r.ref)(!1),Me=function(){ke.value||(ke.value=!0,a("focus"))},Ae=function(){ke.value&&(ke.value=!1,a("blur"))},De=function(t,o){var n=t.popoverMinWidth,l=null,a=(0,r.ref)("auto"),i=(0,r.ref)(!1),u=function(){var e;a.value=Math.max(null===(e=o.value)||void 0===e?void 0:e.offsetWidth,n)};return(0,r.onMounted)((function(){o.value&&(l=(0,e.observerResize)(o.value,u,60,!0)).start()})),(0,r.onBeforeUnmount)((function(){null==l||l.stop(),l=null})),{isPopoverShow:i,popperWidth:a,togglePopover:function(){i.value=!i.value},hidePopover:function(){i.value=!1},showPopover:function(){i.value=!0}}}({popoverMinWidth:x.value},J),He=De.popperWidth,Ke=De.isPopoverShow,qe=De.hidePopover,_e=De.showPopover,$e=De.togglePopover;(0,r.watch)(Ke,(function(){a("toggle",Ke.value)}));var Ge=(0,r.computed)((function(){return(h.value&&O.value||N.value)&&Ke.value}));(0,r.watch)(Ke,(function(e){e?setTimeout((function(){Ye(),Be()}),10):_.value||(Ue.value="")}));var Be=function(){var e,t=ae.value[0],o=re.value.get(null==t?void 0:t.value);o&&!o.disabled&&o.visible?ue.value=null==t?void 0:t.value:ue.value=null===(e=ne.value.find((function(e){return!e.disabled&&e.visible})))||void 0===e?void 0:e.optionID},Fe=g(ye.value?b.value:function(e){h.value&&ne.value.forEach((function(t){var o;t.visible=null===(o=y(String(t.optionName)))||void 0===o?void 0:o.includes(y(e))}))},Be),Ue=Fe.searchKey,ze=Fe.searchLoading,We=function(e){e!==p.value&&(a("update:modelValue",e,p.value),a("change",e,p.value))},Xe=function(e){if(!de.value&&e){if(m.value){var t=ae.value.findIndex((function(t){return t.value===e.optionID}));t>-1?ae.value.splice(t,1):ae.value.push({value:e.optionID,label:e.optionName||e.optionID}),We(ae.value.map((function(e){return e.value})))}else ae.value=[{label:e.optionName||e.optionID,value:e.optionID}],We(e.optionID),qe();Ye()}},Ye=function(){setTimeout((function(){var e,t,o;O.value||N.value?"tag"===P.value?null===(t=ee.value)||void 0===t||t.focus():null===(o=Y.value)||void 0===o||o.focus():null===(e=Z.value)||void 0===e||e.focus()}),0)},Je=function(e){var o,r,l=e;if("object"===t(l)){var a,i=function(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return k(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}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 l,a=!0,i=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return a=e.done,e},e:function(e){i=!0,l=e},f:function(){try{a||null==o.return||o.return()}finally{if(i)throw l}}}}(re.value.keys());try{for(i.s();!(a=i.n()).done;){var u=a.value;if((0,n.isEqual)(u,l)){l=u;break}}}catch(e){i.e(e)}finally{i.f()}}return(null===(r=null===(o=re.value)||void 0===o?void 0:o.get(l))||void 0===r?void 0:r.optionName)||se.value[l]||ie.value[l]||l},Qe=function(){Array.isArray(p.value)?ae.value=w(p.value.map((function(e){return{value:e,label:Je(e)}}))):void 0!==p.value||K.value.includes(p.value)?ae.value=[{value:p.value,label:Je(p.value)}]:ae.value=[]};return(0,r.provide)(d,(0,r.reactive)({multiple:m,selected:ae,activeOptionValue:ue,showSelectedIcon:V,selectedStyle:$,register:Ne,unregister:Ce,registerGroup:Oe,unregisterGroup:Ie,handleOptionSelected:Xe,handleGetLabelByValue:Je})),(0,r.onMounted)((function(){Qe(),setTimeout((function(){S.value&&_e(),q.value&&Ye()}))})),{selected:ae,isInput:Ge,options:ne,isDisabled:de,selectedLabel:pe,isPopoverShow:Ke,isHover:je,popperWidth:He,inputRef:Y,triggerRef:J,contentRef:Q,searchRef:Z,selectTagInputRef:ee,virtualRenderRef:te,popoverRef:oe,searchLoading:ze,isOptionsEmpty:he,isSearchEmpty:ge,isFocus:ke,isShowSelectContent:me,curContentText:Te,isGroup:fe,searchKey:Ue,isShowSelectAll:be,virtualHeight:we,virtualList:ce,isCollapseTags:xe,popoverConfig:Se,focusInput:Ye,setHover:Le,cancelHover:Re,handleFocus:Me,handleBlur:Ae,handleTogglePopover:function(){de.value||(Me(),$e())},handleClear:function(e){e.stopPropagation(),ae.value=[],We(m.value?[]:""),a("clear",m.value?[]:""),qe()},hidePopover:qe,showPopover:_e,handleToggleAll:function(){var e;ve.value?ae.value=[]:(ne.value.forEach((function(e){e.disabled||e.optionID in ie.value||ae.value.push({value:e.optionID,label:e.optionName||e.optionID})})),null===(e=L.value)||void 0===e||e.forEach((function(e){e.disabled||e[M.value]in ie.value||ae.value.push({value:e[M.value],label:e[R.value]})}))),We(ae.value.map((function(e){return e.value}))),Ye()},handleOptionSelected:Xe,handleClickOutside:function(e){var t,o=e.event.target;(null===(t=J.value)||void 0===t?void 0:t.contains(o))||J.value===o||(qe(),Ae())},handleScroll:function(e){var t=e.target;t.scrollTop+t.clientHeight===t.scrollHeight&&a("scroll-end")},handleDeleteTag:function(e){if(!de.value){var t=ae.value.findIndex((function(t){return t.value===e}));t>-1&&(ae.value.splice(t,1),We(ae.value.map((function(e){return e.value}))))}},handleInputChange:function(e){h.value&&(Ue.value=e)},handleInputEnter:function(e,t){var o=String(e);!N.value||!o||h.value&&ne.value.find((function(e){return y(String(e.optionName))===y(o)}))||re.value.get(o)||(t.stopPropagation(),m.value?(ae.value.push({value:o,label:o}),We(ae.value.map((function(e){return e.value})))):(ae.value=[{value:o,label:o}],We(o),qe()),Ue.value="")},handleKeydown:function(e){var t,o;if(Ke.value){var r=ne.value.filter((function(e){return!e.disabled&&e.visible})),n=r.findIndex((function(e){return e.optionID===ue.value}));if(r.length&&-1!==n)switch(e.code){case"ArrowDown":e.preventDefault();var l=n>=r.length-1?0:n+1;ue.value=null===(t=r[l])||void 0===t?void 0:t.optionID;break;case"ArrowUp":e.preventDefault();var a=0===n?r.length-1:n-1;ue.value=null===(o=r[a])||void 0===o?void 0:o.optionID;break;case"Backspace":if(!m.value||!ae.value.length||Ue.value.length||e.target===Z.value)return;ae.value.pop(),We(ae.value.map((function(e){return e.value})));break;case"Enter":var i=re.value.get(ue.value);Xe(i)}}},handleSelectedAllOptionMouseEnter:function(){ue.value=""},handlePopoverShow:function(){setTimeout((function(){var e,t;I.value&&(null===(t=null===(e=te.value)||void 0===e?void 0:e.reset)||void 0===t||t.call(e))}))},localLoadingText:F,localPlaceholder:U,localSearchPlaceholder:z,localSelectAllText:W,resolveClassName:s}},render:function(){var t,n=this,l=(0,e.classes)((o(t={},"".concat(this.resolveClassName("select")),!0),o(t,"popover-show",this.isPopoverShow),o(t,"is-disabled",this.isDisabled),o(t,"is-focus",this.isFocus),o(t,"is-filterable",this.filterable),o(t,this.size,!0),o(t,this.behavior,!0),t)),a=function(){return n.loading?(0,r.createVNode)(C(),{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):n.clearable&&n.isHover&&n.selected.length&&!n.isDisabled?(0,r.createVNode)(u.Close,{class:"clear-icon",onClick:n.handleClear},null):(0,r.createVNode)(u.AngleUp,{class:"angle-up"},null)},i=function(){var e,t,o,l;return"tag"===n.multipleMode?(0,r.createVNode)(R,{ref:"selectTagInputRef",modelValue:n.searchKey,"onUpdate:modelValue":function(e){return n.searchKey=e},selected:n.selected,tagTheme:n.tagTheme,placeholder:n.localPlaceholder,filterable:n.isInput,disabled:n.isDisabled,onRemove:n.handleDeleteTag,collapseTags:n.isCollapseTags,onEnter:n.handleInputEnter,onKeydown:function(e,t){return n.handleKeydown(t)}},{prefix:n.prefix?(0,r.createVNode)("div",{class:"".concat(n.resolveClassName("select--prefix-area"))},[(0,r.createVNode)("span",null,[n.prefix])]):null===(o=(t=n.$slots).prefix)||void 0===o?void 0:o.call(t),default:n.$slots.tag&&function(){return n.$slots.tag({selected:n.selected})},suffix:function(){return a()}}):(0,r.createVNode)(P(),(0,r.mergeProps)({ref:"inputRef",type:"text",modelValue:n.isInput?n.searchKey:n.selectedLabel.join(","),placeholder:n.isInput&&n.selectedLabel.join(",")||n.localPlaceholder,readonly:!n.isInput,selectReadonly:!0,disabled:n.isDisabled,behavior:n.behavior,size:n.size,withValidate:!1,onInput:n.handleInputChange,onEnter:n.handleInputEnter,onKeydown:function(e,t){return n.handleKeydown(t)}},n.prefix?{prefix:n.prefix}:null),(l=e=Object.assign(Object.assign({},"function"==typeof n.$slots.prefix?{prefix:function(){var e,t;return null===(t=(e=n.$slots).prefix)||void 0===t?void 0:t.call(e)}}:null),{suffix:function(){return a()}}),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!(0,r.isVNode)(l)?e:{default:function(){return[e]}}))};return(0,r.createVNode)("div",{class:l},[(0,r.createVNode)(O(),(0,r.mergeProps)(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:function(){return(0,r.createVNode)("div",{class:n.resolveClassName("select-trigger"),style:{height:n.autoHeight&&n.collapseTags?"32px":""},ref:"triggerRef",onClick:n.handleTogglePopover,onMouseenter:n.setHover,onMouseleave:n.cancelHover},[(null===(t=(e=n.$slots).trigger)||void 0===t?void 0:t.call(e,{selected:n.selected}))||i()]);var e,t},content:function(){return(0,r.createVNode)("div",{class:n.resolveClassName("select-content-wrapper"),ref:"contentRef"},[n.filterable&&!n.inputSearch&&(0,r.createVNode)("div",{class:n.resolveClassName("select-search-wrapper")},[(0,r.createVNode)(u.Search,{class:"icon-search",width:16,height:16},null),(0,r.withDirectives)((0,r.createVNode)("input",{ref:"searchRef",class:n.resolveClassName("select-search-input"),placeholder:n.localSearchPlaceholder,"onUpdate:modelValue":function(e){return n.searchKey=e}},null),[[r.vModelText,n.searchKey]])]),!n.isShowSelectContent&&(0,r.createVNode)("div",{class:n.resolveClassName("select-empty")},[n.searchLoading&&(0,r.createVNode)(C(),{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),(0,r.createVNode)("span",null,[n.curContentText])]),(0,r.createVNode)("div",{class:n.resolveClassName("select-content")},[(0,r.createVNode)("div",{class:n.resolveClassName("select-dropdown"),style:{maxHeight:"".concat(n.scrollHeight,"px")},onScroll:n.handleScroll},[(0,r.withDirectives)((0,r.createVNode)("ul",{class:n.resolveClassName("select-options")},[n.isShowSelectAll&&(0,r.createVNode)("li",{class:n.resolveClassName("select-option"),onMouseenter:n.handleSelectedAllOptionMouseEnter,onClick:n.handleToggleAll},[n.localSelectAllText]),n.enableVirtualRender?(0,r.createVNode)(E(),{list:n.virtualList,height:n.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:function(e){return e.data.map((function(e){var t,o;return(0,r.createVNode)(m,{key:e[n.idKey],id:e[n.idKey],name:e[n.displayKey]},{default:null===(o=(t=n.$slots).virtualScrollRender)||void 0===o?void 0:o.call(t,{item:e})})}))}}):n.list.map((function(e){return(0,r.createVNode)(m,{id:e[n.idKey],name:e[n.displayKey]},null)})),null===(t=(e=n.$slots).default)||void 0===t?void 0:t.call(e),n.scrollLoading&&(0,r.createVNode)("li",{class:n.resolveClassName("select-options-loading")},[(0,r.createVNode)(C(),{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),(0,r.createVNode)("span",null,[n.localLoadingText])])]),[[r.vShow,n.isShowSelectContent]])]),n.$slots.extension&&(0,r.createVNode)("div",{class:n.resolveClassName("select-extension")},[n.$slots.extension()])])]);var e,t}})])}});var A=(0,e.withInstallProps)(M,{Option:m,Group:T});const D=A})(),h})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("lodash"), require("../checkbox"), require("../config-provider"), require("../icon"), require("../directives"), require("../input"), require("../loading"), require("../popover"), require("../virtual-render"), require("../tag"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "lodash", "../checkbox", "../config-provider", "../icon", "../directives", "../input", "../loading", "../popover", "../virtual-render", "../tag"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("lodash"), require("../checkbox"), require("../config-provider"), require("../icon"), require("../directives"), require("../input"), require("../loading"), require("../popover"), require("../virtual-render"), require("../tag")) : factory(root["../shared"], root["vue"], root["lodash"], root["../checkbox"], root["../config-provider"], root["../icon"], root["../directives"], root["../input"], root["../loading"], root["../popover"], root["../virtual-render"], root["../tag"]);
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__467__, __WEBPACK_EXTERNAL_MODULE__5800__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__4061__, __WEBPACK_EXTERNAL_MODULE__8133__, __WEBPACK_EXTERNAL_MODULE__4870__, __WEBPACK_EXTERNAL_MODULE__5537__, __WEBPACK_EXTERNAL_MODULE__3511__, __WEBPACK_EXTERNAL_MODULE__7739__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 5800:
15
+ /***/ ((module) => {
16
+
17
+ "use strict";
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5800__;
19
+
20
+ /***/ }),
21
+
22
+ /***/ 2717:
23
+ /***/ ((module) => {
24
+
25
+ "use strict";
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
27
+
28
+ /***/ }),
29
+
30
+ /***/ 4061:
31
+ /***/ ((module) => {
32
+
33
+ "use strict";
34
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
35
+
36
+ /***/ }),
37
+
38
+ /***/ 6870:
39
+ /***/ ((module) => {
40
+
41
+ "use strict";
42
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
43
+
44
+ /***/ }),
45
+
46
+ /***/ 8133:
47
+ /***/ ((module) => {
48
+
49
+ "use strict";
50
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8133__;
51
+
52
+ /***/ }),
53
+
54
+ /***/ 4870:
55
+ /***/ ((module) => {
56
+
57
+ "use strict";
58
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4870__;
59
+
60
+ /***/ }),
61
+
62
+ /***/ 5537:
63
+ /***/ ((module) => {
64
+
65
+ "use strict";
66
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
67
+
68
+ /***/ }),
69
+
70
+ /***/ 4212:
71
+ /***/ ((module) => {
72
+
73
+ "use strict";
74
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
75
+
76
+ /***/ }),
77
+
78
+ /***/ 7739:
79
+ /***/ ((module) => {
80
+
81
+ "use strict";
82
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7739__;
83
+
84
+ /***/ }),
85
+
86
+ /***/ 3511:
87
+ /***/ ((module) => {
88
+
89
+ "use strict";
90
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3511__;
91
+
92
+ /***/ }),
93
+
94
+ /***/ 467:
95
+ /***/ ((module) => {
96
+
97
+ "use strict";
98
+ module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
99
+
100
+ /***/ }),
101
+
102
+ /***/ 748:
103
+ /***/ ((module) => {
104
+
105
+ "use strict";
106
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
107
+
108
+ /***/ }),
109
+
110
+ /***/ 7609:
111
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
112
+
113
+ var _typeof = (__webpack_require__(7425)["default"]);
114
+ function _regeneratorRuntime() {
115
+ "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
116
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
117
+ return exports;
118
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
119
+ var exports = {},
120
+ Op = Object.prototype,
121
+ hasOwn = Op.hasOwnProperty,
122
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
123
+ obj[key] = desc.value;
124
+ },
125
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
126
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
127
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
128
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
129
+ function define(obj, key, value) {
130
+ return Object.defineProperty(obj, key, {
131
+ value: value,
132
+ enumerable: !0,
133
+ configurable: !0,
134
+ writable: !0
135
+ }), obj[key];
136
+ }
137
+ try {
138
+ define({}, "");
139
+ } catch (err) {
140
+ define = function define(obj, key, value) {
141
+ return obj[key] = value;
142
+ };
143
+ }
144
+ function wrap(innerFn, outerFn, self, tryLocsList) {
145
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
146
+ generator = Object.create(protoGenerator.prototype),
147
+ context = new Context(tryLocsList || []);
148
+ return defineProperty(generator, "_invoke", {
149
+ value: makeInvokeMethod(innerFn, self, context)
150
+ }), generator;
151
+ }
152
+ function tryCatch(fn, obj, arg) {
153
+ try {
154
+ return {
155
+ type: "normal",
156
+ arg: fn.call(obj, arg)
157
+ };
158
+ } catch (err) {
159
+ return {
160
+ type: "throw",
161
+ arg: err
162
+ };
163
+ }
164
+ }
165
+ exports.wrap = wrap;
166
+ var ContinueSentinel = {};
167
+ function Generator() {}
168
+ function GeneratorFunction() {}
169
+ function GeneratorFunctionPrototype() {}
170
+ var IteratorPrototype = {};
171
+ define(IteratorPrototype, iteratorSymbol, function () {
172
+ return this;
173
+ });
174
+ var getProto = Object.getPrototypeOf,
175
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
176
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
177
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
178
+ function defineIteratorMethods(prototype) {
179
+ ["next", "throw", "return"].forEach(function (method) {
180
+ define(prototype, method, function (arg) {
181
+ return this._invoke(method, arg);
182
+ });
183
+ });
184
+ }
185
+ function AsyncIterator(generator, PromiseImpl) {
186
+ function invoke(method, arg, resolve, reject) {
187
+ var record = tryCatch(generator[method], generator, arg);
188
+ if ("throw" !== record.type) {
189
+ var result = record.arg,
190
+ value = result.value;
191
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
192
+ invoke("next", value, resolve, reject);
193
+ }, function (err) {
194
+ invoke("throw", err, resolve, reject);
195
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
196
+ result.value = unwrapped, resolve(result);
197
+ }, function (error) {
198
+ return invoke("throw", error, resolve, reject);
199
+ });
200
+ }
201
+ reject(record.arg);
202
+ }
203
+ var previousPromise;
204
+ defineProperty(this, "_invoke", {
205
+ value: function value(method, arg) {
206
+ function callInvokeWithMethodAndArg() {
207
+ return new PromiseImpl(function (resolve, reject) {
208
+ invoke(method, arg, resolve, reject);
209
+ });
210
+ }
211
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
212
+ }
213
+ });
214
+ }
215
+ function makeInvokeMethod(innerFn, self, context) {
216
+ var state = "suspendedStart";
217
+ return function (method, arg) {
218
+ if ("executing" === state) throw new Error("Generator is already running");
219
+ if ("completed" === state) {
220
+ if ("throw" === method) throw arg;
221
+ return doneResult();
222
+ }
223
+ for (context.method = method, context.arg = arg;;) {
224
+ var delegate = context.delegate;
225
+ if (delegate) {
226
+ var delegateResult = maybeInvokeDelegate(delegate, context);
227
+ if (delegateResult) {
228
+ if (delegateResult === ContinueSentinel) continue;
229
+ return delegateResult;
230
+ }
231
+ }
232
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
233
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
234
+ context.dispatchException(context.arg);
235
+ } else "return" === context.method && context.abrupt("return", context.arg);
236
+ state = "executing";
237
+ var record = tryCatch(innerFn, self, context);
238
+ if ("normal" === record.type) {
239
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
240
+ return {
241
+ value: record.arg,
242
+ done: context.done
243
+ };
244
+ }
245
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
246
+ }
247
+ };
248
+ }
249
+ function maybeInvokeDelegate(delegate, context) {
250
+ var methodName = context.method,
251
+ method = delegate.iterator[methodName];
252
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
253
+ var record = tryCatch(method, delegate.iterator, context.arg);
254
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
255
+ var info = record.arg;
256
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
257
+ }
258
+ function pushTryEntry(locs) {
259
+ var entry = {
260
+ tryLoc: locs[0]
261
+ };
262
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
263
+ }
264
+ function resetTryEntry(entry) {
265
+ var record = entry.completion || {};
266
+ record.type = "normal", delete record.arg, entry.completion = record;
267
+ }
268
+ function Context(tryLocsList) {
269
+ this.tryEntries = [{
270
+ tryLoc: "root"
271
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
272
+ }
273
+ function values(iterable) {
274
+ if (iterable) {
275
+ var iteratorMethod = iterable[iteratorSymbol];
276
+ if (iteratorMethod) return iteratorMethod.call(iterable);
277
+ if ("function" == typeof iterable.next) return iterable;
278
+ if (!isNaN(iterable.length)) {
279
+ var i = -1,
280
+ next = function next() {
281
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
282
+ return next.value = undefined, next.done = !0, next;
283
+ };
284
+ return next.next = next;
285
+ }
286
+ }
287
+ return {
288
+ next: doneResult
289
+ };
290
+ }
291
+ function doneResult() {
292
+ return {
293
+ value: undefined,
294
+ done: !0
295
+ };
296
+ }
297
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
298
+ value: GeneratorFunctionPrototype,
299
+ configurable: !0
300
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
301
+ value: GeneratorFunction,
302
+ configurable: !0
303
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
304
+ var ctor = "function" == typeof genFun && genFun.constructor;
305
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
306
+ }, exports.mark = function (genFun) {
307
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
308
+ }, exports.awrap = function (arg) {
309
+ return {
310
+ __await: arg
311
+ };
312
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
313
+ return this;
314
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
315
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
316
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
317
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
318
+ return result.done ? result.value : iter.next();
319
+ });
320
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
321
+ return this;
322
+ }), define(Gp, "toString", function () {
323
+ return "[object Generator]";
324
+ }), exports.keys = function (val) {
325
+ var object = Object(val),
326
+ keys = [];
327
+ for (var key in object) keys.push(key);
328
+ return keys.reverse(), function next() {
329
+ for (; keys.length;) {
330
+ var key = keys.pop();
331
+ if (key in object) return next.value = key, next.done = !1, next;
332
+ }
333
+ return next.done = !0, next;
334
+ };
335
+ }, exports.values = values, Context.prototype = {
336
+ constructor: Context,
337
+ reset: function reset(skipTempReset) {
338
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
339
+ },
340
+ stop: function stop() {
341
+ this.done = !0;
342
+ var rootRecord = this.tryEntries[0].completion;
343
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
344
+ return this.rval;
345
+ },
346
+ dispatchException: function dispatchException(exception) {
347
+ if (this.done) throw exception;
348
+ var context = this;
349
+ function handle(loc, caught) {
350
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
351
+ }
352
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
353
+ var entry = this.tryEntries[i],
354
+ record = entry.completion;
355
+ if ("root" === entry.tryLoc) return handle("end");
356
+ if (entry.tryLoc <= this.prev) {
357
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
358
+ hasFinally = hasOwn.call(entry, "finallyLoc");
359
+ if (hasCatch && hasFinally) {
360
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
361
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
362
+ } else if (hasCatch) {
363
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
364
+ } else {
365
+ if (!hasFinally) throw new Error("try statement without catch or finally");
366
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
367
+ }
368
+ }
369
+ }
370
+ },
371
+ abrupt: function abrupt(type, arg) {
372
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
373
+ var entry = this.tryEntries[i];
374
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
375
+ var finallyEntry = entry;
376
+ break;
377
+ }
378
+ }
379
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
380
+ var record = finallyEntry ? finallyEntry.completion : {};
381
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
382
+ },
383
+ complete: function complete(record, afterLoc) {
384
+ if ("throw" === record.type) throw record.arg;
385
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
386
+ },
387
+ finish: function finish(finallyLoc) {
388
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
389
+ var entry = this.tryEntries[i];
390
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
391
+ }
392
+ },
393
+ "catch": function _catch(tryLoc) {
394
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
395
+ var entry = this.tryEntries[i];
396
+ if (entry.tryLoc === tryLoc) {
397
+ var record = entry.completion;
398
+ if ("throw" === record.type) {
399
+ var thrown = record.arg;
400
+ resetTryEntry(entry);
401
+ }
402
+ return thrown;
403
+ }
404
+ }
405
+ throw new Error("illegal catch attempt");
406
+ },
407
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
408
+ return this.delegate = {
409
+ iterator: values(iterable),
410
+ resultName: resultName,
411
+ nextLoc: nextLoc
412
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
413
+ }
414
+ }, exports;
415
+ }
416
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
417
+
418
+ /***/ }),
419
+
420
+ /***/ 7425:
421
+ /***/ ((module) => {
422
+
423
+ function _typeof(obj) {
424
+ "@babel/helpers - typeof";
425
+
426
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
427
+ return typeof obj;
428
+ } : function (obj) {
429
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
430
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
431
+ }
432
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
433
+
434
+ /***/ }),
435
+
436
+ /***/ 2841:
437
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
438
+
439
+ // TODO(Babel 8): Remove this file.
440
+
441
+ var runtime = __webpack_require__(7609)();
442
+ module.exports = runtime;
443
+
444
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
445
+ try {
446
+ regeneratorRuntime = runtime;
447
+ } catch (accidentalStrictMode) {
448
+ if (typeof globalThis === "object") {
449
+ globalThis.regeneratorRuntime = runtime;
450
+ } else {
451
+ Function("r", "regeneratorRuntime = r")(runtime);
452
+ }
453
+ }
454
+
455
+
456
+ /***/ })
457
+
458
+ /******/ });
459
+ /************************************************************************/
460
+ /******/ // The module cache
461
+ /******/ var __webpack_module_cache__ = {};
462
+ /******/
463
+ /******/ // The require function
464
+ /******/ function __webpack_require__(moduleId) {
465
+ /******/ // Check if module is in cache
466
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
467
+ /******/ if (cachedModule !== undefined) {
468
+ /******/ return cachedModule.exports;
469
+ /******/ }
470
+ /******/ // Create a new module (and put it into the cache)
471
+ /******/ var module = __webpack_module_cache__[moduleId] = {
472
+ /******/ // no module.id needed
473
+ /******/ // no module.loaded needed
474
+ /******/ exports: {}
475
+ /******/ };
476
+ /******/
477
+ /******/ // Execute the module function
478
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
479
+ /******/
480
+ /******/ // Return the exports of the module
481
+ /******/ return module.exports;
482
+ /******/ }
483
+ /******/
484
+ /************************************************************************/
485
+ /******/ /* webpack/runtime/compat get default export */
486
+ /******/ (() => {
487
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
488
+ /******/ __webpack_require__.n = (module) => {
489
+ /******/ var getter = module && module.__esModule ?
490
+ /******/ () => (module['default']) :
491
+ /******/ () => (module);
492
+ /******/ __webpack_require__.d(getter, { a: getter });
493
+ /******/ return getter;
494
+ /******/ };
495
+ /******/ })();
496
+ /******/
497
+ /******/ /* webpack/runtime/define property getters */
498
+ /******/ (() => {
499
+ /******/ // define getter functions for harmony exports
500
+ /******/ __webpack_require__.d = (exports, definition) => {
501
+ /******/ for(var key in definition) {
502
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
503
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
504
+ /******/ }
505
+ /******/ }
506
+ /******/ };
507
+ /******/ })();
508
+ /******/
509
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
510
+ /******/ (() => {
511
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
512
+ /******/ })();
513
+ /******/
514
+ /******/ /* webpack/runtime/make namespace object */
515
+ /******/ (() => {
516
+ /******/ // define __esModule on exports
517
+ /******/ __webpack_require__.r = (exports) => {
518
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
519
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
520
+ /******/ }
521
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
522
+ /******/ };
523
+ /******/ })();
524
+ /******/
525
+ /************************************************************************/
526
+ var __webpack_exports__ = {};
527
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
528
+ (() => {
529
+ "use strict";
530
+ // ESM COMPAT FLAG
531
+ __webpack_require__.r(__webpack_exports__);
532
+
533
+ // EXPORTS
534
+ __webpack_require__.d(__webpack_exports__, {
535
+ BkOption: () => (/* reexport */ src_option),
536
+ BkOptionGroup: () => (/* reexport */ optionGroup),
537
+ BkSelect: () => (/* binding */ BkSelect),
538
+ "default": () => (/* binding */ src)
539
+ });
540
+
541
+ // EXTERNAL MODULE: external "../shared"
542
+ var external_shared_ = __webpack_require__(4212);
543
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
544
+ function _typeof(obj) {
545
+ "@babel/helpers - typeof";
546
+
547
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
548
+ return typeof obj;
549
+ } : function (obj) {
550
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
551
+ }, _typeof(obj);
552
+ }
553
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
554
+
555
+ function _toPrimitive(input, hint) {
556
+ if (_typeof(input) !== "object" || input === null) return input;
557
+ var prim = input[Symbol.toPrimitive];
558
+ if (prim !== undefined) {
559
+ var res = prim.call(input, hint || "default");
560
+ if (_typeof(res) !== "object") return res;
561
+ throw new TypeError("@@toPrimitive must return a primitive value.");
562
+ }
563
+ return (hint === "string" ? String : Number)(input);
564
+ }
565
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
566
+
567
+
568
+ function _toPropertyKey(arg) {
569
+ var key = _toPrimitive(arg, "string");
570
+ return _typeof(key) === "symbol" ? key : String(key);
571
+ }
572
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
573
+
574
+ function _defineProperty(obj, key, value) {
575
+ key = _toPropertyKey(key);
576
+ if (key in obj) {
577
+ Object.defineProperty(obj, key, {
578
+ value: value,
579
+ enumerable: true,
580
+ configurable: true,
581
+ writable: true
582
+ });
583
+ } else {
584
+ obj[key] = value;
585
+ }
586
+ return obj;
587
+ }
588
+ // EXTERNAL MODULE: external "vue"
589
+ var external_vue_ = __webpack_require__(748);
590
+ // EXTERNAL MODULE: external "lodash"
591
+ var external_lodash_ = __webpack_require__(467);
592
+ // EXTERNAL MODULE: external "../checkbox"
593
+ var external_checkbox_ = __webpack_require__(5800);
594
+ var external_checkbox_default = /*#__PURE__*/__webpack_require__.n(external_checkbox_);
595
+ // EXTERNAL MODULE: external "../config-provider"
596
+ var external_config_provider_ = __webpack_require__(2717);
597
+ // EXTERNAL MODULE: external "../icon"
598
+ var external_icon_ = __webpack_require__(6870);
599
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
600
+ var regenerator = __webpack_require__(2841);
601
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
602
+ ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
603
+ /******************************************************************************
604
+ Copyright (c) Microsoft Corporation.
605
+
606
+ Permission to use, copy, modify, and/or distribute this software for any
607
+ purpose with or without fee is hereby granted.
608
+
609
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
610
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
611
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
612
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
613
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
614
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
615
+ PERFORMANCE OF THIS SOFTWARE.
616
+ ***************************************************************************** */
617
+ /* global Reflect, Promise, SuppressedError, Symbol */
618
+
619
+ var extendStatics = function(d, b) {
620
+ extendStatics = Object.setPrototypeOf ||
621
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
622
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
623
+ return extendStatics(d, b);
624
+ };
625
+
626
+ function __extends(d, b) {
627
+ if (typeof b !== "function" && b !== null)
628
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
629
+ extendStatics(d, b);
630
+ function __() { this.constructor = d; }
631
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
632
+ }
633
+
634
+ var __assign = function() {
635
+ __assign = Object.assign || function __assign(t) {
636
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
637
+ s = arguments[i];
638
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
639
+ }
640
+ return t;
641
+ }
642
+ return __assign.apply(this, arguments);
643
+ }
644
+
645
+ function __rest(s, e) {
646
+ var t = {};
647
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
648
+ t[p] = s[p];
649
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
650
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
651
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
652
+ t[p[i]] = s[p[i]];
653
+ }
654
+ return t;
655
+ }
656
+
657
+ function __decorate(decorators, target, key, desc) {
658
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
659
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
660
+ 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;
661
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
662
+ }
663
+
664
+ function __param(paramIndex, decorator) {
665
+ return function (target, key) { decorator(target, key, paramIndex); }
666
+ }
667
+
668
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
669
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
670
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
671
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
672
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
673
+ var _, done = false;
674
+ for (var i = decorators.length - 1; i >= 0; i--) {
675
+ var context = {};
676
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
677
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
678
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
679
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
680
+ if (kind === "accessor") {
681
+ if (result === void 0) continue;
682
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
683
+ if (_ = accept(result.get)) descriptor.get = _;
684
+ if (_ = accept(result.set)) descriptor.set = _;
685
+ if (_ = accept(result.init)) initializers.unshift(_);
686
+ }
687
+ else if (_ = accept(result)) {
688
+ if (kind === "field") initializers.unshift(_);
689
+ else descriptor[key] = _;
690
+ }
691
+ }
692
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
693
+ done = true;
694
+ };
695
+
696
+ function __runInitializers(thisArg, initializers, value) {
697
+ var useValue = arguments.length > 2;
698
+ for (var i = 0; i < initializers.length; i++) {
699
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
700
+ }
701
+ return useValue ? value : void 0;
702
+ };
703
+
704
+ function __propKey(x) {
705
+ return typeof x === "symbol" ? x : "".concat(x);
706
+ };
707
+
708
+ function __setFunctionName(f, name, prefix) {
709
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
710
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
711
+ };
712
+
713
+ function __metadata(metadataKey, metadataValue) {
714
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
715
+ }
716
+
717
+ function __awaiter(thisArg, _arguments, P, generator) {
718
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
719
+ return new (P || (P = Promise))(function (resolve, reject) {
720
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
721
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
722
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
723
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
724
+ });
725
+ }
726
+
727
+ function __generator(thisArg, body) {
728
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
729
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
730
+ function verb(n) { return function (v) { return step([n, v]); }; }
731
+ function step(op) {
732
+ if (f) throw new TypeError("Generator is already executing.");
733
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
734
+ 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;
735
+ if (y = 0, t) op = [op[0] & 2, t.value];
736
+ switch (op[0]) {
737
+ case 0: case 1: t = op; break;
738
+ case 4: _.label++; return { value: op[1], done: false };
739
+ case 5: _.label++; y = op[1]; op = [0]; continue;
740
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
741
+ default:
742
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
743
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
744
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
745
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
746
+ if (t[2]) _.ops.pop();
747
+ _.trys.pop(); continue;
748
+ }
749
+ op = body.call(thisArg, _);
750
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
751
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
752
+ }
753
+ }
754
+
755
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
756
+ if (k2 === undefined) k2 = k;
757
+ var desc = Object.getOwnPropertyDescriptor(m, k);
758
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
759
+ desc = { enumerable: true, get: function() { return m[k]; } };
760
+ }
761
+ Object.defineProperty(o, k2, desc);
762
+ }) : (function(o, m, k, k2) {
763
+ if (k2 === undefined) k2 = k;
764
+ o[k2] = m[k];
765
+ });
766
+
767
+ function __exportStar(m, o) {
768
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
769
+ }
770
+
771
+ function __values(o) {
772
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
773
+ if (m) return m.call(o);
774
+ if (o && typeof o.length === "number") return {
775
+ next: function () {
776
+ if (o && i >= o.length) o = void 0;
777
+ return { value: o && o[i++], done: !o };
778
+ }
779
+ };
780
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
781
+ }
782
+
783
+ function __read(o, n) {
784
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
785
+ if (!m) return o;
786
+ var i = m.call(o), r, ar = [], e;
787
+ try {
788
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
789
+ }
790
+ catch (error) { e = { error: error }; }
791
+ finally {
792
+ try {
793
+ if (r && !r.done && (m = i["return"])) m.call(i);
794
+ }
795
+ finally { if (e) throw e.error; }
796
+ }
797
+ return ar;
798
+ }
799
+
800
+ /** @deprecated */
801
+ function __spread() {
802
+ for (var ar = [], i = 0; i < arguments.length; i++)
803
+ ar = ar.concat(__read(arguments[i]));
804
+ return ar;
805
+ }
806
+
807
+ /** @deprecated */
808
+ function __spreadArrays() {
809
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
810
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
811
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
812
+ r[k] = a[j];
813
+ return r;
814
+ }
815
+
816
+ function __spreadArray(to, from, pack) {
817
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
818
+ if (ar || !(i in from)) {
819
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
820
+ ar[i] = from[i];
821
+ }
822
+ }
823
+ return to.concat(ar || Array.prototype.slice.call(from));
824
+ }
825
+
826
+ function __await(v) {
827
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
828
+ }
829
+
830
+ function __asyncGenerator(thisArg, _arguments, generator) {
831
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
832
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
833
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
834
+ 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); }); }; }
835
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
836
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
837
+ function fulfill(value) { resume("next", value); }
838
+ function reject(value) { resume("throw", value); }
839
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
840
+ }
841
+
842
+ function __asyncDelegator(o) {
843
+ var i, p;
844
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
845
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
846
+ }
847
+
848
+ function __asyncValues(o) {
849
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
850
+ var m = o[Symbol.asyncIterator], i;
851
+ 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);
852
+ 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); }); }; }
853
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
854
+ }
855
+
856
+ function __makeTemplateObject(cooked, raw) {
857
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
858
+ return cooked;
859
+ };
860
+
861
+ var __setModuleDefault = Object.create ? (function(o, v) {
862
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
863
+ }) : function(o, v) {
864
+ o["default"] = v;
865
+ };
866
+
867
+ function __importStar(mod) {
868
+ if (mod && mod.__esModule) return mod;
869
+ var result = {};
870
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
871
+ __setModuleDefault(result, mod);
872
+ return result;
873
+ }
874
+
875
+ function __importDefault(mod) {
876
+ return (mod && mod.__esModule) ? mod : { default: mod };
877
+ }
878
+
879
+ function __classPrivateFieldGet(receiver, state, kind, f) {
880
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
881
+ 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");
882
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
883
+ }
884
+
885
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
886
+ if (kind === "m") throw new TypeError("Private method is not writable");
887
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
888
+ 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");
889
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
890
+ }
891
+
892
+ function __classPrivateFieldIn(state, receiver) {
893
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
894
+ return typeof state === "function" ? receiver === state : state.has(receiver);
895
+ }
896
+
897
+ function __addDisposableResource(env, value, async) {
898
+ if (value !== null && value !== void 0) {
899
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
900
+ var dispose;
901
+ if (async) {
902
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
903
+ dispose = value[Symbol.asyncDispose];
904
+ }
905
+ if (dispose === void 0) {
906
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
907
+ dispose = value[Symbol.dispose];
908
+ }
909
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
910
+ env.stack.push({ value: value, dispose: dispose, async: async });
911
+ }
912
+ else if (async) {
913
+ env.stack.push({ async: true });
914
+ }
915
+ return value;
916
+ }
917
+
918
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
919
+ var e = new Error(message);
920
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
921
+ };
922
+
923
+ function __disposeResources(env) {
924
+ function fail(e) {
925
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
926
+ env.hasError = true;
927
+ }
928
+ function next() {
929
+ while (env.stack.length) {
930
+ var rec = env.stack.pop();
931
+ try {
932
+ var result = rec.dispose && rec.dispose.call(rec.value);
933
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
934
+ }
935
+ catch (e) {
936
+ fail(e);
937
+ }
938
+ }
939
+ if (env.hasError) throw env.error;
940
+ }
941
+ return next();
942
+ }
943
+
944
+ /* harmony default export */ const tslib_es6 = ({
945
+ __extends,
946
+ __assign,
947
+ __rest,
948
+ __decorate,
949
+ __param,
950
+ __metadata,
951
+ __awaiter,
952
+ __generator,
953
+ __createBinding,
954
+ __exportStar,
955
+ __values,
956
+ __read,
957
+ __spread,
958
+ __spreadArrays,
959
+ __spreadArray,
960
+ __await,
961
+ __asyncGenerator,
962
+ __asyncDelegator,
963
+ __asyncValues,
964
+ __makeTemplateObject,
965
+ __importStar,
966
+ __importDefault,
967
+ __classPrivateFieldGet,
968
+ __classPrivateFieldSet,
969
+ __classPrivateFieldIn,
970
+ __addDisposableResource,
971
+ __disposeResources,
972
+ });
973
+
974
+ ;// CONCATENATED MODULE: ../../packages/select/src/common.ts
975
+
976
+
977
+ /*
978
+ * Tencent is pleased to support the open source community by making
979
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
980
+ *
981
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
982
+ *
983
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
984
+ *
985
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
986
+ *
987
+ * ---------------------------------------------------
988
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
989
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
990
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
991
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
992
+ *
993
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
994
+ * the Software.
995
+ *
996
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
997
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
998
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
999
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1000
+ * IN THE SOFTWARE.
1001
+ */
1002
+
1003
+
1004
+ var selectKey = Symbol('BkSelect');
1005
+ var optionGroupKey = Symbol('BkOptionGroup');
1006
+ function useHover() {
1007
+ var isHover = (0,external_vue_.ref)(false);
1008
+ var setHover = function setHover() {
1009
+ isHover.value = true;
1010
+ };
1011
+ var cancelHover = function cancelHover() {
1012
+ isHover.value = false;
1013
+ };
1014
+ return {
1015
+ isHover: isHover,
1016
+ setHover: setHover,
1017
+ cancelHover: cancelHover
1018
+ };
1019
+ }
1020
+ function useRegistry(data) {
1021
+ // 注册item
1022
+ var register = function register(key, item) {
1023
+ if (!item) return;
1024
+ if (data.value.has(key)) {
1025
+ console.warn("repeat ".concat(key), item);
1026
+ return;
1027
+ }
1028
+ return data.value.set(key, item);
1029
+ };
1030
+ // 删除item
1031
+ var unregister = function unregister(key) {
1032
+ data.value["delete"](key);
1033
+ };
1034
+ return {
1035
+ register: register,
1036
+ unregister: unregister
1037
+ };
1038
+ }
1039
+ function useDebouncedRef(value) {
1040
+ var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
1041
+ var timeout;
1042
+ var innerValue = value;
1043
+ return (0,external_vue_.customRef)(function (track, trigger) {
1044
+ return {
1045
+ get: function get() {
1046
+ track();
1047
+ return innerValue;
1048
+ },
1049
+ set: function set(newValue) {
1050
+ clearTimeout(timeout);
1051
+ if (newValue === undefined || newValue === '') {
1052
+ innerValue = newValue;
1053
+ trigger();
1054
+ } else {
1055
+ timeout = setTimeout(function () {
1056
+ innerValue = newValue;
1057
+ trigger();
1058
+ }, delay);
1059
+ }
1060
+ }
1061
+ };
1062
+ });
1063
+ }
1064
+ function usePopover(config, triggerRef) {
1065
+ var popoverMinWidth = config.popoverMinWidth;
1066
+ var observerIns = null;
1067
+ var popperWidth = (0,external_vue_.ref)('auto');
1068
+ var isPopoverShow = (0,external_vue_.ref)(false);
1069
+ var togglePopover = function togglePopover() {
1070
+ isPopoverShow.value = !isPopoverShow.value;
1071
+ };
1072
+ var hidePopover = function hidePopover() {
1073
+ isPopoverShow.value = false;
1074
+ };
1075
+ var showPopover = function showPopover() {
1076
+ isPopoverShow.value = true;
1077
+ };
1078
+ var triggerRefResize = function triggerRefResize() {
1079
+ var _a;
1080
+ popperWidth.value = Math.max((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.offsetWidth, popoverMinWidth);
1081
+ };
1082
+ (0,external_vue_.onMounted)(function () {
1083
+ if (!triggerRef.value) return;
1084
+ observerIns = (0,external_shared_.observerResize)(triggerRef.value, triggerRefResize, 60, true);
1085
+ observerIns.start();
1086
+ });
1087
+ (0,external_vue_.onBeforeUnmount)(function () {
1088
+ observerIns === null || observerIns === void 0 ? void 0 : observerIns.stop();
1089
+ observerIns = null;
1090
+ });
1091
+ return {
1092
+ isPopoverShow: isPopoverShow,
1093
+ popperWidth: popperWidth,
1094
+ togglePopover: togglePopover,
1095
+ hidePopover: hidePopover,
1096
+ showPopover: showPopover
1097
+ };
1098
+ }
1099
+ function useRemoteSearch(method, callBack) {
1100
+ var _this = this;
1101
+ var searchKey = useDebouncedRef('');
1102
+ var searchLoading = (0,external_vue_.ref)(false);
1103
+ (0,external_vue_.watch)(searchKey, function () {
1104
+ return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1105
+ return regenerator_default().wrap(function _callee$(_context) {
1106
+ while (1) switch (_context.prev = _context.next) {
1107
+ case 0:
1108
+ _context.prev = 0;
1109
+ searchLoading.value = true;
1110
+ _context.next = 4;
1111
+ return method(searchKey.value);
1112
+ case 4:
1113
+ searchLoading.value = false;
1114
+ _context.next = 10;
1115
+ break;
1116
+ case 7:
1117
+ _context.prev = 7;
1118
+ _context.t0 = _context["catch"](0);
1119
+ console.error(_context.t0);
1120
+ case 10:
1121
+ _context.prev = 10;
1122
+ callBack === null || callBack === void 0 ? void 0 : callBack();
1123
+ return _context.finish(10);
1124
+ case 13:
1125
+ case "end":
1126
+ return _context.stop();
1127
+ }
1128
+ }, _callee, null, [[0, 7, 10, 13]]);
1129
+ }));
1130
+ });
1131
+ return {
1132
+ searchKey: searchKey,
1133
+ searchLoading: searchLoading
1134
+ };
1135
+ }
1136
+ function toLowerCase() {
1137
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1138
+ if (!value) return value;
1139
+ return String(value).trim().toLowerCase();
1140
+ }
1141
+ ;
1142
+ ;// CONCATENATED MODULE: ../../packages/select/src/option.tsx
1143
+
1144
+
1145
+ /*
1146
+ * Tencent is pleased to support the open source community by making
1147
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1148
+ *
1149
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1150
+ *
1151
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1152
+ *
1153
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1154
+ *
1155
+ * ---------------------------------------------------
1156
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1157
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1158
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1159
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1160
+ *
1161
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1162
+ * the Software.
1163
+ *
1164
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1165
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1166
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1167
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1168
+ * IN THE SOFTWARE.
1169
+ */
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+ /* harmony default export */ const src_option = ((0,external_vue_.defineComponent)({
1178
+ name: 'Option',
1179
+ props: {
1180
+ id: {
1181
+ type: [String, Number, Object],
1182
+ require: true
1183
+ },
1184
+ name: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.string]),
1185
+ disabled: external_shared_.PropTypes.bool.def(false)
1186
+ },
1187
+ setup: function setup(props, _ref) {
1188
+ var attrs = _ref.attrs;
1189
+ var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
1190
+ proxy = _getCurrentInstance.proxy;
1191
+ var states = (0,external_vue_.reactive)({
1192
+ visible: true
1193
+ });
1194
+ var _toRefs = (0,external_vue_.toRefs)(props),
1195
+ disabled = _toRefs.disabled,
1196
+ id = _toRefs.id,
1197
+ name = _toRefs.name;
1198
+ // 兼容label
1199
+ var optionName = (0,external_vue_.computed)(function () {
1200
+ return name.value !== undefined ? name.value : attrs.label;
1201
+ });
1202
+ // 兼容value
1203
+ var optionID = (0,external_vue_.computed)(function () {
1204
+ return id.value !== undefined ? id.value : attrs.value;
1205
+ });
1206
+ var select = (0,external_vue_.inject)(selectKey, null);
1207
+ var group = (0,external_vue_.inject)(optionGroupKey, null);
1208
+ var selected = (0,external_vue_.computed)(function () {
1209
+ var _a;
1210
+ return (_a = select === null || select === void 0 ? void 0 : select.selected) === null || _a === void 0 ? void 0 : _a.some(function (item) {
1211
+ return (0,external_lodash_.isEqual)(item.value, optionID.value);
1212
+ });
1213
+ });
1214
+ var multiple = (0,external_vue_.computed)(function () {
1215
+ return select === null || select === void 0 ? void 0 : select.multiple;
1216
+ });
1217
+ var isHover = (0,external_vue_.computed)(function () {
1218
+ return (select === null || select === void 0 ? void 0 : select.activeOptionValue) === optionID.value;
1219
+ });
1220
+ var showSelectedIcon = (0,external_vue_.computed)(function () {
1221
+ return (select === null || select === void 0 ? void 0 : select.showSelectedIcon) && multiple.value;
1222
+ });
1223
+ var selectedStyle = (0,external_vue_.computed)(function () {
1224
+ return select === null || select === void 0 ? void 0 : select.selectedStyle;
1225
+ });
1226
+ var handleOptionClick = function handleOptionClick() {
1227
+ if (disabled.value) return;
1228
+ select === null || select === void 0 ? void 0 : select.handleOptionSelected(proxy);
1229
+ };
1230
+ var handleMouseEnter = function handleMouseEnter() {
1231
+ select.activeOptionValue = optionID.value;
1232
+ };
1233
+ (0,external_vue_.onBeforeMount)(function () {
1234
+ select === null || select === void 0 ? void 0 : select.register(optionID.value, proxy);
1235
+ group === null || group === void 0 ? void 0 : group.register(optionID.value, proxy);
1236
+ });
1237
+ (0,external_vue_.onBeforeUnmount)(function () {
1238
+ select === null || select === void 0 ? void 0 : select.unregister(optionID.value);
1239
+ group === null || group === void 0 ? void 0 : group.unregister(optionID.value);
1240
+ });
1241
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1242
+ resolveClassName = _usePrefix.resolveClassName;
1243
+ return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(states)), {
1244
+ selected: selected,
1245
+ multiple: multiple,
1246
+ isHover: isHover,
1247
+ showSelectedIcon: showSelectedIcon,
1248
+ selectedStyle: selectedStyle,
1249
+ optionName: optionName,
1250
+ optionID: optionID,
1251
+ handleOptionClick: handleOptionClick,
1252
+ handleMouseEnter: handleMouseEnter,
1253
+ resolveClassName: resolveClassName
1254
+ });
1255
+ },
1256
+ render: function render() {
1257
+ var _a, _b, _c;
1258
+ var selectItemClass = (0,external_shared_.classes)(_defineProperty({
1259
+ 'is-selected': this.selected,
1260
+ 'is-disabled': this.disabled,
1261
+ 'is-multiple': this.multiple,
1262
+ 'is-hover': this.isHover,
1263
+ 'is-checkbox': this.selectedStyle === external_shared_.SelectedTypeEnum.CHECKBOX
1264
+ }, this.resolveClassName('select-option'), true));
1265
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
1266
+ "class": selectItemClass,
1267
+ "onClick": this.handleOptionClick,
1268
+ "onMouseenter": this.handleMouseEnter
1269
+ }, [this.showSelectedIcon && this.selectedStyle === external_shared_.SelectedTypeEnum.CHECKBOX && (0,external_vue_.createVNode)((external_checkbox_default()), {
1270
+ "disabled": this.disabled,
1271
+ "class": this.resolveClassName('select-checkbox'),
1272
+ "modelValue": this.selected
1273
+ }, null), (_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : (0,external_vue_.createVNode)("span", {
1274
+ "class": this.resolveClassName('select-option-item'),
1275
+ "title": String(this.optionName)
1276
+ }, [this.optionName]), this.showSelectedIcon && this.selected && this.selectedStyle === external_shared_.SelectedTypeEnum.CHECK && (0,external_vue_.createVNode)(external_icon_.Done, {
1277
+ "class": this.resolveClassName('select-selected-icon'),
1278
+ "width": 22,
1279
+ "height": 22
1280
+ }, null)]), [[external_vue_.vShow, this.visible]]);
1281
+ }
1282
+ }));
1283
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1284
+ function _arrayLikeToArray(arr, len) {
1285
+ if (len == null || len > arr.length) len = arr.length;
1286
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1287
+ return arr2;
1288
+ }
1289
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
1290
+
1291
+ function _arrayWithoutHoles(arr) {
1292
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1293
+ }
1294
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1295
+ function _iterableToArray(iter) {
1296
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1297
+ }
1298
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1299
+
1300
+ function _unsupportedIterableToArray(o, minLen) {
1301
+ if (!o) return;
1302
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1303
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1304
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1305
+ if (n === "Map" || n === "Set") return Array.from(o);
1306
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1307
+ }
1308
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1309
+ function _nonIterableSpread() {
1310
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1311
+ }
1312
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
1313
+
1314
+
1315
+
1316
+
1317
+ function _toConsumableArray(arr) {
1318
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1319
+ }
1320
+ ;// CONCATENATED MODULE: ../../packages/select/src/optionGroup.tsx
1321
+
1322
+
1323
+
1324
+ /*
1325
+ * Tencent is pleased to support the open source community by making
1326
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1327
+ *
1328
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1329
+ *
1330
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1331
+ *
1332
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1333
+ *
1334
+ * ---------------------------------------------------
1335
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1336
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1337
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1338
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1339
+ *
1340
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1341
+ * the Software.
1342
+ *
1343
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1344
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1345
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1346
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1347
+ * IN THE SOFTWARE.
1348
+ */
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+ /* harmony default export */ const optionGroup = ((0,external_vue_.defineComponent)({
1355
+ name: 'OptionGroup',
1356
+ props: {
1357
+ label: external_shared_.PropTypes.string.def(''),
1358
+ disabled: external_shared_.PropTypes.bool.def(false),
1359
+ collapsible: external_shared_.PropTypes.bool.def(false),
1360
+ collapse: external_shared_.PropTypes.bool.def(false) // 是否折叠初始状态
1361
+ },
1362
+ setup: function setup(props, _ref) {
1363
+ var emit = _ref.emit;
1364
+ var instance = (0,external_vue_.getCurrentInstance)();
1365
+ var proxy = instance.proxy;
1366
+ var select = (0,external_vue_.inject)(selectKey, null);
1367
+ var states = (0,external_vue_.reactive)({
1368
+ groupCollapse: props.collapse,
1369
+ visible: true
1370
+ });
1371
+ var optionsMap = (0,external_vue_.ref)(new Map());
1372
+ var _useRegistry = useRegistry(optionsMap),
1373
+ register = _useRegistry.register,
1374
+ unregister = _useRegistry.unregister;
1375
+ var groupLabel = (0,external_vue_.computed)(function () {
1376
+ return "".concat(props.label, " (").concat(_toConsumableArray(optionsMap.value.values()).filter(function (option) {
1377
+ return option.visible;
1378
+ }).length, ")");
1379
+ });
1380
+ var handleToggleCollapse = function handleToggleCollapse() {
1381
+ if (!props.collapsible || props.disabled) return;
1382
+ states.groupCollapse = !states.groupCollapse;
1383
+ emit('update:collapse', states.groupCollapse);
1384
+ };
1385
+ (0,external_vue_.provide)(optionGroupKey, (0,external_vue_.reactive)(Object.assign(Object.assign({}, (0,external_vue_.toRefs)(props)), {
1386
+ register: register,
1387
+ unregister: unregister,
1388
+ groupCollapse: (0,external_vue_.toRef)(states, 'groupCollapse')
1389
+ })));
1390
+ (0,external_vue_.onBeforeMount)(function () {
1391
+ select === null || select === void 0 ? void 0 : select.registerGroup(instance.uid, proxy);
1392
+ });
1393
+ (0,external_vue_.onBeforeUnmount)(function () {
1394
+ select === null || select === void 0 ? void 0 : select.unregisterGroup(instance.uid);
1395
+ });
1396
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1397
+ resolveClassName = _usePrefix.resolveClassName;
1398
+ return Object.assign(Object.assign({}, (0,external_vue_.toRefs)(states)), {
1399
+ groupLabel: groupLabel,
1400
+ handleToggleCollapse: handleToggleCollapse,
1401
+ resolveClassName: resolveClassName
1402
+ });
1403
+ },
1404
+ render: function render() {
1405
+ var _classes, _classes2;
1406
+ var _a, _b;
1407
+ var groupClass = (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, this.resolveClassName('option-group'), true), _defineProperty(_classes, "collapsible", this.collapsible), _defineProperty(_classes, "disabled", this.disabled), _classes));
1408
+ var groupLabelClass = (0,external_shared_.classes)((_classes2 = {}, _defineProperty(_classes2, this.resolveClassName('option-group-label'), true), _defineProperty(_classes2, "collapsible", this.collapsible), _classes2));
1409
+ var groupLabelIconClass = (0,external_shared_.classes)({
1410
+ 'default-group-label-icon': true,
1411
+ collapse: this.groupCollapse
1412
+ });
1413
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("ul", {
1414
+ "class": groupClass
1415
+ }, [(0,external_vue_.createVNode)("li", {
1416
+ "class": groupLabelClass,
1417
+ "onClick": this.handleToggleCollapse
1418
+ }, [this.$slots.label ? this.$slots.label() : (0,external_vue_.createVNode)("span", {
1419
+ "class": "default-group-label"
1420
+ }, [this.collapsible && (0,external_vue_.createVNode)(external_icon_.AngleUpFill, {
1421
+ "class": groupLabelIconClass
1422
+ }, null), (0,external_vue_.createVNode)("span", {
1423
+ "class": "default-group-label-title"
1424
+ }, [this.groupLabel])])]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("ul", {
1425
+ "class": this.resolveClassName('option-group-content')
1426
+ }, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]), [[external_vue_.vShow, !this.groupCollapse]])]), [[external_vue_.vShow, this.visible]]);
1427
+ }
1428
+ }));
1429
+ // EXTERNAL MODULE: external "../directives"
1430
+ var external_directives_ = __webpack_require__(4061);
1431
+ // EXTERNAL MODULE: external "../input"
1432
+ var external_input_ = __webpack_require__(8133);
1433
+ var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
1434
+ // EXTERNAL MODULE: external "../loading"
1435
+ var external_loading_ = __webpack_require__(4870);
1436
+ var external_loading_default = /*#__PURE__*/__webpack_require__.n(external_loading_);
1437
+ // EXTERNAL MODULE: external "../popover"
1438
+ var external_popover_ = __webpack_require__(5537);
1439
+ var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
1440
+ // EXTERNAL MODULE: external "../virtual-render"
1441
+ var external_virtual_render_ = __webpack_require__(3511);
1442
+ var external_virtual_render_default = /*#__PURE__*/__webpack_require__.n(external_virtual_render_);
1443
+ // EXTERNAL MODULE: external "../tag"
1444
+ var external_tag_ = __webpack_require__(7739);
1445
+ var external_tag_default = /*#__PURE__*/__webpack_require__.n(external_tag_);
1446
+ ;// CONCATENATED MODULE: ../../packages/select/src/selectTagInput.tsx
1447
+
1448
+
1449
+ /*
1450
+ * Tencent is pleased to support the open source community by making
1451
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1452
+ *
1453
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1454
+ *
1455
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1456
+ *
1457
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1458
+ *
1459
+ * ---------------------------------------------------
1460
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1461
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1462
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1463
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1464
+ *
1465
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1466
+ * the Software.
1467
+ *
1468
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1469
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1470
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1471
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1472
+ * IN THE SOFTWARE.
1473
+ */
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+ /* harmony default export */ const selectTagInput = ((0,external_vue_.defineComponent)({
1481
+ name: 'SelectTagInput',
1482
+ props: {
1483
+ selected: {
1484
+ type: Array,
1485
+ "default": function _default() {
1486
+ return [];
1487
+ }
1488
+ },
1489
+ tagTheme: (0,external_shared_.TagThemeType)(),
1490
+ placeholder: external_shared_.PropTypes.string.def(''),
1491
+ filterable: external_shared_.PropTypes.bool.def(false),
1492
+ allowCreate: external_shared_.PropTypes.bool.def(false),
1493
+ disabled: external_shared_.PropTypes.bool.def(false),
1494
+ modelValue: external_shared_.PropTypes.any,
1495
+ collapseTags: external_shared_.PropTypes.bool.def(false)
1496
+ },
1497
+ emits: ['update:modelValue', 'remove', 'enter', 'keydown'],
1498
+ setup: function setup(props, _ref) {
1499
+ var emit = _ref.emit;
1500
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1501
+ resolveClassName = _usePrefix.resolveClassName;
1502
+ var select = (0,external_vue_.inject)(selectKey, null);
1503
+ var _toRefs = (0,external_vue_.toRefs)(props),
1504
+ modelValue = _toRefs.modelValue,
1505
+ collapseTags = _toRefs.collapseTags,
1506
+ selected = _toRefs.selected;
1507
+ var value = (0,external_vue_.ref)(modelValue.value);
1508
+ var inputRef = (0,external_vue_.ref)();
1509
+ var overflowTagIndex = (0,external_vue_.ref)(null);
1510
+ (0,external_vue_.watch)(modelValue, function () {
1511
+ value.value = modelValue.value;
1512
+ });
1513
+ (0,external_vue_.watch)([selected, collapseTags], function () {
1514
+ calcOverflow();
1515
+ }, {
1516
+ flush: 'post'
1517
+ });
1518
+ var handleRemoveTag = function handleRemoveTag(val) {
1519
+ emit('remove', val);
1520
+ };
1521
+ var focus = function focus() {
1522
+ var _a;
1523
+ (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.focus();
1524
+ };
1525
+ var handleInput = function handleInput(e) {
1526
+ emit('update:modelValue', e.target.value);
1527
+ };
1528
+ var handleKeydown = function handleKeydown(e) {
1529
+ switch (e.code) {
1530
+ case 'Enter':
1531
+ {
1532
+ emit('enter', e.target.value, e);
1533
+ break;
1534
+ }
1535
+ }
1536
+ emit('keydown', e.target.value, e);
1537
+ };
1538
+ var tagsRefs = (0,external_vue_.ref)([]);
1539
+ var collapseTagRef = (0,external_vue_.ref)();
1540
+ var getTagDOM = function getTagDOM(index) {
1541
+ var tagDomList = tagsRefs.value.map(function (item) {
1542
+ return item === null || item === void 0 ? void 0 : item.$el;
1543
+ }).filter(function (item) {
1544
+ return !!item;
1545
+ });
1546
+ return typeof index === 'number' ? tagDomList[index] : tagDomList;
1547
+ };
1548
+ // 计算出现换行的索引
1549
+ var calcOverflow = function calcOverflow() {
1550
+ if (!collapseTags.value) return;
1551
+ overflowTagIndex.value = null;
1552
+ setTimeout(function () {
1553
+ var _a, _b;
1554
+ var tags = getTagDOM();
1555
+ // 出现换行的Index位置
1556
+ var tagIndexInSecondRow = tags.findIndex(function (currentTag, index) {
1557
+ if (!index) {
1558
+ return false;
1559
+ }
1560
+ var previousTag = tags[index - 1];
1561
+ return previousTag.offsetTop !== currentTag.offsetTop;
1562
+ });
1563
+ overflowTagIndex.value = tagIndexInSecondRow > 0 ? tagIndexInSecondRow : null;
1564
+ // 剩余位置能否放下数字tag
1565
+ if (((_a = tags[overflowTagIndex.value]) === null || _a === void 0 ? void 0 : _a.offsetTop) !== ((_b = collapseTagRef.value) === null || _b === void 0 ? void 0 : _b.offsetTop) && overflowTagIndex.value > 1) {
1566
+ overflowTagIndex.value -= 1;
1567
+ }
1568
+ });
1569
+ };
1570
+ // 监听Dom元素变化
1571
+ var debounceFn = (0,external_lodash_.debounce)(calcOverflow, 150);
1572
+ var tagWrapperRef = (0,external_vue_.ref)();
1573
+ var resizeObserver = new ResizeObserver(function () {
1574
+ debounceFn();
1575
+ });
1576
+ (0,external_vue_.onMounted)(function () {
1577
+ tagWrapperRef.value && resizeObserver.observe(tagWrapperRef.value);
1578
+ });
1579
+ (0,external_vue_.onBeforeUnmount)(function () {
1580
+ tagWrapperRef.value && resizeObserver.unobserve(tagWrapperRef.value);
1581
+ });
1582
+ return {
1583
+ collapseTagRef: collapseTagRef,
1584
+ tagWrapperRef: tagWrapperRef,
1585
+ tagsRefs: tagsRefs,
1586
+ select: select,
1587
+ overflowTagIndex: overflowTagIndex,
1588
+ value: value,
1589
+ inputRef: inputRef,
1590
+ handleRemoveTag: handleRemoveTag,
1591
+ focus: focus,
1592
+ handleInput: handleInput,
1593
+ handleKeydown: handleKeydown,
1594
+ resolveClassName: resolveClassName
1595
+ };
1596
+ },
1597
+ render: function render() {
1598
+ var _classes,
1599
+ _this = this;
1600
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1601
+ var prefix = (_b = (_a = this.$slots) === null || _a === void 0 ? void 0 : _a.prefix) === null || _b === void 0 ? void 0 : _b.call(_a);
1602
+ var selectTagClass = (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, this.resolveClassName('select-tag'), true), _defineProperty(_classes, this.resolveClassName('select-tag--default'), true), _defineProperty(_classes, 'is-disabled', this.disabled), _defineProperty(_classes, 'collapse-tag', this.collapseTags), _defineProperty(_classes, 'has-prefix', !!prefix), _classes));
1603
+ var tagWrapperClass = (0,external_shared_.classes)(_defineProperty({}, this.resolveClassName('select-tag-wrapper'), true));
1604
+ var inputStyle = {
1605
+ display: this.selected.length && !this.filterable ? 'none' : ''
1606
+ };
1607
+ return (0,external_vue_.createVNode)("div", {
1608
+ "class": selectTagClass,
1609
+ "ref": "tagWrapperRef"
1610
+ }, [(_d = (_c = this.$slots) === null || _c === void 0 ? void 0 : _c.prefix) === null || _d === void 0 ? void 0 : _d.call(_c), (0,external_vue_.createVNode)("div", {
1611
+ "class": tagWrapperClass
1612
+ }, [(_g = (_f = (_e = this.$slots)["default"]) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : this.selected.map(function (item, index) {
1613
+ var _a;
1614
+ return (0,external_vue_.createVNode)((external_tag_default()), {
1615
+ "closable": true,
1616
+ "theme": _this.tagTheme,
1617
+ "style": {
1618
+ display: _this.collapseTags && _this.overflowTagIndex && index >= _this.overflowTagIndex ? 'none' : ''
1619
+ },
1620
+ "ref": function ref(el) {
1621
+ return _this.tagsRefs[index] = el;
1622
+ },
1623
+ "onClose": function onClose() {
1624
+ return _this.handleRemoveTag(item.value);
1625
+ }
1626
+ }, {
1627
+ "default": function _default() {
1628
+ return [(_a = _this.select) === null || _a === void 0 ? void 0 : _a.handleGetLabelByValue(item.value)];
1629
+ }
1630
+ });
1631
+ }), (0,external_vue_.createVNode)((external_tag_default()), {
1632
+ "class": this.resolveClassName('select-overflow-tag'),
1633
+ "style": {
1634
+ display: !!this.overflowTagIndex && this.collapseTags ? '' : 'none'
1635
+ },
1636
+ "ref": "collapseTagRef"
1637
+ }, {
1638
+ "default": function _default() {
1639
+ return [(0,external_vue_.createTextVNode)("+"), _this.selected.length - _this.overflowTagIndex];
1640
+ }
1641
+ }), (0,external_vue_.createVNode)("input", {
1642
+ "class": this.resolveClassName('select-tag-input'),
1643
+ "ref": "inputRef",
1644
+ "type": "text",
1645
+ "style": inputStyle,
1646
+ "placeholder": !this.selected.length ? this.placeholder : '',
1647
+ "readonly": !this.filterable,
1648
+ "disabled": this.disabled,
1649
+ "value": !this.filterable ? '' : this.value,
1650
+ "onInput": this.handleInput,
1651
+ "onKeydown": this.handleKeydown
1652
+ }, null)]), (_j = (_h = this.$slots) === null || _h === void 0 ? void 0 : _h.suffix) === null || _j === void 0 ? void 0 : _j.call(_h)]);
1653
+ }
1654
+ }));
1655
+ ;// CONCATENATED MODULE: ../../packages/select/src/select.tsx
1656
+
1657
+
1658
+
1659
+
1660
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = select_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; } } }; }
1661
+ function select_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return select_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 select_arrayLikeToArray(o, minLen); }
1662
+ function select_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; }
1663
+ /*
1664
+ * Tencent is pleased to support the open source community by making
1665
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1666
+ *
1667
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1668
+ *
1669
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1670
+ *
1671
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1672
+ *
1673
+ * ---------------------------------------------------
1674
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1675
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1676
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1677
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1678
+ *
1679
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1680
+ * the Software.
1681
+ *
1682
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1683
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1684
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1685
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1686
+ * IN THE SOFTWARE.
1687
+ */
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+ function _isSlot(s) {
1702
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
1703
+ }
1704
+ /* harmony default export */ const src_select = ((0,external_vue_.defineComponent)({
1705
+ name: 'Select',
1706
+ directives: {
1707
+ clickoutside: external_directives_.clickoutside
1708
+ },
1709
+ props: {
1710
+ modelValue: external_shared_.PropTypes.any,
1711
+ multiple: external_shared_.PropTypes.bool.def(false),
1712
+ disabled: external_shared_.PropTypes.bool.def(false),
1713
+ size: external_shared_.PropTypes.size().def(external_shared_.SizeEnum.DEFAULT),
1714
+ clearable: external_shared_.PropTypes.bool.def(true),
1715
+ loading: external_shared_.PropTypes.bool.def(false),
1716
+ filterable: external_shared_.PropTypes.bool.def(false),
1717
+ remoteMethod: external_shared_.PropTypes.func,
1718
+ scrollHeight: external_shared_.PropTypes.number.def(200),
1719
+ showSelectAll: external_shared_.PropTypes.bool.def(false),
1720
+ popoverMinWidth: external_shared_.PropTypes.number.def(0),
1721
+ showOnInit: external_shared_.PropTypes.bool.def(false),
1722
+ multipleMode: external_shared_.PropTypes.oneOf(['default', 'tag']).def('default'),
1723
+ tagTheme: (0,external_shared_.TagThemeType)(),
1724
+ behavior: (0,external_shared_.InputBehaviorType)(),
1725
+ collapseTags: external_shared_.PropTypes.bool.def(false),
1726
+ autoHeight: external_shared_.PropTypes.bool.def(true),
1727
+ noDataText: external_shared_.PropTypes.string,
1728
+ noMatchText: external_shared_.PropTypes.string,
1729
+ loadingText: external_shared_.PropTypes.string,
1730
+ placeholder: external_shared_.PropTypes.string,
1731
+ searchPlaceholder: external_shared_.PropTypes.string,
1732
+ selectAllText: external_shared_.PropTypes.string,
1733
+ scrollLoading: external_shared_.PropTypes.bool.def(false),
1734
+ allowCreate: external_shared_.PropTypes.bool.def(false),
1735
+ popoverOptions: Object,
1736
+ customContent: external_shared_.PropTypes.bool.def(false),
1737
+ list: external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.any).def([]),
1738
+ idKey: external_shared_.PropTypes.string.def('value'),
1739
+ displayKey: external_shared_.PropTypes.string.def('label'),
1740
+ withValidate: external_shared_.PropTypes.bool.def(true),
1741
+ showSelectedIcon: external_shared_.PropTypes.bool.def(true),
1742
+ inputSearch: external_shared_.PropTypes.bool.def(true),
1743
+ enableVirtualRender: external_shared_.PropTypes.bool.def(false),
1744
+ allowEmptyValues: external_shared_.PropTypes.array.def([]),
1745
+ autoFocus: external_shared_.PropTypes.bool.def(false),
1746
+ keepSearchValue: external_shared_.PropTypes.bool.def(false),
1747
+ prefix: external_shared_.PropTypes.string,
1748
+ selectedStyle: (0,external_shared_.SelectedType)()
1749
+ },
1750
+ emits: ['update:modelValue', 'change', 'toggle', 'clear', 'scroll-end', 'focus', 'blur', 'tag-remove'],
1751
+ setup: function setup(props, _ref) {
1752
+ var emit = _ref.emit;
1753
+ var t = (0,external_config_provider_.useLocale)('select');
1754
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1755
+ resolveClassName = _usePrefix.resolveClassName;
1756
+ var _toRefs = (0,external_vue_.toRefs)(props),
1757
+ modelValue = _toRefs.modelValue,
1758
+ disabled = _toRefs.disabled,
1759
+ filterable = _toRefs.filterable,
1760
+ multiple = _toRefs.multiple,
1761
+ remoteMethod = _toRefs.remoteMethod,
1762
+ loading = _toRefs.loading,
1763
+ popoverMinWidth = _toRefs.popoverMinWidth,
1764
+ showOnInit = _toRefs.showOnInit,
1765
+ multipleMode = _toRefs.multipleMode,
1766
+ allowCreate = _toRefs.allowCreate,
1767
+ customContent = _toRefs.customContent,
1768
+ showSelectedIcon = _toRefs.showSelectedIcon,
1769
+ inputSearch = _toRefs.inputSearch,
1770
+ enableVirtualRender = _toRefs.enableVirtualRender,
1771
+ showSelectAll = _toRefs.showSelectAll,
1772
+ scrollHeight = _toRefs.scrollHeight,
1773
+ list = _toRefs.list,
1774
+ displayKey = _toRefs.displayKey,
1775
+ idKey = _toRefs.idKey,
1776
+ collapseTags = _toRefs.collapseTags,
1777
+ autoHeight = _toRefs.autoHeight,
1778
+ popoverOptions = _toRefs.popoverOptions,
1779
+ allowEmptyValues = _toRefs.allowEmptyValues,
1780
+ autoFocus = _toRefs.autoFocus,
1781
+ keepSearchValue = _toRefs.keepSearchValue,
1782
+ selectedStyle = _toRefs.selectedStyle;
1783
+ var localNoDataText = (0,external_vue_.computed)(function () {
1784
+ if (props.noDataText === undefined) {
1785
+ return t.value.noData;
1786
+ }
1787
+ return props.noDataText;
1788
+ });
1789
+ var localNoMatchText = (0,external_vue_.computed)(function () {
1790
+ if (props.noMatchText === undefined) {
1791
+ return t.value.noMatchedData;
1792
+ }
1793
+ return props.noMatchText;
1794
+ });
1795
+ var localLoadingText = (0,external_vue_.computed)(function () {
1796
+ if (props.loadingText === undefined) {
1797
+ return t.value.loading;
1798
+ }
1799
+ return props.loadingText;
1800
+ });
1801
+ var localPlaceholder = (0,external_vue_.computed)(function () {
1802
+ if (props.placeholder === undefined) {
1803
+ return t.value.pleaseSelect;
1804
+ }
1805
+ return props.placeholder;
1806
+ });
1807
+ var localSearchPlaceholder = (0,external_vue_.computed)(function () {
1808
+ if (props.searchPlaceholder === undefined) {
1809
+ return t.value.enterKeywords;
1810
+ }
1811
+ return props.searchPlaceholder;
1812
+ });
1813
+ var localSelectAllText = (0,external_vue_.computed)(function () {
1814
+ if (props.selectAllText === undefined) {
1815
+ return t.value.all;
1816
+ }
1817
+ return props.selectAllText;
1818
+ });
1819
+ var formItem = (0,external_shared_.useFormItem)();
1820
+ var inputRef = (0,external_vue_.ref)();
1821
+ var triggerRef = (0,external_vue_.ref)();
1822
+ var contentRef = (0,external_vue_.ref)();
1823
+ var searchRef = (0,external_vue_.ref)();
1824
+ var selectTagInputRef = (0,external_vue_.ref)();
1825
+ var virtualRenderRef = (0,external_vue_.ref)();
1826
+ var popoverRef = (0,external_vue_.ref)();
1827
+ var optionsMap = (0,external_vue_.ref)(new Map());
1828
+ var options = (0,external_vue_.computed)(function () {
1829
+ return _toConsumableArray(optionsMap.value.values());
1830
+ });
1831
+ var groupsMap = (0,external_vue_.ref)(new Map());
1832
+ var selected = (0,external_vue_.ref)([]);
1833
+ var cacheSelectedMap = (0,external_vue_.computed)(function () {
1834
+ return selected.value.reduce(function (pre, item) {
1835
+ pre[item.value] = item.label;
1836
+ return pre;
1837
+ }, {});
1838
+ });
1839
+ var activeOptionValue = (0,external_vue_.ref)(); // 当前悬浮的option
1840
+ var listMap = (0,external_vue_.computed)(function () {
1841
+ return list.value.reduce(function (pre, item) {
1842
+ pre[item[idKey.value]] = item[displayKey.value];
1843
+ return pre;
1844
+ }, {});
1845
+ });
1846
+ (0,external_vue_.watch)(modelValue, function () {
1847
+ var _a;
1848
+ handleSetSelectedData();
1849
+ if (props.withValidate) {
1850
+ (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
1851
+ }
1852
+ }, {
1853
+ deep: true
1854
+ });
1855
+ (0,external_vue_.watch)(selected, function () {
1856
+ var _a;
1857
+ (_a = popoverRef.value) === null || _a === void 0 ? void 0 : _a.updatePopover(null, popoverConfig.value);
1858
+ });
1859
+ // 虚拟滚动模式下搜索后的值
1860
+ var virtualList = (0,external_vue_.computed)(function () {
1861
+ return isRemoteSearch.value ? list.value : list.value.filter(function (item) {
1862
+ var _a;
1863
+ return (_a = toLowerCase(String(item[displayKey.value]))) === null || _a === void 0 ? void 0 : _a.includes(toLowerCase(searchKey.value));
1864
+ });
1865
+ });
1866
+ // select组件是否禁用
1867
+ var isDisabled = (0,external_vue_.computed)(function () {
1868
+ return disabled.value || loading.value;
1869
+ });
1870
+ // modelValue对应的label
1871
+ var selectedLabel = (0,external_vue_.computed)(function () {
1872
+ return selected.value.map(function (item) {
1873
+ var _a, _b;
1874
+ return ((_b = (_a = optionsMap.value) === null || _a === void 0 ? void 0 : _a.get(item.value)) === null || _b === void 0 ? void 0 : _b.optionName) || listMap.value[item.value] || item.label;
1875
+ });
1876
+ });
1877
+ // 是否全选(todo: 优化)
1878
+ var isAllSelected = (0,external_vue_.computed)(function () {
1879
+ var normalSelectedValues = options.value.reduce(function (pre, option) {
1880
+ if (!option.disabled) {
1881
+ pre.push(option.optionID);
1882
+ }
1883
+ return pre;
1884
+ }, []);
1885
+ return normalSelectedValues.length <= selected.value.length && normalSelectedValues.every(function (val) {
1886
+ return selected.value.some(function (item) {
1887
+ return item.value === val;
1888
+ });
1889
+ });
1890
+ });
1891
+ // 是否含有分组
1892
+ var isGroup = (0,external_vue_.computed)(function () {
1893
+ return !!groupsMap.value.size;
1894
+ });
1895
+ // options是否为空
1896
+ var isOptionsEmpty = (0,external_vue_.computed)(function () {
1897
+ return !options.value.length;
1898
+ });
1899
+ // 是否搜索为空
1900
+ var isSearchEmpty = (0,external_vue_.computed)(function () {
1901
+ return options.value.length && options.value.every(function (option) {
1902
+ return !option.visible;
1903
+ });
1904
+ });
1905
+ // 是否远程搜索
1906
+ var isRemoteSearch = (0,external_vue_.computed)(function () {
1907
+ return filterable.value && typeof remoteMethod.value === 'function';
1908
+ });
1909
+ // 是否显示select下拉内容
1910
+ var isShowSelectContent = (0,external_vue_.computed)(function () {
1911
+ return !(searchLoading.value || isOptionsEmpty.value || isSearchEmpty.value) || customContent.value;
1912
+ });
1913
+ // 是否显示全选
1914
+ var isShowSelectAll = (0,external_vue_.computed)(function () {
1915
+ return multiple.value && showSelectAll.value && (!searchKey.value || !filterable.value);
1916
+ });
1917
+ // 虚拟滚动高度 12 上下边距,32 显示全选时的高度
1918
+ var virtualHeight = (0,external_vue_.computed)(function () {
1919
+ return scrollHeight.value - 12 - (isShowSelectAll.value ? 32 : 0);
1920
+ });
1921
+ // 当前空状态时显示文案
1922
+ var curContentText = (0,external_vue_.computed)(function () {
1923
+ if (searchLoading.value) {
1924
+ return localLoadingText.value;
1925
+ }
1926
+ if (isOptionsEmpty.value) {
1927
+ return localNoDataText.value;
1928
+ }
1929
+ if (isSearchEmpty.value) {
1930
+ return localNoMatchText.value;
1931
+ }
1932
+ return '';
1933
+ });
1934
+ // 是否合并tag以数字形式展示
1935
+ var isCollapseTags = (0,external_vue_.computed)(function () {
1936
+ return autoHeight.value ? collapseTags.value && !isPopoverShow.value : collapseTags.value;
1937
+ });
1938
+ var popoverConfig = (0,external_vue_.computed)(function () {
1939
+ return (0,external_lodash_.merge)({
1940
+ theme: "light ".concat(resolveClassName('select-popover')),
1941
+ trigger: 'manual',
1942
+ width: popperWidth.value,
1943
+ arrow: false,
1944
+ placement: 'bottom-start',
1945
+ isShow: isPopoverShow.value,
1946
+ reference: selectTagInputRef.value,
1947
+ offset: 6,
1948
+ popoverDelay: 0,
1949
+ renderType: external_shared_.RenderType.AUTO
1950
+ }, popoverOptions.value);
1951
+ });
1952
+ var _useRegistry = useRegistry(optionsMap),
1953
+ register = _useRegistry.register,
1954
+ unregister = _useRegistry.unregister;
1955
+ var _useRegistry2 = useRegistry(groupsMap),
1956
+ registerGroup = _useRegistry2.register,
1957
+ unregisterGroup = _useRegistry2.unregister;
1958
+ var _useHover = useHover(),
1959
+ isHover = _useHover.isHover,
1960
+ setHover = _useHover.setHover,
1961
+ cancelHover = _useHover.cancelHover;
1962
+ var isFocus = (0,external_vue_.ref)(false);
1963
+ var handleFocus = function handleFocus() {
1964
+ if (isFocus.value) return;
1965
+ isFocus.value = true;
1966
+ emit('focus');
1967
+ };
1968
+ var handleBlur = function handleBlur() {
1969
+ if (!isFocus.value) return;
1970
+ isFocus.value = false;
1971
+ emit('blur');
1972
+ };
1973
+ var _usePopover = usePopover({
1974
+ popoverMinWidth: popoverMinWidth.value
1975
+ }, triggerRef),
1976
+ popperWidth = _usePopover.popperWidth,
1977
+ isPopoverShow = _usePopover.isPopoverShow,
1978
+ hidePopover = _usePopover.hidePopover,
1979
+ showPopover = _usePopover.showPopover,
1980
+ togglePopover = _usePopover.togglePopover;
1981
+ (0,external_vue_.watch)(isPopoverShow, function () {
1982
+ emit('toggle', isPopoverShow.value);
1983
+ });
1984
+ // 输入框是否可以输入内容
1985
+ var isInput = (0,external_vue_.computed)(function () {
1986
+ return (filterable.value && inputSearch.value || allowCreate.value) && isPopoverShow.value;
1987
+ });
1988
+ (0,external_vue_.watch)(isPopoverShow, function (isShow) {
1989
+ if (!isShow) {
1990
+ if (!keepSearchValue.value) {
1991
+ searchKey.value = '';
1992
+ }
1993
+ } else {
1994
+ setTimeout(function () {
1995
+ focusInput();
1996
+ initActiveOptionValue();
1997
+ }, 10); // 等待Popover content出来,options加载完成
1998
+ }
1999
+ });
2000
+ // 初始化当前悬浮的option项
2001
+ var initActiveOptionValue = function initActiveOptionValue() {
2002
+ var _a;
2003
+ var firstSelected = selected.value[0];
2004
+ var option = optionsMap.value.get(firstSelected === null || firstSelected === void 0 ? void 0 : firstSelected.value);
2005
+ if (option && !option.disabled && option.visible) {
2006
+ activeOptionValue.value = firstSelected === null || firstSelected === void 0 ? void 0 : firstSelected.value;
2007
+ } else {
2008
+ activeOptionValue.value = (_a = options.value.find(function (option) {
2009
+ return !option.disabled && option.visible;
2010
+ })) === null || _a === void 0 ? void 0 : _a.optionID;
2011
+ }
2012
+ };
2013
+ // 默认搜索方法
2014
+ var defaultSearchMethod = function defaultSearchMethod(value) {
2015
+ if (!filterable.value) return;
2016
+ options.value.forEach(function (option) {
2017
+ var _a;
2018
+ option.visible = (_a = toLowerCase(String(option.optionName))) === null || _a === void 0 ? void 0 : _a.includes(toLowerCase(value));
2019
+ });
2020
+ };
2021
+ var _useRemoteSearch = useRemoteSearch(isRemoteSearch.value ? remoteMethod.value : defaultSearchMethod, initActiveOptionValue),
2022
+ searchKey = _useRemoteSearch.searchKey,
2023
+ searchLoading = _useRemoteSearch.searchLoading;
2024
+ // 派发change事件
2025
+ var emitChange = function emitChange(val) {
2026
+ if (val === modelValue.value) return;
2027
+ emit('update:modelValue', val, modelValue.value);
2028
+ emit('change', val, modelValue.value);
2029
+ };
2030
+ // 派发toggle事件
2031
+ var handleTogglePopover = function handleTogglePopover() {
2032
+ if (isDisabled.value) return;
2033
+ handleFocus();
2034
+ togglePopover();
2035
+ };
2036
+ // 搜索
2037
+ var handleInputChange = function handleInputChange(value) {
2038
+ if (!filterable.value) return;
2039
+ searchKey.value = value;
2040
+ };
2041
+ // allow create(创建自定义选项)
2042
+ var handleInputEnter = function handleInputEnter(val, e) {
2043
+ var value = String(val);
2044
+ if (!allowCreate.value || !value || filterable.value && options.value.find(function (data) {
2045
+ return toLowerCase(String(data.optionName)) === toLowerCase(value);
2046
+ })) return; // 开启搜索后,正好匹配到自定义选项,则不进行创建操作
2047
+ var data = optionsMap.value.get(value);
2048
+ if (data) return; // 已经存在相同值的option时不能创建
2049
+ // todo 优化交互方式
2050
+ e.stopPropagation(); // 阻止触发 handleKeyup enter 事件
2051
+ if (multiple.value) {
2052
+ selected.value.push({
2053
+ value: value,
2054
+ label: value
2055
+ });
2056
+ emitChange(selected.value.map(function (item) {
2057
+ return item.value;
2058
+ }));
2059
+ } else {
2060
+ selected.value = [{
2061
+ value: value,
2062
+ label: value
2063
+ }];
2064
+ emitChange(value);
2065
+ hidePopover();
2066
+ }
2067
+ searchKey.value = '';
2068
+ };
2069
+ // Option点击事件
2070
+ var handleOptionSelected = function handleOptionSelected(option) {
2071
+ if (isDisabled.value || !option) return;
2072
+ if (multiple.value) {
2073
+ // 多选
2074
+ var index = selected.value.findIndex(function (item) {
2075
+ return item.value === option.optionID;
2076
+ });
2077
+ if (index > -1) {
2078
+ selected.value.splice(index, 1);
2079
+ } else {
2080
+ selected.value.push({
2081
+ value: option.optionID,
2082
+ label: option.optionName || option.optionID
2083
+ });
2084
+ }
2085
+ emitChange(selected.value.map(function (item) {
2086
+ return item.value;
2087
+ }));
2088
+ } else {
2089
+ // 单选
2090
+ selected.value = [{
2091
+ label: option.optionName || option.optionID,
2092
+ value: option.optionID
2093
+ }];
2094
+ emitChange(option.optionID);
2095
+ hidePopover();
2096
+ }
2097
+ focusInput();
2098
+ };
2099
+ // 聚焦输入框
2100
+ var focusInput = function focusInput() {
2101
+ setTimeout(function () {
2102
+ var _a, _b, _c;
2103
+ if (!inputSearch.value && !allowCreate.value) {
2104
+ (_a = searchRef.value) === null || _a === void 0 ? void 0 : _a.focus();
2105
+ } else {
2106
+ if (multipleMode.value === 'tag') {
2107
+ (_b = selectTagInputRef.value) === null || _b === void 0 ? void 0 : _b.focus();
2108
+ } else {
2109
+ (_c = inputRef.value) === null || _c === void 0 ? void 0 : _c.focus();
2110
+ }
2111
+ }
2112
+ }, 0);
2113
+ };
2114
+ // 清空事件
2115
+ var handleClear = function handleClear(e) {
2116
+ e.stopPropagation();
2117
+ selected.value = [];
2118
+ emitChange(multiple.value ? [] : '');
2119
+ emit('clear', multiple.value ? [] : '');
2120
+ hidePopover();
2121
+ };
2122
+ // 全选/取消全选
2123
+ var handleSelectedAllOptionMouseEnter = function handleSelectedAllOptionMouseEnter() {
2124
+ activeOptionValue.value = '';
2125
+ };
2126
+ var handleToggleAll = function handleToggleAll() {
2127
+ var _a;
2128
+ if (isAllSelected.value) {
2129
+ selected.value = [];
2130
+ } else {
2131
+ options.value.forEach(function (option) {
2132
+ if (option.disabled || option.optionID in cacheSelectedMap.value) return;
2133
+ selected.value.push({
2134
+ value: option.optionID,
2135
+ label: option.optionName || option.optionID
2136
+ });
2137
+ });
2138
+ (_a = list.value) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
2139
+ if (item.disabled || item[idKey.value] in cacheSelectedMap.value) return;
2140
+ selected.value.push({
2141
+ value: item[idKey.value],
2142
+ label: item[displayKey.value]
2143
+ });
2144
+ });
2145
+ }
2146
+ emitChange(selected.value.map(function (item) {
2147
+ return item.value;
2148
+ }));
2149
+ focusInput();
2150
+ };
2151
+ // 滚动事件
2152
+ var handleScroll = function handleScroll(e) {
2153
+ var _e$target = e.target,
2154
+ scrollTop = _e$target.scrollTop,
2155
+ clientHeight = _e$target.clientHeight,
2156
+ scrollHeight = _e$target.scrollHeight;
2157
+ if (scrollTop + clientHeight === scrollHeight) {
2158
+ emit('scroll-end');
2159
+ }
2160
+ };
2161
+ // tag删除事件
2162
+ var handleDeleteTag = function handleDeleteTag(val) {
2163
+ if (isDisabled.value) return;
2164
+ var index = selected.value.findIndex(function (item) {
2165
+ return item.value === val;
2166
+ });
2167
+ if (index > -1) {
2168
+ selected.value.splice(index, 1);
2169
+ emitChange(selected.value.map(function (item) {
2170
+ return item.value;
2171
+ }));
2172
+ emit('tag-remove', val);
2173
+ }
2174
+ };
2175
+ // options存在 > 上一次选择的label > 当前值
2176
+ var handleGetLabelByValue = function handleGetLabelByValue(value) {
2177
+ var _a, _b;
2178
+ // 处理options value为对象类型,引用类型变更后,回显不对问题
2179
+ var tmpValue = value;
2180
+ if (_typeof(tmpValue) === 'object') {
2181
+ var _iterator = _createForOfIteratorHelper(optionsMap.value.keys()),
2182
+ _step;
2183
+ try {
2184
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2185
+ var key = _step.value;
2186
+ if ((0,external_lodash_.isEqual)(key, tmpValue)) {
2187
+ tmpValue = key;
2188
+ break;
2189
+ }
2190
+ }
2191
+ } catch (err) {
2192
+ _iterator.e(err);
2193
+ } finally {
2194
+ _iterator.f();
2195
+ }
2196
+ }
2197
+ return ((_b = (_a = optionsMap.value) === null || _a === void 0 ? void 0 : _a.get(tmpValue)) === null || _b === void 0 ? void 0 : _b.optionName) || listMap.value[tmpValue] || cacheSelectedMap.value[tmpValue] || tmpValue;
2198
+ };
2199
+ // 设置selected选项
2200
+ var handleSetSelectedData = function handleSetSelectedData() {
2201
+ // 同步内部value值
2202
+ if (Array.isArray(modelValue.value)) {
2203
+ selected.value = _toConsumableArray(modelValue.value.map(function (value) {
2204
+ return {
2205
+ value: value,
2206
+ label: handleGetLabelByValue(value)
2207
+ };
2208
+ }));
2209
+ } else {
2210
+ if (modelValue.value !== undefined || allowEmptyValues.value.includes(modelValue.value)) {
2211
+ selected.value = [{
2212
+ value: modelValue.value,
2213
+ label: handleGetLabelByValue(modelValue.value)
2214
+ }];
2215
+ } else {
2216
+ selected.value = [];
2217
+ }
2218
+ }
2219
+ };
2220
+ // 处理键盘事件
2221
+ var handleKeydown = function handleKeydown(e) {
2222
+ var _a, _b;
2223
+ if (!isPopoverShow.value) return;
2224
+ var availableOptions = options.value.filter(function (option) {
2225
+ return !option.disabled && option.visible;
2226
+ });
2227
+ var index = availableOptions.findIndex(function (option) {
2228
+ return option.optionID === activeOptionValue.value;
2229
+ });
2230
+ if (!availableOptions.length || index === -1) return;
2231
+ switch (e.code) {
2232
+ // 下一个option
2233
+ case 'ArrowDown':
2234
+ {
2235
+ e.preventDefault(); // 阻止滚动屏幕
2236
+ var nextIndex = index >= availableOptions.length - 1 ? 0 : index + 1;
2237
+ activeOptionValue.value = (_a = availableOptions[nextIndex]) === null || _a === void 0 ? void 0 : _a.optionID;
2238
+ break;
2239
+ }
2240
+ // 上一个option
2241
+ case 'ArrowUp':
2242
+ {
2243
+ e.preventDefault(); // 阻止滚动屏幕
2244
+ var preIndex = index === 0 ? availableOptions.length - 1 : index - 1;
2245
+ activeOptionValue.value = (_b = availableOptions[preIndex]) === null || _b === void 0 ? void 0 : _b.optionID;
2246
+ break;
2247
+ }
2248
+ // 删除选项
2249
+ case 'Backspace':
2250
+ {
2251
+ if (!multiple.value || !selected.value.length || searchKey.value.length || e.target === searchRef.value) return; // 单选和下拉搜索不支持回退键删除
2252
+ selected.value.pop();
2253
+ emitChange(selected.value.map(function (item) {
2254
+ return item.value;
2255
+ }));
2256
+ break;
2257
+ }
2258
+ // 选择选项
2259
+ case 'Enter':
2260
+ {
2261
+ var option = optionsMap.value.get(activeOptionValue.value);
2262
+ handleOptionSelected(option);
2263
+ break;
2264
+ }
2265
+ }
2266
+ };
2267
+ var handleClickOutside = function handleClickOutside(_ref2) {
2268
+ var event = _ref2.event;
2269
+ var _a;
2270
+ var target = event.target;
2271
+ if (((_a = triggerRef.value) === null || _a === void 0 ? void 0 : _a.contains(target)) || triggerRef.value === target) return;
2272
+ hidePopover();
2273
+ handleBlur();
2274
+ };
2275
+ var handlePopoverShow = function handlePopoverShow() {
2276
+ setTimeout(function () {
2277
+ var _a, _b;
2278
+ // 虚拟滚动首次未更新问题
2279
+ enableVirtualRender.value && ((_b = (_a = virtualRenderRef.value) === null || _a === void 0 ? void 0 : _a.reset) === null || _b === void 0 ? void 0 : _b.call(_a));
2280
+ });
2281
+ };
2282
+ (0,external_vue_.provide)(selectKey, (0,external_vue_.reactive)({
2283
+ multiple: multiple,
2284
+ selected: selected,
2285
+ activeOptionValue: activeOptionValue,
2286
+ showSelectedIcon: showSelectedIcon,
2287
+ selectedStyle: selectedStyle,
2288
+ register: register,
2289
+ unregister: unregister,
2290
+ registerGroup: registerGroup,
2291
+ unregisterGroup: unregisterGroup,
2292
+ handleOptionSelected: handleOptionSelected,
2293
+ handleGetLabelByValue: handleGetLabelByValue
2294
+ }));
2295
+ (0,external_vue_.onMounted)(function () {
2296
+ handleSetSelectedData();
2297
+ setTimeout(function () {
2298
+ showOnInit.value && showPopover();
2299
+ autoFocus.value && focusInput();
2300
+ });
2301
+ });
2302
+ return {
2303
+ selected: selected,
2304
+ isInput: isInput,
2305
+ options: options,
2306
+ isDisabled: isDisabled,
2307
+ selectedLabel: selectedLabel,
2308
+ isPopoverShow: isPopoverShow,
2309
+ isHover: isHover,
2310
+ popperWidth: popperWidth,
2311
+ inputRef: inputRef,
2312
+ triggerRef: triggerRef,
2313
+ contentRef: contentRef,
2314
+ searchRef: searchRef,
2315
+ selectTagInputRef: selectTagInputRef,
2316
+ virtualRenderRef: virtualRenderRef,
2317
+ popoverRef: popoverRef,
2318
+ searchLoading: searchLoading,
2319
+ isOptionsEmpty: isOptionsEmpty,
2320
+ isSearchEmpty: isSearchEmpty,
2321
+ isFocus: isFocus,
2322
+ isShowSelectContent: isShowSelectContent,
2323
+ curContentText: curContentText,
2324
+ isGroup: isGroup,
2325
+ searchKey: searchKey,
2326
+ isShowSelectAll: isShowSelectAll,
2327
+ virtualHeight: virtualHeight,
2328
+ virtualList: virtualList,
2329
+ isCollapseTags: isCollapseTags,
2330
+ popoverConfig: popoverConfig,
2331
+ focusInput: focusInput,
2332
+ setHover: setHover,
2333
+ cancelHover: cancelHover,
2334
+ handleFocus: handleFocus,
2335
+ handleBlur: handleBlur,
2336
+ handleTogglePopover: handleTogglePopover,
2337
+ handleClear: handleClear,
2338
+ hidePopover: hidePopover,
2339
+ showPopover: showPopover,
2340
+ handleToggleAll: handleToggleAll,
2341
+ handleOptionSelected: handleOptionSelected,
2342
+ handleClickOutside: handleClickOutside,
2343
+ handleScroll: handleScroll,
2344
+ handleDeleteTag: handleDeleteTag,
2345
+ handleInputChange: handleInputChange,
2346
+ handleInputEnter: handleInputEnter,
2347
+ handleKeydown: handleKeydown,
2348
+ handleSelectedAllOptionMouseEnter: handleSelectedAllOptionMouseEnter,
2349
+ handlePopoverShow: handlePopoverShow,
2350
+ localLoadingText: localLoadingText,
2351
+ localPlaceholder: localPlaceholder,
2352
+ localSearchPlaceholder: localSearchPlaceholder,
2353
+ localSelectAllText: localSelectAllText,
2354
+ resolveClassName: resolveClassName
2355
+ };
2356
+ },
2357
+ render: function render() {
2358
+ var _classes,
2359
+ _this = this;
2360
+ var selectClass = (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, "".concat(this.resolveClassName('select')), true), _defineProperty(_classes, 'popover-show', this.isPopoverShow), _defineProperty(_classes, 'is-disabled', this.isDisabled), _defineProperty(_classes, 'is-focus', this.isFocus), _defineProperty(_classes, 'is-filterable', this.filterable), _defineProperty(_classes, this.size, true), _defineProperty(_classes, this.behavior, true), _classes));
2361
+ var suffixIcon = function suffixIcon() {
2362
+ if (_this.loading) {
2363
+ return (0,external_vue_.createVNode)((external_loading_default()), {
2364
+ "loading": true,
2365
+ "theme": "primary",
2366
+ "class": "spinner",
2367
+ "mode": "spin",
2368
+ "size": "mini"
2369
+ }, null);
2370
+ }
2371
+ if (_this.clearable && _this.isHover && _this.selected.length && !_this.isDisabled) {
2372
+ return (0,external_vue_.createVNode)(external_icon_.Close, {
2373
+ "class": "clear-icon",
2374
+ "onClick": _this.handleClear
2375
+ }, null);
2376
+ }
2377
+ return (0,external_vue_.createVNode)(external_icon_.AngleUp, {
2378
+ "class": "angle-up"
2379
+ }, null);
2380
+ };
2381
+ var renderTriggerInput = function renderTriggerInput() {
2382
+ var _slot;
2383
+ var _a, _b;
2384
+ if (_this.multipleMode === 'tag') {
2385
+ return (0,external_vue_.createVNode)(selectTagInput, {
2386
+ "ref": "selectTagInputRef",
2387
+ "modelValue": _this.searchKey,
2388
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
2389
+ return _this.searchKey = $event;
2390
+ },
2391
+ "selected": _this.selected,
2392
+ "tagTheme": _this.tagTheme,
2393
+ "placeholder": _this.localPlaceholder,
2394
+ "filterable": _this.isInput,
2395
+ "disabled": _this.isDisabled,
2396
+ "onRemove": _this.handleDeleteTag,
2397
+ "collapseTags": _this.isCollapseTags,
2398
+ "onEnter": _this.handleInputEnter,
2399
+ "onKeydown": function onKeydown(_, e) {
2400
+ return _this.handleKeydown(e);
2401
+ }
2402
+ }, {
2403
+ prefix: _this.prefix ? (0,external_vue_.createVNode)("div", {
2404
+ "class": "".concat(_this.resolveClassName('select--prefix-area'))
2405
+ }, [(0,external_vue_.createVNode)("span", null, [_this.prefix])]) : (_b = (_a = _this.$slots).prefix) === null || _b === void 0 ? void 0 : _b.call(_a),
2406
+ "default": _this.$slots.tag && function () {
2407
+ return _this.$slots.tag({
2408
+ selected: _this.selected
2409
+ });
2410
+ },
2411
+ suffix: function suffix() {
2412
+ return suffixIcon();
2413
+ }
2414
+ });
2415
+ }
2416
+ return (0,external_vue_.createVNode)((external_input_default()), (0,external_vue_.mergeProps)({
2417
+ "ref": "inputRef",
2418
+ "type": "text",
2419
+ "modelValue": _this.isInput ? _this.searchKey : _this.selectedLabel.join(','),
2420
+ "placeholder": _this.isInput ? _this.selectedLabel.join(',') || _this.localPlaceholder : _this.localPlaceholder,
2421
+ "readonly": !_this.isInput,
2422
+ "selectReadonly": true,
2423
+ "disabled": _this.isDisabled,
2424
+ "behavior": _this.behavior,
2425
+ "size": _this.size,
2426
+ "withValidate": false,
2427
+ "onInput": _this.handleInputChange,
2428
+ "onEnter": _this.handleInputEnter,
2429
+ "onKeydown": function onKeydown(_, e) {
2430
+ return _this.handleKeydown(e);
2431
+ }
2432
+ }, _this.prefix ? {
2433
+ prefix: _this.prefix
2434
+ } : null), _isSlot(_slot = Object.assign(Object.assign({}, typeof _this.$slots.prefix === 'function' ? {
2435
+ prefix: function prefix() {
2436
+ var _a, _b;
2437
+ return (_b = (_a = _this.$slots).prefix) === null || _b === void 0 ? void 0 : _b.call(_a);
2438
+ }
2439
+ } : null), {
2440
+ suffix: function suffix() {
2441
+ return suffixIcon();
2442
+ }
2443
+ })) ? _slot : {
2444
+ "default": function _default() {
2445
+ return [_slot];
2446
+ }
2447
+ });
2448
+ };
2449
+ var renderSelectTrigger = function renderSelectTrigger() {
2450
+ var _a, _b;
2451
+ return (0,external_vue_.createVNode)("div", {
2452
+ "class": _this.resolveClassName('select-trigger'),
2453
+ "style": {
2454
+ height: _this.autoHeight && _this.collapseTags ? '32px' : ''
2455
+ },
2456
+ "ref": "triggerRef",
2457
+ "onClick": _this.handleTogglePopover,
2458
+ "onMouseenter": _this.setHover,
2459
+ "onMouseleave": _this.cancelHover
2460
+ }, [((_b = (_a = _this.$slots).trigger) === null || _b === void 0 ? void 0 : _b.call(_a, {
2461
+ selected: _this.selected
2462
+ })) || renderTriggerInput()]);
2463
+ };
2464
+ var renderSelectContent = function renderSelectContent() {
2465
+ var _a, _b;
2466
+ return (0,external_vue_.createVNode)("div", {
2467
+ "class": _this.resolveClassName('select-content-wrapper'),
2468
+ "ref": "contentRef"
2469
+ }, [_this.filterable && !_this.inputSearch && (0,external_vue_.createVNode)("div", {
2470
+ "class": _this.resolveClassName('select-search-wrapper')
2471
+ }, [(0,external_vue_.createVNode)(external_icon_.Search, {
2472
+ "class": "icon-search",
2473
+ "width": 16,
2474
+ "height": 16
2475
+ }, null), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("input", {
2476
+ "ref": "searchRef",
2477
+ "class": _this.resolveClassName('select-search-input'),
2478
+ "placeholder": _this.localSearchPlaceholder,
2479
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
2480
+ return _this.searchKey = $event;
2481
+ }
2482
+ }, null), [[external_vue_.vModelText, _this.searchKey]])]), !_this.isShowSelectContent && (0,external_vue_.createVNode)("div", {
2483
+ "class": _this.resolveClassName('select-empty')
2484
+ }, [_this.searchLoading && (0,external_vue_.createVNode)((external_loading_default()), {
2485
+ "class": "mr5",
2486
+ "theme": "primary",
2487
+ "loading": true,
2488
+ "mode": "spin",
2489
+ "size": "mini"
2490
+ }, null), (0,external_vue_.createVNode)("span", null, [_this.curContentText])]), (0,external_vue_.createVNode)("div", {
2491
+ "class": _this.resolveClassName('select-content')
2492
+ }, [(0,external_vue_.createVNode)("div", {
2493
+ "class": _this.resolveClassName('select-dropdown'),
2494
+ "style": {
2495
+ maxHeight: "".concat(_this.scrollHeight, "px")
2496
+ },
2497
+ "onScroll": _this.handleScroll
2498
+ }, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("ul", {
2499
+ "class": _this.resolveClassName('select-options')
2500
+ }, [_this.isShowSelectAll && (0,external_vue_.createVNode)("li", {
2501
+ "class": _this.resolveClassName('select-option'),
2502
+ "onMouseenter": _this.handleSelectedAllOptionMouseEnter,
2503
+ "onClick": _this.handleToggleAll
2504
+ }, [_this.localSelectAllText]), _this.enableVirtualRender ? (0,external_vue_.createVNode)((external_virtual_render_default()), {
2505
+ "list": _this.virtualList,
2506
+ "height": _this.virtualHeight,
2507
+ "lineHeight": 32,
2508
+ "ref": "virtualRenderRef"
2509
+ }, {
2510
+ "default": function _default(_ref3) {
2511
+ var data = _ref3.data;
2512
+ return data.map(function (item) {
2513
+ var _a, _b;
2514
+ return (0,external_vue_.createVNode)(src_option, {
2515
+ "key": item[_this.idKey],
2516
+ "id": item[_this.idKey],
2517
+ "name": item[_this.displayKey]
2518
+ }, {
2519
+ "default": (_b = (_a = _this.$slots).virtualScrollRender) === null || _b === void 0 ? void 0 : _b.call(_a, {
2520
+ item: item
2521
+ })
2522
+ });
2523
+ });
2524
+ }
2525
+ }) : _this.list.map(function (item) {
2526
+ return (0,external_vue_.createVNode)(src_option, {
2527
+ "id": item[_this.idKey],
2528
+ "name": item[_this.displayKey]
2529
+ }, null);
2530
+ }), (_b = (_a = _this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a), _this.scrollLoading && (0,external_vue_.createVNode)("li", {
2531
+ "class": _this.resolveClassName('select-options-loading')
2532
+ }, [(0,external_vue_.createVNode)((external_loading_default()), {
2533
+ "class": "spinner mr5",
2534
+ "theme": "primary",
2535
+ "loading": true,
2536
+ "mode": "spin",
2537
+ "size": "mini"
2538
+ }, null), (0,external_vue_.createVNode)("span", null, [_this.localLoadingText])])]), [[external_vue_.vShow, _this.isShowSelectContent]])]), _this.$slots.extension && (0,external_vue_.createVNode)("div", {
2539
+ "class": _this.resolveClassName('select-extension')
2540
+ }, [_this.$slots.extension()])])]);
2541
+ };
2542
+ return (0,external_vue_.createVNode)("div", {
2543
+ "class": selectClass
2544
+ }, [(0,external_vue_.createVNode)((external_popover_default()), (0,external_vue_.mergeProps)(this.popoverConfig, {
2545
+ "onClickoutside": this.handleClickOutside,
2546
+ "onAfterShow": this.handlePopoverShow,
2547
+ "ref": "popoverRef"
2548
+ }), {
2549
+ "default": function _default() {
2550
+ return renderSelectTrigger();
2551
+ },
2552
+ content: function content() {
2553
+ return renderSelectContent();
2554
+ }
2555
+ })]);
2556
+ }
2557
+ }));
2558
+ ;// CONCATENATED MODULE: ../../packages/select/src/index.ts
2559
+ /*
2560
+ * Tencent is pleased to support the open source community by making
2561
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2562
+ *
2563
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2564
+ *
2565
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2566
+ *
2567
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2568
+ *
2569
+ * ---------------------------------------------------
2570
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2571
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2572
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2573
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2574
+ *
2575
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2576
+ * the Software.
2577
+ *
2578
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2579
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2580
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2581
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2582
+ * IN THE SOFTWARE.
2583
+ */
2584
+
2585
+
2586
+
2587
+
2588
+ var BkSelect = (0,external_shared_.withInstallProps)(src_select, {
2589
+ Option: src_option,
2590
+ Group: optionGroup
2591
+ });
2592
+ /* harmony default export */ const src = (BkSelect);
2593
+
2594
+ })();
2595
+
2596
+ /******/ return __webpack_exports__;
2597
+ /******/ })()
2598
+ ;
2599
+ });