!function(){function e(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,o,l=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(t=r.next()).done)&&(l.push(t.value),!n||l.length!==n);a=!0);}catch(i){u=!0,o=i}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return l}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return n(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(e,r)}(e,r)||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 n(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}System.register(["./index-legacy.2ae28dc5.js"],(function(n){"use strict";var r,t,o,l,a,u,i,c,d,s,f,p,b,m,v,h,g,k,y,S,V,x;return{setters:[function(e){r=e.O,t=e.n,o=e.w,l=e.d,a=e.N,u=e.aj,i=e.t,c=e.S,d=e.v,s=e.k,f=e.a2,p=e.U,b=e.m,m=e.aT,v=e.u,h=e.E,g=e.G,k=e.aR,y=e.x,S=e.as,V=e.z,x=e.y}],execute:function(){var C=n("c",{name:r,shape:t("round"),disabled:Boolean,iconSize:o,modelValue:r,checkedColor:String,labelPosition:String,labelDisabled:Boolean}),G=n("s",l({props:a({},C,{bem:u(Function),role:String,parent:Object,checked:Boolean,bindGroup:i}),emits:["click","toggle"],setup:function(e,n){var r=n.emit,t=n.slots,o=c(),l=function(n){if(e.parent&&e.bindGroup)return e.parent.props[n]},a=d((function(){return l("disabled")||e.disabled})),u=d((function(){return l("direction")})),i=d((function(){var n=e.checkedColor||l("checkedColor");if(n&&e.checked&&!a.value)return{borderColor:n,backgroundColor:n}})),b=function(n){var t=n.target,l=o.value,u=l===t||(null==l?void 0:l.contains(t));a.value||!u&&e.labelDisabled||r("toggle"),r("click",n)},m=function(){var n=e.bem,r=e.shape,u=e.checked,c=e.iconSize||l("iconSize");return s("div",{ref:o,class:n("icon",[r,{disabled:a.value,checked:u}]),style:{fontSize:p(c)}},[t.icon?t.icon({checked:u,disabled:a.value}):s(f,{name:"success",style:i.value},null)])},v=function(){if(t.default)return s("span",{class:e.bem("label",[e.labelPosition,{disabled:a.value}])},[t.default()])};return function(){var n="left"===e.labelPosition?[v(),m()]:[m(),v()];return s("div",{role:e.role,class:e.bem([{disabled:a.value,"label-disabled":e.labelDisabled},u.value]),tabindex:a.value?void 0:0,"aria-checked":e.checked,onClick:b},[n])}}})),A=e(b("checkbox-group"),2),j=A[0],z=A[1],O={max:o,disabled:Boolean,iconSize:o,direction:String,modelValue:m(),checkedColor:String},w=Symbol(j),B=(n("a",l({name:j,props:O,emits:["change","update:modelValue"],setup:function(e,n){var r=n.emit,t=n.slots,o=v(w),l=o.children,a=o.linkChildren,u=function(e){return r("update:modelValue",e)};return h((function(){return e.modelValue}),(function(e){return r("change",e)})),g({toggleAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof e&&(e={checked:e});var n=e,r=n.checked,t=n.skipDisabled,o=l.filter((function(e){return!!e.props.bindGroup&&(e.props.disabled&&t?e.checked.value:null!=r?r:!e.checked.value)})),a=o.map((function(e){return e.name}));u(a)}}),k((function(){return e.modelValue})),a({props:e,updateValue:u}),function(){var n;return s("div",{class:z([e.direction])},[null==(n=t.default)?void 0:n.call(t)])}}})),e(b("checkbox"),2)),D=B[0],I=B[1],P=a({},C,{bindGroup:i}),T=l({name:D,props:P,emits:["change","update:modelValue"],setup:function(e,n){var r=n.emit,t=n.slots,o=y(w).parent,l=function(n){var r=e.name,t=o.props,l=t.max,a=t.modelValue.slice();if(n){l&&a.length>=l||a.includes(r)||(a.push(r),e.bindGroup&&o.updateValue(a))}else{var u=a.indexOf(r);-1!==u&&(a.splice(u,1),e.bindGroup&&o.updateValue(a))}},a=d((function(){return o&&e.bindGroup?-1!==o.props.modelValue.indexOf(e.name):!!e.modelValue})),u=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!a.value;o&&e.bindGroup?l(n):r("update:modelValue",n)};return h((function(){return e.modelValue}),(function(e){return r("change",e)})),g({toggle:u,props:e,checked:a}),k((function(){return e.modelValue})),function(){return s(G,V({bem:I,role:"checkbox",parent:o,checked:a.value,onToggle:u},e),S(t,["default","icon"]))}}});n("C",x(T))}}}))}();
