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,1683 @@
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("../config-provider"),require("../input"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../input","../popover"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../input"),require("../popover")):t(e["../shared"],e.vue,e["../config-provider"],e["../input"],e["../popover"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r,n)=>(()=>{var o={2717:e=>{"use strict";e.exports=a},8133:e=>{"use strict";e.exports=r},5537:e=>{"use strict";e.exports=n},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,a)=>{var r=a(7425).default;function n(){"use strict";e.exports=n=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},a=Object.prototype,o=a.hasOwnProperty,u=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},i=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function v(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(e){v=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var n=t&&t.prototype instanceof p?t:p,o=Object.create(n.prototype),l=new j(r||[]);return u(o,"_invoke",{value:L(e,a,l)}),o}function d(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var f={};function p(){}function h(){}function y(){}var V={};v(V,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(O([])));x&&x!==a&&o.call(x,i)&&(V=x);var g=y.prototype=p.prototype=Object.create(V);function w(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function a(n,u,l,i){var c=d(e[n],e,u);if("throw"!==c.type){var s=c.arg,v=s.value;return v&&"object"==r(v)&&o.call(v,"__await")?t.resolve(v.__await).then((function(e){a("next",e,l,i)}),(function(e){a("throw",e,l,i)})):t.resolve(v).then((function(e){s.value=e,l(s)}),(function(e){return a("throw",e,l,i)}))}i(c.arg)}var n;u(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,n){a(e,r,t,n)}))}return n=n?n.then(o,o):o()}})}function L(e,t,a){var r="suspendedStart";return function(n,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw o;return{value:void 0,done:!0}}for(a.method=n,a.arg=o;;){var u=a.delegate;if(u){var l=S(u,a);if(l){if(l===f)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var i=d(e,t,a);if("normal"===i.type){if(r=a.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r="completed",a.method="throw",a.arg=i.arg)}}}function S(e,t){var a=t.method,r=e.iterator[a];if(void 0===r)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var n=d(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,f;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(o.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=y,u(g,"constructor",{value:y,configurable:!0}),u(y,"constructor",{value:h,configurable:!0}),h.displayName=v(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,v(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},w(N.prototype),v(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var u=new N(m(e,a,r,n),o);return t.isGeneratorFunction(a)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},w(g),v(g,s,"Generator"),v(g,i,(function(){return this})),v(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=O,j.prototype={constructor:j,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(C),!e)for(var t in this)"t"===t.charAt(0)&&o.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 a(a,r){return u.type="throw",u.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r],u=n.completion;if("root"===n.tryLoc)return a("end");if(n.tryLoc<=this.prev){var l=o.call(n,"catchLoc"),i=o.call(n,"finallyLoc");if(l&&i){if(this.prev<n.catchLoc)return a(n.catchLoc,!0);if(this.prev<n.finallyLoc)return a(n.finallyLoc)}else if(l){if(this.prev<n.catchLoc)return a(n.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return a(n.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&o.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 u=n?n.completion:{};return u.type=e,u.arg=t,n?(this.method="next",this.next=n.finallyLoc,f):this.complete(u)},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 a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),C(a),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;C(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:O(e),resultName:t,nextLoc:a},"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(a){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(a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,a)=>{var r=a(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},u={};function l(e){var t=u[e];if(void 0!==t)return t.exports;var a=u[e]={exports:{}};return o[e](a,a.exports,l),a.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";l.r(i),l.d(i,{default:()=>p});var e=l(4212),t=l(748),a=l(2841),r=l.n(a);Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var n=l(2717),o=l(8133),u=l.n(o),c=l(5537),s=l.n(c);const v=(0,t.defineComponent)({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:function(){return{}}}},emits:["emitChange","resetSize","update:modelValue"],setup:function(a,r){var o=r.emit,u=(0,t.ref)(!1),l=(0,t.ref)(!1),i=(0,t.ref)(0),c=(0,t.ref)(0),v=(0,t.ref)(0),f=(0,t.ref)(null),p=(0,t.ref)(a.modelValue),h=(0,t.ref)(0),y=(0,t.ref)(0),V=(0,t.ref)(!1),b=(0,t.ref)(null),x=(0,t.computed)((function(){var t,r,n="";if(null===(t=a.params.customContent)||void 0===t?void 0:t[a.modelValue]){var o=a.params.customContent[a.modelValue];n=o.tip||o.label||""}var u=a.params.vertical?e.PlacementEnum.RIGHT:e.PlacementEnum.TOP;return(null===(r=a.params)||void 0===r?void 0:r.showTip)?{content:a.params.formatterTipLabel("".concat(n||(null==a?void 0:a.modelValue)||"0")),placement:u}:{content:"",placement:u}})),g=(0,t.computed)((function(){return"".concat((a.modelValue-a.params.minValue)/(a.params.maxValue-a.params.minValue)*100,"%")})),w=(0,t.computed)((function(){return a.params.vertical?{bottom:g.value}:{left:g.value}})),N=(0,t.computed)((function(){return a.params.formatterButtonLabel(a.modelValue)})),L=function(e){a.params.disable||(e.preventDefault(),S(e),m(window,"mousemove",E),m(window,"touchmove",E),m(window,"mouseup",C),m(window,"touchend",C))},S=function(e){u.value=!0,l.value=!0,a.params.vertical?i.value=e.clientY:c.value=e.clientX,v.value=parseFloat(g.value),f.value=v.value},E=function(e){if(u.value){l.value=!1,o("resetSize");var t=0;a.params.vertical?(h.value=e.clientY,t=(i.value-h.value)/a.params.sliderSize*100):(y.value=e.clientX,t=(y.value-c.value)/a.params.sliderSize*100),f.value=v.value+t,j(f.value)}},C=function e(){V.value=!1,u.value&&(setTimeout((function(){u.value=!1,l.value||(j(f.value),o("emitChange"))}),0),d(window,"mousemove",E),d(window,"touchmove",E),d(window,"mouseup",e),d(window,"touchend",e))},j=function(e){if(null!==e&&!isNaN(e)){e<0?f.value=0:e>100&&(f.value=100);var t=100/((a.params.maxValue-a.params.minValue)/a.params.step),r=Math.round(e/t)*t*(a.params.maxValue-a.params.minValue)*.01+a.params.minValue;r=parseFloat(r.toFixed(a.params.precision)),o("update:modelValue",r),u.value||a.modelValue===p.value||(p.value=a.modelValue)}},O=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){return(0,t.createVNode)("div",{class:["".concat(O("slider-button")),a.params.vertical?"vertical":"horizontal",{grabbing:u.value}],ref:b,tabindex:"0",style:w.value,onClick:function(e){return e.stopPropagation()},onMousedown:L},[Boolean(x.value.content)?(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)(s(),{content:x.value.content,theme:"dark",placement:x.value.placement,boundary:document.body},{default:function(){return[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]}})]):(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)("div",{class:["slider-button",{"slider-button-disable":a.params.disable}]},null)]),a.params.showButtonLabel&&!a.params.showIntervalLabel?(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)("div",{class:["slider-button-label",a.params.vertical?"vertical":"horizontal"]},[N.value])]):null])},setPosition:j,tip:x}},render:function(){return this.renderDom()}});var m=function(e,t,a){e&&t&&a&&e.addEventListener(t,a,!1)},d=function(e,t,a){e&&t&&a&&e.removeEventListener(t,a,!1)};const f=(0,t.defineComponent)({name:"Slider",props:{modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:function(e){return e}},formatterButtonLabel:{type:Function,default:function(e){return e}},formatterTipLabel:{type:Function,default:function(e){return e}}},emits:["update:modelValue","change"],setup:function(e,a){var o=this,l=a.slots,i=a.emit,c=(0,t.ref)(1),s=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(0),h=(0,t.ref)(0),y=(0,t.ref)(null),V=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),g=(0,t.computed)((function(){var t=[e.minValue,e.maxValue,e.step].map((function(e){var t="".concat(e).split(".")[1];return t?t.length:0}));return Math.max.apply(null,t)})),w=(0,t.computed)((function(){return Math.min(s.value,d.value)})),N=(0,t.computed)((function(){return Math.max(s.value,d.value)})),L=(0,t.computed)((function(){return e.range?"".concat(100*(N.value-w.value)/(e.maxValue-e.minValue),"%"):"".concat(100*(s.value-e.minValue)/(e.maxValue-e.minValue),"%")})),S=(0,t.computed)((function(){return e.range?"".concat(100*(w.value-e.minValue)/(e.maxValue-e.minValue),"%"):"0%"})),E=(0,t.computed)((function(){return e.vertical?{height:L.value,bottom:S.value}:{width:L.value,left:S.value}})),C=(0,t.computed)((function(){if(!e.showInterval||e.minValue>e.maxValue)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=(e.maxValue-e.minValue)/e.step,a=100*e.step/(e.maxValue-e.minValue),r=[],n=1;n<t;n++)r.push(n*a);return e.range?r.filter((function(t){return t<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||t>100*(N.value-e.minValue)/(e.maxValue-e.minValue)})):r.filter((function(t){return t>100*(s.value-e.minValue)/(e.maxValue-e.minValue)}))})),j=(0,t.computed)((function(){return e.vertical?{height:e.height,width:"4px"}:{}})),O=(0,t.computed)((function(){if(!e.showIntervalLabel)return[];if(0===e.step)return console.warn("WARNNING:step should not be 0"),[];for(var t=100*e.step/(e.maxValue-e.minValue),a=[],r=e.minValue,n=0;r<=e.maxValue;r+=e.step,n++){var o={stepWidth:n*t,stepLabel:e.formatterLabel(r)};a.push(o)}return a})),T=(0,t.computed)((function(){return Array.isArray(e.modelValue)})),_=(0,t.computed)((function(){return e.customContent?Object.keys(e.customContent).sort((function(e,t){return Number(e)-Number(t)})).filter((function(t){return Number(t)>=e.minValue&&Number(t)<=e.maxValue})).map((function(t){var a=e.customContent[t].tip,r=e.customContent[t].label;return{tip:a||r||"",label:r||"",percent:(Number(t)-e.minValue)/(e.maxValue-e.minValue)*100}})):[]})),P=(0,t.computed)((function(){return{vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:g.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:c.value,formatterTipLabel:e.formatterTipLabel}}));(0,t.watch)((function(){return e.modelValue}),(function(){k()})),(0,t.watch)((function(){return s.value}),(function(t){e.range?i("update:modelValue",[w.value,N.value]):i("update:modelValue",t),p.value=t})),(0,t.watch)((function(){return d.value}),(function(e){i("update:modelValue",[w.value,N.value]),h.value=e})),(0,t.onMounted)((function(){e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),d.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,d.value=e.maxValue),f.value=[s.value,d.value]):("number"!=typeof e.modelValue||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),f.value=s.value),B(),m(window,"resize",B())}));var B=function(){y.value&&(c.value=y.value["client".concat(e.vertical?"Height":"Width")])},I=function(t){var a,r;if(t.stopPropagation(),!e.disable){if(B(),e.vertical){var n=null===(a=y.value)||void 0===a?void 0:a.getBoundingClientRect().bottom;G((n-t.clientY)/c.value*100)}else{var o=null===(r=y.value)||void 0===r?void 0:r.getBoundingClientRect().left;G((t.clientX-o)/c.value*100)}F()}},M=function(){return e.range?![w.value,N.value].every((function(e,t){return e===f.value[t]})):e.modelValue!==f.value},k=function(){if(e.minValue>e.maxValue)console.error("min should not be greater than max.");else{var t=e.modelValue;e.range&&Array.isArray(t)?t[1]<e.minValue?i("update:modelValue",[e.minValue,e.minValue]):t[0]>e.maxValue?i("update:modelValue",[e.maxValue,e.maxValue]):t[0]<e.minValue?i("update:modelValue",[e.minValue,t[1]]):t[1]>e.maxValue?i("update:modelValue",[t[0],e.maxValue]):(s.value=Number(t[0]),d.value=Number(t[1]),M()&&(f.value=t.slice())):e.range||"number"!=typeof t||isNaN(t)||(t<e.minValue?i("update:modelValue",e.minValue):t>e.maxValue?i("update:modelValue",e.maxValue):(s.value=t,M()&&(f.value=t)))}},F=function(){return a=o,n=void 0,u=void 0,l=r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,t.nextTick)();case 2:i("change",e.range?[w.value,N.value]:e.modelValue);case 3:case"end":return a.stop()}}),a)})),new(u||(u=Promise))((function(e,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var a;t.done?e(t.value):(a=t.value,a instanceof u?a:new u((function(e){e(a)}))).then(r,o)}i((l=l.apply(a,n||[])).next())}));var a,n,u,l},z=function(t){return e.vertical?{bottom:"".concat(t,"%")}:{left:"".concat(t,"%")}},G=function(t){if(e.range){var a=e.minValue+t*(e.maxValue-e.minValue)/100;Math.abs(w.value-a)<Math.abs(N.value-a)?x.value=s.value<d.value?V.value:b.value:x.value=s.value>d.value?V.value:b.value,x.value.setPosition(t)}else V.value.setPosition(t)},q=function(t){if(""!==t){var a=parseFloat(t);a<e.minValue?(p.value=e.minValue,s.value=e.minValue):a>e.maxValue?(p.value=e.maxValue,s.value=e.maxValue):s.value=a}},A=function(t){if(""!==t){var a=parseFloat(t.toString());a<e.minValue?(h.value=e.minValue,d.value=e.minValue):a>e.maxValue?(h.value=e.maxValue,d.value=e.maxValue):d.value=a}},R=function(t){var a;return a="start"===t?e.vertical?e.maxValue:e.minValue:e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,d.value].includes(a)?"0":"1"},D=(0,n.usePrefix)().resolveClassName;return{renderDom:function(){var a,r;return(0,t.createVNode)("div",{class:["".concat(D("slider")),e.extCls]},[null===(a=l.start)||void 0===a?void 0:a.call(l),(0,t.createVNode)("div",{class:"".concat(D("slider-runway")),ref:y,style:j.value,onClick:I},[(0,t.createVNode)("div",{class:["".concat(D("slider-bar")),e.vertical?"vertical":"horizontal",{disable:e.disable}],style:E.value},null),e.showInterval?C.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:z(a)},null)})):void 0,e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{key:r,class:["".concat(D("slider-interval")),{vertical:e.vertical}],style:z(a.percent)},null)})):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?(0,t.createVNode)("div",{class:["".concat(D("slider-labels")),e.vertical?"vertical":"horizontal"]},[e.showBetweenLabel?[(0,t.createVNode)("div",{class:"label-start",style:[{opacity:R("start")}]},[e.formatterLabel(e.minValue)]),(0,t.createVNode)("div",{class:"label-end",style:[{opacity:R("end")}]},[e.formatterLabel(e.maxValue)])]:e.showIntervalLabel?O.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:z(a.stepWidth)},[a.stepLabel])})):e.customContent?_.value.map((function(a,r){return(0,t.createVNode)("div",{class:["".concat(D("slider-label")),e.vertical?"vertical":"horizontal"],key:r,style:z(a.percent)},[a.label])})):void 0]):void 0,(0,t.createVNode)(v,{modelValue:s.value,"onUpdate:modelValue":function(e){return s.value=e},ref:V,params:P.value,onEmitChange:F,onResetSize:B},null),e.range?(0,t.createVNode)(v,{modelValue:d.value,"onUpdate:modelValue":function(e){return d.value=e},ref:b,params:P.value,onEmitChange:F,onResetSize:B},null):void 0]),e.showInput&&!e.vertical?(0,t.createVNode)("div",{class:"".concat(D("slider-input"))},[(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:p.value,max:e.maxValue,min:e.minValue,onChange:q},null)]),T.value&&d.value?[(0,t.createVNode)("div",{class:"input-center"},[(0,t.createTextVNode)("~")]),(0,t.createVNode)("div",{class:"input-item"},[(0,t.createVNode)(u(),{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:A},null)])]:void 0]):void 0,null===(r=l.end)||void 0===r?void 0:r.call(l)])}}},render:function(){return this.renderDom()}}),p=(0,e.withInstall)(f)})(),i})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../config-provider"), require("../input"), require("../popover"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../config-provider", "../input", "../popover"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../config-provider"), require("../input"), require("../popover")) : factory(root["../shared"], root["vue"], root["../config-provider"], root["../input"], root["../popover"]);
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__2717__, __WEBPACK_EXTERNAL_MODULE__8133__, __WEBPACK_EXTERNAL_MODULE__5537__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 2717:
15
+ /***/ ((module) => {
16
+
17
+ "use strict";
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
19
+
20
+ /***/ }),
21
+
22
+ /***/ 8133:
23
+ /***/ ((module) => {
24
+
25
+ "use strict";
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8133__;
27
+
28
+ /***/ }),
29
+
30
+ /***/ 5537:
31
+ /***/ ((module) => {
32
+
33
+ "use strict";
34
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
35
+
36
+ /***/ }),
37
+
38
+ /***/ 4212:
39
+ /***/ ((module) => {
40
+
41
+ "use strict";
42
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
43
+
44
+ /***/ }),
45
+
46
+ /***/ 748:
47
+ /***/ ((module) => {
48
+
49
+ "use strict";
50
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
51
+
52
+ /***/ }),
53
+
54
+ /***/ 7609:
55
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
56
+
57
+ var _typeof = (__webpack_require__(7425)["default"]);
58
+ function _regeneratorRuntime() {
59
+ "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
60
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
61
+ return exports;
62
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
63
+ var exports = {},
64
+ Op = Object.prototype,
65
+ hasOwn = Op.hasOwnProperty,
66
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
67
+ obj[key] = desc.value;
68
+ },
69
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
70
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
71
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
72
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
73
+ function define(obj, key, value) {
74
+ return Object.defineProperty(obj, key, {
75
+ value: value,
76
+ enumerable: !0,
77
+ configurable: !0,
78
+ writable: !0
79
+ }), obj[key];
80
+ }
81
+ try {
82
+ define({}, "");
83
+ } catch (err) {
84
+ define = function define(obj, key, value) {
85
+ return obj[key] = value;
86
+ };
87
+ }
88
+ function wrap(innerFn, outerFn, self, tryLocsList) {
89
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
90
+ generator = Object.create(protoGenerator.prototype),
91
+ context = new Context(tryLocsList || []);
92
+ return defineProperty(generator, "_invoke", {
93
+ value: makeInvokeMethod(innerFn, self, context)
94
+ }), generator;
95
+ }
96
+ function tryCatch(fn, obj, arg) {
97
+ try {
98
+ return {
99
+ type: "normal",
100
+ arg: fn.call(obj, arg)
101
+ };
102
+ } catch (err) {
103
+ return {
104
+ type: "throw",
105
+ arg: err
106
+ };
107
+ }
108
+ }
109
+ exports.wrap = wrap;
110
+ var ContinueSentinel = {};
111
+ function Generator() {}
112
+ function GeneratorFunction() {}
113
+ function GeneratorFunctionPrototype() {}
114
+ var IteratorPrototype = {};
115
+ define(IteratorPrototype, iteratorSymbol, function () {
116
+ return this;
117
+ });
118
+ var getProto = Object.getPrototypeOf,
119
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
120
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
121
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
122
+ function defineIteratorMethods(prototype) {
123
+ ["next", "throw", "return"].forEach(function (method) {
124
+ define(prototype, method, function (arg) {
125
+ return this._invoke(method, arg);
126
+ });
127
+ });
128
+ }
129
+ function AsyncIterator(generator, PromiseImpl) {
130
+ function invoke(method, arg, resolve, reject) {
131
+ var record = tryCatch(generator[method], generator, arg);
132
+ if ("throw" !== record.type) {
133
+ var result = record.arg,
134
+ value = result.value;
135
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
136
+ invoke("next", value, resolve, reject);
137
+ }, function (err) {
138
+ invoke("throw", err, resolve, reject);
139
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
140
+ result.value = unwrapped, resolve(result);
141
+ }, function (error) {
142
+ return invoke("throw", error, resolve, reject);
143
+ });
144
+ }
145
+ reject(record.arg);
146
+ }
147
+ var previousPromise;
148
+ defineProperty(this, "_invoke", {
149
+ value: function value(method, arg) {
150
+ function callInvokeWithMethodAndArg() {
151
+ return new PromiseImpl(function (resolve, reject) {
152
+ invoke(method, arg, resolve, reject);
153
+ });
154
+ }
155
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
156
+ }
157
+ });
158
+ }
159
+ function makeInvokeMethod(innerFn, self, context) {
160
+ var state = "suspendedStart";
161
+ return function (method, arg) {
162
+ if ("executing" === state) throw new Error("Generator is already running");
163
+ if ("completed" === state) {
164
+ if ("throw" === method) throw arg;
165
+ return doneResult();
166
+ }
167
+ for (context.method = method, context.arg = arg;;) {
168
+ var delegate = context.delegate;
169
+ if (delegate) {
170
+ var delegateResult = maybeInvokeDelegate(delegate, context);
171
+ if (delegateResult) {
172
+ if (delegateResult === ContinueSentinel) continue;
173
+ return delegateResult;
174
+ }
175
+ }
176
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
177
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
178
+ context.dispatchException(context.arg);
179
+ } else "return" === context.method && context.abrupt("return", context.arg);
180
+ state = "executing";
181
+ var record = tryCatch(innerFn, self, context);
182
+ if ("normal" === record.type) {
183
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
184
+ return {
185
+ value: record.arg,
186
+ done: context.done
187
+ };
188
+ }
189
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
190
+ }
191
+ };
192
+ }
193
+ function maybeInvokeDelegate(delegate, context) {
194
+ var methodName = context.method,
195
+ method = delegate.iterator[methodName];
196
+ 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;
197
+ var record = tryCatch(method, delegate.iterator, context.arg);
198
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
199
+ var info = record.arg;
200
+ 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);
201
+ }
202
+ function pushTryEntry(locs) {
203
+ var entry = {
204
+ tryLoc: locs[0]
205
+ };
206
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
207
+ }
208
+ function resetTryEntry(entry) {
209
+ var record = entry.completion || {};
210
+ record.type = "normal", delete record.arg, entry.completion = record;
211
+ }
212
+ function Context(tryLocsList) {
213
+ this.tryEntries = [{
214
+ tryLoc: "root"
215
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
216
+ }
217
+ function values(iterable) {
218
+ if (iterable) {
219
+ var iteratorMethod = iterable[iteratorSymbol];
220
+ if (iteratorMethod) return iteratorMethod.call(iterable);
221
+ if ("function" == typeof iterable.next) return iterable;
222
+ if (!isNaN(iterable.length)) {
223
+ var i = -1,
224
+ next = function next() {
225
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
226
+ return next.value = undefined, next.done = !0, next;
227
+ };
228
+ return next.next = next;
229
+ }
230
+ }
231
+ return {
232
+ next: doneResult
233
+ };
234
+ }
235
+ function doneResult() {
236
+ return {
237
+ value: undefined,
238
+ done: !0
239
+ };
240
+ }
241
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
242
+ value: GeneratorFunctionPrototype,
243
+ configurable: !0
244
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
245
+ value: GeneratorFunction,
246
+ configurable: !0
247
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
248
+ var ctor = "function" == typeof genFun && genFun.constructor;
249
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
250
+ }, exports.mark = function (genFun) {
251
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
252
+ }, exports.awrap = function (arg) {
253
+ return {
254
+ __await: arg
255
+ };
256
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
257
+ return this;
258
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
259
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
260
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
261
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
262
+ return result.done ? result.value : iter.next();
263
+ });
264
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
265
+ return this;
266
+ }), define(Gp, "toString", function () {
267
+ return "[object Generator]";
268
+ }), exports.keys = function (val) {
269
+ var object = Object(val),
270
+ keys = [];
271
+ for (var key in object) keys.push(key);
272
+ return keys.reverse(), function next() {
273
+ for (; keys.length;) {
274
+ var key = keys.pop();
275
+ if (key in object) return next.value = key, next.done = !1, next;
276
+ }
277
+ return next.done = !0, next;
278
+ };
279
+ }, exports.values = values, Context.prototype = {
280
+ constructor: Context,
281
+ reset: function reset(skipTempReset) {
282
+ 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);
283
+ },
284
+ stop: function stop() {
285
+ this.done = !0;
286
+ var rootRecord = this.tryEntries[0].completion;
287
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
288
+ return this.rval;
289
+ },
290
+ dispatchException: function dispatchException(exception) {
291
+ if (this.done) throw exception;
292
+ var context = this;
293
+ function handle(loc, caught) {
294
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
295
+ }
296
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
297
+ var entry = this.tryEntries[i],
298
+ record = entry.completion;
299
+ if ("root" === entry.tryLoc) return handle("end");
300
+ if (entry.tryLoc <= this.prev) {
301
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
302
+ hasFinally = hasOwn.call(entry, "finallyLoc");
303
+ if (hasCatch && hasFinally) {
304
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
305
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
306
+ } else if (hasCatch) {
307
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
308
+ } else {
309
+ if (!hasFinally) throw new Error("try statement without catch or finally");
310
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
311
+ }
312
+ }
313
+ }
314
+ },
315
+ abrupt: function abrupt(type, arg) {
316
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
317
+ var entry = this.tryEntries[i];
318
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
319
+ var finallyEntry = entry;
320
+ break;
321
+ }
322
+ }
323
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
324
+ var record = finallyEntry ? finallyEntry.completion : {};
325
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
326
+ },
327
+ complete: function complete(record, afterLoc) {
328
+ if ("throw" === record.type) throw record.arg;
329
+ 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;
330
+ },
331
+ finish: function finish(finallyLoc) {
332
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
333
+ var entry = this.tryEntries[i];
334
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
335
+ }
336
+ },
337
+ "catch": function _catch(tryLoc) {
338
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
339
+ var entry = this.tryEntries[i];
340
+ if (entry.tryLoc === tryLoc) {
341
+ var record = entry.completion;
342
+ if ("throw" === record.type) {
343
+ var thrown = record.arg;
344
+ resetTryEntry(entry);
345
+ }
346
+ return thrown;
347
+ }
348
+ }
349
+ throw new Error("illegal catch attempt");
350
+ },
351
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
352
+ return this.delegate = {
353
+ iterator: values(iterable),
354
+ resultName: resultName,
355
+ nextLoc: nextLoc
356
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
357
+ }
358
+ }, exports;
359
+ }
360
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
361
+
362
+ /***/ }),
363
+
364
+ /***/ 7425:
365
+ /***/ ((module) => {
366
+
367
+ function _typeof(obj) {
368
+ "@babel/helpers - typeof";
369
+
370
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
371
+ return typeof obj;
372
+ } : function (obj) {
373
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
374
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
375
+ }
376
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
377
+
378
+ /***/ }),
379
+
380
+ /***/ 2841:
381
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
382
+
383
+ // TODO(Babel 8): Remove this file.
384
+
385
+ var runtime = __webpack_require__(7609)();
386
+ module.exports = runtime;
387
+
388
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
389
+ try {
390
+ regeneratorRuntime = runtime;
391
+ } catch (accidentalStrictMode) {
392
+ if (typeof globalThis === "object") {
393
+ globalThis.regeneratorRuntime = runtime;
394
+ } else {
395
+ Function("r", "regeneratorRuntime = r")(runtime);
396
+ }
397
+ }
398
+
399
+
400
+ /***/ })
401
+
402
+ /******/ });
403
+ /************************************************************************/
404
+ /******/ // The module cache
405
+ /******/ var __webpack_module_cache__ = {};
406
+ /******/
407
+ /******/ // The require function
408
+ /******/ function __webpack_require__(moduleId) {
409
+ /******/ // Check if module is in cache
410
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
411
+ /******/ if (cachedModule !== undefined) {
412
+ /******/ return cachedModule.exports;
413
+ /******/ }
414
+ /******/ // Create a new module (and put it into the cache)
415
+ /******/ var module = __webpack_module_cache__[moduleId] = {
416
+ /******/ // no module.id needed
417
+ /******/ // no module.loaded needed
418
+ /******/ exports: {}
419
+ /******/ };
420
+ /******/
421
+ /******/ // Execute the module function
422
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
423
+ /******/
424
+ /******/ // Return the exports of the module
425
+ /******/ return module.exports;
426
+ /******/ }
427
+ /******/
428
+ /************************************************************************/
429
+ /******/ /* webpack/runtime/compat get default export */
430
+ /******/ (() => {
431
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
432
+ /******/ __webpack_require__.n = (module) => {
433
+ /******/ var getter = module && module.__esModule ?
434
+ /******/ () => (module['default']) :
435
+ /******/ () => (module);
436
+ /******/ __webpack_require__.d(getter, { a: getter });
437
+ /******/ return getter;
438
+ /******/ };
439
+ /******/ })();
440
+ /******/
441
+ /******/ /* webpack/runtime/define property getters */
442
+ /******/ (() => {
443
+ /******/ // define getter functions for harmony exports
444
+ /******/ __webpack_require__.d = (exports, definition) => {
445
+ /******/ for(var key in definition) {
446
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
447
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
448
+ /******/ }
449
+ /******/ }
450
+ /******/ };
451
+ /******/ })();
452
+ /******/
453
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
454
+ /******/ (() => {
455
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
456
+ /******/ })();
457
+ /******/
458
+ /******/ /* webpack/runtime/make namespace object */
459
+ /******/ (() => {
460
+ /******/ // define __esModule on exports
461
+ /******/ __webpack_require__.r = (exports) => {
462
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
463
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
464
+ /******/ }
465
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
466
+ /******/ };
467
+ /******/ })();
468
+ /******/
469
+ /************************************************************************/
470
+ var __webpack_exports__ = {};
471
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
472
+ (() => {
473
+ "use strict";
474
+ // ESM COMPAT FLAG
475
+ __webpack_require__.r(__webpack_exports__);
476
+
477
+ // EXPORTS
478
+ __webpack_require__.d(__webpack_exports__, {
479
+ "default": () => (/* binding */ src)
480
+ });
481
+
482
+ // EXTERNAL MODULE: external "../shared"
483
+ var external_shared_ = __webpack_require__(4212);
484
+ // EXTERNAL MODULE: external "vue"
485
+ var external_vue_ = __webpack_require__(748);
486
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
487
+ var regenerator = __webpack_require__(2841);
488
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
489
+ ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
490
+ /******************************************************************************
491
+ Copyright (c) Microsoft Corporation.
492
+
493
+ Permission to use, copy, modify, and/or distribute this software for any
494
+ purpose with or without fee is hereby granted.
495
+
496
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
497
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
498
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
499
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
500
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
501
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
502
+ PERFORMANCE OF THIS SOFTWARE.
503
+ ***************************************************************************** */
504
+ /* global Reflect, Promise, SuppressedError, Symbol */
505
+
506
+ var extendStatics = function(d, b) {
507
+ extendStatics = Object.setPrototypeOf ||
508
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
509
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
510
+ return extendStatics(d, b);
511
+ };
512
+
513
+ function __extends(d, b) {
514
+ if (typeof b !== "function" && b !== null)
515
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
516
+ extendStatics(d, b);
517
+ function __() { this.constructor = d; }
518
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
519
+ }
520
+
521
+ var __assign = function() {
522
+ __assign = Object.assign || function __assign(t) {
523
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
524
+ s = arguments[i];
525
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
526
+ }
527
+ return t;
528
+ }
529
+ return __assign.apply(this, arguments);
530
+ }
531
+
532
+ function __rest(s, e) {
533
+ var t = {};
534
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
535
+ t[p] = s[p];
536
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
537
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
538
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
539
+ t[p[i]] = s[p[i]];
540
+ }
541
+ return t;
542
+ }
543
+
544
+ function __decorate(decorators, target, key, desc) {
545
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
546
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
547
+ 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;
548
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
549
+ }
550
+
551
+ function __param(paramIndex, decorator) {
552
+ return function (target, key) { decorator(target, key, paramIndex); }
553
+ }
554
+
555
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
556
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
557
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
558
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
559
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
560
+ var _, done = false;
561
+ for (var i = decorators.length - 1; i >= 0; i--) {
562
+ var context = {};
563
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
564
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
565
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
566
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
567
+ if (kind === "accessor") {
568
+ if (result === void 0) continue;
569
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
570
+ if (_ = accept(result.get)) descriptor.get = _;
571
+ if (_ = accept(result.set)) descriptor.set = _;
572
+ if (_ = accept(result.init)) initializers.unshift(_);
573
+ }
574
+ else if (_ = accept(result)) {
575
+ if (kind === "field") initializers.unshift(_);
576
+ else descriptor[key] = _;
577
+ }
578
+ }
579
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
580
+ done = true;
581
+ };
582
+
583
+ function __runInitializers(thisArg, initializers, value) {
584
+ var useValue = arguments.length > 2;
585
+ for (var i = 0; i < initializers.length; i++) {
586
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
587
+ }
588
+ return useValue ? value : void 0;
589
+ };
590
+
591
+ function __propKey(x) {
592
+ return typeof x === "symbol" ? x : "".concat(x);
593
+ };
594
+
595
+ function __setFunctionName(f, name, prefix) {
596
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
597
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
598
+ };
599
+
600
+ function __metadata(metadataKey, metadataValue) {
601
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
602
+ }
603
+
604
+ function __awaiter(thisArg, _arguments, P, generator) {
605
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
606
+ return new (P || (P = Promise))(function (resolve, reject) {
607
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
608
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
609
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
610
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
611
+ });
612
+ }
613
+
614
+ function __generator(thisArg, body) {
615
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
616
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
617
+ function verb(n) { return function (v) { return step([n, v]); }; }
618
+ function step(op) {
619
+ if (f) throw new TypeError("Generator is already executing.");
620
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
621
+ 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;
622
+ if (y = 0, t) op = [op[0] & 2, t.value];
623
+ switch (op[0]) {
624
+ case 0: case 1: t = op; break;
625
+ case 4: _.label++; return { value: op[1], done: false };
626
+ case 5: _.label++; y = op[1]; op = [0]; continue;
627
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
628
+ default:
629
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
630
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
631
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
632
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
633
+ if (t[2]) _.ops.pop();
634
+ _.trys.pop(); continue;
635
+ }
636
+ op = body.call(thisArg, _);
637
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
638
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
639
+ }
640
+ }
641
+
642
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
643
+ if (k2 === undefined) k2 = k;
644
+ var desc = Object.getOwnPropertyDescriptor(m, k);
645
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
646
+ desc = { enumerable: true, get: function() { return m[k]; } };
647
+ }
648
+ Object.defineProperty(o, k2, desc);
649
+ }) : (function(o, m, k, k2) {
650
+ if (k2 === undefined) k2 = k;
651
+ o[k2] = m[k];
652
+ });
653
+
654
+ function __exportStar(m, o) {
655
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
656
+ }
657
+
658
+ function __values(o) {
659
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
660
+ if (m) return m.call(o);
661
+ if (o && typeof o.length === "number") return {
662
+ next: function () {
663
+ if (o && i >= o.length) o = void 0;
664
+ return { value: o && o[i++], done: !o };
665
+ }
666
+ };
667
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
668
+ }
669
+
670
+ function __read(o, n) {
671
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
672
+ if (!m) return o;
673
+ var i = m.call(o), r, ar = [], e;
674
+ try {
675
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
676
+ }
677
+ catch (error) { e = { error: error }; }
678
+ finally {
679
+ try {
680
+ if (r && !r.done && (m = i["return"])) m.call(i);
681
+ }
682
+ finally { if (e) throw e.error; }
683
+ }
684
+ return ar;
685
+ }
686
+
687
+ /** @deprecated */
688
+ function __spread() {
689
+ for (var ar = [], i = 0; i < arguments.length; i++)
690
+ ar = ar.concat(__read(arguments[i]));
691
+ return ar;
692
+ }
693
+
694
+ /** @deprecated */
695
+ function __spreadArrays() {
696
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
697
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
698
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
699
+ r[k] = a[j];
700
+ return r;
701
+ }
702
+
703
+ function __spreadArray(to, from, pack) {
704
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
705
+ if (ar || !(i in from)) {
706
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
707
+ ar[i] = from[i];
708
+ }
709
+ }
710
+ return to.concat(ar || Array.prototype.slice.call(from));
711
+ }
712
+
713
+ function __await(v) {
714
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
715
+ }
716
+
717
+ function __asyncGenerator(thisArg, _arguments, generator) {
718
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
719
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
720
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
721
+ 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); }); }; }
722
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
723
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
724
+ function fulfill(value) { resume("next", value); }
725
+ function reject(value) { resume("throw", value); }
726
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
727
+ }
728
+
729
+ function __asyncDelegator(o) {
730
+ var i, p;
731
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
732
+ 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; }
733
+ }
734
+
735
+ function __asyncValues(o) {
736
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
737
+ var m = o[Symbol.asyncIterator], i;
738
+ 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);
739
+ 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); }); }; }
740
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
741
+ }
742
+
743
+ function __makeTemplateObject(cooked, raw) {
744
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
745
+ return cooked;
746
+ };
747
+
748
+ var __setModuleDefault = Object.create ? (function(o, v) {
749
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
750
+ }) : function(o, v) {
751
+ o["default"] = v;
752
+ };
753
+
754
+ function __importStar(mod) {
755
+ if (mod && mod.__esModule) return mod;
756
+ var result = {};
757
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
758
+ __setModuleDefault(result, mod);
759
+ return result;
760
+ }
761
+
762
+ function __importDefault(mod) {
763
+ return (mod && mod.__esModule) ? mod : { default: mod };
764
+ }
765
+
766
+ function __classPrivateFieldGet(receiver, state, kind, f) {
767
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
768
+ 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");
769
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
770
+ }
771
+
772
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
773
+ if (kind === "m") throw new TypeError("Private method is not writable");
774
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
775
+ 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");
776
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
777
+ }
778
+
779
+ function __classPrivateFieldIn(state, receiver) {
780
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
781
+ return typeof state === "function" ? receiver === state : state.has(receiver);
782
+ }
783
+
784
+ function __addDisposableResource(env, value, async) {
785
+ if (value !== null && value !== void 0) {
786
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
787
+ var dispose;
788
+ if (async) {
789
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
790
+ dispose = value[Symbol.asyncDispose];
791
+ }
792
+ if (dispose === void 0) {
793
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
794
+ dispose = value[Symbol.dispose];
795
+ }
796
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
797
+ env.stack.push({ value: value, dispose: dispose, async: async });
798
+ }
799
+ else if (async) {
800
+ env.stack.push({ async: true });
801
+ }
802
+ return value;
803
+ }
804
+
805
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
806
+ var e = new Error(message);
807
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
808
+ };
809
+
810
+ function __disposeResources(env) {
811
+ function fail(e) {
812
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
813
+ env.hasError = true;
814
+ }
815
+ function next() {
816
+ while (env.stack.length) {
817
+ var rec = env.stack.pop();
818
+ try {
819
+ var result = rec.dispose && rec.dispose.call(rec.value);
820
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
821
+ }
822
+ catch (e) {
823
+ fail(e);
824
+ }
825
+ }
826
+ if (env.hasError) throw env.error;
827
+ }
828
+ return next();
829
+ }
830
+
831
+ /* harmony default export */ const tslib_es6 = ({
832
+ __extends,
833
+ __assign,
834
+ __rest,
835
+ __decorate,
836
+ __param,
837
+ __metadata,
838
+ __awaiter,
839
+ __generator,
840
+ __createBinding,
841
+ __exportStar,
842
+ __values,
843
+ __read,
844
+ __spread,
845
+ __spreadArrays,
846
+ __spreadArray,
847
+ __await,
848
+ __asyncGenerator,
849
+ __asyncDelegator,
850
+ __asyncValues,
851
+ __makeTemplateObject,
852
+ __importStar,
853
+ __importDefault,
854
+ __classPrivateFieldGet,
855
+ __classPrivateFieldSet,
856
+ __classPrivateFieldIn,
857
+ __addDisposableResource,
858
+ __disposeResources,
859
+ });
860
+
861
+ // EXTERNAL MODULE: external "../config-provider"
862
+ var external_config_provider_ = __webpack_require__(2717);
863
+ // EXTERNAL MODULE: external "../input"
864
+ var external_input_ = __webpack_require__(8133);
865
+ var external_input_default = /*#__PURE__*/__webpack_require__.n(external_input_);
866
+ // EXTERNAL MODULE: external "../popover"
867
+ var external_popover_ = __webpack_require__(5537);
868
+ var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
869
+ ;// CONCATENATED MODULE: ../../packages/slider/src/slider-button.tsx
870
+
871
+ /**
872
+ * Tencent is pleased to support the open source community by making
873
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
874
+ *
875
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
876
+ *
877
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
878
+ *
879
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
880
+ *
881
+ * ---------------------------------------------------
882
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
883
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
884
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
885
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
886
+ *
887
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
888
+ * the Software.
889
+ *
890
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
891
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
892
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
893
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
894
+ * IN THE SOFTWARE.
895
+ */
896
+
897
+
898
+
899
+
900
+
901
+ /* harmony default export */ const slider_button = ((0,external_vue_.defineComponent)({
902
+ name: 'SliderButton',
903
+ props: {
904
+ modelValue: {
905
+ type: Number,
906
+ "default": 0
907
+ },
908
+ params: {
909
+ type: Object,
910
+ "default": function _default() {
911
+ return {};
912
+ }
913
+ }
914
+ },
915
+ emits: ['emitChange', 'resetSize', 'update:modelValue'],
916
+ setup: function setup(props, _ref) {
917
+ var emit = _ref.emit;
918
+ var dragging = (0,external_vue_.ref)(false);
919
+ var isClick = (0,external_vue_.ref)(false);
920
+ var startY = (0,external_vue_.ref)(0);
921
+ var startX = (0,external_vue_.ref)(0);
922
+ var startPosition = (0,external_vue_.ref)(0);
923
+ var newPosition = (0,external_vue_.ref)(null);
924
+ var oldValue = (0,external_vue_.ref)(props.modelValue);
925
+ var currentY = (0,external_vue_.ref)(0);
926
+ var currentX = (0,external_vue_.ref)(0);
927
+ var isMove = (0,external_vue_.ref)(false);
928
+ var button = (0,external_vue_.ref)(null);
929
+ var tip = (0,external_vue_.computed)(function () {
930
+ var _a, _b;
931
+ var tip = '';
932
+ if ((_a = props.params.customContent) === null || _a === void 0 ? void 0 : _a[props.modelValue]) {
933
+ var customContent = props.params.customContent[props.modelValue];
934
+ tip = customContent.tip || customContent.label || '';
935
+ }
936
+ var placement = props.params.vertical ? external_shared_.PlacementEnum.RIGHT : external_shared_.PlacementEnum.TOP;
937
+ if ((_b = props.params) === null || _b === void 0 ? void 0 : _b.showTip) {
938
+ return {
939
+ content: props.params.formatterTipLabel("".concat(tip || (props === null || props === void 0 ? void 0 : props.modelValue) || '0')),
940
+ placement: placement
941
+ };
942
+ }
943
+ return {
944
+ content: '',
945
+ placement: placement
946
+ };
947
+ });
948
+ var currentPosition = (0,external_vue_.computed)(function () {
949
+ return "".concat((props.modelValue - props.params.minValue) / (props.params.maxValue - props.params.minValue) * 100, "%");
950
+ });
951
+ var wrapperStyle = (0,external_vue_.computed)(function () {
952
+ return props.params.vertical ? {
953
+ bottom: currentPosition.value
954
+ } : {
955
+ left: currentPosition.value
956
+ };
957
+ });
958
+ var buttonLabel = (0,external_vue_.computed)(function () {
959
+ return props.params.formatterButtonLabel(props.modelValue);
960
+ });
961
+ var onButtonDown = function onButtonDown(event) {
962
+ if (props.params.disable) return;
963
+ event.preventDefault();
964
+ onDragStart(event);
965
+ on(window, 'mousemove', onDragging);
966
+ on(window, 'touchmove', onDragging);
967
+ on(window, 'mouseup', onDragEnd);
968
+ on(window, 'touchend', onDragEnd);
969
+ };
970
+ var onDragStart = function onDragStart(event) {
971
+ dragging.value = true;
972
+ isClick.value = true;
973
+ if (props.params.vertical) {
974
+ startY.value = event.clientY;
975
+ } else {
976
+ startX.value = event.clientX;
977
+ }
978
+ startPosition.value = parseFloat(currentPosition.value);
979
+ newPosition.value = startPosition.value;
980
+ };
981
+ var onDragging = function onDragging(event) {
982
+ if (dragging.value) {
983
+ isClick.value = false;
984
+ emit('resetSize');
985
+ var diff = 0;
986
+ if (props.params.vertical) {
987
+ currentY.value = event.clientY;
988
+ diff = (startY.value - currentY.value) / props.params.sliderSize * 100;
989
+ } else {
990
+ currentX.value = event.clientX;
991
+ diff = (currentX.value - startX.value) / props.params.sliderSize * 100;
992
+ }
993
+ newPosition.value = startPosition.value + diff;
994
+ setPosition(newPosition.value);
995
+ }
996
+ };
997
+ var onDragEnd = function onDragEnd() {
998
+ isMove.value = false;
999
+ if (dragging.value) {
1000
+ setTimeout(function () {
1001
+ dragging.value = false;
1002
+ if (!isClick.value) {
1003
+ setPosition(newPosition.value);
1004
+ emit('emitChange');
1005
+ }
1006
+ }, 0);
1007
+ off(window, 'mousemove', onDragging);
1008
+ off(window, 'touchmove', onDragging);
1009
+ off(window, 'mouseup', onDragEnd);
1010
+ off(window, 'touchend', onDragEnd);
1011
+ }
1012
+ };
1013
+ var setPosition = function setPosition(position) {
1014
+ if (position === null || isNaN(position)) return;
1015
+ if (position < 0) {
1016
+ newPosition.value = 0;
1017
+ } else if (position > 100) {
1018
+ newPosition.value = 100;
1019
+ }
1020
+ var lengthPerStep = 100 / ((props.params.maxValue - props.params.minValue) / props.params.step);
1021
+ var steps = Math.round(position / lengthPerStep);
1022
+ var value = steps * lengthPerStep * (props.params.maxValue - props.params.minValue) * 0.01 + props.params.minValue;
1023
+ value = parseFloat(value.toFixed(props.params.precision));
1024
+ emit('update:modelValue', value);
1025
+ if (!dragging.value && props.modelValue !== oldValue.value) {
1026
+ oldValue.value = props.modelValue;
1027
+ }
1028
+ };
1029
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1030
+ resolveClassName = _usePrefix.resolveClassName;
1031
+ var renderDom = function renderDom() {
1032
+ return (0,external_vue_.createVNode)("div", {
1033
+ "class": ["".concat(resolveClassName('slider-button')), props.params.vertical ? 'vertical' : 'horizontal', {
1034
+ grabbing: dragging.value
1035
+ }],
1036
+ "ref": button,
1037
+ "tabindex": "0",
1038
+ "style": wrapperStyle.value,
1039
+ "onClick": function onClick(event) {
1040
+ return event.stopPropagation();
1041
+ },
1042
+ "onMousedown": onButtonDown
1043
+ }, [Boolean(tip.value.content) ? (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)((external_popover_default()), {
1044
+ "content": tip.value.content,
1045
+ "theme": 'dark',
1046
+ "placement": tip.value.placement,
1047
+ "boundary": document.body
1048
+ }, {
1049
+ "default": function _default() {
1050
+ return [(0,external_vue_.createVNode)("div", {
1051
+ "class": ['slider-button', {
1052
+ 'slider-button-disable': props.params.disable
1053
+ }]
1054
+ }, null)];
1055
+ }
1056
+ })]) : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)("div", {
1057
+ "class": ['slider-button', {
1058
+ 'slider-button-disable': props.params.disable
1059
+ }]
1060
+ }, null)]), props.params.showButtonLabel && !props.params.showIntervalLabel ? (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)("div", {
1061
+ "class": ['slider-button-label', props.params.vertical ? 'vertical' : 'horizontal']
1062
+ }, [buttonLabel.value])]) : null]);
1063
+ };
1064
+ return {
1065
+ renderDom: renderDom,
1066
+ setPosition: setPosition,
1067
+ tip: tip
1068
+ };
1069
+ },
1070
+ render: function render() {
1071
+ return this.renderDom();
1072
+ }
1073
+ }));
1074
+ ;// CONCATENATED MODULE: ../../packages/slider/src/slider.tsx
1075
+
1076
+
1077
+ /**
1078
+ * Tencent is pleased to support the open source community by making
1079
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1080
+ *
1081
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1082
+ *
1083
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1084
+ *
1085
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1086
+ *
1087
+ * ---------------------------------------------------
1088
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1089
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1090
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1091
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1092
+ *
1093
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1094
+ * the Software.
1095
+ *
1096
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1097
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1098
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1099
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1100
+ * IN THE SOFTWARE.
1101
+ */
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+
1108
+ var on = function on(element, event, handler) {
1109
+ if (element && event && handler) {
1110
+ element.addEventListener(event, handler, false);
1111
+ }
1112
+ };
1113
+ var off = function off(element, event, handler) {
1114
+ if (element && event && handler) {
1115
+ element.removeEventListener(event, handler, false);
1116
+ }
1117
+ };
1118
+ /* harmony default export */ const slider = ((0,external_vue_.defineComponent)({
1119
+ name: 'Slider',
1120
+ props: {
1121
+ modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.number), external_shared_.PropTypes.number]),
1122
+ extCls: {
1123
+ type: String,
1124
+ "default": ''
1125
+ },
1126
+ vertical: {
1127
+ type: Boolean,
1128
+ "default": false
1129
+ },
1130
+ height: {
1131
+ type: String,
1132
+ "default": '200px'
1133
+ },
1134
+ disable: {
1135
+ type: Boolean,
1136
+ "default": false
1137
+ },
1138
+ showTip: {
1139
+ type: Boolean,
1140
+ "default": false
1141
+ },
1142
+ maxValue: {
1143
+ type: [Number],
1144
+ "default": 100
1145
+ },
1146
+ minValue: {
1147
+ type: [Number],
1148
+ "default": 0
1149
+ },
1150
+ step: {
1151
+ type: [Number],
1152
+ "default": 1
1153
+ },
1154
+ range: {
1155
+ type: Boolean,
1156
+ "default": false
1157
+ },
1158
+ showInterval: {
1159
+ type: Boolean,
1160
+ "default": false
1161
+ },
1162
+ showIntervalLabel: {
1163
+ type: Boolean,
1164
+ "default": false
1165
+ },
1166
+ showButtonLabel: {
1167
+ type: Boolean,
1168
+ "default": false
1169
+ },
1170
+ showBetweenLabel: {
1171
+ type: Boolean,
1172
+ "default": false
1173
+ },
1174
+ showInput: {
1175
+ type: Boolean,
1176
+ "default": false
1177
+ },
1178
+ customContent: {
1179
+ type: Object,
1180
+ "default": null
1181
+ },
1182
+ formatterLabel: {
1183
+ type: Function,
1184
+ "default": function _default(value) {
1185
+ return value;
1186
+ }
1187
+ },
1188
+ formatterButtonLabel: {
1189
+ type: Function,
1190
+ "default": function _default(value) {
1191
+ return value;
1192
+ }
1193
+ },
1194
+ formatterTipLabel: {
1195
+ type: Function,
1196
+ "default": function _default(value) {
1197
+ return value;
1198
+ }
1199
+ } // 自定义tip格式
1200
+ },
1201
+
1202
+ emits: ['update:modelValue', 'change'],
1203
+ setup: function setup(props, _ref) {
1204
+ var _this = this;
1205
+ var slots = _ref.slots,
1206
+ emit = _ref.emit;
1207
+ /* 滑动选择器长度 */
1208
+ var sliderSize = (0,external_vue_.ref)(1);
1209
+ /* 第一个滑块与第二个滑块的值 */
1210
+ var firstValue = (0,external_vue_.ref)(null);
1211
+ var secondValue = (0,external_vue_.ref)(null);
1212
+ var oldValue = (0,external_vue_.ref)(null);
1213
+ /* 第一个输入框与第二个输入框的值 */
1214
+ var firstInput = (0,external_vue_.ref)(0);
1215
+ var secondInput = (0,external_vue_.ref)(0);
1216
+ /* 以下为refDom */
1217
+ var slider = (0,external_vue_.ref)(null);
1218
+ var firstbutton = (0,external_vue_.ref)(null);
1219
+ var secondbutton = (0,external_vue_.ref)(null);
1220
+ var curButtonRef = (0,external_vue_.ref)(null);
1221
+ // 小数点后最大位数
1222
+ var precision = (0,external_vue_.computed)(function () {
1223
+ var precisions = [props.minValue, props.maxValue, props.step].map(function (item) {
1224
+ var decimal = "".concat(item).split('.')[1];
1225
+ return decimal ? decimal.length : 0;
1226
+ });
1227
+ return Math.max.apply(null, precisions);
1228
+ });
1229
+ /* 当前滑块的最小值与最大值 */
1230
+ var rangeMinValue = (0,external_vue_.computed)(function () {
1231
+ return Math.min(firstValue.value, secondValue.value);
1232
+ });
1233
+ var rangeMaxValue = (0,external_vue_.computed)(function () {
1234
+ return Math.max(firstValue.value, secondValue.value);
1235
+ });
1236
+ var barSize = (0,external_vue_.computed)(function () {
1237
+ return props.range ? "".concat(100 * (rangeMaxValue.value - rangeMinValue.value) / (props.maxValue - props.minValue), "%") : "".concat(100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue), "%");
1238
+ });
1239
+ var barStart = (0,external_vue_.computed)(function () {
1240
+ return props.range ? "".concat(100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue), "%") : '0%';
1241
+ });
1242
+ /* 当前滑动区域的位置与长度 */
1243
+ var barStyle = (0,external_vue_.computed)(function () {
1244
+ return props.vertical ? {
1245
+ height: barSize.value,
1246
+ bottom: barStart.value
1247
+ } : {
1248
+ width: barSize.value,
1249
+ left: barStart.value
1250
+ };
1251
+ });
1252
+ /* 断点 */
1253
+ var intervals = (0,external_vue_.computed)(function () {
1254
+ if (!props.showInterval || props.minValue > props.maxValue) return [];
1255
+ if (props.step === 0) {
1256
+ console.warn('WARNNING:step should not be 0');
1257
+ return [];
1258
+ }
1259
+ var stopCount = (props.maxValue - props.minValue) / props.step;
1260
+ var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1261
+ var result = [];
1262
+ for (var i = 1; i < stopCount; i++) {
1263
+ result.push(i * stepWidth);
1264
+ }
1265
+ if (props.range) {
1266
+ // eslint-disable-next-line max-len
1267
+ return result.filter(function (step) {
1268
+ return step < 100 * (rangeMinValue.value - props.minValue) / (props.maxValue - props.minValue) || step > 100 * (rangeMaxValue.value - props.minValue) / (props.maxValue - props.minValue);
1269
+ });
1270
+ }
1271
+ // eslint-disable-next-line max-len
1272
+ return result.filter(function (step) {
1273
+ return step > 100 * (firstValue.value - props.minValue) / (props.maxValue - props.minValue);
1274
+ });
1275
+ });
1276
+ /* 可滑动区域的样式 */
1277
+ var runwayStyle = (0,external_vue_.computed)(function () {
1278
+ return props.vertical ? {
1279
+ height: props.height,
1280
+ width: '4px'
1281
+ } : {};
1282
+ });
1283
+ /* 断点下方的文案 */
1284
+ var intervalLabels = (0,external_vue_.computed)(function () {
1285
+ if (!props.showIntervalLabel) return [];
1286
+ if (props.step === 0) {
1287
+ console.warn('WARNNING:step should not be 0');
1288
+ return [];
1289
+ }
1290
+ var stepWidth = 100 * props.step / (props.maxValue - props.minValue);
1291
+ var result = [];
1292
+ for (var i = props.minValue, j = 0; i <= props.maxValue; i += props.step, j++) {
1293
+ var item = {
1294
+ stepWidth: j * stepWidth,
1295
+ stepLabel: props.formatterLabel(i)
1296
+ };
1297
+ result.push(item);
1298
+ }
1299
+ return result;
1300
+ });
1301
+ /* 是否显示第二个输入框 */
1302
+ var showSecondInput = (0,external_vue_.computed)(function () {
1303
+ return Array.isArray(props.modelValue);
1304
+ });
1305
+ /* 自定义断点 */
1306
+ var customList = (0,external_vue_.computed)(function () {
1307
+ if (!props.customContent) {
1308
+ return [];
1309
+ }
1310
+ return Object.keys(props.customContent).sort(function (a, b) {
1311
+ return Number(a) - Number(b);
1312
+ }).filter(function (value) {
1313
+ return Number(value) >= props.minValue && Number(value) <= props.maxValue;
1314
+ }).map(function (item) {
1315
+ var tip = props.customContent[item].tip;
1316
+ var label = props.customContent[item].label;
1317
+ return {
1318
+ tip: tip || label || '',
1319
+ label: label || '',
1320
+ percent: (Number(item) - props.minValue) / (props.maxValue - props.minValue) * 100
1321
+ };
1322
+ });
1323
+ });
1324
+ /* 传入到滑块的参数 */
1325
+ var buttonParms = (0,external_vue_.computed)(function () {
1326
+ return {
1327
+ vertical: props.vertical,
1328
+ showTip: props.showTip,
1329
+ disable: props.disable,
1330
+ maxValue: props.maxValue,
1331
+ minValue: props.minValue,
1332
+ step: props.step,
1333
+ precision: precision.value,
1334
+ showButtonLabel: props.showButtonLabel,
1335
+ formatterButtonLabel: props.formatterButtonLabel,
1336
+ showIntervalLabel: props.showIntervalLabel,
1337
+ customContent: props.customContent,
1338
+ sliderSize: sliderSize.value,
1339
+ formatterTipLabel: props.formatterTipLabel
1340
+ };
1341
+ });
1342
+ // 监听
1343
+ (0,external_vue_.watch)(function () {
1344
+ return props.modelValue;
1345
+ }, function () {
1346
+ setValues();
1347
+ });
1348
+ (0,external_vue_.watch)(function () {
1349
+ return firstValue.value;
1350
+ }, function (val) {
1351
+ if (props.range) {
1352
+ emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1353
+ } else {
1354
+ emit('update:modelValue', val);
1355
+ }
1356
+ firstInput.value = val;
1357
+ });
1358
+ (0,external_vue_.watch)(function () {
1359
+ return secondValue.value;
1360
+ }, function (val) {
1361
+ emit('update:modelValue', [rangeMinValue.value, rangeMaxValue.value]);
1362
+ secondInput.value = val;
1363
+ });
1364
+ /* 初始化 */
1365
+ (0,external_vue_.onMounted)(function () {
1366
+ if (props.range) {
1367
+ if (Array.isArray(props.modelValue)) {
1368
+ firstValue.value = Math.max(props.minValue, Number(props.modelValue[0]));
1369
+ secondValue.value = Math.min(props.maxValue, Number(props.modelValue[1]));
1370
+ } else {
1371
+ firstValue.value = props.minValue;
1372
+ secondValue.value = props.maxValue;
1373
+ }
1374
+ oldValue.value = [firstValue.value, secondValue.value];
1375
+ } else {
1376
+ if (typeof props.modelValue !== 'number' || isNaN(props.modelValue)) {
1377
+ firstValue.value = props.minValue;
1378
+ } else {
1379
+ firstValue.value = Math.min(props.maxValue, Math.max(props.minValue, props.modelValue));
1380
+ }
1381
+ oldValue.value = firstValue.value;
1382
+ }
1383
+ resetSize();
1384
+ on(window, 'resize', resetSize());
1385
+ });
1386
+ var resetSize = function resetSize() {
1387
+ if (slider.value) {
1388
+ sliderSize.value = slider.value["client".concat(props.vertical ? 'Height' : 'Width')];
1389
+ }
1390
+ };
1391
+ /* 点击容器时设置滑块位置 */
1392
+ var setButtonPos = function setButtonPos(event) {
1393
+ var _a, _b;
1394
+ event.stopPropagation();
1395
+ if (props.disable) return;
1396
+ resetSize();
1397
+ if (props.vertical) {
1398
+ var offsetBottom = (_a = slider.value) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().bottom;
1399
+ setPosition((offsetBottom - event.clientY) / sliderSize.value * 100);
1400
+ } else {
1401
+ var offsetLeft = (_b = slider.value) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().left;
1402
+ setPosition((event.clientX - offsetLeft) / sliderSize.value * 100);
1403
+ }
1404
+ emitChange();
1405
+ };
1406
+ /* 是否更改了值 */
1407
+ var valueChanged = function valueChanged() {
1408
+ if (props.range) {
1409
+ return ![rangeMinValue.value, rangeMaxValue.value].every(function (item, index) {
1410
+ return item === oldValue.value[index];
1411
+ });
1412
+ }
1413
+ return props.modelValue !== oldValue.value;
1414
+ };
1415
+ /* emit */
1416
+ var setValues = function setValues() {
1417
+ if (props.minValue > props.maxValue) {
1418
+ console.error('min should not be greater than max.');
1419
+ return;
1420
+ }
1421
+ var val = props.modelValue;
1422
+ if (props.range && Array.isArray(val)) {
1423
+ if (val[1] < props.minValue) {
1424
+ emit('update:modelValue', [props.minValue, props.minValue]);
1425
+ } else if (val[0] > props.maxValue) {
1426
+ emit('update:modelValue', [props.maxValue, props.maxValue]);
1427
+ } else if (val[0] < props.minValue) {
1428
+ emit('update:modelValue', [props.minValue, val[1]]);
1429
+ } else if (val[1] > props.maxValue) {
1430
+ emit('update:modelValue', [val[0], props.maxValue]);
1431
+ } else {
1432
+ firstValue.value = Number(val[0]);
1433
+ secondValue.value = Number(val[1]);
1434
+ if (valueChanged()) {
1435
+ oldValue.value = val.slice();
1436
+ }
1437
+ }
1438
+ } else if (!props.range && typeof val === 'number' && !isNaN(val)) {
1439
+ if (val < props.minValue) {
1440
+ emit('update:modelValue', props.minValue);
1441
+ } else if (val > props.maxValue) {
1442
+ emit('update:modelValue', props.maxValue);
1443
+ } else {
1444
+ firstValue.value = val;
1445
+ if (valueChanged()) {
1446
+ oldValue.value = val;
1447
+ }
1448
+ }
1449
+ }
1450
+ };
1451
+ /* 派出事件 */
1452
+ var emitChange = function emitChange() {
1453
+ return __awaiter(_this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1454
+ return regenerator_default().wrap(function _callee$(_context) {
1455
+ while (1) switch (_context.prev = _context.next) {
1456
+ case 0:
1457
+ _context.next = 2;
1458
+ return (0,external_vue_.nextTick)();
1459
+ case 2:
1460
+ emit('change', props.range ? [rangeMinValue.value, rangeMaxValue.value] : props.modelValue);
1461
+ case 3:
1462
+ case "end":
1463
+ return _context.stop();
1464
+ }
1465
+ }, _callee);
1466
+ }));
1467
+ };
1468
+ /* 断点样式 */
1469
+ var getIntervalStyle = function getIntervalStyle(position) {
1470
+ return props.vertical ? {
1471
+ bottom: "".concat(position, "%")
1472
+ } : {
1473
+ left: "".concat(position, "%")
1474
+ };
1475
+ };
1476
+ /* 设置滑块位置 */
1477
+ var setPosition = function setPosition(percent) {
1478
+ if (!props.range) {
1479
+ firstbutton.value.setPosition(percent);
1480
+ return;
1481
+ }
1482
+ var targetValue = props.minValue + percent * (props.maxValue - props.minValue) / 100;
1483
+ // 绝对值
1484
+ if (Math.abs(rangeMinValue.value - targetValue) < Math.abs(rangeMaxValue.value - targetValue)) {
1485
+ curButtonRef.value = firstValue.value < secondValue.value ? firstbutton.value : secondbutton.value;
1486
+ } else {
1487
+ curButtonRef.value = firstValue.value > secondValue.value ? firstbutton.value : secondbutton.value;
1488
+ }
1489
+ curButtonRef.value.setPosition(percent);
1490
+ };
1491
+ var firstInputChange = function firstInputChange(v) {
1492
+ if (v === '') {
1493
+ return;
1494
+ }
1495
+ var val = parseFloat(v);
1496
+ if (val < props.minValue) {
1497
+ firstInput.value = props.minValue;
1498
+ firstValue.value = props.minValue;
1499
+ } else if (val > props.maxValue) {
1500
+ firstInput.value = props.maxValue;
1501
+ firstValue.value = props.maxValue;
1502
+ } else {
1503
+ firstValue.value = val;
1504
+ }
1505
+ };
1506
+ var secondInputChange = function secondInputChange(v) {
1507
+ if (v === '') {
1508
+ return;
1509
+ }
1510
+ var val = parseFloat(v.toString());
1511
+ if (val < props.minValue) {
1512
+ secondInput.value = props.minValue;
1513
+ secondValue.value = props.minValue;
1514
+ } else if (val > props.maxValue) {
1515
+ secondInput.value = props.maxValue;
1516
+ secondValue.value = props.maxValue;
1517
+ } else {
1518
+ secondValue.value = val;
1519
+ }
1520
+ };
1521
+ var betweenLabelStyle = function betweenLabelStyle(postion) {
1522
+ var value = 0;
1523
+ if (postion === 'start') {
1524
+ value = props.vertical ? props.maxValue : props.minValue;
1525
+ } else {
1526
+ value = props.vertical ? props.minValue : props.maxValue;
1527
+ }
1528
+ if (props.showButtonLabel && [firstValue.value, secondValue.value].includes(value)) {
1529
+ return '0';
1530
+ }
1531
+ return '1';
1532
+ };
1533
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1534
+ resolveClassName = _usePrefix.resolveClassName;
1535
+ var renderDom = function renderDom() {
1536
+ var _a, _b;
1537
+ return (0,external_vue_.createVNode)("div", {
1538
+ "class": ["".concat(resolveClassName('slider')), props.extCls]
1539
+ }, [(_a = slots.start) === null || _a === void 0 ? void 0 : _a.call(slots), (0,external_vue_.createVNode)("div", {
1540
+ "class": "".concat(resolveClassName('slider-runway')),
1541
+ "ref": slider,
1542
+ "style": runwayStyle.value,
1543
+ "onClick": setButtonPos
1544
+ }, [(0,external_vue_.createVNode)("div", {
1545
+ "class": ["".concat(resolveClassName('slider-bar')), props.vertical ? 'vertical' : 'horizontal', {
1546
+ disable: props.disable
1547
+ }],
1548
+ "style": barStyle.value
1549
+ }, null), props.showInterval ? intervals.value.map(function (interval, index) {
1550
+ return (0,external_vue_.createVNode)("div", {
1551
+ "key": index,
1552
+ "class": ["".concat(resolveClassName('slider-interval')), {
1553
+ vertical: props.vertical
1554
+ }],
1555
+ "style": getIntervalStyle(interval)
1556
+ }, null);
1557
+ }) : undefined, props.customContent ? customList.value.map(function (custom, index) {
1558
+ return (0,external_vue_.createVNode)("div", {
1559
+ "key": index,
1560
+ "class": ["".concat(resolveClassName('slider-interval')), {
1561
+ vertical: props.vertical
1562
+ }],
1563
+ "style": getIntervalStyle(custom.percent)
1564
+ }, null);
1565
+ }) : undefined, props.showBetweenLabel || props.showIntervalLabel || props.customContent ? (0,external_vue_.createVNode)("div", {
1566
+ "class": ["".concat(resolveClassName('slider-labels')), props.vertical ? 'vertical' : 'horizontal']
1567
+ }, [function () {
1568
+ if (props.showBetweenLabel) {
1569
+ return [(0,external_vue_.createVNode)("div", {
1570
+ "class": "label-start",
1571
+ "style": [{
1572
+ opacity: betweenLabelStyle('start')
1573
+ }]
1574
+ }, [props.formatterLabel(props.minValue)]), (0,external_vue_.createVNode)("div", {
1575
+ "class": "label-end",
1576
+ "style": [{
1577
+ opacity: betweenLabelStyle('end')
1578
+ }]
1579
+ }, [props.formatterLabel(props.maxValue)])];
1580
+ }
1581
+ if (props.showIntervalLabel) {
1582
+ return intervalLabels.value.map(function (intervalLabel, index) {
1583
+ return (0,external_vue_.createVNode)("div", {
1584
+ "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1585
+ "key": index,
1586
+ "style": getIntervalStyle(intervalLabel.stepWidth)
1587
+ }, [intervalLabel.stepLabel]);
1588
+ });
1589
+ }
1590
+ if (props.customContent) {
1591
+ return customList.value.map(function (item, index) {
1592
+ return (0,external_vue_.createVNode)("div", {
1593
+ "class": ["".concat(resolveClassName('slider-label')), props.vertical ? 'vertical' : 'horizontal'],
1594
+ "key": index,
1595
+ "style": getIntervalStyle(item.percent)
1596
+ }, [item.label]);
1597
+ });
1598
+ }
1599
+ return undefined;
1600
+ }()]) : undefined, (0,external_vue_.createVNode)(slider_button, {
1601
+ "modelValue": firstValue.value,
1602
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
1603
+ return firstValue.value = $event;
1604
+ },
1605
+ "ref": firstbutton,
1606
+ "params": buttonParms.value,
1607
+ "onEmitChange": emitChange,
1608
+ "onResetSize": resetSize
1609
+ }, null), props.range ? (0,external_vue_.createVNode)(slider_button, {
1610
+ "modelValue": secondValue.value,
1611
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
1612
+ return secondValue.value = $event;
1613
+ },
1614
+ "ref": secondbutton,
1615
+ "params": buttonParms.value,
1616
+ "onEmitChange": emitChange,
1617
+ "onResetSize": resetSize
1618
+ }, null) : undefined]), props.showInput && !props.vertical ? (0,external_vue_.createVNode)("div", {
1619
+ "class": "".concat(resolveClassName('slider-input'))
1620
+ }, [(0,external_vue_.createVNode)("div", {
1621
+ "class": "input-item"
1622
+ }, [(0,external_vue_.createVNode)((external_input_default()), {
1623
+ "type": "number",
1624
+ "modelValue": firstInput.value,
1625
+ "max": props.maxValue,
1626
+ "min": props.minValue,
1627
+ "onChange": firstInputChange
1628
+ }, null)]), showSecondInput.value && secondValue.value ? [(0,external_vue_.createVNode)("div", {
1629
+ "class": "input-center"
1630
+ }, [(0,external_vue_.createTextVNode)("\uFF5E")]), (0,external_vue_.createVNode)("div", {
1631
+ "class": "input-item"
1632
+ }, [(0,external_vue_.createVNode)((external_input_default()), {
1633
+ "type": "number",
1634
+ "modelValue": secondInput.value,
1635
+ "max": props.maxValue,
1636
+ "min": props.minValue,
1637
+ "onChange": secondInputChange
1638
+ }, null)])] : undefined]) : undefined, (_b = slots.end) === null || _b === void 0 ? void 0 : _b.call(slots)]);
1639
+ };
1640
+ return {
1641
+ renderDom: renderDom
1642
+ };
1643
+ },
1644
+ render: function render() {
1645
+ return this.renderDom();
1646
+ }
1647
+ }));
1648
+ ;// CONCATENATED MODULE: ../../packages/slider/src/index.ts
1649
+ /**
1650
+ * Tencent is pleased to support the open source community by making
1651
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1652
+ *
1653
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1654
+ *
1655
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1656
+ *
1657
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1658
+ *
1659
+ * ---------------------------------------------------
1660
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1661
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1662
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1663
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1664
+ *
1665
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1666
+ * the Software.
1667
+ *
1668
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1669
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1670
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1671
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1672
+ * IN THE SOFTWARE.
1673
+ */
1674
+
1675
+
1676
+ var Slider = (0,external_shared_.withInstall)(slider);
1677
+ /* harmony default export */ const src = (Slider);
1678
+ })();
1679
+
1680
+ /******/ return __webpack_exports__;
1681
+ /******/ })()
1682
+ ;
1683
+ });