bkui-vue 0.0.1-beta.84 → 0.0.1-beta.87

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 (88) hide show
  1. package/dist/index.cjs.js +27 -27
  2. package/dist/index.esm.js +327 -413
  3. package/dist/index.umd.js +29 -29
  4. package/dist/style.css +1 -1
  5. package/lib/alert/alert.css +3 -3
  6. package/lib/alert/alert.less +5 -3
  7. package/lib/alert/alert.variable.css +3 -3
  8. package/lib/alert/index.js +1 -1
  9. package/lib/badge/badge.d.ts +1 -1
  10. package/lib/badge/index.d.ts +4 -4
  11. package/lib/button/button.d.ts +1 -1
  12. package/lib/button/index.d.ts +4 -4
  13. package/lib/cascader/cascader.d.ts +2 -2
  14. package/lib/cascader/index.d.ts +7 -7
  15. package/lib/checkbox/index.js +1 -1
  16. package/lib/date-picker/date-picker.d.ts +1 -1
  17. package/lib/date-picker/index.d.ts +4 -4
  18. package/lib/date-picker/index.js +1 -1
  19. package/lib/dialog/dialog.d.ts +1 -1
  20. package/lib/dialog/index.d.ts +4 -4
  21. package/lib/dropdown/dropdown.d.ts +2 -2
  22. package/lib/dropdown/index.d.ts +7 -7
  23. package/lib/form/form-item.d.ts +3 -3
  24. package/lib/form/form.d.ts +23 -9
  25. package/lib/form/index.d.ts +44 -21
  26. package/lib/form/index.js +1 -1
  27. package/lib/form/type.d.ts +5 -4
  28. package/lib/form/validator.d.ts +1 -0
  29. package/lib/input/index.d.ts +20 -20
  30. package/lib/input/index.js +1 -1
  31. package/lib/input/input.d.ts +6 -6
  32. package/lib/link/index.d.ts +7 -7
  33. package/lib/link/link.d.ts +2 -2
  34. package/lib/message/messageConstructor.d.ts +1 -1
  35. package/lib/notify/notifyConstructor.d.ts +2 -2
  36. package/lib/pagination/index.d.ts +4 -4
  37. package/lib/pagination/index.js +1 -1
  38. package/lib/pagination/pagination.d.ts +1 -1
  39. package/lib/popover/index.d.ts +13 -13
  40. package/lib/popover/popover.d.ts +4 -4
  41. package/lib/progress/index.d.ts +4 -4
  42. package/lib/progress/progress.d.ts +1 -1
  43. package/lib/radio/index.js +1 -1
  44. package/lib/rate/index.js +1 -1
  45. package/lib/resize-layout/index.d.ts +7 -7
  46. package/lib/resize-layout/resize-layout.d.ts +2 -2
  47. package/lib/select/index.d.ts +34 -87
  48. package/lib/select/index.js +1 -1
  49. package/lib/select/option.d.ts +2 -7
  50. package/lib/select/optionGroup.d.ts +1 -1
  51. package/lib/select/select.d.ts +6 -14
  52. package/lib/shared/index.d.ts +2 -0
  53. package/lib/shared/index.js +1 -1
  54. package/lib/shared/token.d.ts +4 -2
  55. package/lib/switcher/index.d.ts +4 -4
  56. package/lib/switcher/index.js +1 -1
  57. package/lib/switcher/switcher.d.ts +1 -1
  58. package/lib/tab/index.d.ts +5 -5
  59. package/lib/tab/tab-panel.d.ts +1 -1
  60. package/lib/tab/tab.d.ts +1 -1
  61. package/lib/table/const.d.ts +3 -1
  62. package/lib/table/index.d.ts +68 -2
  63. package/lib/table/index.js +1 -1
  64. package/lib/table/props.d.ts +24 -0
  65. package/lib/table/table.css +1 -0
  66. package/lib/table/table.d.ts +30 -0
  67. package/lib/table/table.less +1 -0
  68. package/lib/table/table.variable.css +1 -0
  69. package/lib/table/utils.d.ts +7 -0
  70. package/lib/tag-input/index.d.ts +11 -11
  71. package/lib/tag-input/index.js +1 -1
  72. package/lib/tag-input/tag-input.d.ts +3 -3
  73. package/lib/transfer/const.d.ts +5 -0
  74. package/lib/transfer/index.d.ts +164 -150
  75. package/lib/transfer/index.js +1 -1
  76. package/lib/transfer/props.d.ts +54 -0
  77. package/lib/transfer/transfer.css +6 -6
  78. package/lib/transfer/transfer.d.ts +70 -95
  79. package/lib/transfer/transfer.less +4 -4
  80. package/lib/transfer/transfer.variable.css +6 -6
  81. package/lib/tree/index.js +1 -1
  82. package/lib/upload/upload-list.d.ts +1 -1
  83. package/lib/upload/upload-trigger.d.ts +1 -1
  84. package/lib/upload/upload.d.ts +1 -1
  85. package/lib/virtual-render/index.js +1 -1
  86. package/package.json +1 -1
  87. package/lib/form/common.d.ts +0 -3
  88. package/lib/use-form.d.ts +0 -3
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("js-calendar"),require("date-fns"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../directives","../icon","js-calendar","date-fns"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("js-calendar"),require("date-fns")):t(e["../shared"],e.vue,e["../directives"],e["../icon"],e["js-calendar"],e["date-fns"]);for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,((e,t,n,a,r,i)=>(()=>{"use strict";var l={4061:e=>{e.exports=n},6870:e=>{e.exports=a},4212:t=>{t.exports=e},7876:e=>{e.exports=i},7926:e=>{e.exports=r},748:e=>{e.exports=t}},o={};function c(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return l[e](n,n.exports,c),n.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{default:()=>ie});var e=c(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],l=!0,o=!1;try{for(n=n.call(e);!(l=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);l=!0);}catch(e){o=!0,r=e}finally{try{l||null==n.return||n.return()}finally{if(o)throw r}}return i}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(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 i(e){return i="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},i(e)}var l=c(748),o=c(4061),s={placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};const d=(0,l.defineComponent)({props:s,emits:["changeVisible"],setup:function(t,n){var a=n.emit,r=Object.create(null),i=(0,l.ref)(null);(0,l.onMounted)((function(){c()})),(0,l.onBeforeUnmount)((function(){o()}));var o=function(){if(r&&0!==Object.keys(r).length){var e=r;e.isShow&&e.hide(),e.destroy(),r=null,a("changeVisible",!1)}},c=function(){r&&0!==Object.keys(r).length?(0,l.nextTick)((function(){r.update()})):(0,l.nextTick)((function(){r=new e.BKPopover(t.triggerRef,i.value,{placement:t.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})}))},u=(0,l.computed)((function(){var n={};return t.appendToBody&&(n["z-index"]=1060+e.bkZIndexManager.getModalNextIndex()),n})),s=(0,l.reactive)({styles:u});return Object.assign(Object.assign({},(0,l.toRefs)(s)),{refContentRef:i,updateDropdown:c,destoryDropdown:o})},render:function(){var e,t,n;return(0,l.createVNode)("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""])}});var f=c(6870),p={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};const h=(0,l.defineComponent)({props:p,emits:["pick-clear","pick-success","pick-toggle-time"],setup:function(e,t){var n=t.emit,a=(0,l.computed)((function(){return{time:e.isTime?"选择日期":"选择时间",clear:"清除",ok:"确定"}})),i=(0,l.ref)(null);return{labels:a,handleClear:function(){n("pick-clear")},handleSuccess:function(){n("pick-success")},handleToggleTime:function(){e.timeDisabled||n("pick-toggle-time")},handleTab:function(e){var t=r(i.value.children)[e.shiftKey?"shift":"pop"]();document.activeElement===t&&(e.preventDefault(),e.stopPropagation())}}},render:function(){return(0,l.createVNode)("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?(0,l.createVNode)("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[this.labels.time]):"",this.clearable?(0,l.createVNode)("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",(0,l.createVNode)("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])}});function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=c(7926),v=c.n(y),g=c(7876),b={},k=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,D=/\d\d?/,w=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,S=function(){};function V(e,t){for(var n=[],a=0,r=e.length;a<r;a++)n.push(e[a].substr(0,t));return n}function M(e){return function(t,n,a){var r=a[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~r&&(t.month=r)}}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=String(e);n.length<t;)n="0".concat(n);return n}var N=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"],T=V(C,3),x=V(N,3);b.i18n={dayNamesShort:x,dayNames:N,monthNamesShort:T,monthNames:C,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10)*e%10]}};var F={D:function(e){return e.getDay()},DD:function(e){return P(e.getDay())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return e.getDate()},dd:function(e){return P(e.getDate())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return e.getMonth()+1},MM:function(e){return P(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},yy:function(e){return String(e.getFullYear()).substr(2)},yyyy:function(e){return e.getFullYear()},h:function(e){return e.getHours()%12||12},hh:function(e){return P(e.getHours()%12||12)},H:function(e){return e.getHours()},HH:function(e){return P(e.getHours())},m:function(e){return e.getMinutes()},mm:function(e){return P(e.getMinutes())},s:function(e){return e.getSeconds()},ss:function(e){return P(e.getSeconds())},S:function(e){return Math.round(e.getMilliseconds()/100)},SS:function(e){return P(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return P(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+P(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)}},O={d:[D,function(e,t){e.day=t}],M:[D,function(e,t){e.month=t-1}],yy:[D,function(e,t){var n=new Date,a=+"".concat(n.getFullYear()).substr(0,2);e.year="".concat(t>68?a-1:a).concat(t)}],h:[D,function(e,t){e.hour=t}],m:[D,function(e,t){e.minute=t}],s:[D,function(e,t){e.second=t}],yyyy:[/\d{4}/,function(e,t){e.year=t}],S:[/\d/,function(e,t){e.millisecond=100*t}],SS:[/\d{2}/,function(e,t){e.millisecond=10*t}],SSS:[/\d{3}/,function(e,t){e.millisecond=t}],D:[D,S],ddd:[w,S],MMM:[w,M("monthNamesShort")],MMMM:[w,M("monthNames")],a:[w,function(e,t,n){var a=t.toLowerCase();a===n.amPm[0]?e.isPm=!1:a===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,function(e,t){var n,a="".concat(t).match(/([\\+\\-]|\d\d)/gi);a&&(n=60*a[1]+parseInt(a[2],10),e.timezoneOffset="+"===a[0]?n:-n)}]};O.DD=O.D,O.dddd=O.ddd,O.Do=O.dd=O.d,O.mm=O.m,O.hh=O.H=O.HH=O.h,O.MM=O.M,O.ss=O.s,O.A=O.a,b.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},b.format=function(e,t,n){var a=n||b.i18n;if("number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return(t=b.masks[t]||t||b.masks.default).replace(k,(function(t){return t in F?F[t](e,a):t.slice(1,t.length-1)}))},b.parse=function(e,t,n){var a=n||b.i18n;if("string"!=typeof t)throw new Error("Invalid format in fecha.parse");if(t=b.masks[t]||t,e.length>1e3)return!1;var r=!0,i={};if(t.replace(k,(function(t){if(O[t]){var n=O[t],l=e.search(n[0]);~l?e.replace(n[0],(function(t){return n[1](i,t,a),e=e.substr(l+t.length),t})):r=!1}return O[t]?"":t.slice(1,t.length-1)})),!r)return!1;var l,o=new Date;return!0===i.isPm&&null!==i.hour&&12!=+i.hour?i.hour=+i.hour+12:!1===i.isPm&&12==+i.hour&&(i.hour=0),null!==i.timezoneOffset&&void 0!==i.timezoneOffset?(i.minute=+(i.minute||0)-+i.timezoneOffset,l=new Date(Date.UTC(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0))):l=new Date(i.year||o.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0),l};const H=b;var L=" - ",A=function(e,t){var n=(0,g.toDate)(new Date(e));return!n||isNaN(n.getTime())?"":(0,g.format)(n,t||"yyyy-MM-dd")},j=function(e,t){if(Array.isArray(e)&&2===e.length){var n=e[0],a=e[1];if(n&&a)return A(n,t)+L+A(a,t)}else if(!Array.isArray(e)&&e instanceof Date)return A(e,t);return""},B=function(e,t){var n=Array.isArray(e)?e:e.split(L);if(2===n.length){var a=n[0],r=n[1];return[a instanceof Date?a:H.parse(a,t||"yyyy-MM-dd"),r instanceof Date?r:H.parse(r,t||"yyyy-MM-dd")]}return[]},R={default:{formatter:function(e){return e?"".concat(e):""},parser:function(e){return void 0===e||""===e?null:e}},date:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},datetime:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},daterange:{formatter:j,parser:B},datetimerange:{formatter:j,parser:B},timerange:{formatter:j,parser:B},time:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},month:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},year:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},multiple:{formatter:function(e,t){return e.filter(Boolean).map((function(e){return A(e,t)})).join(",")},parser:function(e,t){return("string"==typeof e?e.split(","):e).map((function(e){if(e instanceof Date)return e;var n=e;return"string"==typeof e?n=e.trim():"number"==typeof e||e||(n=""),H.parse(n,t||"yyyy-MM-dd")}))}},number:{formatter:function(e){return e?"".concat(e):""},parser:function(e){var t=Number(e);return isNaN(e)?null:t}}},z=function(e){return e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0]},I={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Y=function(e,t,n,r){var i=t.includes("range"),l=(R[t]||R.default).parser,o=r||I[t],c=R.multiple.parser,u=e;if(!e||"time"!==t||e instanceof Date)if(n&&e)u=c(e,o);else if(i)if(e)if("string"==typeof e)u=l(e,o);else if("timerange"===t)u=l(e,o).map((function(e){return e||""}));else{var s=a(e,2),d=s[0],f=s[1];d instanceof Date&&f instanceof Date?u=e.map((function(e){return new Date(e)})):"string"==typeof d&&"string"==typeof f?u=l(e.join(L),o):d&&f||(u=[null,null])}else u=[null,null];else"string"==typeof e&&0!==t.indexOf("time")&&(u=l(e,o)||null);else u=l(e,o);return i||n?u||[]:[u]},q=function(e,t,n,a){var r=I[t];return n?(0,R.multiple.formatter)(e,a||r):(0,(R[t]||R.default).formatter)(e,a||r)},E=Symbol("date-picker");function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return["bk-picker-panel-icon-btn","bk-date-picker-".concat(e,"-btn"),"bk-date-picker-".concat(e,"-btn-arrow").concat(t)]}var $,K,J=function(e,t){var n,a=new Date(e),r=a.getMonth()+t,i=(n=a.getFullYear(),new Date(n,r+1,0).getDate());return i<a.getDate()&&a.setDate(i),a.setMonth(r),a},Z=($={yyyy:function(e){return e.getFullYear()},m:function(e){return e.getMonth()+1},mm:function(e){return"0".concat(e.getMonth()+1).slice(-2)},mmm:function(e,t){return e.toLocaleDateString(t,{month:"long"}).slice(0,3)},Mmm:function(e,t){var n=e.toLocaleDateString(t,{month:"long"});return(n[0].toUpperCase()+n.slice(1).toLowerCase()).slice(0,3)},mmmm:function(e,t){return e.toLocaleDateString(t,{month:"long"})},Mmmm:function(e,t){var n=e.toLocaleDateString(t,{month:"long"});return n[0].toUpperCase()+n.slice(1).toLowerCase()}},K=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g"),function(e,t,n){var a=t.match(/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/).slice(1);return{separator:a[1],labels:[a[0],a[2]].map((function(t){return{label:t.replace(/\[[^\]]+\]/,(function(t){return t.slice(1,-1).replace(K,(function(t){return $[t](n,e)}))})),type:-1!==t.indexOf("yy")?"year":"month"}}))}}),_=function(e){var t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},W=function(e,t,n){if(!t||!n)return!1;var r=a([t,n].sort(),2),i=r[0],l=r[1];return e>=i&&e<=l},G={tableDate:{type:Date,required:!0},disableDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:function(){return{from:null,to:null,selecting:!1}}},focusedDate:{type:Date,required:!0}};const Q=(0,l.defineComponent)({props:G,emits:["pick","pick-click","changeRange"],setup:function(e,t){var n=t.emit,r=(0,l.computed)((function(){return new(v().Generator)({onlyDays:!0,weekStart:0})})),i=(0,l.computed)((function(){var e=["日","一","二","三","四","五","六"];return e.splice(0,7).concat(e.splice(0,0))})),o=(0,l.computed)((function(){return"range"===e.selectionMode&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue}));return{headerDays:i,cells:(0,l.computed)((function(){var t=e.tableDate.getFullYear(),n=e.tableDate.getMonth(),i=_(new Date),l=o.value.filter(Boolean).map(_),c=a(o.value.map(_),2),u=c[0],s=c[1],d=e.rangeState.from&&_(e.rangeState.from),f=e.rangeState.to&&_(e.rangeState.to),p="range"===e.selectionMode,h="function"==typeof e.disableDate&&e.disableDate;return r.value(t,n,(function(e){e.date instanceof Date&&e.date.setTime(e.date.getTime()+6e4*e.date.getTimezoneOffset());var t=e.date&&_(e.date),a=e.date&&n===e.date.getMonth();return Object.assign(Object.assign({},e),{type:t===i?"today":e.type,selected:a&&l.includes(t),disabled:e.date&&h&&h(new Date(t)),range:a&&p&&W(t,d,f),start:a&&p&&t===u,end:a&&p&&t===s})})).cells.slice(0)})),getCellCls:function(e){var t;return["bk-date-picker-cells-cell",(t={},m(t,"bk-date-picker-cells-cell-selected",e.selected||e.start||e.end),m(t,"bk-date-picker-cells-cell-disabled",e.disabled),m(t,"bk-date-picker-cells-cell-today","today"===e.type),m(t,"bk-date-picker-cells-cell-prev-month","prevMonth"===e.type),m(t,"bk-date-picker-cells-cell-next-month","nextMonth"===e.type),m(t,"bk-date-picker-cells-cell-week-label","weekLabel"===e.type),m(t,"bk-date-picker-cells-cell-range",e.range&&!e.start&&!e.end),t)]},handleClick:function(e){if(!e.disabled&&"weekLabel"!==e.type){var t=new Date(_(e.date));n("pick",t),n("pick-click")}},handleMouseMove:function(t){if(e.rangeState.selecting&&!t.disabled){var a=t.date;n("changeRange",a)}}}},render:function(){var e=this;return(0,l.createVNode)("div",{class:"bk-date-picker-cells"},[(0,l.createVNode)("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map((function(e){return(0,l.createVNode)("span",null,[e])}))]),this.cells.map((function(t){return(0,l.createVNode)("span",{class:e.getCellCls(t),onClick:function(){return e.handleClick(t)},onMouseenter:function(){return e.handleMouseMove(t)}},[(0,l.createVNode)("em",null,[t.desc])])}))])}});var X={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator:function(e){return!(["year","month","date","time"].indexOf(e)<0&&(console.error("selectionMode property is not valid: '".concat(e,"'")),1))}},startDate:{type:Date},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};const ee=(0,l.defineComponent)({props:X,emits:["pick","pick-success","pick-clear"],setup:function(e,t){var n=this,a=t.slots,r=t.emit,i=function(e){return e.match(/^time/)?"time-picker":"".concat(e,"-table")},o=e.modelValue.slice().sort(),c=(0,l.reactive)({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:o,panelDate:e.startDate||o[0]||new Date}),u=function(){setTimeout((function(){c.currentView=e.selectionMode}),500)},s=function(e){c.panelDate=e,"year-table"===c.pickerTable?c.pickerTable="month-table":c.pickerTable=i(c.currentView)},d=function(t,n){var a;a="year"===e.selectionMode?new Date(t.getFullYear(),0,1):"month"===e.selectionMode?new Date(c.panelDate.getFullYear(),t.getMonth(),1):new Date(t),c.dates=[a],r("pick",a,!1,n||e.selectionMode)},f=function(){u(),r("pick-success")},p=(0,l.ref)(null),h=(0,l.ref)(null),m=(0,l.computed)((function(){return c.pickerTable==="".concat(c.currentView,"-table")?d:s})),y=(0,l.computed)((function(){var e=c.panelDate,t=Z("zh-CN","[yyyy]-[mm]",e),n=t.labels;return{separator:t.separator,labels:n.map((function(e){var t,n=e;return n.handler=(t=e.type,function(){c.pickerTable=i(t)}),n}))}})),v=(0,l.computed)((function(){return"year"===y.value.labels[0].type||"date"===c.currentView})),g=(0,l.computed)((function(){return"year"===y.value.labels[1].type||"date"===c.currentView})),b=(0,l.computed)((function(){return"time"===c.currentView})),k=(0,l.computed)((function(){return!!a.shortcuts}));return Object.assign(Object.assign({},(0,l.toRefs)(c)),{panelPickerHandlers:m,datePanelLabel:y,showLabelFirst:v,showLabelSecond:g,handleShortcutClick:function(t){t.value&&r("pick",t.value(),!1,void 0,t),t.onClick&&t.onClick(n),e.shortcutClose&&f()},changeYear:function(t){"year"===e.selectionMode||"year-table"===c.pickerTable?c.panelDate=new Date(c.panelDate.getFullYear()+10*t,0,1):c.panelDate=J(c.panelDate,12*t)},changeMonth:function(e){c.panelDate=J(c.panelDate,e)},reset:function(){c.currentView=e.selectionMode,c.pickerTable=i(c.currentView)},isTime:b,hasShortcuts:k,onToggleVisibility:function(e){var t,n;e&&(null===(t=null==p?void 0:p.value)||void 0===t||t.updateScroll(),null===(n=null==h?void 0:h.value)||void 0===n||n.updateScroll())},handleToggleTime:function(){c.currentView="time"===c.currentView?"date":"time"},handlePickSuccess:f,handlePickClear:function(){u(),r("pick-clear")}})},render:function(){var e,t,n,a=this;return(0,l.createVNode)("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:function(e){e.preventDefault()}},[this.shortcuts.length?(0,l.createVNode)("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map((function(e){return(0,l.createVNode)("div",{class:"bk-picker-panel-shortcut",onClick:function(){return a.handleShortcutClick(e)}},[e.text])}))]):"",(0,l.createVNode)("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[(0,l.withDirectives)((0,l.createVNode)("div",{class:"bk-date-picker-header"},[(0,l.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.changeYear(-1)}},[(0,l.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.pickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("prev"),onClick:function(){return a.changeMonth(-1)}},[(0,l.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?(0,l.createVNode)("span",null,[(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.datePanelLabel.labels[0].handler}},[this.datePanelLabel.labels[0].label]),[[l.vShow,this.showLabelFirst]]),"date"===this.currentView?" ".concat(this.datePanelLabel.separator," "):" ",(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.datePanelLabel.labels[1].handler}},[this.datePanelLabel.labels[1].label]),[[l.vShow,this.showLabelSecond]])]):"",(0,l.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.changeYear(1)}},[(0,l.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.pickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("next"),onClick:function(){return a.changeMonth(1)}},[(0,l.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):""]),[[l.vShow,"time"!==this.currentView]]),(0,l.createVNode)("div",{class:"bk-picker-panel-content"},["time"!==this.currentView?"date-table"===a.pickerTable?(0,l.createVNode)(Q,{tableDate:a.panelDate,disableDate:a.disableDate,selectionMode:a.selectionMode,modelValue:a.dates,focusedDate:a.focusedDate,onPick:a.panelPickerHandlers},null):null:""]),this.confirm?(0,l.createVNode)(h,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?(0,l.createVNode)("div",{class:"bk-picker-panel-sidebar"},[null!==(n=null===(t=(e=this.$slots).shortcuts)||void 0===t?void 0:t.call(e))&&void 0!==n?n:null]):null])}});var te={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator:function(e){return!(["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0&&(console.error("type property is not valid: '".concat(e,"'")),1))}},shortcuts:{type:Array,default:function(){return[]}},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator:function(e){return!(["year","month","date","time"].indexOf(e)<0&&(console.error("selectionMode property is not valid: '".concat(e,"'")),1))}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};const ne=(0,l.defineComponent)({props:te,emits:["pick"],setup:function(e,t){var n=t.slots,r=t.emit,i=e.modelValue.map((function(e){return e||function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e}()})),o=a(i,2),c=o[0],u=o[1],s=e.startDate?e.startDate:c,d=(0,l.reactive)({currentView:e.selectionMode||"date",leftPickerTable:"".concat(e.selectionMode,"-table"),rightPickerTable:"".concat(e.selectionMode,"-table"),leftPanelDate:s,rightPanelDate:new Date(s.getFullYear(),s.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:c&&!u},upToNowEnable:!1,dates:e.modelValue}),f=function(e,t){return e&&t?e.getTime()-t.getTime():0},p=(0,l.ref)(null),h=(0,l.ref)(null),m=function t(n,a,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=new Date(d["".concat(n,"PanelDate")]);if(l["set".concat(a)](l["get".concat(a)]()+r),d["".concat(n,"PanelDate")]=l,i)if(e.splitPanels){var o="left"===n?"right":"left";"left"===n&&d.leftPanelDate>=d.rightPanelDate&&t(o,a,1),"right"===n&&d.rightPanelDate<=d.leftPanelDate&&t(o,a,-1)}else{var c="left"===n?"right":"left",u=d["".concat(c,"PanelDate")],s=new Date(u);if("Month"===a){var f=new Date(s.getFullYear(),s.getMonth()+r+1,0).getDate();s.setDate(Math.min(f,s.getDate()))}s["set".concat(a)](s["get".concat(a)]()+r),d["".concat(c,"PanelDate")]=s}},y=function(e){d["".concat(e,"PickerTable")]="year-table"},v=function(e){d["".concat(e,"PickerTable")]="month-table"},g=function(e){var t=d["".concat(e,"PanelDate")],n=Z("zh-CN","[yyyy]-[mm]",t),a=n.labels;return{separator:n.separator,labels:a.map((function(t){var n,a,r=t;return r.handler=(n=t.type,a="month"===n?v:y,function(){return a(e)}),r}))}},b=function(t,n){if(console.warn("handleRangePick"),d.rangeState.selecting||"time"===d.currentView){if("time"===d.currentView)d.dates=t;else{var i=a([d.rangeState.from,t].sort(f),2),l=i[0],o=i[1],c="upToNow"===n?new Date:new Date(new Date(new Date(o.setHours(23)).setMinutes(59)).setSeconds(59));d.dates=[l,c],d.rangeState={from:l,to:c,selecting:!1}}!function(t,n){r("pick",d.dates,!1,n||e.type)}(0,n||"date")}else d.upToNowEnable=new Date(t).getTime()<(new Date).getTime(),d.rangeState={from:t,to:null,selecting:!0}},k=function(t,n){d["".concat(t,"PanelDate")]=n;var a=d["".concat(t,"PickerTable")];if(d["".concat(t,"PickerTable")]="year-table"===a?"month-table":"".concat(d.currentView,"-table"),!e.splitPanels){var r="left"===t?"right":"left";d["".concat(r,"PanelDate")]=n,m(r,"Month","left"===r?-1:1,!1)}};(0,l.watch)((function(){return e.selectionMode}),(function(e){d.currentView=e||"range"}));var D=(0,l.computed)((function(){return"time"===d.currentView})),w=(0,l.computed)((function(){return g("left")})),S=(0,l.computed)((function(){return g("right")})),V=(0,l.computed)((function(){return d.leftPickerTable.split("-").shift()})),M=(0,l.computed)((function(){return d.rightPickerTable.split("-").shift()})),P=(0,l.computed)((function(){return"year"===w.value.labels[0].type||"date"===d.currentView})),N=(0,l.computed)((function(){return"year"===w.value.labels[1].type||"date"===d.currentView})),C=(0,l.computed)((function(){return"year"===S.value.labels[0].type||"date"===d.currentView})),T=(0,l.computed)((function(){return"year"===S.value.labels[1].type||"date"===d.currentView})),x=(0,l.computed)((function(){var e="".concat(d.currentView,"-table");return{left:d.leftPickerTable!==e,right:d.rightPickerTable!==e}})),F=(0,l.computed)((function(){return{left:x.value.left?k.bind("left"):b,right:x.value.right?k.bind("right"):b}})),O=(0,l.computed)((function(){return!!n.shortcuts}));return Object.assign(Object.assign({},(0,l.toRefs)(d)),{isTime:D,hasShortcuts:O,prevYear:function(e){var t="year"===d.currentView?-10:-1;m(e,"FullYear",t)},nextYear:function(e){var t="year"===d.currentView?10:1;m(e,"FullYear",t)},prevMonth:function(e){m(e,"Month",-1)},nextMonth:function(e){m(e,"Month",1)},leftDatePanelLabel:w,rightDatePanelLabel:S,leftDatePanelView:V,rightDatePanelView:M,leftShowLabelFirst:P,leftShowLabelSecond:N,rightShowLabelFirst:C,rightShowLabelSecond:T,preSelecting:x,panelPickerHandlers:F,reset:function(){d.currentView=e.selectionMode,d.leftPickerTable="".concat(d.currentView,"-table"),d.rightPickerTable="".concat(d.currentView,"-table")},onToggleVisibility:function(e){var t,n;e&&(null===(t=null==p?void 0:p.value)||void 0===t||t.updateScroll(),null===(n=null==h?void 0:h.value)||void 0===n||n.updateScroll())},handleRangePick:b,handleChangeRange:function(e){d.rangeState.to=e}})},render:function(){var e,t,n,a=this;return(0,l.createVNode)("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:function(e){e.preventDefault()}},[(0,l.createVNode)("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[(0,l.withDirectives)((0,l.createVNode)("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[(0,l.withDirectives)((0,l.createVNode)("div",{class:"bk-date-picker-header"},[(0,l.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevYear("left")}},[(0,l.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.leftPickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("prev"),onClick:function(){return a.prevMonth("left")}},[(0,l.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?(0,l.createVNode)("span",null,[(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.leftDatePanelLabel.labels[0].handler}},[this.leftDatePanelLabel.labels[0].label]),[[l.vShow,this.leftShowLabelFirst]]),"date"===this.leftDatePanelView?" ".concat(this.leftDatePanelLabel.separator," "):" ",(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.leftDatePanelLabel.labels[1].handler}},[this.leftDatePanelLabel.labels[1].label]),[[l.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||"date-table"!==this.leftPickerTable?(0,l.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.nextYear("left")}},[(0,l.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||"date-table"===this.leftPickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("next"),onClick:function(){return a.nextMonth("left")}},[(0,l.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):""]),[[l.vShow,"time"!==this.currentView]]),"time"!==this.currentView?"date-table"===a.leftPickerTable?(0,l.createVNode)(Q,{selectionMode:"range",tableDate:a.leftPanelDate,disableDate:a.disableDate,rangeState:a.rangeState,modelValue:a.preSelecting.left?[a.dates[0]]:a.dates,focusedDate:a.focusedDate,onChangeRange:a.handleChangeRange,onPick:a.panelPickerHandlers.left},null):null:""]),[[l.vShow,!this.isTime]]),(0,l.withDirectives)((0,l.createVNode)("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[(0,l.withDirectives)((0,l.createVNode)("div",{class:"bk-date-picker-header"},[this.splitPanels||"date-table"!==this.rightPickerTable?(0,l.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevYear("right")}},[(0,l.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&"date-table"===this.rightPickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevMonth("right")}},[(0,l.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?(0,l.createVNode)("span",null,[(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.rightDatePanelLabel.labels[0].handler}},[this.rightDatePanelLabel.labels[0].label]),[[l.vShow,this.rightShowLabelFirst]]),"date"===this.rightDatePanelView?" ".concat(this.rightDatePanelLabel.separator," "):" ",(0,l.withDirectives)((0,l.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.rightDatePanelLabel.labels[1].handler}},[this.rightDatePanelLabel.labels[1].label]),[[l.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(a.rangeState.selecting||"time"===a.currentView)&&a.upToNowEnable?(0,l.createVNode)("span",{class:"up-to-now",onClick:function(){return a.handleRangePick(new Date,"upToNow")}},[(0,l.createTextVNode)("至今")]):(0,l.createVNode)("span",{class:"up-to-now disabled"},[(0,l.createTextVNode)("至今")]):"",(0,l.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.nextYear("right")}},[(0,l.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.rightPickerTable?(0,l.withDirectives)((0,l.createVNode)("span",{class:U("next"),onClick:function(){return a.nextMonth("right")}},[(0,l.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[l.vShow,"date"===this.currentView]]):""]),[[l.vShow,"time"!==this.currentView]]),"time"!==this.currentView?"date-table"===a.rightPickerTable?(0,l.createVNode)(Q,{selectionMode:"range",tableDate:a.rightPanelDate,disableDate:a.disableDate,rangeState:a.rangeState,modelValue:a.preSelecting.right?[a.dates[a.dates.length-1]]:a.dates,focusedDate:a.focusedDate,onChangeRange:a.handleChangeRange,onPick:a.panelPickerHandlers.right},null):null:""]),[[l.vShow,!this.isTime]])]),this.hasShortcuts?(0,l.createVNode)("div",{class:"bk-picker-panel-sidebar"},[null!==(n=null===(t=(e=this.$slots).shortcuts)||void 0===t?void 0:t.call(e))&&void 0!==n?n:null]):null])}});var ae={type:{type:String,default:"date",validator:function(e){return!(["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0&&(console.error("type property is not valid: '".concat(e,"'")),1))}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:function(){return{}}},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:function(){return[]}},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:function(){return{}}},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator:function(e){return["simplicity","normal"].indexOf(e)>-1}},disableDate:Function};const re=(0,l.defineComponent)({name:"DatePicker",directives:{clickoutside:o.clickoutside},props:ae,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup:function(e,t){var n=t.slots,o=t.emit,c=e.type.includes("range"),u=c?[null,null]:[null],s=((c?e.modelValue:[e.modelValue])||[]).every((function(e){return!e||"string"==typeof e&&""===e.trim()}))?u:Y(e.modelValue,e.type,e.multiple,e.format),d=null;-1!==e.shortcutSelectedIndex&&(d=e.shortcuts[e.shortcutSelectedIndex]||null)&&(s=d.value());var f=(0,l.reactive)({showClose:!1,visible:!1,internalValue:s,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:s[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:s.map(z),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:p});function p(e){var t=e;return e.match(/^date/)&&(t="date"),f.selectionMode=["year","month","date","time"].indexOf(t)>-1&&t,f.selectionMode}var h=(0,l.computed)((function(){if(e.multiple)return f.internalValue.slice();var t=e.type.includes("range"),n=f.internalValue.map((function(e){return e instanceof Date?new Date(e):e||""}));return e.type.match(/^time/)&&(n=n.map((function(t){return q(t,e.type,e.multiple,e.format)}))),t||e.multiple?n:n[0]})),m=(0,l.computed)((function(){return e.type.match(/^time/)?h.value:e.multiple?q(h.value,e.type,e.multiple,e.format):Array.isArray(h.value)?h.value.map((function(t){return q(t,e.type,e.multiple,e.format)})):q(h.value,e.type,e.multiple,e.format)})),y=(0,l.computed)((function(){return"daterange"===e.type||"datetimerange"===e.type?"DateRangePanel":"DatePanel"})),v=(0,l.computed)((function(){return null===e.open?f.visible:e.open})),g=(0,l.computed)((function(){return q(f.internalValue,e.type,e.multiple,e.format)})),b=(0,l.computed)((function(){var t;return(null===(t=f.shortcut)||void 0===t?void 0:t.text)&&e.useShortcutText?f.shortcut.text:g.value})),k=(0,l.computed)((function(){return!!n.trigger||"datetime"===e.type||"datetimerange"===e.type||e.multiple})),D=(0,l.computed)((function(){return!!n.header})),w=(0,l.computed)((function(){return!!n.footer})),S=(0,l.computed)((function(){return!!n.shortcuts})),V=(0,l.computed)((function(){var t="";return"medium"===e.fontSize?t="medium-font":"large"===e.fontSize&&(t="large-font"),t})),M=(0,l.computed)((function(){var t="";return"medium"===e.fontSize?t="medium-width":"large"===e.fontSize&&(t="large-width"),t})),P=(0,l.computed)((function(){var t;return!(!(null===(t=f.shortcut)||void 0===t?void 0:t.text)||!e.useShortcutText)||!e.editable||e.readonly})),N=(0,l.computed)((function(){return"RangeTimePickerPanel"===y.value&&e.allowCrossDay})),C=(0,l.ref)(null);(0,l.watch)((function(){return f.visible}),(function(e){var t,n;!1===e&&(null===(t=T.value)||void 0===t||t.destoryDropdown()),null===(n=T.value)||void 0===n||n.updateDropdown(),o("open-change",e)}));var T=(0,l.ref)(null);(0,l.watch)((function(){return e.modelValue}),(function(t){f.internalValue=Y(t,e.type,e.multiple,e.format)})),(0,l.watch)((function(){return e.open}),(function(e){f.visible=!0===e})),(0,l.watch)((function(){return e.type}),(function(e){p(e)})),(0,l.watch)((function(){return h}),(function(e,t){(JSON.stringify(e)!==JSON.stringify(t)||i(e)!==i(t))&&o("input",e)})),(0,l.onMounted)((function(){e.type.indexOf("date"),f.timeEnterMode=!0;var t=e.modelValue,n=h.value;i(t)===i(n)&&JSON.stringify(t)===JSON.stringify(n)||o("input",h.value),null!==e.open&&(f.visible=e.open),(0,l.provide)(E,{props:e,focus:function(){var e;null===(e=null==C?void 0:C.value)||void 0===e||e.focus()}})}));var x=(0,l.ref)(null),F=function(e){var t;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(e&&"mousedown"===e.type&&f.visible)return e.preventDefault(),void e.stopPropagation();if(f.visible){var n=null===(t=null==x?void 0:x.value)||void 0===t?void 0:t.$el;if(e&&n&&n.contains(e.target))return;return f.visible=!1,null==e||e.preventDefault(),void(null==e||e.stopPropagation())}f.isFocused=!1,f.disableClickOutSide=!1},O=function(t){(0,l.nextTick)((function(){var n;o("change",m.value,t),o("update:modelValue",h.value),e.type.indexOf("time")<0&&(null===(n=null==C?void 0:C.value)||void 0===n||n.blur())}))},H=function(){var e;null===(e=null==x?void 0:x.value)||void 0===e||e.reset()},L=function(){var e;f.visible=!1,console.error("onPickSuccess"),(0,l.nextTick)((function(){o("pick-success")})),null===(e=null==C?void 0:C.value)||void 0===e||e.blur(),H()},A=(0,l.ref)(null);return Object.assign(Object.assign({},(0,l.toRefs)(f)),{panel:y,publicStringValue:m,opened:v,visualValue:g,displayValue:b,isConfirm:k,hasHeader:D,hasFooter:w,hasShortcuts:S,fontSizeCls:V,longWidthCls:M,localReadonly:P,allowCrossDayProp:N,pickerDropdownRef:T,inputRef:C,triggerRef:A,pickerPanelRef:x,handleClose:F,handleIconClick:function(){var e,t;null===(e=null==C?void 0:C.value)||void 0===e||e.focus(),null===(t=null==C?void 0:C.value)||void 0===t||t.click()},handleInputMouseenter:function(){e.readonly||e.disabled||(null==g?void 0:g.value)&&(f.showClose=!0)},handleInputMouseleave:function(e){var t;(null===(t=e.toElement)||void 0===t?void 0:t.classList.contains("clear-action"))||(f.showClose=!1)},handleFocus:function(t){e.readonly||(f.isFocused=!0,t&&"focus"===t.type||e.disabled||(f.visible=!0))},handleBlur:function(t){var n;f.internalFocus?f.internalFocus=!1:f.visible?t.preventDefault():(f.isFocused=!1,p(e.type),f.internalValue=f.internalValue.slice(),H(),null===(n=null==x?void 0:x.value)||void 0===n||n.onToggleVisibility(!1))},handleKeydown:function(e){var t=e.keyCode;if(9===t&&f.visible)if(e.stopPropagation(),e.preventDefault(),k.value){var n=T.value.$el.querySelectorAll(".bk-picker-confirm > *");f.internalFocus=!0,r(n)[e.shiftKey?"pop":"shift"]().focus()}else F();var a=[37,38,39,40];f.visible||!a.includes(t)?(27===t&&f.visible&&(e.stopPropagation(),F()),a.includes(t)&&f.focusedTime.active&&e.preventDefault()):f.visible=!0},handleInputChange:function(t){var n,a=e.type.includes("range")||e.multiple,r=g.value,i=t.target.value,l=Y(i,e.type,e.multiple,e.format),o=a?l:l[0],c=null===(n=e.disableDate)||void 0===n?void 0:n.call(e,o),u=l.reduce((function(e,t){return e&&t instanceof Date}),!0);i!==r&&!c&&u?(O(e.type),f.internalValue=l):f.forceInputRerender=f.forceInputRerender+1},handleClear:function(){f.visible=!1,f.internalValue=f.internalValue.map((function(){return null})),o("clear"),O(e.type),H(),f.showClose=!1,f.shortcut=null,setTimeout((function(){return p(e.type)}),500)},handleTransferClick:function(){e.appendToBody&&(f.disableCloseUnderTransfer=!0)},onPick:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0,c=t;if(e.multiple){var u=c.getTime(),s=f.internalValue.findIndex((function(e){return e&&e.getTime()===u})),d=[].concat(r(f.internalValue),[c]).filter(Boolean),h=d.map((function(e){return e.getTime()})).filter((function(e,t,n){return n.indexOf(e)===t&&t!==s}));f.internalValue=h.map((function(e){return new Date(e)}))}else c=Y(t,e.type,e.multiple,e.format),f.internalValue=Array.isArray(c)?c:[c];if(f.internalValue[0]){var m=a(f.internalValue,1),y=m[0];f.focusedDate=y}f.focusedTime=Object.assign(Object.assign({},f.focusedTime),{time:f.internalValue.map(z)}),k.value||(p(e.type),f.visible=n),"upToNow"===i&&"daterange"===e.type&&L(),f.shortcut=l,O(i);var v=e.shortcuts.findIndex((function(e){return e===f.shortcut}));o("shortcut-change",f.shortcut,v)},onPickSuccess:L})},render:function(){var e,t,n,a,r,i,o,c,u,s=this,f=(0,l.createVNode)("div",null,[(0,l.createVNode)("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},["time"===this.type||"timerange"===this.type?(0,l.createVNode)("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[(0,l.createVNode)("g",{id:"time"},[(0,l.createVNode)("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),(0,l.createVNode)("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):(0,l.createVNode)("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[(0,l.createVNode)("g",{id:"date"},[(0,l.createVNode)("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),(0,l.createVNode)("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),(0,l.createVNode)("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),(0,l.createVNode)("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),(0,l.createVNode)("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),(0,l.createVNode)("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,"simplicity"===this.behavior?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?(0,l.createVNode)("i",{class:"bk-icon icon-close-circle-shape clear-action",onClick:this.handleClear},null):""]),p=this.hasShortcuts?{shortcuts:function(){var e,t;return(null===(t=(e=s.$slots).shortcuts)||void 0===t?void 0:t.call(e))||null}}:{};return(0,l.withDirectives)((0,l.createVNode)("div",{class:["bk-date-picker","datetimerange"===this.type?"long":"",this.longWidthCls]},[(0,l.createVNode)("div",{ref:"triggerRef",class:"bk-date-picker-rel"},[null!==(n=null===(t=(e=this.$slots).trigger)||void 0===t?void 0:t.call(e))&&void 0!==n?n:f]),(0,l.createVNode)(l.Teleport,{to:"body",disabled:!this.appendToBody},{default:function(){return[(0,l.createVNode)(l.Transition,{name:"bk-fade-down-transition"},{default:function(){return[(0,l.withDirectives)((0,l.createVNode)(d,{class:[s.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:s.triggerRef,placement:s.placement,extPopoverCls:s.extPopoverCls,appendToBody:s.appendToBody,onClick:s.handleTransferClick},{default:function(){return[s.hasHeader?(0,l.createVNode)("div",{class:["bk-date-picker-top-wrapper",s.headerSlotCls]},[null!==(i=null===(r=(a=s.$slots).header)||void 0===r?void 0:r.call(a))&&void 0!==i?i:null]):null,"DateRangePanel"===s.panel?(0,l.createVNode)(ne,{ref:"pickerPanelRef",type:s.type,confirm:s.isConfirm,shortcuts:s.shortcuts,modelValue:s.internalValue,selectionMode:s.selectionMode,startDate:s.startDate,disableDate:s.disableDate,focusedDate:s.focusedDate,onPick:s.onPick,"onPick-success":s.onPickSuccess},p):(0,l.createVNode)(ee,{ref:"pickerPanelRef",clearable:s.clearable,showTime:"datetime"===s.type||"datetimerange"===s.type,confirm:s.isConfirm,shortcuts:s.shortcuts,multiple:s.multiple,shortcutClose:s.shortcutClose,selectionMode:s.selectionMode,modelValue:s.internalValue,startDate:s.startDate,disableDate:s.disableDate,focusedDate:s.focusedDate,onPick:s.onPick,"onPick-clear":s.handleClear,"onPick-success":s.onPickSuccess},p),s.hasFooter?(0,l.createVNode)("div",{class:["bk-date-picker-footer-wrapper",s.footerSlotCls]},[null!==(u=null===(c=(o=s.$slots).footer)||void 0===c?void 0:c.call(o))&&void 0!==u?u:null]):null]}}),[[l.vShow,s.opened]])]}})]}})]),[[(0,l.resolveDirective)("clickoutside"),this.handleClose]])}}),ie=(0,e.withInstall)(re)})(),u})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("js-calendar"),require("date-fns"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../directives","../icon","js-calendar","date-fns"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../directives"),require("../icon"),require("js-calendar"),require("date-fns")):t(e["../shared"],e.vue,e["../directives"],e["../icon"],e["js-calendar"],e["date-fns"]);for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,((e,t,n,a,r,l)=>(()=>{"use strict";var i={4061:e=>{e.exports=n},6870:e=>{e.exports=a},4212:t=>{t.exports=e},7876:e=>{e.exports=l},7926:e=>{e.exports=r},748:e=>{e.exports=t}},o={};function c(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,c),n.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{default:()=>le});var e=c(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,l=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(l.push(a.value),!t||l.length!==t);i=!0);}catch(e){o=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(o)throw r}}return l}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(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 l(e){return l="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},l(e)}var i=c(748),o=c(4061),s={placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};const d=(0,i.defineComponent)({props:s,emits:["changeVisible"],setup:function(t,n){var a=n.emit,r=Object.create(null),l=(0,i.ref)(null);(0,i.onMounted)((function(){c()})),(0,i.onBeforeUnmount)((function(){o()}));var o=function(){if(r&&0!==Object.keys(r).length){var e=r;e.isShow&&e.hide(),e.destroy(),r=null,a("changeVisible",!1)}},c=function(){r&&0!==Object.keys(r).length?(0,i.nextTick)((function(){r.update()})):(0,i.nextTick)((function(){r=new e.BKPopover(t.triggerRef,l.value,{placement:t.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})}))},u=(0,i.computed)((function(){var n={};return t.appendToBody&&(n["z-index"]=1060+e.bkZIndexManager.getModalNextIndex()),n})),s=(0,i.reactive)({styles:u});return Object.assign(Object.assign({},(0,i.toRefs)(s)),{refContentRef:l,updateDropdown:c,destoryDropdown:o})},render:function(){var e,t,n;return(0,i.createVNode)("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[null!==(n=null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))&&void 0!==n?n:""])}});var f=c(6870),p={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};const h=(0,i.defineComponent)({props:p,emits:["pick-clear","pick-success","pick-toggle-time"],setup:function(e,t){var n=t.emit,a=(0,i.computed)((function(){return{time:e.isTime?"选择日期":"选择时间",clear:"清除",ok:"确定"}})),l=(0,i.ref)(null);return{labels:a,handleClear:function(){n("pick-clear")},handleSuccess:function(){n("pick-success")},handleToggleTime:function(){e.timeDisabled||n("pick-toggle-time")},handleTab:function(e){var t=r(l.value.children)[e.shiftKey?"shift":"pop"]();document.activeElement===t&&(e.preventDefault(),e.stopPropagation())}}},render:function(){return(0,i.createVNode)("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?(0,i.createVNode)("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[this.labels.time]):"",this.clearable?(0,i.createVNode)("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",(0,i.createVNode)("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])}});function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=c(7926),v=c.n(y),g=c(7876),b={},k=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,D=/\d\d?/,w=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,S=function(){};function V(e,t){for(var n=[],a=0,r=e.length;a<r;a++)n.push(e[a].substr(0,t));return n}function M(e){return function(t,n,a){var r=a[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~r&&(t.month=r)}}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=String(e);n.length<t;)n="0".concat(n);return n}var N=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],C=["January","February","March","April","May","June","July","August","September","October","November","December"],T=V(C,3),x=V(N,3);b.i18n={dayNamesShort:x,dayNames:N,monthNamesShort:T,monthNames:C,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10)*e%10]}};var F={D:function(e){return e.getDay()},DD:function(e){return P(e.getDay())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return e.getDate()},dd:function(e){return P(e.getDate())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return e.getMonth()+1},MM:function(e){return P(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},yy:function(e){return String(e.getFullYear()).substr(2)},yyyy:function(e){return e.getFullYear()},h:function(e){return e.getHours()%12||12},hh:function(e){return P(e.getHours()%12||12)},H:function(e){return e.getHours()},HH:function(e){return P(e.getHours())},m:function(e){return e.getMinutes()},mm:function(e){return P(e.getMinutes())},s:function(e){return e.getSeconds()},ss:function(e){return P(e.getSeconds())},S:function(e){return Math.round(e.getMilliseconds()/100)},SS:function(e){return P(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return P(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+P(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)}},O={d:[D,function(e,t){e.day=t}],M:[D,function(e,t){e.month=t-1}],yy:[D,function(e,t){var n=new Date,a=+"".concat(n.getFullYear()).substr(0,2);e.year="".concat(t>68?a-1:a).concat(t)}],h:[D,function(e,t){e.hour=t}],m:[D,function(e,t){e.minute=t}],s:[D,function(e,t){e.second=t}],yyyy:[/\d{4}/,function(e,t){e.year=t}],S:[/\d/,function(e,t){e.millisecond=100*t}],SS:[/\d{2}/,function(e,t){e.millisecond=10*t}],SSS:[/\d{3}/,function(e,t){e.millisecond=t}],D:[D,S],ddd:[w,S],MMM:[w,M("monthNamesShort")],MMMM:[w,M("monthNames")],a:[w,function(e,t,n){var a=t.toLowerCase();a===n.amPm[0]?e.isPm=!1:a===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,function(e,t){var n,a="".concat(t).match(/([\\+\\-]|\d\d)/gi);a&&(n=60*a[1]+parseInt(a[2],10),e.timezoneOffset="+"===a[0]?n:-n)}]};O.DD=O.D,O.dddd=O.ddd,O.Do=O.dd=O.d,O.mm=O.m,O.hh=O.H=O.HH=O.h,O.MM=O.M,O.ss=O.s,O.A=O.a,b.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},b.format=function(e,t,n){var a=n||b.i18n;if("number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return(t=b.masks[t]||t||b.masks.default).replace(k,(function(t){return t in F?F[t](e,a):t.slice(1,t.length-1)}))},b.parse=function(e,t,n){var a=n||b.i18n;if("string"!=typeof t)throw new Error("Invalid format in fecha.parse");if(t=b.masks[t]||t,e.length>1e3)return!1;var r=!0,l={};if(t.replace(k,(function(t){if(O[t]){var n=O[t],i=e.search(n[0]);~i?e.replace(n[0],(function(t){return n[1](l,t,a),e=e.substr(i+t.length),t})):r=!1}return O[t]?"":t.slice(1,t.length-1)})),!r)return!1;var i,o=new Date;return!0===l.isPm&&null!==l.hour&&12!=+l.hour?l.hour=+l.hour+12:!1===l.isPm&&12==+l.hour&&(l.hour=0),null!==l.timezoneOffset&&void 0!==l.timezoneOffset?(l.minute=+(l.minute||0)-+l.timezoneOffset,i=new Date(Date.UTC(l.year||o.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0))):i=new Date(l.year||o.getFullYear(),l.month||0,l.day||1,l.hour||0,l.minute||0,l.second||0,l.millisecond||0),i};const H=b;var L=" - ",A=function(e,t){var n=(0,g.toDate)(new Date(e));return!n||isNaN(n.getTime())?"":(0,g.format)(n,t||"yyyy-MM-dd")},j=function(e,t){if(Array.isArray(e)&&2===e.length){var n=e[0],a=e[1];if(n&&a)return A(n,t)+L+A(a,t)}else if(!Array.isArray(e)&&e instanceof Date)return A(e,t);return""},B=function(e,t){var n=Array.isArray(e)?e:e.split(L);if(2===n.length){var a=n[0],r=n[1];return[a instanceof Date?a:H.parse(a,t||"yyyy-MM-dd"),r instanceof Date?r:H.parse(r,t||"yyyy-MM-dd")]}return[]},R={default:{formatter:function(e){return e?"".concat(e):""},parser:function(e){return void 0===e||""===e?null:e}},date:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},datetime:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},daterange:{formatter:j,parser:B},datetimerange:{formatter:j,parser:B},timerange:{formatter:j,parser:B},time:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},month:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},year:{formatter:function(e,t){return A(e,t)},parser:function(e,t){return H.parse(e,t||"yyyy-MM-dd")}},multiple:{formatter:function(e,t){return e.filter(Boolean).map((function(e){return A(e,t)})).join(",")},parser:function(e,t){return("string"==typeof e?e.split(","):e).map((function(e){if(e instanceof Date)return e;var n=e;return"string"==typeof e?n=e.trim():"number"==typeof e||e||(n=""),H.parse(n,t||"yyyy-MM-dd")}))}},number:{formatter:function(e){return e?"".concat(e):""},parser:function(e){var t=Number(e);return isNaN(e)?null:t}}},z=function(e){return e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0]},I={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Y=function(e,t,n,r){var l=t.includes("range"),i=(R[t]||R.default).parser,o=r||I[t],c=R.multiple.parser,u=e;if(!e||"time"!==t||e instanceof Date)if(n&&e)u=c(e,o);else if(l)if(e)if("string"==typeof e)u=i(e,o);else if("timerange"===t)u=i(e,o).map((function(e){return e||""}));else{var s=a(e,2),d=s[0],f=s[1];d instanceof Date&&f instanceof Date?u=e.map((function(e){return new Date(e)})):"string"==typeof d&&"string"==typeof f?u=i(e.join(L),o):d&&f||(u=[null,null])}else u=[null,null];else"string"==typeof e&&0!==t.indexOf("time")&&(u=i(e,o)||null);else u=i(e,o);return l||n?u||[]:[u]},q=function(e,t,n,a){var r=I[t];return n?(0,R.multiple.formatter)(e,a||r):(0,(R[t]||R.default).formatter)(e,a||r)},E=Symbol("date-picker");function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return["bk-picker-panel-icon-btn","bk-date-picker-".concat(e,"-btn"),"bk-date-picker-".concat(e,"-btn-arrow").concat(t)]}var $,K,J=function(e,t){var n,a=new Date(e),r=a.getMonth()+t,l=(n=a.getFullYear(),new Date(n,r+1,0).getDate());return l<a.getDate()&&a.setDate(l),a.setMonth(r),a},Z=($={yyyy:function(e){return e.getFullYear()},m:function(e){return e.getMonth()+1},mm:function(e){return"0".concat(e.getMonth()+1).slice(-2)},mmm:function(e,t){return e.toLocaleDateString(t,{month:"long"}).slice(0,3)},Mmm:function(e,t){var n=e.toLocaleDateString(t,{month:"long"});return(n[0].toUpperCase()+n.slice(1).toLowerCase()).slice(0,3)},mmmm:function(e,t){return e.toLocaleDateString(t,{month:"long"})},Mmmm:function(e,t){var n=e.toLocaleDateString(t,{month:"long"});return n[0].toUpperCase()+n.slice(1).toLowerCase()}},K=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g"),function(e,t,n){var a=t.match(/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/).slice(1);return{separator:a[1],labels:[a[0],a[2]].map((function(t){return{label:t.replace(/\[[^\]]+\]/,(function(t){return t.slice(1,-1).replace(K,(function(t){return $[t](n,e)}))})),type:-1!==t.indexOf("yy")?"year":"month"}}))}}),_=function(e){var t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},W=function(e,t,n){if(!t||!n)return!1;var r=a([t,n].sort(),2),l=r[0],i=r[1];return e>=l&&e<=i},G={tableDate:{type:Date,required:!0},disableDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:function(){return{from:null,to:null,selecting:!1}}},focusedDate:{type:Date,required:!0}};const Q=(0,i.defineComponent)({props:G,emits:["pick","pick-click","changeRange"],setup:function(e,t){var n=t.emit,r=(0,i.computed)((function(){return new(v().Generator)({onlyDays:!0,weekStart:0})})),l=(0,i.computed)((function(){var e=["日","一","二","三","四","五","六"];return e.splice(0,7).concat(e.splice(0,0))})),o=(0,i.computed)((function(){return"range"===e.selectionMode&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue}));return{headerDays:l,cells:(0,i.computed)((function(){var t=e.tableDate.getFullYear(),n=e.tableDate.getMonth(),l=_(new Date),i=o.value.filter(Boolean).map(_),c=a(o.value.map(_),2),u=c[0],s=c[1],d=e.rangeState.from&&_(e.rangeState.from),f=e.rangeState.to&&_(e.rangeState.to),p="range"===e.selectionMode,h="function"==typeof e.disableDate&&e.disableDate;return r.value(t,n,(function(e){e.date instanceof Date&&e.date.setTime(e.date.getTime()+6e4*e.date.getTimezoneOffset());var t=e.date&&_(e.date),a=e.date&&n===e.date.getMonth();return Object.assign(Object.assign({},e),{type:t===l?"today":e.type,selected:a&&i.includes(t),disabled:e.date&&h&&h(new Date(t)),range:a&&p&&W(t,d,f),start:a&&p&&t===u,end:a&&p&&t===s})})).cells.slice(0)})),getCellCls:function(e){var t;return["bk-date-picker-cells-cell",(t={},m(t,"bk-date-picker-cells-cell-selected",e.selected||e.start||e.end),m(t,"bk-date-picker-cells-cell-disabled",e.disabled),m(t,"bk-date-picker-cells-cell-today","today"===e.type),m(t,"bk-date-picker-cells-cell-prev-month","prevMonth"===e.type),m(t,"bk-date-picker-cells-cell-next-month","nextMonth"===e.type),m(t,"bk-date-picker-cells-cell-week-label","weekLabel"===e.type),m(t,"bk-date-picker-cells-cell-range",e.range&&!e.start&&!e.end),t)]},handleClick:function(e){if(!e.disabled&&"weekLabel"!==e.type){var t=new Date(_(e.date));n("pick",t),n("pick-click")}},handleMouseMove:function(t){if(e.rangeState.selecting&&!t.disabled){var a=t.date;n("changeRange",a)}}}},render:function(){var e=this;return(0,i.createVNode)("div",{class:"bk-date-picker-cells"},[(0,i.createVNode)("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map((function(e){return(0,i.createVNode)("span",null,[e])}))]),this.cells.map((function(t){return(0,i.createVNode)("span",{class:e.getCellCls(t),onClick:function(){return e.handleClick(t)},onMouseenter:function(){return e.handleMouseMove(t)}},[(0,i.createVNode)("em",null,[t.desc])])}))])}});var X={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:function(){return[]}},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator:function(e){return!(["year","month","date","time"].indexOf(e)<0&&(console.error("selectionMode property is not valid: '".concat(e,"'")),1))}},startDate:{type:Date},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};const ee=(0,i.defineComponent)({props:X,emits:["pick","pick-success","pick-clear"],setup:function(e,t){var n=this,a=t.slots,r=t.emit,l=function(e){return e.match(/^time/)?"time-picker":"".concat(e,"-table")},o=e.modelValue.slice().sort(),c=(0,i.reactive)({currentView:e.selectionMode||"date",pickerTable:l(e.selectionMode),dates:o,panelDate:e.startDate||o[0]||new Date}),u=function(){setTimeout((function(){c.currentView=e.selectionMode}),500)},s=function(e){c.panelDate=e,"year-table"===c.pickerTable?c.pickerTable="month-table":c.pickerTable=l(c.currentView)},d=function(t,n){var a;a="year"===e.selectionMode?new Date(t.getFullYear(),0,1):"month"===e.selectionMode?new Date(c.panelDate.getFullYear(),t.getMonth(),1):new Date(t),c.dates=[a],r("pick",a,!1,n||e.selectionMode)},f=function(){u(),r("pick-success")},p=(0,i.ref)(null),h=(0,i.ref)(null),m=(0,i.computed)((function(){return c.pickerTable==="".concat(c.currentView,"-table")?d:s})),y=(0,i.computed)((function(){var e=c.panelDate,t=Z("zh-CN","[yyyy]-[mm]",e),n=t.labels;return{separator:t.separator,labels:n.map((function(e){var t,n=e;return n.handler=(t=e.type,function(){c.pickerTable=l(t)}),n}))}})),v=(0,i.computed)((function(){return"year"===y.value.labels[0].type||"date"===c.currentView})),g=(0,i.computed)((function(){return"year"===y.value.labels[1].type||"date"===c.currentView})),b=(0,i.computed)((function(){return"time"===c.currentView})),k=(0,i.computed)((function(){return!!a.shortcuts}));return Object.assign(Object.assign({},(0,i.toRefs)(c)),{panelPickerHandlers:m,datePanelLabel:y,showLabelFirst:v,showLabelSecond:g,handleShortcutClick:function(t){t.value&&r("pick",t.value(),!1,void 0,t),t.onClick&&t.onClick(n),e.shortcutClose&&f()},changeYear:function(t){"year"===e.selectionMode||"year-table"===c.pickerTable?c.panelDate=new Date(c.panelDate.getFullYear()+10*t,0,1):c.panelDate=J(c.panelDate,12*t)},changeMonth:function(e){c.panelDate=J(c.panelDate,e)},reset:function(){c.currentView=e.selectionMode,c.pickerTable=l(c.currentView)},isTime:b,hasShortcuts:k,onToggleVisibility:function(e){var t,n;e&&(null===(t=null==p?void 0:p.value)||void 0===t||t.updateScroll(),null===(n=null==h?void 0:h.value)||void 0===n||n.updateScroll())},handleToggleTime:function(){c.currentView="time"===c.currentView?"date":"time"},handlePickSuccess:f,handlePickClear:function(){u(),r("pick-clear")}})},render:function(){var e,t,n,a=this;return(0,i.createVNode)("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:function(e){e.preventDefault()}},[this.shortcuts.length?(0,i.createVNode)("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map((function(e){return(0,i.createVNode)("div",{class:"bk-picker-panel-shortcut",onClick:function(){return a.handleShortcutClick(e)}},[e.text])}))]):"",(0,i.createVNode)("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"bk-date-picker-header"},[(0,i.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.changeYear(-1)}},[(0,i.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.pickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("prev"),onClick:function(){return a.changeMonth(-1)}},[(0,i.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?(0,i.createVNode)("span",null,[(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.datePanelLabel.labels[0].handler}},[this.datePanelLabel.labels[0].label]),[[i.vShow,this.showLabelFirst]]),"date"===this.currentView?" ".concat(this.datePanelLabel.separator," "):" ",(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.datePanelLabel.labels[1].handler}},[this.datePanelLabel.labels[1].label]),[[i.vShow,this.showLabelSecond]])]):"",(0,i.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.changeYear(1)}},[(0,i.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.pickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("next"),onClick:function(){return a.changeMonth(1)}},[(0,i.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):""]),[[i.vShow,"time"!==this.currentView]]),(0,i.createVNode)("div",{class:"bk-picker-panel-content"},["time"!==this.currentView?"date-table"===a.pickerTable?(0,i.createVNode)(Q,{tableDate:a.panelDate,disableDate:a.disableDate,selectionMode:a.selectionMode,modelValue:a.dates,focusedDate:a.focusedDate,onPick:a.panelPickerHandlers},null):null:""]),this.confirm?(0,i.createVNode)(h,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?(0,i.createVNode)("div",{class:"bk-picker-panel-sidebar"},[null!==(n=null===(t=(e=this.$slots).shortcuts)||void 0===t?void 0:t.call(e))&&void 0!==n?n:null]):null])}});var te={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator:function(e){return!(["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0&&(console.error("type property is not valid: '".concat(e,"'")),1))}},shortcuts:{type:Array,default:function(){return[]}},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator:function(e){return!(["year","month","date","time"].indexOf(e)<0&&(console.error("selectionMode property is not valid: '".concat(e,"'")),1))}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};const ne=(0,i.defineComponent)({props:te,emits:["pick"],setup:function(e,t){var n=t.slots,r=t.emit,l=e.modelValue.map((function(e){return e||function(){var e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e}()})),o=a(l,2),c=o[0],u=o[1],s=e.startDate?e.startDate:c,d=(0,i.reactive)({currentView:e.selectionMode||"date",leftPickerTable:"".concat(e.selectionMode,"-table"),rightPickerTable:"".concat(e.selectionMode,"-table"),leftPanelDate:s,rightPanelDate:new Date(s.getFullYear(),s.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:c&&!u},upToNowEnable:!1,dates:e.modelValue}),f=function(e,t){return e&&t?e.getTime()-t.getTime():0},p=(0,i.ref)(null),h=(0,i.ref)(null),m=function t(n,a,r){var l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=new Date(d["".concat(n,"PanelDate")]);if(i["set".concat(a)](i["get".concat(a)]()+r),d["".concat(n,"PanelDate")]=i,l)if(e.splitPanels){var o="left"===n?"right":"left";"left"===n&&d.leftPanelDate>=d.rightPanelDate&&t(o,a,1),"right"===n&&d.rightPanelDate<=d.leftPanelDate&&t(o,a,-1)}else{var c="left"===n?"right":"left",u=d["".concat(c,"PanelDate")],s=new Date(u);if("Month"===a){var f=new Date(s.getFullYear(),s.getMonth()+r+1,0).getDate();s.setDate(Math.min(f,s.getDate()))}s["set".concat(a)](s["get".concat(a)]()+r),d["".concat(c,"PanelDate")]=s}},y=function(e){d["".concat(e,"PickerTable")]="year-table"},v=function(e){d["".concat(e,"PickerTable")]="month-table"},g=function(e){var t=d["".concat(e,"PanelDate")],n=Z("zh-CN","[yyyy]-[mm]",t),a=n.labels;return{separator:n.separator,labels:a.map((function(t){var n,a,r=t;return r.handler=(n=t.type,a="month"===n?v:y,function(){return a(e)}),r}))}},b=function(t,n){if(console.warn("handleRangePick"),d.rangeState.selecting||"time"===d.currentView){if("time"===d.currentView)d.dates=t;else{var l=a([d.rangeState.from,t].sort(f),2),i=l[0],o=l[1],c="upToNow"===n?new Date:new Date(new Date(new Date(o.setHours(23)).setMinutes(59)).setSeconds(59));d.dates=[i,c],d.rangeState={from:i,to:c,selecting:!1}}!function(t,n){r("pick",d.dates,!1,n||e.type)}(0,n||"date")}else d.upToNowEnable=new Date(t).getTime()<(new Date).getTime(),d.rangeState={from:t,to:null,selecting:!0}},k=function(t,n){d["".concat(t,"PanelDate")]=n;var a=d["".concat(t,"PickerTable")];if(d["".concat(t,"PickerTable")]="year-table"===a?"month-table":"".concat(d.currentView,"-table"),!e.splitPanels){var r="left"===t?"right":"left";d["".concat(r,"PanelDate")]=n,m(r,"Month","left"===r?-1:1,!1)}};(0,i.watch)((function(){return e.selectionMode}),(function(e){d.currentView=e||"range"}));var D=(0,i.computed)((function(){return"time"===d.currentView})),w=(0,i.computed)((function(){return g("left")})),S=(0,i.computed)((function(){return g("right")})),V=(0,i.computed)((function(){return d.leftPickerTable.split("-").shift()})),M=(0,i.computed)((function(){return d.rightPickerTable.split("-").shift()})),P=(0,i.computed)((function(){return"year"===w.value.labels[0].type||"date"===d.currentView})),N=(0,i.computed)((function(){return"year"===w.value.labels[1].type||"date"===d.currentView})),C=(0,i.computed)((function(){return"year"===S.value.labels[0].type||"date"===d.currentView})),T=(0,i.computed)((function(){return"year"===S.value.labels[1].type||"date"===d.currentView})),x=(0,i.computed)((function(){var e="".concat(d.currentView,"-table");return{left:d.leftPickerTable!==e,right:d.rightPickerTable!==e}})),F=(0,i.computed)((function(){return{left:x.value.left?k.bind("left"):b,right:x.value.right?k.bind("right"):b}})),O=(0,i.computed)((function(){return!!n.shortcuts}));return Object.assign(Object.assign({},(0,i.toRefs)(d)),{isTime:D,hasShortcuts:O,prevYear:function(e){var t="year"===d.currentView?-10:-1;m(e,"FullYear",t)},nextYear:function(e){var t="year"===d.currentView?10:1;m(e,"FullYear",t)},prevMonth:function(e){m(e,"Month",-1)},nextMonth:function(e){m(e,"Month",1)},leftDatePanelLabel:w,rightDatePanelLabel:S,leftDatePanelView:V,rightDatePanelView:M,leftShowLabelFirst:P,leftShowLabelSecond:N,rightShowLabelFirst:C,rightShowLabelSecond:T,preSelecting:x,panelPickerHandlers:F,reset:function(){d.currentView=e.selectionMode,d.leftPickerTable="".concat(d.currentView,"-table"),d.rightPickerTable="".concat(d.currentView,"-table")},onToggleVisibility:function(e){var t,n;e&&(null===(t=null==p?void 0:p.value)||void 0===t||t.updateScroll(),null===(n=null==h?void 0:h.value)||void 0===n||n.updateScroll())},handleRangePick:b,handleChangeRange:function(e){d.rangeState.to=e}})},render:function(){var e,t,n,a=this;return(0,i.createVNode)("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:function(e){e.preventDefault()}},[(0,i.createVNode)("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"bk-date-picker-header"},[(0,i.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevYear("left")}},[(0,i.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.leftPickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("prev"),onClick:function(){return a.prevMonth("left")}},[(0,i.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?(0,i.createVNode)("span",null,[(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.leftDatePanelLabel.labels[0].handler}},[this.leftDatePanelLabel.labels[0].label]),[[i.vShow,this.leftShowLabelFirst]]),"date"===this.leftDatePanelView?" ".concat(this.leftDatePanelLabel.separator," "):" ",(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.leftDatePanelLabel.labels[1].handler}},[this.leftDatePanelLabel.labels[1].label]),[[i.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||"date-table"!==this.leftPickerTable?(0,i.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.nextYear("left")}},[(0,i.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||"date-table"===this.leftPickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("next"),onClick:function(){return a.nextMonth("left")}},[(0,i.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):""]),[[i.vShow,"time"!==this.currentView]]),"time"!==this.currentView?"date-table"===a.leftPickerTable?(0,i.createVNode)(Q,{selectionMode:"range",tableDate:a.leftPanelDate,disableDate:a.disableDate,rangeState:a.rangeState,modelValue:a.preSelecting.left?[a.dates[0]]:a.dates,focusedDate:a.focusedDate,onChangeRange:a.handleChangeRange,onPick:a.panelPickerHandlers.left},null):null:""]),[[i.vShow,!this.isTime]]),(0,i.withDirectives)((0,i.createVNode)("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[(0,i.withDirectives)((0,i.createVNode)("div",{class:"bk-date-picker-header"},[this.splitPanels||"date-table"!==this.rightPickerTable?(0,i.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevYear("right")}},[(0,i.createVNode)(f.AngleDoubleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&"date-table"===this.rightPickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("prev","-double"),onClick:function(){return a.prevMonth("right")}},[(0,i.createVNode)(f.AngleLeft,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?(0,i.createVNode)("span",null,[(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.rightDatePanelLabel.labels[0].handler}},[this.rightDatePanelLabel.labels[0].label]),[[i.vShow,this.rightShowLabelFirst]]),"date"===this.rightDatePanelView?" ".concat(this.rightDatePanelLabel.separator," "):" ",(0,i.withDirectives)((0,i.createVNode)("span",{class:"bk-date-picker-header-label",onClick:function(){return a.rightDatePanelLabel.labels[1].handler}},[this.rightDatePanelLabel.labels[1].label]),[[i.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(a.rangeState.selecting||"time"===a.currentView)&&a.upToNowEnable?(0,i.createVNode)("span",{class:"up-to-now",onClick:function(){return a.handleRangePick(new Date,"upToNow")}},[(0,i.createTextVNode)("至今")]):(0,i.createVNode)("span",{class:"up-to-now disabled"},[(0,i.createTextVNode)("至今")]):"",(0,i.createVNode)("span",{class:U("next","-double"),onClick:function(){return a.nextYear("right")}},[(0,i.createVNode)(f.AngleDoubleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),"date-table"===this.rightPickerTable?(0,i.withDirectives)((0,i.createVNode)("span",{class:U("next"),onClick:function(){return a.nextMonth("right")}},[(0,i.createVNode)(f.AngleRight,{style:{fontSize:"20px",lineHeight:1}},null)]),[[i.vShow,"date"===this.currentView]]):""]),[[i.vShow,"time"!==this.currentView]]),"time"!==this.currentView?"date-table"===a.rightPickerTable?(0,i.createVNode)(Q,{selectionMode:"range",tableDate:a.rightPanelDate,disableDate:a.disableDate,rangeState:a.rangeState,modelValue:a.preSelecting.right?[a.dates[a.dates.length-1]]:a.dates,focusedDate:a.focusedDate,onChangeRange:a.handleChangeRange,onPick:a.panelPickerHandlers.right},null):null:""]),[[i.vShow,!this.isTime]])]),this.hasShortcuts?(0,i.createVNode)("div",{class:"bk-picker-panel-sidebar"},[null!==(n=null===(t=(e=this.$slots).shortcuts)||void 0===t?void 0:t.call(e))&&void 0!==n?n:null]):null])}});var ae={type:{type:String,default:"date",validator:function(e){return!(["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0&&(console.error("type property is not valid: '".concat(e,"'")),1))}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:function(){return{}}},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:function(e){return!(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0&&(console.error("placement property is not valid: '".concat(e,"'")),1))}},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:function(){return[]}},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:function(){return{}}},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator:function(e){return["simplicity","normal"].indexOf(e)>-1}},disableDate:Function};const re=(0,i.defineComponent)({name:"DatePicker",directives:{clickoutside:o.clickoutside},props:ae,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup:function(t,n){var o=n.slots,c=n.emit,u=(0,e.useFormItem)(),s=t.type.includes("range"),d=s?[null,null]:[null],f=((s?t.modelValue:[t.modelValue])||[]).every((function(e){return!e||"string"==typeof e&&""===e.trim()}))?d:Y(t.modelValue,t.type,t.multiple,t.format),p=null;-1!==t.shortcutSelectedIndex&&(p=t.shortcuts[t.shortcutSelectedIndex]||null)&&(f=p.value());var h=(0,i.reactive)({showClose:!1,visible:!1,internalValue:f,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:f[0]||t.startDate||new Date,focusedTime:{column:0,picker:0,time:f.map(z),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:p,onSelectionModeChange:m});function m(e){var t=e;return e.match(/^date/)&&(t="date"),h.selectionMode=["year","month","date","time"].indexOf(t)>-1&&t,h.selectionMode}var y=(0,i.computed)((function(){if(t.multiple)return h.internalValue.slice();var e=t.type.includes("range"),n=h.internalValue.map((function(e){return e instanceof Date?new Date(e):e||""}));return t.type.match(/^time/)&&(n=n.map((function(e){return q(e,t.type,t.multiple,t.format)}))),e||t.multiple?n:n[0]})),v=(0,i.computed)((function(){return t.type.match(/^time/)?y.value:t.multiple?q(y.value,t.type,t.multiple,t.format):Array.isArray(y.value)?y.value.map((function(e){return q(e,t.type,t.multiple,t.format)})):q(y.value,t.type,t.multiple,t.format)})),g=(0,i.computed)((function(){return"daterange"===t.type||"datetimerange"===t.type?"DateRangePanel":"DatePanel"})),b=(0,i.computed)((function(){return null===t.open?h.visible:t.open})),k=(0,i.computed)((function(){return q(h.internalValue,t.type,t.multiple,t.format)})),D=(0,i.computed)((function(){var e;return(null===(e=h.shortcut)||void 0===e?void 0:e.text)&&t.useShortcutText?h.shortcut.text:k.value})),w=(0,i.computed)((function(){return!!o.trigger||"datetime"===t.type||"datetimerange"===t.type||t.multiple})),S=(0,i.computed)((function(){return!!o.header})),V=(0,i.computed)((function(){return!!o.footer})),M=(0,i.computed)((function(){return!!o.shortcuts})),P=(0,i.computed)((function(){var e="";return"medium"===t.fontSize?e="medium-font":"large"===t.fontSize&&(e="large-font"),e})),N=(0,i.computed)((function(){var e="";return"medium"===t.fontSize?e="medium-width":"large"===t.fontSize&&(e="large-width"),e})),C=(0,i.computed)((function(){var e;return!(!(null===(e=h.shortcut)||void 0===e?void 0:e.text)||!t.useShortcutText)||!t.editable||t.readonly})),T=(0,i.computed)((function(){return"RangeTimePickerPanel"===g.value&&t.allowCrossDay})),x=(0,i.ref)(null);(0,i.watch)((function(){return h.visible}),(function(e){var t,n;!1===e&&(null===(t=F.value)||void 0===t||t.destoryDropdown()),null===(n=F.value)||void 0===n||n.updateDropdown(),c("open-change",e)}));var F=(0,i.ref)(null);(0,i.watch)((function(){return t.modelValue}),(function(e){h.internalValue=Y(e,t.type,t.multiple,t.format)})),(0,i.watch)((function(){return t.open}),(function(e){h.visible=!0===e})),(0,i.watch)((function(){return t.type}),(function(e){m(e)})),(0,i.watch)((function(){return y}),(function(e,t){(JSON.stringify(e)!==JSON.stringify(t)||l(e)!==l(t))&&c("input",e)})),(0,i.onMounted)((function(){t.type.indexOf("date"),h.timeEnterMode=!0;var e=t.modelValue,n=y.value;l(e)===l(n)&&JSON.stringify(e)===JSON.stringify(n)||c("input",y.value),null!==t.open&&(h.visible=t.open),(0,i.provide)(E,{props:t,focus:function(){var e;null===(e=null==x?void 0:x.value)||void 0===e||e.focus()}})}));var O=(0,i.ref)(null),H=function(e){var t;if(h.disableCloseUnderTransfer)return h.disableCloseUnderTransfer=!1,!1;if(e&&"mousedown"===e.type&&h.visible)return e.preventDefault(),void e.stopPropagation();if(h.visible){var n=null===(t=null==O?void 0:O.value)||void 0===t?void 0:t.$el;if(e&&n&&n.contains(e.target))return;return h.visible=!1,null==e||e.preventDefault(),void(null==e||e.stopPropagation())}h.isFocused=!1,h.disableClickOutSide=!1},L=function(e){(0,i.nextTick)((function(){var n,a;c("change",v.value,e),c("update:modelValue",y.value),null===(n=null==u?void 0:u.validate)||void 0===n||n.call(u,"change"),t.type.indexOf("time")<0&&(null===(a=null==x?void 0:x.value)||void 0===a||a.blur())}))},A=function(){var e;null===(e=null==O?void 0:O.value)||void 0===e||e.reset()},j=function(){var e;h.visible=!1,console.error("onPickSuccess"),(0,i.nextTick)((function(){c("pick-success")})),null===(e=null==x?void 0:x.value)||void 0===e||e.blur(),A()},B=(0,i.ref)(null);return Object.assign(Object.assign({},(0,i.toRefs)(h)),{panel:g,publicStringValue:v,opened:b,visualValue:k,displayValue:D,isConfirm:w,hasHeader:S,hasFooter:V,hasShortcuts:M,fontSizeCls:P,longWidthCls:N,localReadonly:C,allowCrossDayProp:T,pickerDropdownRef:F,inputRef:x,triggerRef:B,pickerPanelRef:O,handleClose:H,handleIconClick:function(){var e,t;null===(e=null==x?void 0:x.value)||void 0===e||e.focus(),null===(t=null==x?void 0:x.value)||void 0===t||t.click()},handleInputMouseenter:function(){t.readonly||t.disabled||(null==k?void 0:k.value)&&(h.showClose=!0)},handleInputMouseleave:function(e){var t;(null===(t=e.toElement)||void 0===t?void 0:t.classList.contains("clear-action"))||(h.showClose=!1)},handleFocus:function(e){t.readonly||(h.isFocused=!0,e&&"focus"===e.type||t.disabled||(h.visible=!0))},handleBlur:function(e){var n,a;h.internalFocus?h.internalFocus=!1:h.visible?e.preventDefault():(h.isFocused=!1,m(t.type),h.internalValue=h.internalValue.slice(),A(),null===(n=null==O?void 0:O.value)||void 0===n||n.onToggleVisibility(!1),null===(a=null==u?void 0:u.validate)||void 0===a||a.call(u,"blur"))},handleKeydown:function(e){var t=e.keyCode;if(9===t&&h.visible)if(e.stopPropagation(),e.preventDefault(),w.value){var n=F.value.$el.querySelectorAll(".bk-picker-confirm > *");h.internalFocus=!0,r(n)[e.shiftKey?"pop":"shift"]().focus()}else H();var a=[37,38,39,40];h.visible||!a.includes(t)?(27===t&&h.visible&&(e.stopPropagation(),H()),a.includes(t)&&h.focusedTime.active&&e.preventDefault()):h.visible=!0},handleInputChange:function(e){var n,a=t.type.includes("range")||t.multiple,r=k.value,l=e.target.value,i=Y(l,t.type,t.multiple,t.format),o=a?i:i[0],c=null===(n=t.disableDate)||void 0===n?void 0:n.call(t,o),u=i.reduce((function(e,t){return e&&t instanceof Date}),!0);l!==r&&!c&&u?(L(t.type),h.internalValue=i):h.forceInputRerender=h.forceInputRerender+1},handleClear:function(){h.visible=!1,h.internalValue=h.internalValue.map((function(){return null})),c("clear"),L(t.type),A(),h.showClose=!1,h.shortcut=null,setTimeout((function(){return m(t.type)}),500)},handleTransferClick:function(){t.appendToBody&&(h.disableCloseUnderTransfer=!0)},onPick:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=e;if(t.multiple){var u=o.getTime(),s=h.internalValue.findIndex((function(e){return e&&e.getTime()===u})),d=[].concat(r(h.internalValue),[o]).filter(Boolean),f=d.map((function(e){return e.getTime()})).filter((function(e,t,n){return n.indexOf(e)===t&&t!==s}));h.internalValue=f.map((function(e){return new Date(e)}))}else o=Y(e,t.type,t.multiple,t.format),h.internalValue=Array.isArray(o)?o:[o];if(h.internalValue[0]){var p=a(h.internalValue,1),y=p[0];h.focusedDate=y}h.focusedTime=Object.assign(Object.assign({},h.focusedTime),{time:h.internalValue.map(z)}),w.value||(m(t.type),h.visible=n),"upToNow"===l&&"daterange"===t.type&&j(),h.shortcut=i,L(l);var v=t.shortcuts.findIndex((function(e){return e===h.shortcut}));c("shortcut-change",h.shortcut,v)},onPickSuccess:j})},render:function(){var e,t,n,a,r,l,o,c,u,s=this,f=(0,i.createVNode)("div",null,[(0,i.createVNode)("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},["time"===this.type||"timerange"===this.type?(0,i.createVNode)("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[(0,i.createVNode)("g",{id:"time"},[(0,i.createVNode)("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),(0,i.createVNode)("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):(0,i.createVNode)("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[(0,i.createVNode)("g",{id:"date"},[(0,i.createVNode)("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),(0,i.createVNode)("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),(0,i.createVNode)("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),(0,i.createVNode)("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),(0,i.createVNode)("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),(0,i.createVNode)("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,"simplicity"===this.behavior?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?(0,i.createVNode)("i",{class:"bk-icon icon-close-circle-shape clear-action",onClick:this.handleClear},null):""]),p=this.hasShortcuts?{shortcuts:function(){var e,t;return(null===(t=(e=s.$slots).shortcuts)||void 0===t?void 0:t.call(e))||null}}:{};return(0,i.withDirectives)((0,i.createVNode)("div",{class:["bk-date-picker","datetimerange"===this.type?"long":"",this.longWidthCls]},[(0,i.createVNode)("div",{ref:"triggerRef",class:"bk-date-picker-rel"},[null!==(n=null===(t=(e=this.$slots).trigger)||void 0===t?void 0:t.call(e))&&void 0!==n?n:f]),(0,i.createVNode)(i.Teleport,{to:"body",disabled:!this.appendToBody},{default:function(){return[(0,i.createVNode)(i.Transition,{name:"bk-fade-down-transition"},{default:function(){return[(0,i.withDirectives)((0,i.createVNode)(d,{class:[s.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:s.triggerRef,placement:s.placement,extPopoverCls:s.extPopoverCls,appendToBody:s.appendToBody,onClick:s.handleTransferClick},{default:function(){return[s.hasHeader?(0,i.createVNode)("div",{class:["bk-date-picker-top-wrapper",s.headerSlotCls]},[null!==(l=null===(r=(a=s.$slots).header)||void 0===r?void 0:r.call(a))&&void 0!==l?l:null]):null,"DateRangePanel"===s.panel?(0,i.createVNode)(ne,{ref:"pickerPanelRef",type:s.type,confirm:s.isConfirm,shortcuts:s.shortcuts,modelValue:s.internalValue,selectionMode:s.selectionMode,startDate:s.startDate,disableDate:s.disableDate,focusedDate:s.focusedDate,onPick:s.onPick,"onPick-success":s.onPickSuccess},p):(0,i.createVNode)(ee,{ref:"pickerPanelRef",clearable:s.clearable,showTime:"datetime"===s.type||"datetimerange"===s.type,confirm:s.isConfirm,shortcuts:s.shortcuts,multiple:s.multiple,shortcutClose:s.shortcutClose,selectionMode:s.selectionMode,modelValue:s.internalValue,startDate:s.startDate,disableDate:s.disableDate,focusedDate:s.focusedDate,onPick:s.onPick,"onPick-clear":s.handleClear,"onPick-success":s.onPickSuccess},p),s.hasFooter?(0,i.createVNode)("div",{class:["bk-date-picker-footer-wrapper",s.footerSlotCls]},[null!==(u=null===(c=(o=s.$slots).footer)||void 0===c?void 0:c.call(o))&&void 0!==u?u:null]):null]}}),[[i.vShow,s.opened]])]}})]}})]),[[(0,i.resolveDirective)("clickoutside"),this.handleClose]])}}),le=(0,e.withInstall)(re)})(),u})()));
@@ -303,10 +303,10 @@ declare const _default: import("vue").DefineComponent<{
303
303
  title: string;
304
304
  multiInstance: boolean;
305
305
  showMask: boolean;
306
+ theme: string;
306
307
  width: string | number;
307
308
  height: string | number;
308
309
  draggable: boolean;
309
- theme: string;
310
310
  size: string;
311
311
  extCls: string;
312
312
  direction: string;
@@ -6,10 +6,10 @@ declare const BkDialog: {
6
6
  title: string;
7
7
  multiInstance: boolean;
8
8
  showMask: boolean;
9
+ theme: string;
9
10
  width: string | number;
10
11
  height: string | number;
11
12
  draggable: boolean;
12
- theme: string;
13
13
  size: string;
14
14
  extCls: string;
15
15
  direction: string;
@@ -181,7 +181,7 @@ declare const BkDialog: {
181
181
  onPrev?: (...args: any[]) => any;
182
182
  onNext?: (...args: any[]) => any;
183
183
  onClosed?: (...args: any[]) => any;
184
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "multiInstance" | "showMask" | "width" | "height" | "draggable" | "theme" | "size" | "extCls" | "direction" | "maxHeight" | "isShow" | "transfer" | "renderDirective" | "dialogType" | "customClass" | "scrollable" | "closeIcon" | "escClose" | "maskClose" | "fullscreen" | "quickClose" | "animateType" | "headerAlign" | "footerAlign" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "isLoading">;
184
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "multiInstance" | "showMask" | "theme" | "width" | "height" | "draggable" | "size" | "extCls" | "direction" | "maxHeight" | "isShow" | "transfer" | "renderDirective" | "dialogType" | "customClass" | "scrollable" | "closeIcon" | "escClose" | "maskClose" | "fullscreen" | "quickClose" | "animateType" | "headerAlign" | "footerAlign" | "confirmText" | "cancelText" | "prevText" | "nextText" | "current" | "totalStep" | "isLoading">;
185
185
  $attrs: {
186
186
  [x: string]: unknown;
187
187
  };
@@ -360,10 +360,10 @@ declare const BkDialog: {
360
360
  title: string;
361
361
  multiInstance: boolean;
362
362
  showMask: boolean;
363
+ theme: string;
363
364
  width: string | number;
364
365
  height: string | number;
365
366
  draggable: boolean;
366
- theme: string;
367
367
  size: string;
368
368
  extCls: string;
369
369
  direction: string;
@@ -739,10 +739,10 @@ declare const BkDialog: {
739
739
  title: string;
740
740
  multiInstance: boolean;
741
741
  showMask: boolean;
742
+ theme: string;
742
743
  width: string | number;
743
744
  height: string | number;
744
745
  draggable: boolean;
745
- theme: string;
746
746
  size: string;
747
747
  extCls: string;
748
748
  direction: string;
@@ -55,9 +55,9 @@ declare const _default: import("vue").DefineComponent<{
55
55
  onShowChange?: (...args: any[]) => any;
56
56
  }, {
57
57
  placement: string;
58
- extCls: string;
59
- disabled: boolean;
60
58
  trigger: string;
59
+ disabled: boolean;
60
+ extCls: string;
61
61
  isShow: boolean;
62
62
  }>;
63
63
  export default _default;
@@ -6,9 +6,9 @@ declare const BkDropdown: {
6
6
  $data: {};
7
7
  $props: Partial<{
8
8
  placement: string;
9
- extCls: string;
10
- disabled: boolean;
11
9
  trigger: string;
10
+ disabled: boolean;
11
+ extCls: string;
12
12
  isShow: boolean;
13
13
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
14
14
  isShow: import("vue-types").VueTypeValidableDef<boolean> & {
@@ -34,7 +34,7 @@ declare const BkDropdown: {
34
34
  onShow?: (...args: any[]) => any;
35
35
  onHide?: (...args: any[]) => any;
36
36
  onShowChange?: (...args: any[]) => any;
37
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "placement" | "extCls" | "disabled" | "trigger" | "isShow">;
37
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "placement" | "trigger" | "disabled" | "extCls" | "isShow">;
38
38
  $attrs: {
39
39
  [x: string]: unknown;
40
40
  };
@@ -77,9 +77,9 @@ declare const BkDropdown: {
77
77
  refContent: any;
78
78
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show" | "showChange")[], string, {
79
79
  placement: string;
80
- extCls: string;
81
- disabled: boolean;
82
80
  trigger: string;
81
+ disabled: boolean;
82
+ extCls: string;
83
83
  isShow: boolean;
84
84
  }> & {
85
85
  beforeCreate?: (() => void) | (() => void)[];
@@ -161,9 +161,9 @@ declare const BkDropdown: {
161
161
  refContent: any;
162
162
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("hide" | "show" | "showChange")[], "hide" | "show" | "showChange", {
163
163
  placement: string;
164
- extCls: string;
165
- disabled: boolean;
166
164
  trigger: string;
165
+ disabled: boolean;
166
+ extCls: string;
167
167
  isShow: boolean;
168
168
  }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
169
169
  DropdownMenu: import("vue").DefineComponent<{
@@ -91,7 +91,7 @@ declare const _default: import("vue").DefineComponent<{
91
91
  };
92
92
  }, {
93
93
  labelStyles: import("vue").ComputedRef<object>;
94
- validate: (trigger: String) => Promise<boolean>;
94
+ validate: (trigger?: String) => Promise<boolean>;
95
95
  clearValidate: () => void;
96
96
  isError: import("vue").Ref<boolean>;
97
97
  errorMessage: import("vue").Ref<string>;
@@ -144,12 +144,12 @@ declare const _default: import("vue").DefineComponent<{
144
144
  required: boolean;
145
145
  property: string;
146
146
  email: boolean;
147
- max: number;
148
147
  min: number;
148
+ max: number;
149
149
  maxlength: number;
150
- description: string;
151
150
  rules: unknown[];
152
151
  autoCheck: boolean;
152
+ description: string;
153
153
  errorDisplayType: string;
154
154
  }>;
155
155
  export default _default;
@@ -12,8 +12,12 @@ export declare const formProps: {
12
12
  [key: string]: any;
13
13
  };
14
14
  };
15
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
16
- default: () => unknown[];
15
+ rules: import("vue-types").VueTypeValidableDef<{
16
+ [key: string]: any;
17
+ }> & {
18
+ default: () => {
19
+ [key: string]: any;
20
+ };
17
21
  };
18
22
  };
19
23
  export declare type FormProps = Readonly<ExtractPropTypes<typeof formProps>>;
@@ -30,15 +34,19 @@ declare const _default: import("vue").DefineComponent<{
30
34
  [key: string]: any;
31
35
  };
32
36
  };
33
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
34
- default: () => unknown[];
37
+ rules: import("vue-types").VueTypeValidableDef<{
38
+ [key: string]: any;
39
+ }> & {
40
+ default: () => {
41
+ [key: string]: any;
42
+ };
35
43
  };
36
44
  }, {
37
45
  handleSubmit: (event: Event) => void;
38
- validate: (fields: string | Array<string>) => Promise<{
46
+ validate: (fields?: string | Array<string>) => Promise<{
39
47
  [key: string]: any;
40
48
  }>;
41
- clearValidate: (fields: string | Array<string>) => void;
49
+ clearValidate: (fields?: string | Array<string>) => void;
42
50
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
43
51
  formType: import("vue-types").VueTypeDef<string> & {
44
52
  default: string;
@@ -52,16 +60,22 @@ declare const _default: import("vue").DefineComponent<{
52
60
  [key: string]: any;
53
61
  };
54
62
  };
55
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
56
- default: () => unknown[];
63
+ rules: import("vue-types").VueTypeValidableDef<{
64
+ [key: string]: any;
65
+ }> & {
66
+ default: () => {
67
+ [key: string]: any;
68
+ };
57
69
  };
58
70
  }>> & {
59
71
  onSubmit?: (...args: any[]) => any;
60
72
  }, {
73
+ rules: {
74
+ [key: string]: any;
75
+ };
61
76
  formType: string;
62
77
  model: {
63
78
  [key: string]: any;
64
79
  };
65
- rules: unknown[];
66
80
  }>;
67
81
  export default _default;
@@ -1,16 +1,19 @@
1
1
  import ComposeFormItem from './compose-form-item';
2
2
  import { formProps } from './form';
3
3
  import FormItem from './form-item';
4
+ export * from './type';
4
5
  declare const BkForm: {
5
6
  new (...args: any[]): {
6
7
  $: import("vue").ComponentInternalInstance;
7
8
  $data: {};
8
9
  $props: Partial<{
10
+ rules: {
11
+ [key: string]: any;
12
+ };
9
13
  formType: string;
10
14
  model: {
11
15
  [key: string]: any;
12
16
  };
13
- rules: unknown[];
14
17
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
15
18
  formType: import("vue-types").VueTypeDef<string> & {
16
19
  default: string;
@@ -24,12 +27,16 @@ declare const BkForm: {
24
27
  [key: string]: any;
25
28
  };
26
29
  };
27
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
28
- default: () => unknown[];
30
+ rules: import("vue-types").VueTypeValidableDef<{
31
+ [key: string]: any;
32
+ }> & {
33
+ default: () => {
34
+ [key: string]: any;
35
+ };
29
36
  };
30
37
  }>> & {
31
38
  onSubmit?: (...args: any[]) => any;
32
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "formType" | "model" | "rules">;
39
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "rules" | "formType" | "model">;
33
40
  $attrs: {
34
41
  [x: string]: unknown;
35
42
  };
@@ -56,23 +63,29 @@ declare const BkForm: {
56
63
  [key: string]: any;
57
64
  };
58
65
  };
59
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
60
- default: () => unknown[];
66
+ rules: import("vue-types").VueTypeValidableDef<{
67
+ [key: string]: any;
68
+ }> & {
69
+ default: () => {
70
+ [key: string]: any;
71
+ };
61
72
  };
62
73
  }>> & {
63
74
  onSubmit?: (...args: any[]) => any;
64
75
  }, {
65
76
  handleSubmit: (event: Event) => void;
66
- validate: (fields: string | string[]) => Promise<{
77
+ validate: (fields?: string | string[]) => Promise<{
67
78
  [key: string]: any;
68
79
  }>;
69
- clearValidate: (fields: string | string[]) => void;
80
+ clearValidate: (fields?: string | string[]) => void;
70
81
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], string, {
82
+ rules: {
83
+ [key: string]: any;
84
+ };
71
85
  formType: string;
72
86
  model: {
73
87
  [key: string]: any;
74
88
  };
75
- rules: unknown[];
76
89
  }> & {
77
90
  beforeCreate?: (() => void) | (() => void)[];
78
91
  created?: (() => void) | (() => void)[];
@@ -106,17 +119,21 @@ declare const BkForm: {
106
119
  [key: string]: any;
107
120
  };
108
121
  };
109
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
110
- default: () => unknown[];
122
+ rules: import("vue-types").VueTypeValidableDef<{
123
+ [key: string]: any;
124
+ }> & {
125
+ default: () => {
126
+ [key: string]: any;
127
+ };
111
128
  };
112
129
  }>> & {
113
130
  onSubmit?: (...args: any[]) => any;
114
131
  } & import("vue").ShallowUnwrapRef<{
115
132
  handleSubmit: (event: Event) => void;
116
- validate: (fields: string | string[]) => Promise<{
133
+ validate: (fields?: string | string[]) => Promise<{
117
134
  [key: string]: any;
118
135
  }>;
119
- clearValidate: (fields: string | string[]) => void;
136
+ clearValidate: (fields?: string | string[]) => void;
120
137
  }> & {} & {} & import("vue").ComponentCustomProperties;
121
138
  __isFragment?: never;
122
139
  __isTeleport?: never;
@@ -134,23 +151,29 @@ declare const BkForm: {
134
151
  [key: string]: any;
135
152
  };
136
153
  };
137
- rules: import("vue-types").VueTypeValidableDef<unknown[]> & {
138
- default: () => unknown[];
154
+ rules: import("vue-types").VueTypeValidableDef<{
155
+ [key: string]: any;
156
+ }> & {
157
+ default: () => {
158
+ [key: string]: any;
159
+ };
139
160
  };
140
161
  }>> & {
141
162
  onSubmit?: (...args: any[]) => any;
142
163
  }, {
143
164
  handleSubmit: (event: Event) => void;
144
- validate: (fields: string | string[]) => Promise<{
165
+ validate: (fields?: string | string[]) => Promise<{
145
166
  [key: string]: any;
146
167
  }>;
147
- clearValidate: (fields: string | string[]) => void;
168
+ clearValidate: (fields?: string | string[]) => void;
148
169
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", {
170
+ rules: {
171
+ [key: string]: any;
172
+ };
149
173
  formType: string;
150
174
  model: {
151
175
  [key: string]: any;
152
176
  };
153
- rules: unknown[];
154
177
  }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin & Readonly<{
155
178
  FormItem: import("vue").DefineComponent<{
156
179
  label: import("vue-types").VueTypeValidableDef<string> & {
@@ -198,7 +221,7 @@ declare const BkForm: {
198
221
  };
199
222
  }, {
200
223
  labelStyles: import("vue").ComputedRef<object>;
201
- validate: (trigger: String) => Promise<boolean>;
224
+ validate: (trigger?: String) => Promise<boolean>;
202
225
  clearValidate: () => void;
203
226
  isError: import("vue").Ref<boolean>;
204
227
  errorMessage: import("vue").Ref<string>;
@@ -251,12 +274,12 @@ declare const BkForm: {
251
274
  required: boolean;
252
275
  property: string;
253
276
  email: boolean;
254
- max: number;
255
277
  min: number;
278
+ max: number;
256
279
  maxlength: number;
257
- description: string;
258
280
  rules: unknown[];
259
281
  autoCheck: boolean;
282
+ description: string;
260
283
  errorDisplayType: string;
261
284
  }>;
262
285
  ComposeFormItem: import("vue").DefineComponent<{