bkui-vue 0.0.2-beta.13 → 0.0.2-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
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("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["vue","../shared","vue-types","../config-provider","../icon"],t);else{var n="object"==typeof exports?t(require("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon")):t(e.vue,e["../shared"],e["vue-types"],e["../config-provider"],e["../icon"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,((e,t,n,r,o)=>(()=>{var i={7647:function(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return b}});var r=n(279),o=n.n(r),i=n(370),s=n.n(i),a=n(817),c=n.n(a);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t},f=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=c()(n);return l("copy"),n.remove(),r},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=f(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=f(e.value,t):(n=c()(e),l("copy")),n};function p(e){return p="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},p(e)}function m(e){return m="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},m(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,n,r,o,i,a=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(o);if(i){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this)).resolveOptions(t),n.listenClick(e),n}return t=c,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===m(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=s()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,o=e.target,i=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?d(i,{container:r}):o?"cut"===n?u(o):d(o,{container:r}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?"success":"error",{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&y(t.prototype,n),r&&y(t,r),c}(o()),b=j},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var s=i.apply(this,arguments);return e.addEventListener(n,s,o),{destroy:function(){e.removeEventListener(n,s,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,s=r.length;i<s;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},4346:function(e){e.exports=function(){"use strict";function e(e){return null===e?"null":typeof e}function t(e){return!!e&&"object"==typeof e}function n(e){if(void 0===e)return"";if(null===e)return"Object";if("object"==typeof e&&!e.constructor)return"Object";var t=/function ([^(]*)/.exec(e.constructor.toString());return t&&t.length>1?t[1]:""}function r(e,t,n){return"null"===e||"undefined"===e?e:("string"!==e&&"stringifiable"!==e||(n='"'+n.replace(/"/g,'\\"')+'"'),"function"===e?t.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":n)}function o(o){var i="";return t(o)?(i=n(o),Array.isArray(o)&&(i+="["+o.length+"]")):i=r(e(o),o,o),i}function i(e){return"json-formatter-"+e}function s(e,t,n){var r=document.createElement(e);return t&&r.classList.add(i(t)),void 0!==n&&(n instanceof Node?r.appendChild(n):r.appendChild(document.createTextNode(String(n)))),r}!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}('.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,c=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,l=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,u=window.requestAnimationFrame||function(e){return e(),0},f={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null};return function(){function d(e,t,n,r){void 0===t&&(t=1),void 0===n&&(n=f),this.json=e,this.open=t,this.config=n,this.key=r,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=f.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=f.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=f.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=f.useToJSON),""===this.key&&(this.key='""')}return Object.defineProperty(d.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(e){this._isOpen=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||l.test(this.json)||c.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isObject",{get:function(){return t(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"constructorName",{get:function(){return n(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":e(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"keys",{get:function(){if(this.isObject){var e=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?e.sort(this.config.sortPropertiesBy):e}return[]},enumerable:!0,configurable:!0}),d.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))},d.prototype.openAtDepth=function(e){void 0===e&&(e=1),e<0||(this.open=e,this.isOpen=0!==e,this.element&&(this.removeChildren(!1),0===e?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))},d.prototype.getInlinepreview=function(){var e=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?"Array["+this.json.length+"]":"["+this.json.map(o).join(", ")+"]";var t=this.keys,n=t.slice(0,this.config.hoverPreviewFieldCount).map((function(t){return t+":"+o(e.json[t])})),r=t.length>=this.config.hoverPreviewFieldCount?"…":"";return"{"+n.join(", ")+r+"}"},d.prototype.render=function(){this.element=s("div","row");var e=this.isObject?s("a","toggler-link"):s("span");if(this.isObject&&!this.useToJSON&&e.appendChild(s("span","toggler")),this.hasKey&&e.appendChild(s("span","key",this.key+":")),this.isObject&&!this.useToJSON){var t=s("span","value"),n=s("span"),o=s("span","constructor-name",this.constructorName);if(n.appendChild(o),this.isArray){var a=s("span");a.appendChild(s("span","bracket","[")),a.appendChild(s("span","number",this.json.length)),a.appendChild(s("span","bracket","]")),n.appendChild(a)}t.appendChild(n),e.appendChild(t)}else{(t=this.isUrl?s("a"):s("span")).classList.add(i(this.type)),this.isDate&&t.classList.add(i("date")),this.isUrl&&(t.classList.add(i("url")),t.setAttribute("href",this.json));var c=r(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);t.appendChild(document.createTextNode(c)),e.appendChild(t)}if(this.isObject&&this.config.hoverPreviewEnabled){var l=s("span","preview-text");l.appendChild(document.createTextNode(this.getInlinepreview())),e.appendChild(l)}var u=s("div","children");return this.isObject&&u.classList.add(i("object")),this.isArray&&u.classList.add(i("array")),this.isEmpty&&u.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),this.element.appendChild(e),this.element.appendChild(u),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&e.addEventListener("click",this.toggleOpen.bind(this)),this.element},d.prototype.appendChildren=function(e){var t=this;void 0===e&&(e=!1);var n=this.element.querySelector("div."+i("children"));if(n&&!this.isEmpty)if(e){var r=0,o=function(){var e=t.keys[r],i=new d(t.json[e],t.open-1,t.config,e);n.appendChild(i.render()),(r+=1)<t.keys.length&&(r>10?o():u(o))};u(o)}else this.keys.forEach((function(e){var r=new d(t.json[e],t.open-1,t.config,e);n.appendChild(r.render())}))},d.prototype.removeChildren=function(e){void 0===e&&(e=!1);var t=this.element.querySelector("div."+i("children"));if(e){var n=0,r=function(){t&&t.children.length&&(t.removeChild(t.children[0]),(n+=1)>10?r():u(r))};u(r)}else t&&(t.innerHTML="")},d}()}()},2717:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=n}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";a.r(c),a.d(c,{default:()=>S});var e=a(748),t=a(4212),n={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},r=1;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return s="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},s(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,f,d,p=a(7647),m=a.n(p),y=a(4346),h=a.n(y),v=a(210),g=a(2717),j=a(6870);!function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"}(u||(u={})),function(e){e.KEY_VALUE="key-value",e.JSON="json"}(f||(f={})),function(e){e.ASSISTANT="assistant",e.DETAILS="details",e.FIX="fix",e.CLOSE="close"}(d||(d={}));var b={id:t.PropTypes.string.def(""),message:(0,v.toType)("IMessage",{}),theme:(0,v.toType)("messageTheme",{}).def(u.PRIMARY),delay:t.PropTypes.number,dismissable:t.PropTypes.bool.def(!0),offsetY:t.PropTypes.number.def(30),spacing:t.PropTypes.number.def(10),extCls:t.PropTypes.string.def(""),onClose:t.PropTypes.func,getContainer:t.PropTypes.instanceOf(HTMLElement),width:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]),actions:(0,v.toType)("IMessageAction",{})};const w=(0,e.defineComponent)({name:"Message",props:b,emits:["destroy"],setup:function(n,r){var o,a=this,c=r.emit,u=r.slots,p=(0,g.useLocale)("message"),y=(0,g.usePrefix)().resolveClassName,v=(0,e.computed)((function(){return["".concat(y("message")),"".concat(y("message-".concat(n.theme))),"".concat(n.extCls)]})),b=t.bkZIndexManager.getMessageNextIndex(),w=(0,e.computed)((function(){return/^\d+\.?\d*$/.test("".concat(n.delay))?n.delay:"object"!==s(n.message)||(0,e.isVNode)(n.message)?3e3:8e3})),S=(0,e.computed)((function(){return/^\d+/.test("".concat(n.width))?/^\d+\.?\d*$/.test("".concat(n.width))?"".concat(n.width,"px"):n.width:"object"!==s(n.message)||(0,e.isVNode)(n.message)?"".concat(560,"px"):"".concat(800,"px")})),C=(0,e.computed)((function(){return n.getContainer&&(0,t.isElement)(n.getContainer)})),k=(0,e.computed)((function(){return{top:"".concat(n.offsetY,"px"),zIndex:b,position:C.value?"absolute":"fixed",width:S.value}})),O=(0,e.ref)(null),x=(0,e.ref)(null),T=(0,e.ref)(null),N=(0,e.ref)(!1),E=(0,e.reactive)({isFix:!1,isDetailShow:!1}),A=null,L=function(){A=setTimeout((function(){E.isFix||(N.value=!1)}),w.value)},P=function(e){e.preventDefault(),e.stopPropagation(),N.value=!1},M=(0,e.ref)(!1),V=(0,e.ref)(null),F=function(e){var t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){console.error("Format Json Error: ".concat(e))}return t},I=function(t,r){if(E.isDetailShow=null!=r?r:!E.isDetailShow,D(t,E.isDetailShow),E.isDetailShow&&"object"===s(n.message)&&!(0,e.isVNode)(n.message)&&(n.message.type===f.JSON||!n.message.type)){var o=F(n.message.details),i=new(h())(o);setTimeout((function(){O.value&&(O.value.innerHTML="",O.value.append(i.render()))}))}},D=function(e,t){E.isFix=null!=t?t:!E.isFix};(0,e.onMounted)((function(){w.value&&L(),N.value=!0})),(0,e.onUnmounted)((function(){clearTimeout(A)})),(0,e.watch)(N,(function(){N.value||c("destroy",n.id)}));var R=(0,e.computed)((function(){var t;return l(t={},d.ASSISTANT,{id:d.ASSISTANT,icon:function(){return(0,e.createVNode)(j.WeixinPro,null,null)},text:function(){return p.value.assistant},onClick:function(e){n.message.assistant&&window.open(n.message.assistant,"_blank")}}),l(t,d.DETAILS,{id:d.DETAILS,icon:function(){return E.isDetailShow?(0,e.createVNode)(j.AngleDoubleUpLine,null,null):(0,e.createVNode)(j.AngleDoubleDownLine,null,null)},text:function(){return p.value.details},onClick:function(e){return I(e)}}),l(t,d.FIX,{id:d.FIX,icon:function(){return E.isFix?(0,e.createVNode)(j.FixShape,null,null):(0,e.createVNode)(j.FixLine,null,null)},classList:E.isFix?"fixed":"",onClick:function(e){return D(e)}}),l(t,d.CLOSE,{id:d.CLOSE,classList:"normal-color",icon:function(){return n.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(y("message-close")),onClick:P},null)},onClick:P}),t})),_=[d.ASSISTANT,d.DETAILS,d.FIX,d.CLOSE],J=(0,e.computed)((function(){var e;if((null===(e=n.actions)||void 0===e?void 0:e.length)>0){var t=n.actions.map((function(e){var t=e.id.toLocaleLowerCase(),n=R.value[t],r=null==n?void 0:n.onClick,o=Object.assign({},R.value[t]||{},e);if(o.id=t,void 0!==e.classList){var c=Array.isArray(e.classList)?e.classList:[e.classList],l=[];void 0!==n.classList&&(l=Array.isArray(n.classList)?n.classList:[n.classList]),o.classList=[].concat(i(l),i(c))}return"function"==typeof e.onClick?(o.onClick=function(){var t=Reflect.apply(e.onClick,a,[]);void 0!==s(t)&&!t||"function"!=typeof r||Reflect.apply(r,a,[])},o):(o.onClick=r,o)})),r=_.filter((function(e){return!t.some((function(t){return t.id===e}))})).map((function(e){return R.value[e]}));return t.push.apply(t,i(r)),t}return _.map((function(e){return R.value[e]}))}));return{classNames:v,styles:k,visible:N,close:P,setDetailsShow:I,fixMesage:D,copyMessage:function(e){if(!M.value){var t=new(m())(T.value,{text:function(){return n.message.details}});["success","error"].forEach((function(e){t.on(e,(function(){var t,n,r=x.value;V.value=e,r&&((t=r.classList).remove.apply(t,["success","error","is-hidden"]),(n=r.classList).add.apply(n,[e,"is-show"]),o&&clearTimeout(o),o=setTimeout((function(){var e,t;(e=r.classList).remove.apply(e,["is-show"]),(t=r.classList).add.apply(t,["is-hidden"])}),2e3))})),M.value=!0,setTimeout((function(){T.value.click()}))}))}},parseJson:F,handleMouseenter:function(e){clearTimeout(A)},handleMouseleave:function(e){w.value&&L()},renderMessageActions:function(){var t,n,r=function(t){var n=t.text,r=void 0;if("function"==typeof n&&(r=Reflect.apply(n,a,[])),void 0!==r)return"string"==typeof r?(0,e.createVNode)("span",{class:"message-action-text"},[r]):r};return null!==(n=null===(t=u.action)||void 0===t?void 0:t.call(u))&&void 0!==n?n:J.value.map((function(t){if(t.disabled)return null;if("function"==typeof t.render)return Reflect.apply(t.render,a,[]);var n,o,i=Array.isArray(t.classList)?t.classList.join(" "):t.classList;return(0,e.createVNode)("span",{class:["tool",t.id,i],onClick:function(e){return function(e,t){t.readonly||t.disabled||"function"==typeof t.onClick&&Reflect.apply(t.onClick,a,[e,t])}(e,t)}},[(n=t,o=n.icon,"function"==typeof o?Reflect.apply(o,a,[]):(0,e.createVNode)("span",{class:o},null)),r(t)])}))},refJsonContent:O,refCopyStatus:x,refCopyMsgDiv:T,toolOperation:E,copyStatus:V,t:p,resolveClassName:y}},render:function(){var t=this,n=function(n){return{primary:(0,e.createVNode)(j.Info,null,null),warning:(0,e.createVNode)(j.Warn,null,null),success:(0,e.createVNode)(j.Success,null,null),error:(0,e.createVNode)(j.Close,null,null)}[null!=n?n:t.theme]},r=function(n){if(n.type===f.KEY_VALUE){var r=t.parseJson(n.details||{});return Object.keys(r).map((function(t){return(0,e.createVNode)("div",{class:"message-row"},[(0,e.createVNode)("label",null,[t]),r[t]])}))}};return(0,e.createVNode)(e.Transition,{name:"bk-message-fade"},{default:function(){return[(0,e.withDirectives)((0,e.createVNode)("div",{class:t.classNames,style:t.styles,onMouseenter:t.handleMouseenter,onMouseleave:t.handleMouseleave},["object"!==s(t.message)||(0,e.isVNode)(t.message)?(0,e.createVNode)(e.Fragment,null,[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content"))},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),t.message]),t.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(t.resolveClassName("message-close")),onClick:t.close},null)]):(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content")," multi")},[(0,e.createVNode)("div",{class:"overview"},[(0,e.createVNode)("div",{class:"left-content"},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),(0,e.createVNode)("div",{class:"describe"},[null!==(a=null===(i=(o=t.$slots).title)||void 0===i?void 0:i.call(o))&&void 0!==a?a:"【".concat(t.message.code,"】").concat(t.message.overview," ").concat(t.message.suggestion)])]),(0,e.createVNode)("div",{class:"tools"},[t.renderMessageActions()])]),t.toolOperation.isDetailShow&&(0,e.createVNode)("div",{class:"message-detail"},[(0,e.createVNode)("div",{class:"message-copy",ref:"refCopyMsgDiv",onClick:t.copyMessage},[(0,e.createVNode)(j.CopyShape,null,null),(0,e.createVNode)("div",{class:"copy-status",ref:"refCopyStatus"},[(0,e.createVNode)("div",{class:"inner"},[n(t.copyStatus),"success"===t.copyStatus?t.t.copySuccess:t.t.copyFailed])])]),(0,e.createVNode)("div",{ref:"refJsonContent",class:"message-tree"},[r(t.message)])])])]),[[e.vShow,t.visible]])];var o,i,a}})}}),S=function(o){!function(o,i){var s=i,a=s.position||"top-right";"string"==typeof i&&(s={message:i});var c=i.onClose,l=s.offsetX||10,u=s.offsetY||30,f=s.spacing,d=void 0===f?10:f;n[a].forEach((function(e){u+=(e.el.offsetHeight||0)+d}));var p="message_".concat(r+=1);s=Object.assign(Object.assign({},s),{offsetX:l,offsetY:u,id:p});var m=document.createElement("div"),y=(0,e.createVNode)(o,s);y.props.onDestroy=function(t){!function(e,t,r,o){null==o||o();var i=t.startsWith("top")?"top":"bottom",s=-1;n[t].forEach((function(t,n){t.props.id===e&&(s=n)}));for(var a=n[t][s].el.offsetHeight,c=n[t].length,l=s;l<c;l++){var u=parseInt(n[t][l].el.style[i],10)-a-r;n[t][l].component.props.offsetY=u}n[t].splice(s,1)}(t,a,d,c),(0,e.render)(null,m)},(0,e.render)(y,m),n[a].push(y),(y.props.getContainer&&(0,t.isElement)(y.props.getContainer)?y.props.getContainer:document.body).appendChild(m.firstElementChild)}(w,o)}})(),c})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["vue","../shared","vue-types","../config-provider","../icon"],t);else{var n="object"==typeof exports?t(require("vue"),require("../shared"),require("vue-types"),require("../config-provider"),require("../icon")):t(e.vue,e["../shared"],e["vue-types"],e["../config-provider"],e["../icon"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,((e,t,n,r,o)=>(()=>{var i={7647:function(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return b}});var r=n(279),o=n.n(r),i=n(370),s=n.n(i),a=n(817),c=n.n(a);function l(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=c()(e);return l("cut"),t},f=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=c()(n);return l("copy"),n.remove(),r},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=f(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=f(e.value,t):(n=c()(e),l("copy")),n};function p(e){return p="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},p(e)}function m(e){return m="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},m(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,n,r,o,i,a=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(o);if(i){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function c(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=a.call(this)).resolveOptions(t),n.listenClick(e),n}return t=c,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===m(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=s()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,o=e.target,i=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?d(i,{container:r}):o?"cut"===n?u(o):d(o,{container:r}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?"success":"error",{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return d(e,t)}},{key:"cut",value:function(e){return u(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&y(t.prototype,n),r&&y(t,r),c}(o()),b=j},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var s=i.apply(this,arguments);return e.addEventListener(n,s,o),{destroy:function(){e.removeEventListener(n,s,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,s=r.length;i<s;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},4346:function(e){e.exports=function(){"use strict";function e(e){return null===e?"null":typeof e}function t(e){return!!e&&"object"==typeof e}function n(e){if(void 0===e)return"";if(null===e)return"Object";if("object"==typeof e&&!e.constructor)return"Object";var t=/function ([^(]*)/.exec(e.constructor.toString());return t&&t.length>1?t[1]:""}function r(e,t,n){return"null"===e||"undefined"===e?e:("string"!==e&&"stringifiable"!==e||(n='"'+n.replace(/"/g,'\\"')+'"'),"function"===e?t.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":n)}function o(o){var i="";return t(o)?(i=n(o),Array.isArray(o)&&(i+="["+o.length+"]")):i=r(e(o),o,o),i}function i(e){return"json-formatter-"+e}function s(e,t,n){var r=document.createElement(e);return t&&r.classList.add(i(t)),void 0!==n&&(n instanceof Node?r.appendChild(n):r.appendChild(document.createTextNode(String(n)))),r}!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}('.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n color: black;\n text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n color: green;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n color: red;\n}\n.json-formatter-row .json-formatter-null {\n color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: blue;\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n color: blue;\n}\n.json-formatter-row .json-formatter-key {\n color: #00008B;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n.json-formatter-dark.json-formatter-row {\n font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n color: white;\n text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n opacity: 0.5;\n margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n color: #31F031;\n white-space: pre;\n word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n text-decoration: underline;\n color: #027BFF;\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n color: #23A0DB;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n line-height: 1.2rem;\n font-size: 0.7rem;\n vertical-align: middle;\n opacity: 0.6;\n cursor: pointer;\n padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n display: inline-block;\n transition: transform 100ms ease-in;\n content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n opacity: 0;\n transition: opacity 0.15s ease-in;\n font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,c=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,l=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,u=window.requestAnimationFrame||function(e){return e(),0},f={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null};return function(){function d(e,t,n,r){void 0===t&&(t=1),void 0===n&&(n=f),this.json=e,this.open=t,this.config=n,this.key=r,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=f.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=f.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=f.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=f.useToJSON),""===this.key&&(this.key='""')}return Object.defineProperty(d.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(e){this._isOpen=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||l.test(this.json)||c.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isObject",{get:function(){return t(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"constructorName",{get:function(){return n(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":e(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"keys",{get:function(){if(this.isObject){var e=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?e.sort(this.config.sortPropertiesBy):e}return[]},enumerable:!0,configurable:!0}),d.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))},d.prototype.openAtDepth=function(e){void 0===e&&(e=1),e<0||(this.open=e,this.isOpen=0!==e,this.element&&(this.removeChildren(!1),0===e?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))},d.prototype.getInlinepreview=function(){var e=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?"Array["+this.json.length+"]":"["+this.json.map(o).join(", ")+"]";var t=this.keys,n=t.slice(0,this.config.hoverPreviewFieldCount).map((function(t){return t+":"+o(e.json[t])})),r=t.length>=this.config.hoverPreviewFieldCount?"…":"";return"{"+n.join(", ")+r+"}"},d.prototype.render=function(){this.element=s("div","row");var e=this.isObject?s("a","toggler-link"):s("span");if(this.isObject&&!this.useToJSON&&e.appendChild(s("span","toggler")),this.hasKey&&e.appendChild(s("span","key",this.key+":")),this.isObject&&!this.useToJSON){var t=s("span","value"),n=s("span"),o=s("span","constructor-name",this.constructorName);if(n.appendChild(o),this.isArray){var a=s("span");a.appendChild(s("span","bracket","[")),a.appendChild(s("span","number",this.json.length)),a.appendChild(s("span","bracket","]")),n.appendChild(a)}t.appendChild(n),e.appendChild(t)}else{(t=this.isUrl?s("a"):s("span")).classList.add(i(this.type)),this.isDate&&t.classList.add(i("date")),this.isUrl&&(t.classList.add(i("url")),t.setAttribute("href",this.json));var c=r(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);t.appendChild(document.createTextNode(c)),e.appendChild(t)}if(this.isObject&&this.config.hoverPreviewEnabled){var l=s("span","preview-text");l.appendChild(document.createTextNode(this.getInlinepreview())),e.appendChild(l)}var u=s("div","children");return this.isObject&&u.classList.add(i("object")),this.isArray&&u.classList.add(i("array")),this.isEmpty&&u.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),this.element.appendChild(e),this.element.appendChild(u),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&e.addEventListener("click",this.toggleOpen.bind(this)),this.element},d.prototype.appendChildren=function(e){var t=this;void 0===e&&(e=!1);var n=this.element.querySelector("div."+i("children"));if(n&&!this.isEmpty)if(e){var r=0,o=function(){var e=t.keys[r],i=new d(t.json[e],t.open-1,t.config,e);n.appendChild(i.render()),(r+=1)<t.keys.length&&(r>10?o():u(o))};u(o)}else this.keys.forEach((function(e){var r=new d(t.json[e],t.open-1,t.config,e);n.appendChild(r.render())}))},d.prototype.removeChildren=function(e){void 0===e&&(e=!1);var t=this.element.querySelector("div."+i("children"));if(e){var n=0,r=function(){t&&t.children.length&&(t.removeChild(t.children[0]),(n+=1)>10?r():u(r))};u(r)}else t&&(t.innerHTML="")},d}()}()},2717:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=o},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e},210:e=>{"use strict";e.exports=n}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";a.r(c),a.d(c,{default:()=>S});var e=a(748),t=a(4212),n={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},r=1;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){return s="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},s(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,f,d,p=a(7647),m=a.n(p),y=a(4346),h=a.n(y),v=a(210),g=a(2717),j=a(6870);!function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"}(u||(u={})),function(e){e.KEY_VALUE="key-value",e.JSON="json"}(f||(f={})),function(e){e.ASSISTANT="assistant",e.DETAILS="details",e.FIX="fix",e.CLOSE="close"}(d||(d={}));var b={id:t.PropTypes.string.def(""),message:(0,v.toType)("IMessage",{}),theme:(0,v.toType)("messageTheme",{}).def(u.PRIMARY),delay:t.PropTypes.number,dismissable:t.PropTypes.bool.def(!0),offsetY:t.PropTypes.number.def(30),spacing:t.PropTypes.number.def(10),extCls:t.PropTypes.string.def(""),onClose:t.PropTypes.func,getContainer:t.PropTypes.instanceOf(HTMLElement),width:t.PropTypes.oneOfType([t.PropTypes.number,t.PropTypes.string]),actions:(0,v.toType)("IMessageAction",{})};const w=(0,e.defineComponent)({name:"Message",props:b,emits:["destroy"],setup:function(n,r){var o,a=this,c=r.emit,u=r.slots,p=(0,g.useLocale)("message"),y=(0,g.usePrefix)().resolveClassName,v=(0,e.computed)((function(){return["".concat(y("message")),"".concat(y("message-".concat(n.theme))),"".concat(n.extCls)]})),b=t.bkZIndexManager.getMessageNextIndex(),w=(0,e.computed)((function(){return/^\d+\.?\d*$/.test("".concat(n.delay))?n.delay:"object"!==s(n.message)||(0,e.isVNode)(n.message)?3e3:8e3})),S=(0,e.computed)((function(){return/^\d+/.test("".concat(n.width))?/^\d+\.?\d*$/.test("".concat(n.width))?"".concat(n.width,"px"):n.width:"object"!==s(n.message)||(0,e.isVNode)(n.message)?"".concat(560,"px"):"".concat(800,"px")})),C=(0,e.computed)((function(){return n.getContainer&&(0,t.isElement)(n.getContainer)})),k=(0,e.computed)((function(){return{top:"".concat(n.offsetY,"px"),zIndex:b,position:C.value?"absolute":"fixed",width:S.value}})),O=(0,e.ref)(null),x=(0,e.ref)(null),T=(0,e.ref)(null),N=(0,e.ref)(!1),E=(0,e.reactive)({isFix:!1,isDetailShow:!1}),A=null,L=function(){A=setTimeout((function(){E.isFix||(N.value=!1)}),w.value)},P=function(e){e.preventDefault(),e.stopPropagation(),N.value=!1},V=(0,e.ref)(null),M=function(){var e=new(m())(T.value,{text:function(){return n.message.details}});F(e)},F=function(e,t){["success","error"].forEach((function(n){e.on(n,(function(e){var r=x.value;if(V.value=n,r){var i,s,a=e.trigger,c=a.offsetLeft,l=a.offsetWidth,u=a.offsetTop;(i=r.classList).remove.apply(i,["success","error","is-hidden"]),(s=r.classList).add.apply(s,[n,"is-show"]),r.style.setProperty("transform","translate(".concat(c+l/2-41,"px, ").concat(u-40,"px")),o&&clearTimeout(o),o=setTimeout((function(){var e,t;(e=r.classList).remove.apply(e,["is-show"]),(t=r.classList).add.apply(t,["is-hidden"])}),2e3)}"function"==typeof t&&t()}))}))},I=function(){var e=new(m())(O.value.querySelectorAll("span.copy-value"),{text:function(e){return e.innerHTML}});F(e)},D=function(e){var t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){console.error("Format Json Error: ".concat(e))}return t},R=function(t,r){if(E.isDetailShow=null!=r?r:!E.isDetailShow,_(t,E.isDetailShow),E.isDetailShow&&"object"===s(n.message)&&!(0,e.isVNode)(n.message)){if(n.message.type===f.JSON||!n.message.type){var o=D(n.message.details),i=new(h())(o);setTimeout((function(){O.value&&(O.value.innerHTML="",O.value.append(i.render())),M()}))}n.message.type===f.KEY_VALUE&&setTimeout((function(){M(),I()}))}},_=function(e,t){E.isFix=null!=t?t:!E.isFix};(0,e.onMounted)((function(){w.value&&L(),N.value=!0})),(0,e.onUnmounted)((function(){clearTimeout(A)})),(0,e.watch)(N,(function(){N.value||c("destroy",n.id)}));var J=(0,e.computed)((function(){var t;return l(t={},d.ASSISTANT,{id:d.ASSISTANT,icon:function(){return(0,e.createVNode)(j.WeixinPro,null,null)},text:function(){return p.value.assistant},onClick:function(e){n.message.assistant&&window.open(n.message.assistant,"_blank")}}),l(t,d.DETAILS,{id:d.DETAILS,icon:function(){return E.isDetailShow?(0,e.createVNode)(j.AngleDoubleUpLine,null,null):(0,e.createVNode)(j.AngleDoubleDownLine,null,null)},text:function(){return p.value.details},onClick:function(e){return R(e)}}),l(t,d.FIX,{id:d.FIX,icon:function(){return E.isFix?(0,e.createVNode)(j.FixShape,null,null):(0,e.createVNode)(j.FixLine,null,null)},classList:E.isFix?"fixed":"",onClick:function(e){return _(e)}}),l(t,d.CLOSE,{id:d.CLOSE,classList:"normal-color",icon:function(){return n.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(y("message-close")),onClick:P},null)},onClick:P}),t})),q=[d.ASSISTANT,d.DETAILS,d.FIX,d.CLOSE],H=(0,e.computed)((function(){var e;if((null===(e=n.actions)||void 0===e?void 0:e.length)>0){var t=n.actions.map((function(e){var t=e.id.toLocaleLowerCase(),n=J.value[t],r=null==n?void 0:n.onClick,o=Object.assign({},J.value[t]||{},e);if(o.id=t,void 0!==e.classList){var c=Array.isArray(e.classList)?e.classList:[e.classList],l=[];void 0!==n.classList&&(l=Array.isArray(n.classList)?n.classList:[n.classList]),o.classList=[].concat(i(l),i(c))}return"function"==typeof e.onClick?(o.onClick=function(){var t=Reflect.apply(e.onClick,a,[]);void 0!==s(t)&&!t||"function"!=typeof r||Reflect.apply(r,a,[])},o):(o.onClick=r,o)})),r=q.filter((function(e){return!t.some((function(t){return t.id===e}))})).map((function(e){return J.value[e]}));return t.push.apply(t,i(r)),t}return q.map((function(e){return J.value[e]}))}));return{classNames:v,styles:k,visible:N,close:P,setDetailsShow:R,fixMesage:_,copyMessage:M,parseJson:D,handleMouseenter:function(e){clearTimeout(A)},handleMouseleave:function(e){w.value&&L()},renderMessageActions:function(){var t,n,r=function(t){var n=t.text,r=void 0;if("function"==typeof n&&(r=Reflect.apply(n,a,[])),void 0!==r)return"string"==typeof r?(0,e.createVNode)("span",{class:"message-action-text"},[r]):r};return null!==(n=null===(t=u.action)||void 0===t?void 0:t.call(u))&&void 0!==n?n:H.value.map((function(t){if(t.disabled)return null;if("function"==typeof t.render)return Reflect.apply(t.render,a,[]);var n,o,i=Array.isArray(t.classList)?t.classList.join(" "):t.classList;return(0,e.createVNode)("span",{class:["tool",t.id,i],onClick:function(e){return function(e,t){t.readonly||t.disabled||"function"==typeof t.onClick&&Reflect.apply(t.onClick,a,[e,t])}(e,t)}},[(n=t,o=n.icon,"function"==typeof o?Reflect.apply(o,a,[]):(0,e.createVNode)("span",{class:o},null)),r(t)])}))},refJsonContent:O,refCopyStatus:x,refCopyMsgDiv:T,toolOperation:E,copyStatus:V,t:p,resolveClassName:y,copyValueItem:I}},render:function(){var t=this,n=function(n){return{primary:(0,e.createVNode)(j.Info,null,null),warning:(0,e.createVNode)(j.Warn,null,null),success:(0,e.createVNode)(j.Success,null,null),error:(0,e.createVNode)(j.Close,null,null)}[null!=n?n:t.theme]},r=function(n){if(n.type===f.KEY_VALUE){var r=t.parseJson(n.details||{});return Object.keys(r).map((function(t){return(0,e.createVNode)("div",{class:"message-row"},[(0,e.createVNode)("label",null,[t]),(0,e.createVNode)("span",{class:"copy-value"},[r[t]])])}))}};return(0,e.createVNode)(e.Transition,{name:"bk-message-fade"},{default:function(){return[(0,e.withDirectives)((0,e.createVNode)("div",{class:t.classNames,style:t.styles,onMouseenter:t.handleMouseenter,onMouseleave:t.handleMouseleave},["object"!==s(t.message)||(0,e.isVNode)(t.message)?(0,e.createVNode)(e.Fragment,null,[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content"))},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),t.message]),t.dismissable&&(0,e.createVNode)(j.Error,{class:"".concat(t.resolveClassName("message-close")),onClick:t.close},null)]):(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-content")," multi")},[(0,e.createVNode)("div",{class:"overview"},[(0,e.createVNode)("div",{class:"left-content"},[(0,e.createVNode)("div",{class:"".concat(t.resolveClassName("message-icon"))},[n()]),(0,e.createVNode)("div",{class:"describe"},[null!==(a=null===(i=(o=t.$slots).title)||void 0===i?void 0:i.call(o))&&void 0!==a?a:"【".concat(t.message.code,"】").concat(t.message.overview," ").concat(t.message.suggestion)])]),(0,e.createVNode)("div",{class:"tools"},[t.renderMessageActions()])]),t.toolOperation.isDetailShow&&(0,e.createVNode)("div",{class:"message-detail"},[(0,e.createVNode)("div",{class:"message-copy",ref:"refCopyMsgDiv"},[(0,e.createVNode)(j.CopyShape,null,null)]),(0,e.createVNode)("div",{class:"copy-status",ref:"refCopyStatus"},[(0,e.createVNode)("div",{class:"inner"},[n(t.copyStatus),"success"===t.copyStatus?t.t.copySuccess:t.t.copyFailed])]),(0,e.createVNode)("div",{ref:"refJsonContent",class:"message-tree"},[r(t.message)])])])]),[[e.vShow,t.visible]])];var o,i,a}})}}),S=function(o){!function(o,i){var s=i,a=s.position||"top-right";"string"==typeof i&&(s={message:i});var c=i.onClose,l=s.offsetX||10,u=s.offsetY||30,f=s.spacing,d=void 0===f?10:f;n[a].forEach((function(e){u+=(e.el.offsetHeight||0)+d}));var p="message_".concat(r+=1);s=Object.assign(Object.assign({},s),{offsetX:l,offsetY:u,id:p});var m=document.createElement("div"),y=(0,e.createVNode)(o,s);y.props.onDestroy=function(t){!function(e,t,r,o){null==o||o();var i=t.startsWith("top")?"top":"bottom",s=-1;n[t].forEach((function(t,n){t.props.id===e&&(s=n)}));for(var a=n[t][s].el.offsetHeight,c=n[t].length,l=s;l<c;l++){var u=parseInt(n[t][l].el.style[i],10)-a-r;n[t][l].component.props.offsetY=u}n[t].splice(s,1)}(t,a,d,c),(0,e.render)(null,m)},(0,e.render)(y,m),n[a].push(y),(y.props.getContainer&&(0,t.isElement)(y.props.getContainer)?y.props.getContainer:document.body).appendChild(m.firstElementChild)}(w,o)}})(),c})()));
@@ -163,6 +163,14 @@
163
163
  .bk-message-content.multi .message-detail .message-tree .message-row label::after {
164
164
  content: ':';
165
165
  }
166
+ .bk-message-content.multi .message-detail .message-tree .message-row .copy-value {
167
+ padding: 0px 4px;
168
+ }
169
+ .bk-message-content.multi .message-detail .message-tree .message-row .copy-value:hover {
170
+ background: rgba(186, 188, 192, 0.2);
171
+ cursor: pointer;
172
+ border-radius: 2px;
173
+ }
166
174
  .bk-message-content.multi .message-detail .message-copy {
167
175
  position: absolute;
168
176
  top: 20px;
@@ -173,11 +181,11 @@
173
181
  .bk-message-content.multi .message-detail .message-copy:hover span {
174
182
  color: #3a84ff;
175
183
  }
176
- .bk-message-content.multi .message-detail .message-copy .copy-status {
184
+ .bk-message-content.multi .message-detail .copy-status {
177
185
  display: none;
178
186
  padding-bottom: 4px;
179
187
  }
180
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner {
188
+ .bk-message-content.multi .message-detail .copy-status .inner {
181
189
  position: relative;
182
190
  display: flex;
183
191
  padding: 6px 8px;
@@ -189,10 +197,10 @@
189
197
  box-shadow: 0 2px 6px 0 #0000001a;
190
198
  align-items: center;
191
199
  }
192
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner span {
200
+ .bk-message-content.multi .message-detail .copy-status .inner span {
193
201
  margin-right: 4px;
194
202
  }
195
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner::after {
203
+ .bk-message-content.multi .message-detail .copy-status .inner::after {
196
204
  position: absolute;
197
205
  bottom: 0;
198
206
  left: 50%;
@@ -207,13 +215,13 @@
207
215
  box-shadow: 5px 3px 6px 0 #0000001a;
208
216
  box-sizing: border-box;
209
217
  }
210
- .bk-message-content.multi .message-detail .message-copy .copy-status.success .inner span {
218
+ .bk-message-content.multi .message-detail .copy-status.success .inner span {
211
219
  color: #2dcb9d;
212
220
  }
213
- .bk-message-content.multi .message-detail .message-copy .copy-status.error .inner span {
221
+ .bk-message-content.multi .message-detail .copy-status.error .inner span {
214
222
  color: #ea3636;
215
223
  }
216
- .bk-message-content.multi .message-detail .message-copy .copy-status.is-show {
224
+ .bk-message-content.multi .message-detail .copy-status.is-show {
217
225
  position: absolute;
218
226
  top: 0;
219
227
  left: 0;
@@ -221,6 +229,6 @@
221
229
  white-space: nowrap;
222
230
  transform: translate(-50%, -100%);
223
231
  }
224
- .bk-message-content.multi .message-detail .message-copy .copy-status.is-hidden {
232
+ .bk-message-content.multi .message-detail .copy-status.is-hidden {
225
233
  display: none;
226
234
  }
@@ -199,6 +199,16 @@
199
199
  content: ':';
200
200
  }
201
201
  }
202
+
203
+ .copy-value {
204
+ padding: 0px 4px;
205
+
206
+ &:hover {
207
+ background: rgba(186, 188, 192, 0.2);
208
+ cursor: pointer;
209
+ border-radius: 2px;
210
+ }
211
+ }
202
212
  }
203
213
  }
204
214
 
@@ -214,72 +224,72 @@
214
224
  color: #3a84ff;
215
225
  }
216
226
  }
227
+ }
217
228
 
218
- .copy-status {
219
- display: none;
220
- padding-bottom: 4px;
229
+ .copy-status {
230
+ display: none;
231
+ padding-bottom: 4px;
221
232
 
222
- .inner {
223
- position: relative;
224
- display: flex;
225
- padding: 6px 8px;
226
- font-size: 12px;
227
- line-height: 20px;
228
- color: #63656e;
229
- background: #fff;
230
- border: 1px solid #dcdee5;
231
- box-shadow: 0 2px 6px 0 #0000001a;
232
- align-items: center;
233
+ .inner {
234
+ position: relative;
235
+ display: flex;
236
+ padding: 6px 8px;
237
+ font-size: 12px;
238
+ line-height: 20px;
239
+ color: #63656e;
240
+ background: #fff;
241
+ border: 1px solid #dcdee5;
242
+ box-shadow: 0 2px 6px 0 #0000001a;
243
+ align-items: center;
233
244
 
234
- span {
235
- margin-right: 4px;
236
- }
245
+ span {
246
+ margin-right: 4px;
247
+ }
237
248
 
238
- &::after {
239
- position: absolute;
240
- bottom: 0;
241
- left: 50%;
242
- width: 8px;
243
- height: 8px;
244
- background: #fff;
245
- border-color: #dcdee5;
246
- border-style: solid;
247
- border-width: 0px 1px 1px 0px;
248
- content: '';
249
- transform: translate(0, 4px) rotate(45deg);
250
- box-shadow: 5px 3px 6px 0 #0000001a;
251
- box-sizing: border-box;
252
- }
249
+ &::after {
250
+ position: absolute;
251
+ bottom: 0;
252
+ left: 50%;
253
+ width: 8px;
254
+ height: 8px;
255
+ background: #fff;
256
+ border-color: #dcdee5;
257
+ border-style: solid;
258
+ border-width: 0px 1px 1px 0px;
259
+ content: '';
260
+ transform: translate(0, 4px) rotate(45deg);
261
+ box-shadow: 5px 3px 6px 0 #0000001a;
262
+ box-sizing: border-box;
253
263
  }
264
+ }
254
265
 
255
- &.success {
256
- .inner {
257
- span {
258
- color: #2dcb9d;
259
- }
266
+ &.success {
267
+ .inner {
268
+ span {
269
+ color: #2dcb9d;
260
270
  }
261
271
  }
272
+ }
262
273
 
263
- &.error {
264
- .inner {
265
- span {
266
- color: #ea3636;
267
- }
274
+ &.error {
275
+ .inner {
276
+ span {
277
+ color: #ea3636;
268
278
  }
269
279
  }
280
+ }
270
281
 
271
- &.is-show {
272
- position: absolute;
273
- top: 0;
274
- left: 0;
275
- display: inline-flex;
276
- white-space: nowrap;
277
- transform: translate(-50%, -100%);
278
- }
282
+ &.is-show {
283
+ position: absolute;
284
+ top: 0;
285
+ left: 0;
286
+ display: inline-flex;
287
+ white-space: nowrap;
288
+ transform: translate(-50%, -100%);
289
+ }
279
290
 
280
- &.is-hidden {
281
- display: none;
282
- }
291
+ &.is-hidden {
292
+ display: none;
283
293
  }
284
294
  }
285
295
  }
@@ -285,6 +285,14 @@
285
285
  .bk-message-content.multi .message-detail .message-tree .message-row label::after {
286
286
  content: ':';
287
287
  }
288
+ .bk-message-content.multi .message-detail .message-tree .message-row .copy-value {
289
+ padding: 0px 4px;
290
+ }
291
+ .bk-message-content.multi .message-detail .message-tree .message-row .copy-value:hover {
292
+ background: rgba(186, 188, 192, 0.2);
293
+ cursor: pointer;
294
+ border-radius: 2px;
295
+ }
288
296
  .bk-message-content.multi .message-detail .message-copy {
289
297
  position: absolute;
290
298
  top: 20px;
@@ -295,11 +303,11 @@
295
303
  .bk-message-content.multi .message-detail .message-copy:hover span {
296
304
  color: #3a84ff;
297
305
  }
298
- .bk-message-content.multi .message-detail .message-copy .copy-status {
306
+ .bk-message-content.multi .message-detail .copy-status {
299
307
  display: none;
300
308
  padding-bottom: 4px;
301
309
  }
302
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner {
310
+ .bk-message-content.multi .message-detail .copy-status .inner {
303
311
  position: relative;
304
312
  display: flex;
305
313
  padding: 6px 8px;
@@ -311,10 +319,10 @@
311
319
  box-shadow: 0 2px 6px 0 #0000001a;
312
320
  align-items: center;
313
321
  }
314
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner span {
322
+ .bk-message-content.multi .message-detail .copy-status .inner span {
315
323
  margin-right: 4px;
316
324
  }
317
- .bk-message-content.multi .message-detail .message-copy .copy-status .inner::after {
325
+ .bk-message-content.multi .message-detail .copy-status .inner::after {
318
326
  position: absolute;
319
327
  bottom: 0;
320
328
  left: 50%;
@@ -329,13 +337,13 @@
329
337
  box-shadow: 5px 3px 6px 0 #0000001a;
330
338
  box-sizing: border-box;
331
339
  }
332
- .bk-message-content.multi .message-detail .message-copy .copy-status.success .inner span {
340
+ .bk-message-content.multi .message-detail .copy-status.success .inner span {
333
341
  color: #2dcb9d;
334
342
  }
335
- .bk-message-content.multi .message-detail .message-copy .copy-status.error .inner span {
343
+ .bk-message-content.multi .message-detail .copy-status.error .inner span {
336
344
  color: #ea3636;
337
345
  }
338
- .bk-message-content.multi .message-detail .message-copy .copy-status.is-show {
346
+ .bk-message-content.multi .message-detail .copy-status.is-show {
339
347
  position: absolute;
340
348
  top: 0;
341
349
  left: 0;
@@ -343,6 +351,6 @@
343
351
  white-space: nowrap;
344
352
  transform: translate(-50%, -100%);
345
353
  }
346
- .bk-message-content.multi .message-detail .message-copy .copy-status.is-hidden {
354
+ .bk-message-content.multi .message-detail .copy-status.is-hidden {
347
355
  display: none;
348
356
  }
@@ -143,7 +143,7 @@ declare const _default: import("vue").DefineComponent<{
143
143
  close: (e: Event) => void;
144
144
  setDetailsShow: (e: MouseEvent, isShow?: boolean) => void;
145
145
  fixMesage: (_e: MouseEvent, isFix?: boolean) => void;
146
- copyMessage: (_e: MouseEvent) => void;
146
+ copyMessage: () => void;
147
147
  parseJson: (value: any) => any;
148
148
  handleMouseenter: (_e: MouseEvent) => void;
149
149
  handleMouseleave: (_e: MouseEvent) => void;
@@ -163,6 +163,7 @@ declare const _default: import("vue").DefineComponent<{
163
163
  copyFailed: string;
164
164
  }>;
165
165
  resolveClassName: (cls: string) => string;
166
+ copyValueItem: () => void;
166
167
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "destroy"[], "destroy", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
167
168
  id: import("vue-types").VueTypeValidableDef<string> & {
168
169
  default: string;