1 |
- !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,u,o=[],l=!0,a=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(i){a=!0,u=i}finally{try{l||null==r.return||r.return()}finally{if(a)throw u}}return o}(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.90c82f08.js","./Checker-legacy.1b485b9f.js"],(function(n){"use strict";var r,t,u,o,l,a,i,c,d,f,s,p,m,h,b,v,g,y;return{setters:[function(e){r=e.t,t=e.z,u=e.av,o=e.d,l=e.x,a=e.Z,i=e.W,c=e.b4,d=e.c,f=e.N,s=e.v,p=e.C,m=e.y,h=e.am,b=e.E,v=e.D},function(e){g=e.c,y=e.s}],execute:function(){var V=e(r("checkbox-group"),2),k=V[0],x=V[1],S={max:t,disabled:Boolean,iconSize:t,direction:String,modelValue:u(),checkedColor:String},A=Symbol(k),C=(n("s",o({name:k,props:S,emits:["change","update:modelValue"],setup:function(e,n){var r=n.emit,t=n.slots,u=l(A),o=u.children,f=u.linkChildren,s=function(e){return r("update:modelValue",e)};return a((function(){return e.modelValue}),(function(e){return r("change",e)})),i({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,u=o.filter((function(e){return!!e.props.bindGroup&&(e.props.disabled&&t?e.checked.value:null!=r?r:!e.checked.value)})),l=u.map((function(e){return e.name}));s(l)}}),c((function(){return e.modelValue})),f({props:e,updateValue:s}),function(){var n;return d("div",{class:x([e.direction])},[null==(n=t.default)?void 0:n.call(t)])}}})),e(r("checkbox"),2)),G=C[0],j=C[1],w=f({},g,{bindGroup:s}),O=o({name:G,props:w,emits:["change","update:modelValue"],setup:function(e,n){var r=n.emit,t=n.slots,u=p(A).parent,o=function(n){var r=e.name,t=u.props,o=t.max,l=t.modelValue.slice();if(n){o&&l.length>=o||l.includes(r)||(l.push(r),e.bindGroup&&u.updateValue(l))}else{var a=l.indexOf(r);-1!==a&&(l.splice(a,1),e.bindGroup&&u.updateValue(l))}},l=m((function(){return u&&e.bindGroup?-1!==u.props.modelValue.indexOf(e.name):!!e.modelValue})),f=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!l.value;u&&e.bindGroup?o(n):r("update:modelValue",n)};return a((function(){return e.modelValue}),(function(e){return r("change",e)})),i({toggle:f,props:e,checked:l}),c((function(){return e.modelValue})),function(){return d(y,b({bem:j,role:"checkbox",parent:u,checked:l.value,onToggle:f},e),h(t,["default","icon"]))}}});n("C",v(O))}}}))}();
|