vue-efko-data-view 1.0.2 → 1.0.4
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.
- package/dist/data-view.cjs.js +7 -7
- package/dist/data-view.cjs.js.map +1 -1
- package/dist/data-view.es.js +1458 -1378
- package/dist/data-view.es.js.map +1 -1
- package/dist/dataview/DataView.vue.d.ts +2 -0
- package/dist/dataview/table/TheTable.vue.d.ts +1 -0
- package/dist/dataview/table/interface/table.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/data-view.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),G=require("lodash"),be=require("@formkit/auto-animate"),V=require("@ant-design/icons-vue"),ft=require("@vueform/multiselect"),pt=require("efko-ui-library");function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},S.apply(null,arguments)}function Re(e){for(var n=0,o,r=0,a=e.length;a>=4;++r,a-=4)o=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,n=(o&65535)*1540483477+((o>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}const Be="%";class mt{constructor(n){this.cache=new Map,this.instanceId=n}get(n){return this.cache.get(Array.isArray(n)?n.join(Be):n)||null}update(n,o){const r=Array.isArray(n)?n.join(Be):n,a=this.cache.get(r),l=o(a);l===null?this.cache.delete(r):this.cache.set(r,l)}}const gt=e=>{const n=e;return n.install=function(o){o.component(n.displayName||n.name,e)},e};function Pe(e){return{type:Object,default:e}}function ne(e){return{type:Boolean,default:e}}function ht(e,n){const o={validator:()=>!0,default:e};return o}function Ae(e){return{type:Array,default:e}}function Me(e){return{type:String,default:e}}function vt(e,n){return e?{type:e,default:n}:ht(n)}const yt="data-token-hash",re="data-css-hash",U="__cssinjs_instance__";function X(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const n=document.body.querySelectorAll(`style[${re}]`)||[],{firstChild:o}=document.head;Array.from(n).forEach(a=>{a[U]=a[U]||e,a[U]===e&&document.head.insertBefore(a,o)});const r={};Array.from(document.querySelectorAll(`style[${re}]`)).forEach(a=>{var l;const s=a.getAttribute(re);r[s]?a[U]===e&&((l=a.parentNode)===null||l===void 0||l.removeChild(a)):r[s]=!0})}return new mt(e)}const Oe=Symbol("StyleContextKey"),bt=()=>{var e,n,o;const r=t.getCurrentInstance();let a;if(r&&r.appContext){const l=(o=(n=(e=r.appContext)===null||e===void 0?void 0:e.config)===null||n===void 0?void 0:n.globalProperties)===null||o===void 0?void 0:o.__ANTDV_CSSINJS_CACHE__;l?a=l:(a=X(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=a))}else a=X();return a},ze={cache:X(),defaultCache:!0,hashPriority:"low"},xe=()=>{const e=bt();return t.inject(Oe,t.shallowRef(S(S({},ze),{cache:e})))},xt=e=>{const n=xe(),o=t.shallowRef(S(S({},ze),{cache:X()}));return t.watch([()=>t.unref(e),n],()=>{const r=S({},n.value),a=t.unref(e);Object.keys(a).forEach(s=>{const c=a[s];a[s]!==void 0&&(r[s]=c)});const{cache:l}=a;r.cache=r.cache||X(),r.defaultCache=!l&&n.value.defaultCache,o.value=r},{immediate:!0}),t.provide(Oe,o),o},Ct=()=>({autoClear:ne(),mock:Me(),cache:Pe(),defaultCache:ne(),hashPriority:Me(),container:vt(),ssrInline:ne(),transformers:Ae(),linters:Ae()});gt(t.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:Ct(),setup(e,{slots:n}){return xt(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function kt(){return!1}let pe=!1;function St(){return pe}const wt=process.env.NODE_ENV==="production"?kt:St;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const n=e.webpackHotUpdate;e.webpackHotUpdate=(...o)=>(pe=!0,setTimeout(()=>{pe=!1},0),n(...o))}}function Et(e,n,o,r){const a=xe(),l=t.shallowRef(""),s=t.shallowRef();t.watchEffect(()=>{l.value=[e,...n.value].join("%")});const c=wt(),h=u=>{a.value.cache.update(u,d=>{const[m=0,C]=d||[];return m-1===0?(r==null||r(C,!1),null):[m-1,C]})};return t.watch(l,(u,d)=>{d&&h(d),a.value.cache.update(u,m=>{const[C=0,b]=m||[];let i=b;process.env.NODE_ENV!=="production"&&b&&c&&(r==null||r(i,c),i=null);const v=i||o();return[C+1,v]}),s.value=a.value.cache.get(l.value)[1]},{immediate:!0}),t.onBeforeUnmount(()=>{h(l.value)}),s}function Bt(e,n){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}class O{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(n,o=!1){let r={map:this.cache};return n.forEach(a=>{var l;r?r=(l=r==null?void 0:r.map)===null||l===void 0?void 0:l.get(a):r=void 0}),r!=null&&r.value&&o&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(n){var o;return(o=this.internalGet(n,!0))===null||o===void 0?void 0:o[0]}has(n){return!!this.internalGet(n)}set(n,o){if(!this.has(n)){if(this.size()+1>O.MAX_CACHE_SIZE+O.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((l,s)=>{const[,c]=l;return this.internalGet(s)[1]<c?[s,this.internalGet(s)[1]]:l},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(n)}let r=this.cache;n.forEach((a,l)=>{if(l===n.length-1)r.set(a,{value:[o,this.cacheCallTimes++]});else{const s=r.get(a);s?s.map||(s.map=new Map):r.set(a,{map:new Map}),r=r.get(a).map}})}deleteByPath(n,o){var r;const a=n.get(o[0]);if(o.length===1)return a.map?n.set(o[0],{map:a.map}):n.delete(o[0]),(r=a.value)===null||r===void 0?void 0:r[0];const l=this.deleteByPath(a.map,o.slice(1));return(!a.map||a.map.size===0)&&!a.value&&n.delete(o[0]),l}delete(n){if(this.has(n))return this.keys=this.keys.filter(o=>!Bt(o,n)),this.deleteByPath(this.cache,n)}}O.MAX_CACHE_SIZE=20;O.MAX_CACHE_OFFSET=5;let me={};function At(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${n}`)}function Mt(){me={}}function Vt(e,n,o){!n&&!me[o]&&(e(!1,o),me[o]=!0)}function Tt(e,n){Vt(At,e,n)}function Nt(){}let je=Nt;process.env.NODE_ENV!=="production"&&(je=(e,n,o)=>{Tt(e,`[ant-design-vue: ${n}] ${o}`),process.env.NODE_ENV==="test"&&Mt()});let Ve=0;class Ue{constructor(n){this.derivatives=Array.isArray(n)?n:[n],this.id=Ve,n.length===0&&je(n.length>0,"[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."),Ve+=1}getDerivativeToken(n){return this.derivatives.reduce((o,r)=>r(n,o),void 0)}}const ae=new O;function It(e){const n=Array.isArray(e)?e:[e];return ae.has(n)||ae.set(n,new Ue(n)),ae.get(n)}const Te=new WeakMap;function J(e){let n=Te.get(e)||"";return n||(Object.keys(e).forEach(o=>{const r=e[o];n+=o,r instanceof Ue?n+=r.id:r&&typeof r=="object"?n+=J(r):n+=r}),Te.set(e,n)),n}function Dt(e,n){return Re(`${n}_${J(e)}`)}const Ne={},Ft=process.env.NODE_ENV==="production",Ht=process.env.NODE_ENV==="prerender",$t=!Ft&&!Ht?"css-dev-only-do-not-override":"css",_=new Map;function _t(e){_.set(e,(_.get(e)||0)+1)}function Lt(e,n){typeof document<"u"&&document.querySelectorAll(`style[${yt}="${e}"]`).forEach(r=>{var a;r[U]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r))})}const Rt=0;function Pt(e,n){_.set(e,(_.get(e)||0)-1);const o=Array.from(_.keys()),r=o.filter(a=>(_.get(a)||0)<=0);o.length-r.length>Rt&&r.forEach(a=>{Lt(a,n),_.delete(a)})}const Ot=(e,n,o,r)=>{const a=o.getDerivativeToken(e);let l=S(S({},a),n);return r&&(l=r(l)),l};function zt(e,n,o=t.ref({})){const r=xe(),a=t.computed(()=>S({},...n.value)),l=t.computed(()=>J(a.value)),s=t.computed(()=>J(o.value.override||Ne));return Et("token",t.computed(()=>[o.value.salt||"",e.value.id,l.value,s.value]),()=>{const{salt:h="",override:u=Ne,formatToken:d,getComputedToken:m}=o.value,C=m?m(a.value,u,e.value):Ot(a.value,u,e.value,d),b=Dt(C,h);C._tokenKey=b,_t(b);const i=`${$t}-${Re(b)}`;return C._hashId=i,[C,i]},h=>{var u;Pt(h[0]._tokenKey,(u=r.value)===null||u===void 0?void 0:u.cache.instanceId)})}const jt="1.7.0";function B(e,n){Ut(e)&&(e="100%");var o=Gt(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function W(e){return Math.min(1,Math.max(0,e))}function Ut(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Gt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ge(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function q(e){return e<=1?"".concat(Number(e)*100,"%"):e}function L(e){return e.length===1?"0"+e:String(e)}function Xt(e,n,o){return{r:B(e,255)*255,g:B(n,255)*255,b:B(o,255)*255}}function Ie(e,n,o){e=B(e,255),n=B(n,255),o=B(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=0,c=(r+a)/2;if(r===a)s=0,l=0;else{var h=r-a;switch(s=c>.5?h/(2-r-a):h/(r+a),r){case e:l=(n-o)/h+(n<o?6:0);break;case n:l=(o-e)/h+2;break;case o:l=(e-n)/h+4;break}l/=6}return{h:l,s,l:c}}function le(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Wt(e,n,o){var r,a,l;if(e=B(e,360),n=B(n,100),o=B(o,100),n===0)a=o,l=o,r=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;r=le(c,s,e+1/3),a=le(c,s,e),l=le(c,s,e-1/3)}return{r:r*255,g:a*255,b:l*255}}function ge(e,n,o){e=B(e,255),n=B(n,255),o=B(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=r,c=r-a,h=r===0?0:c/r;if(r===a)l=0;else{switch(r){case e:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-e)/c+2;break;case o:l=(e-n)/c+4;break}l/=6}return{h:l,s:h,v:s}}function qt(e,n,o){e=B(e,360)*6,n=B(n,100),o=B(o,100);var r=Math.floor(e),a=e-r,l=o*(1-n),s=o*(1-a*n),c=o*(1-(1-a)*n),h=r%6,u=[o,s,l,l,c,o][h],d=[c,o,o,s,l,l][h],m=[l,l,c,o,o,s][h];return{r:u*255,g:d*255,b:m*255}}function he(e,n,o,r){var a=[L(Math.round(e).toString(16)),L(Math.round(n).toString(16)),L(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Zt(e,n,o,r,a){var l=[L(Math.round(e).toString(16)),L(Math.round(n).toString(16)),L(Math.round(o).toString(16)),L(Kt(r))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function Kt(e){return Math.round(parseFloat(e)*255).toString(16)}function De(e){return M(e)/255}function M(e){return parseInt(e,16)}function Qt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ve={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function P(e){var n={r:0,g:0,b:0},o=1,r=null,a=null,l=null,s=!1,c=!1;return typeof e=="string"&&(e=eo(e)),typeof e=="object"&&(I(e.r)&&I(e.g)&&I(e.b)?(n=Xt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):I(e.h)&&I(e.s)&&I(e.v)?(r=q(e.s),a=q(e.v),n=qt(e.h,r,a),s=!0,c="hsv"):I(e.h)&&I(e.s)&&I(e.l)&&(r=q(e.s),l=q(e.l),n=Wt(e.h,r,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Ge(o),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var Jt="[-\\+]?\\d+%?",Yt="[-\\+]?\\d*\\.\\d+%?",H="(?:".concat(Yt,")|(?:").concat(Jt,")"),ie="[\\s|\\(]+(".concat(H,")[,|\\s]+(").concat(H,")[,|\\s]+(").concat(H,")\\s*\\)?"),se="[\\s|\\(]+(".concat(H,")[,|\\s]+(").concat(H,")[,|\\s]+(").concat(H,")[,|\\s]+(").concat(H,")\\s*\\)?"),T={CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+ie),rgba:new RegExp("rgba"+se),hsl:new RegExp("hsl"+ie),hsla:new RegExp("hsla"+se),hsv:new RegExp("hsv"+ie),hsva:new RegExp("hsva"+se),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function eo(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(ve[e])e=ve[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=T.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=T.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=T.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=T.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=T.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=T.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=T.hex8.exec(e),o?{r:M(o[1]),g:M(o[2]),b:M(o[3]),a:De(o[4]),format:n?"name":"hex8"}:(o=T.hex6.exec(e),o?{r:M(o[1]),g:M(o[2]),b:M(o[3]),format:n?"name":"hex"}:(o=T.hex4.exec(e),o?{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),a:De(o[4]+o[4]),format:n?"name":"hex8"}:(o=T.hex3.exec(e),o?{r:M(o[1]+o[1]),g:M(o[2]+o[2]),b:M(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function I(e){return!!T.CSS_UNIT.exec(String(e))}var N=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=Qt(n)),this.originalInput=n;var a=P(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,l=n.r/255,s=n.g/255,c=n.b/255;return l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?a=c/12.92:a=Math.pow((c+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Ge(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=ge(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=ge(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=Ie(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=Ie(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),he(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),Zt(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(B(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(B(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+he(this.r,this.g,this.b,!1),o=0,r=Object.entries(ve);o<r.length;o++){var a=r[o],l=a[0],s=a[1];if(n===s)return l}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,l=!o&&a&&(n.startsWith("hex")||n==="name");return l?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=W(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=W(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=W(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=W(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new e(n).toRgb(),l=o/100,s={r:(a.r-r.r)*l+r.r,g:(a.g-r.g)*l+r.g,b:(a.b-r.b)*l+r.b,a:(a.a-r.a)*l+r.a};return new e(s)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,l=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,l.push(new e(r));return l},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,l=o.v,s=[],c=1/n;n--;)s.push(new e({h:r,s:a,v:l})),l=(l+c)%1;return s},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),a=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],l=360/n,s=1;s<n;s++)a.push(new e({h:(r+s*l)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}(),Z=2,Fe=.16,to=.05,oo=.05,no=.15,Xe=5,We=4,ro=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function He(e){var n=e.r,o=e.g,r=e.b,a=ge(n,o,r);return{h:a.h*360,s:a.s,v:a.v}}function K(e){var n=e.r,o=e.g,r=e.b;return"#".concat(he(n,o,r,!1))}function ao(e,n,o){var r=o/100,a={r:(n.r-e.r)*r+e.r,g:(n.g-e.g)*r+e.g,b:(n.b-e.b)*r+e.b};return a}function $e(e,n,o){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=o?Math.round(e.h)-Z*n:Math.round(e.h)+Z*n:r=o?Math.round(e.h)+Z*n:Math.round(e.h)-Z*n,r<0?r+=360:r>=360&&(r-=360),r}function _e(e,n,o){if(e.h===0&&e.s===0)return e.s;var r;return o?r=e.s-Fe*n:n===We?r=e.s+Fe:r=e.s+to*n,r>1&&(r=1),o&&n===Xe&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Le(e,n,o){var r;return o?r=e.v+oo*n:r=e.v-no*n,r>1&&(r=1),Number(r.toFixed(2))}function Y(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],r=P(e),a=Xe;a>0;a-=1){var l=He(r),s=K(P({h:$e(l,a,!0),s:_e(l,a,!0),v:Le(l,a,!0)}));o.push(s)}o.push(K(r));for(var c=1;c<=We;c+=1){var h=He(r),u=K(P({h:$e(h,c),s:_e(h,c),v:Le(h,c)}));o.push(u)}return n.theme==="dark"?ro.map(function(d){var m=d.index,C=d.opacity,b=K(ao(P(n.backgroundColor||"#141414"),P(o[m]),C*100));return b}):o}var ce={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},de={},ue={};Object.keys(ce).forEach(function(e){de[e]=Y(ce[e]),de[e].primary=de[e][5],ue[e]=Y(ce[e],{theme:"dark",backgroundColor:"#141414"}),ue[e].primary=ue[e][5]});const lo=e=>{const{controlHeight:n}=e;return{controlHeightSM:n*.75,controlHeightXS:n*.5,controlHeightLG:n*1.25}};function io(e){const{sizeUnit:n,sizeStep:o}=e;return{sizeXXL:n*(o+8),sizeXL:n*(o+4),sizeLG:n*(o+2),sizeMD:n*(o+1),sizeMS:n*o,size:n*o,sizeSM:n*(o-1),sizeXS:n*(o-2),sizeXXS:n*(o-3)}}const qe={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Ce=S(S({},qe),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),Y=require("lodash"),Ee=require("@formkit/auto-animate"),D=require("@ant-design/icons-vue"),vt=require("@vueform/multiselect"),yt=require("efko-ui-library");function A(){return A=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},A.apply(null,arguments)}function Ue(e){for(var n=0,o,r=0,a=e.length;a>=4;++r,a-=4)o=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,n=(o&65535)*1540483477+((o>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(e.charCodeAt(r+2)&255)<<16;case 2:n^=(e.charCodeAt(r+1)&255)<<8;case 1:n^=e.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}const Ne="%";class bt{constructor(n){this.cache=new Map,this.instanceId=n}get(n){return this.cache.get(Array.isArray(n)?n.join(Ne):n)||null}update(n,o){const r=Array.isArray(n)?n.join(Ne):n,a=this.cache.get(r),l=o(a);l===null?this.cache.delete(r):this.cache.set(r,l)}}const Ct=e=>{const n=e;return n.install=function(o){o.component(n.displayName||n.name,e)},e};function Ge(e){return{type:Object,default:e}}function ue(e){return{type:Boolean,default:e}}function xt(e,n){const o={validator:()=>!0,default:e};return o}function De(e){return{type:Array,default:e}}function Ie(e){return{type:String,default:e}}function kt(e,n){return e?{type:e,default:n}:xt(n)}const St="data-token-hash",de="data-css-hash",K="__cssinjs_instance__";function Q(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const n=document.body.querySelectorAll(`style[${de}]`)||[],{firstChild:o}=document.head;Array.from(n).forEach(a=>{a[K]=a[K]||e,a[K]===e&&document.head.insertBefore(a,o)});const r={};Array.from(document.querySelectorAll(`style[${de}]`)).forEach(a=>{var l;const s=a.getAttribute(de);r[s]?a[K]===e&&((l=a.parentNode)===null||l===void 0||l.removeChild(a)):r[s]=!0})}return new bt(e)}const Xe=Symbol("StyleContextKey"),wt=()=>{var e,n,o;const r=t.getCurrentInstance();let a;if(r&&r.appContext){const l=(o=(n=(e=r.appContext)===null||e===void 0?void 0:e.config)===null||n===void 0?void 0:n.globalProperties)===null||o===void 0?void 0:o.__ANTDV_CSSINJS_CACHE__;l?a=l:(a=Q(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=a))}else a=Q();return a},We={cache:Q(),defaultCache:!0,hashPriority:"low"},Be=()=>{const e=wt();return t.inject(Xe,t.shallowRef(A(A({},We),{cache:e})))},At=e=>{const n=Be(),o=t.shallowRef(A(A({},We),{cache:Q()}));return t.watch([()=>t.unref(e),n],()=>{const r=A({},n.value),a=t.unref(e);Object.keys(a).forEach(s=>{const c=a[s];a[s]!==void 0&&(r[s]=c)});const{cache:l}=a;r.cache=r.cache||Q(),r.defaultCache=!l&&n.value.defaultCache,o.value=r},{immediate:!0}),t.provide(Xe,o),o},Et=()=>({autoClear:ue(),mock:Ie(),cache:Ge(),defaultCache:ue(),hashPriority:Ie(),container:kt(),ssrInline:ue(),transformers:De(),linters:De()});Ct(t.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:Et(),setup(e,{slots:n}){return At(e),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}}));function Bt(){return!1}let Ce=!1;function Mt(){return Ce}const Tt=process.env.NODE_ENV==="production"?Bt:Mt;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const n=e.webpackHotUpdate;e.webpackHotUpdate=(...o)=>(Ce=!0,setTimeout(()=>{Ce=!1},0),n(...o))}}function Vt(e,n,o,r){const a=Be(),l=t.shallowRef(""),s=t.shallowRef();t.watchEffect(()=>{l.value=[e,...n.value].join("%")});const c=Tt(),h=f=>{a.value.cache.update(f,d=>{const[v=0,x]=d||[];return v-1===0?(r==null||r(x,!1),null):[v-1,x]})};return t.watch(l,(f,d)=>{d&&h(d),a.value.cache.update(f,v=>{const[x=0,C]=v||[];let p=C;process.env.NODE_ENV!=="production"&&C&&c&&(r==null||r(p,c),p=null);const S=p||o();return[x+1,S]}),s.value=a.value.cache.get(l.value)[1]},{immediate:!0}),t.onBeforeUnmount(()=>{h(l.value)}),s}function Nt(e,n){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==n[o])return!1;return!0}class U{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(n,o=!1){let r={map:this.cache};return n.forEach(a=>{var l;r?r=(l=r==null?void 0:r.map)===null||l===void 0?void 0:l.get(a):r=void 0}),r!=null&&r.value&&o&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(n){var o;return(o=this.internalGet(n,!0))===null||o===void 0?void 0:o[0]}has(n){return!!this.internalGet(n)}set(n,o){if(!this.has(n)){if(this.size()+1>U.MAX_CACHE_SIZE+U.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((l,s)=>{const[,c]=l;return this.internalGet(s)[1]<c?[s,this.internalGet(s)[1]]:l},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(n)}let r=this.cache;n.forEach((a,l)=>{if(l===n.length-1)r.set(a,{value:[o,this.cacheCallTimes++]});else{const s=r.get(a);s?s.map||(s.map=new Map):r.set(a,{map:new Map}),r=r.get(a).map}})}deleteByPath(n,o){var r;const a=n.get(o[0]);if(o.length===1)return a.map?n.set(o[0],{map:a.map}):n.delete(o[0]),(r=a.value)===null||r===void 0?void 0:r[0];const l=this.deleteByPath(a.map,o.slice(1));return(!a.map||a.map.size===0)&&!a.value&&n.delete(o[0]),l}delete(n){if(this.has(n))return this.keys=this.keys.filter(o=>!Nt(o,n)),this.deleteByPath(this.cache,n)}}U.MAX_CACHE_SIZE=20;U.MAX_CACHE_OFFSET=5;let xe={};function Dt(e,n){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${n}`)}function It(){xe={}}function Ft(e,n,o){!n&&!xe[o]&&(e(!1,o),xe[o]=!0)}function Ht(e,n){Ft(Dt,e,n)}function $t(){}let qe=$t;process.env.NODE_ENV!=="production"&&(qe=(e,n,o)=>{Ht(e,`[ant-design-vue: ${n}] ${o}`),process.env.NODE_ENV==="test"&&It()});let Fe=0;class Ze{constructor(n){this.derivatives=Array.isArray(n)?n:[n],this.id=Fe,n.length===0&&qe(n.length>0,"[Efko дизайн Vue CSS-in-JS] Theme should have at least one derivative function."),Fe+=1}getDerivativeToken(n){return this.derivatives.reduce((o,r)=>r(n,o),void 0)}}const fe=new U;function _t(e){const n=Array.isArray(e)?e:[e];return fe.has(n)||fe.set(n,new Ze(n)),fe.get(n)}const He=new WeakMap;function ae(e){let n=He.get(e)||"";return n||(Object.keys(e).forEach(o=>{const r=e[o];n+=o,r instanceof Ze?n+=r.id:r&&typeof r=="object"?n+=ae(r):n+=r}),He.set(e,n)),n}function Lt(e,n){return Ue(`${n}_${ae(e)}`)}const $e={},Rt=process.env.NODE_ENV==="production",Pt=process.env.NODE_ENV==="prerender",Ot=!Rt&&!Pt?"css-dev-only-do-not-override":"css",O=new Map;function zt(e){O.set(e,(O.get(e)||0)+1)}function jt(e,n){typeof document<"u"&&document.querySelectorAll(`style[${St}="${e}"]`).forEach(r=>{var a;r[K]===n&&((a=r.parentNode)===null||a===void 0||a.removeChild(r))})}const Ut=0;function Gt(e,n){O.set(e,(O.get(e)||0)-1);const o=Array.from(O.keys()),r=o.filter(a=>(O.get(a)||0)<=0);o.length-r.length>Ut&&r.forEach(a=>{jt(a,n),O.delete(a)})}const Xt=(e,n,o,r)=>{const a=o.getDerivativeToken(e);let l=A(A({},a),n);return r&&(l=r(l)),l};function Wt(e,n,o=t.ref({})){const r=Be(),a=t.computed(()=>A({},...n.value)),l=t.computed(()=>ae(a.value)),s=t.computed(()=>ae(o.value.override||$e));return Vt("token",t.computed(()=>[o.value.salt||"",e.value.id,l.value,s.value]),()=>{const{salt:h="",override:f=$e,formatToken:d,getComputedToken:v}=o.value,x=v?v(a.value,f,e.value):Xt(a.value,f,e.value,d),C=Lt(x,h);x._tokenKey=C,zt(C);const p=`${Ot}-${Ue(C)}`;return x._hashId=p,[x,p]},h=>{var f;Gt(h[0]._tokenKey,(f=r.value)===null||f===void 0?void 0:f.cache.instanceId)})}const qt="1.7.0";function T(e,n){Zt(e)&&(e="100%");var o=Kt(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function ee(e){return Math.min(1,Math.max(0,e))}function Zt(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Kt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ke(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e){return e<=1?"".concat(Number(e)*100,"%"):e}function z(e){return e.length===1?"0"+e:String(e)}function Yt(e,n,o){return{r:T(e,255)*255,g:T(n,255)*255,b:T(o,255)*255}}function _e(e,n,o){e=T(e,255),n=T(n,255),o=T(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=0,c=(r+a)/2;if(r===a)s=0,l=0;else{var h=r-a;switch(s=c>.5?h/(2-r-a):h/(r+a),r){case e:l=(n-o)/h+(n<o?6:0);break;case n:l=(o-e)/h+2;break;case o:l=(e-n)/h+4;break}l/=6}return{h:l,s,l:c}}function pe(e,n,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*(6*o):o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e}function Qt(e,n,o){var r,a,l;if(e=T(e,360),n=T(n,100),o=T(o,100),n===0)a=o,l=o,r=o;else{var s=o<.5?o*(1+n):o+n-o*n,c=2*o-s;r=pe(c,s,e+1/3),a=pe(c,s,e),l=pe(c,s,e-1/3)}return{r:r*255,g:a*255,b:l*255}}function ke(e,n,o){e=T(e,255),n=T(n,255),o=T(o,255);var r=Math.max(e,n,o),a=Math.min(e,n,o),l=0,s=r,c=r-a,h=r===0?0:c/r;if(r===a)l=0;else{switch(r){case e:l=(n-o)/c+(n<o?6:0);break;case n:l=(o-e)/c+2;break;case o:l=(e-n)/c+4;break}l/=6}return{h:l,s:h,v:s}}function Jt(e,n,o){e=T(e,360)*6,n=T(n,100),o=T(o,100);var r=Math.floor(e),a=e-r,l=o*(1-n),s=o*(1-a*n),c=o*(1-(1-a)*n),h=r%6,f=[o,s,l,l,c,o][h],d=[c,o,o,s,l,l][h],v=[l,l,c,o,o,s][h];return{r:f*255,g:d*255,b:v*255}}function Se(e,n,o,r){var a=[z(Math.round(e).toString(16)),z(Math.round(n).toString(16)),z(Math.round(o).toString(16))];return r&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function eo(e,n,o,r,a){var l=[z(Math.round(e).toString(16)),z(Math.round(n).toString(16)),z(Math.round(o).toString(16)),z(to(r))];return a&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function to(e){return Math.round(parseFloat(e)*255).toString(16)}function Le(e){return V(e)/255}function V(e){return parseInt(e,16)}function oo(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var we={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function j(e){var n={r:0,g:0,b:0},o=1,r=null,a=null,l=null,s=!1,c=!1;return typeof e=="string"&&(e=ao(e)),typeof e=="object"&&(_(e.r)&&_(e.g)&&_(e.b)?(n=Yt(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):_(e.h)&&_(e.s)&&_(e.v)?(r=te(e.s),a=te(e.v),n=Jt(e.h,r,a),s=!0,c="hsv"):_(e.h)&&_(e.s)&&_(e.l)&&(r=te(e.s),l=te(e.l),n=Qt(e.h,r,l),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Ke(o),{ok:s,format:e.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:o}}var no="[-\\+]?\\d+%?",ro="[-\\+]?\\d*\\.\\d+%?",P="(?:".concat(ro,")|(?:").concat(no,")"),me="[\\s|\\(]+(".concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")\\s*\\)?"),ge="[\\s|\\(]+(".concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")[,|\\s]+(").concat(P,")\\s*\\)?"),F={CSS_UNIT:new RegExp(P),rgb:new RegExp("rgb"+me),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+me),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+me),hsva:new RegExp("hsva"+ge),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ao(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(we[e])e=we[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=F.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=F.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=F.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=F.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=F.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=F.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=F.hex8.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),a:Le(o[4]),format:n?"name":"hex8"}:(o=F.hex6.exec(e),o?{r:V(o[1]),g:V(o[2]),b:V(o[3]),format:n?"name":"hex"}:(o=F.hex4.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),a:Le(o[4]+o[4]),format:n?"name":"hex8"}:(o=F.hex3.exec(e),o?{r:V(o[1]+o[1]),g:V(o[2]+o[2]),b:V(o[3]+o[3]),format:n?"name":"hex"}:!1)))))))))}function _(e){return!!F.CSS_UNIT.exec(String(e))}var H=function(){function e(n,o){n===void 0&&(n=""),o===void 0&&(o={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=oo(n)),this.originalInput=n;var a=j(n);this.originalInput=n,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=o.format)!==null&&r!==void 0?r:a.format,this.gradientType=o.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),o,r,a,l=n.r/255,s=n.g/255,c=n.b/255;return l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?a=c/12.92:a=Math.pow((c+.055)/1.055,2.4),.2126*o+.7152*r+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Ke(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=ke(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=ke(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.v*100);return this.a===1?"hsv(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsva(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=_e(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=_e(this.r,this.g,this.b),o=Math.round(n.h*360),r=Math.round(n.s*100),a=Math.round(n.l*100);return this.a===1?"hsl(".concat(o,", ").concat(r,"%, ").concat(a,"%)"):"hsla(".concat(o,", ").concat(r,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),Se(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),eo(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),o=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(o,", ").concat(r,")"):"rgba(".concat(n,", ").concat(o,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(o){return"".concat(Math.round(T(o,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(o){return Math.round(T(o,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+Se(this.r,this.g,this.b,!1),o=0,r=Object.entries(we);o<r.length;o++){var a=r[o],l=a[0],s=a[1];if(n===s)return l}return!1},e.prototype.toString=function(n){var o=!!n;n=n??this.format;var r=!1,a=this.a<1&&this.a>=0,l=!o&&a&&(n.startsWith("hex")||n==="name");return l?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l+=n/100,o.l=ee(o.l),new e(o)},e.prototype.brighten=function(n){n===void 0&&(n=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(n/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(n/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(n/100)))),new e(o)},e.prototype.darken=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.l-=n/100,o.l=ee(o.l),new e(o)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s-=n/100,o.s=ee(o.s),new e(o)},e.prototype.saturate=function(n){n===void 0&&(n=10);var o=this.toHsl();return o.s+=n/100,o.s=ee(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var o=this.toHsl(),r=(o.h+n)%360;return o.h=r<0?360+r:r,new e(o)},e.prototype.mix=function(n,o){o===void 0&&(o=50);var r=this.toRgb(),a=new e(n).toRgb(),l=o/100,s={r:(a.r-r.r)*l+r.r,g:(a.g-r.g)*l+r.g,b:(a.b-r.b)*l+r.b,a:(a.a-r.a)*l+r.a};return new e(s)},e.prototype.analogous=function(n,o){n===void 0&&(n=6),o===void 0&&(o=30);var r=this.toHsl(),a=360/o,l=[this];for(r.h=(r.h-(a*n>>1)+720)%360;--n;)r.h=(r.h+a)%360,l.push(new e(r));return l},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var o=this.toHsv(),r=o.h,a=o.s,l=o.v,s=[],c=1/n;n--;)s.push(new e({h:r,s:a,v:l})),l=(l+c)%1;return s},e.prototype.splitcomplement=function(){var n=this.toHsl(),o=n.h;return[this,new e({h:(o+72)%360,s:n.s,l:n.l}),new e({h:(o+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var o=this.toRgb(),r=new e(n).toRgb(),a=o.a+r.a*(1-o.a);return new e({r:(o.r*o.a+r.r*r.a*(1-o.a))/a,g:(o.g*o.a+r.g*r.a*(1-o.a))/a,b:(o.b*o.a+r.b*r.a*(1-o.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var o=this.toHsl(),r=o.h,a=[this],l=360/n,s=1;s<n;s++)a.push(new e({h:(r+s*l)%360,s:o.s,l:o.l}));return a},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}(),oe=2,Re=.16,lo=.05,io=.05,so=.15,Ye=5,Qe=4,co=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Pe(e){var n=e.r,o=e.g,r=e.b,a=ke(n,o,r);return{h:a.h*360,s:a.s,v:a.v}}function ne(e){var n=e.r,o=e.g,r=e.b;return"#".concat(Se(n,o,r,!1))}function uo(e,n,o){var r=o/100,a={r:(n.r-e.r)*r+e.r,g:(n.g-e.g)*r+e.g,b:(n.b-e.b)*r+e.b};return a}function Oe(e,n,o){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=o?Math.round(e.h)-oe*n:Math.round(e.h)+oe*n:r=o?Math.round(e.h)+oe*n:Math.round(e.h)-oe*n,r<0?r+=360:r>=360&&(r-=360),r}function ze(e,n,o){if(e.h===0&&e.s===0)return e.s;var r;return o?r=e.s-Re*n:n===Qe?r=e.s+Re:r=e.s+lo*n,r>1&&(r=1),o&&n===Ye&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function je(e,n,o){var r;return o?r=e.v+io*n:r=e.v-so*n,r>1&&(r=1),Number(r.toFixed(2))}function le(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=[],r=j(e),a=Ye;a>0;a-=1){var l=Pe(r),s=ne(j({h:Oe(l,a,!0),s:ze(l,a,!0),v:je(l,a,!0)}));o.push(s)}o.push(ne(r));for(var c=1;c<=Qe;c+=1){var h=Pe(r),f=ne(j({h:Oe(h,c),s:ze(h,c),v:je(h,c)}));o.push(f)}return n.theme==="dark"?co.map(function(d){var v=d.index,x=d.opacity,C=ne(uo(j(n.backgroundColor||"#141414"),j(o[v]),x*100));return C}):o}var he={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ve={},ye={};Object.keys(he).forEach(function(e){ve[e]=le(he[e]),ve[e].primary=ve[e][5],ye[e]=le(he[e],{theme:"dark",backgroundColor:"#141414"}),ye[e].primary=ye[e][5]});const fo=e=>{const{controlHeight:n}=e;return{controlHeightSM:n*.75,controlHeightXS:n*.5,controlHeightLG:n*1.25}};function po(e){const{sizeUnit:n,sizeStep:o}=e;return{sizeXXL:n*(o+8),sizeXL:n*(o+4),sizeLG:n*(o+2),sizeMD:n*(o+1),sizeMS:n*o,size:n*o,sizeSM:n*(o-1),sizeXS:n*(o-2),sizeXXS:n*(o-3)}}const Je={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Me=A(A({},Je),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
2
2
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
3
|
-
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function
|
|
3
|
+
'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function mo(e,{generateColorPalettes:n,generateNeutralColorPalettes:o}){const{colorSuccess:r,colorWarning:a,colorError:l,colorInfo:s,colorPrimary:c,colorBgBase:h,colorTextBase:f}=e,d=n(c),v=n(r),x=n(a),C=n(l),p=n(s),S=o(h,f);return A(A({},S),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:v[1],colorSuccessBgHover:v[2],colorSuccessBorder:v[3],colorSuccessBorderHover:v[4],colorSuccessHover:v[4],colorSuccess:v[6],colorSuccessActive:v[7],colorSuccessTextHover:v[8],colorSuccessText:v[9],colorSuccessTextActive:v[10],colorErrorBg:C[1],colorErrorBgHover:C[2],colorErrorBorder:C[3],colorErrorBorderHover:C[4],colorErrorHover:C[5],colorError:C[6],colorErrorActive:C[7],colorErrorTextHover:C[8],colorErrorText:C[9],colorErrorTextActive:C[10],colorWarningBg:x[1],colorWarningBgHover:x[2],colorWarningBorder:x[3],colorWarningBorderHover:x[4],colorWarningHover:x[4],colorWarning:x[6],colorWarningActive:x[7],colorWarningTextHover:x[8],colorWarningText:x[9],colorWarningTextActive:x[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorBgMask:new H("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const go=e=>{let n=e,o=e,r=e,a=e;return e<6&&e>=5?n=e+1:e<16&&e>=6?n=e+2:e>=16&&(n=16),e<7&&e>=5?o=4:e<8&&e>=7?o=5:e<14&&e>=8?o=6:e<16&&e>=14?o=7:e>=16&&(o=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:o,borderRadiusLG:n,borderRadiusOuter:a}};function ho(e){const{motionUnit:n,motionBase:o,borderRadius:r,lineWidth:a}=e;return A({motionDurationFast:`${(o+n).toFixed(1)}s`,motionDurationMid:`${(o+n*2).toFixed(1)}s`,motionDurationSlow:`${(o+n*3).toFixed(1)}s`,lineWidthBold:a+1},go(r))}const L=(e,n)=>new H(e).setAlpha(n).toRgbString(),Z=(e,n)=>new H(e).darken(n).toHexString(),vo=e=>{const n=le(e);return{1:n[0],2:n[1],3:n[2],4:n[3],5:n[4],6:n[5],7:n[6],8:n[4],9:n[5],10:n[6]}},yo=(e,n)=>{const o=e||"#fff",r=n||"#000";return{colorBgBase:o,colorTextBase:r,colorText:L(r,.88),colorTextSecondary:L(r,.65),colorTextTertiary:L(r,.45),colorTextQuaternary:L(r,.25),colorFill:L(r,.15),colorFillSecondary:L(r,.06),colorFillTertiary:L(r,.04),colorFillQuaternary:L(r,.02),colorBgLayout:Z(o,4),colorBgContainer:Z(o,0),colorBgElevated:Z(o,0),colorBgSpotlight:L(r,.85),colorBorder:Z(o,15),colorBorderSecondary:Z(o,6)}};function bo(e){const n=new Array(10).fill(null).map((o,r)=>{const a=r-1,l=e*Math.pow(2.71828,a/5),s=r>1?Math.floor(l):Math.ceil(l);return Math.floor(s/2)*2});return n[1]=e,n.map(o=>{const r=o+8;return{size:o,lineHeight:r/o}})}const Co=e=>{const n=bo(e),o=n.map(a=>a.size),r=n.map(a=>a.lineHeight);return{fontSizeSM:o[0],fontSize:o[1],fontSizeLG:o[2],fontSizeXL:o[3],fontSizeHeading1:o[6],fontSizeHeading2:o[5],fontSizeHeading3:o[4],fontSizeHeading4:o[3],fontSizeHeading5:o[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function xo(e){const n=Object.keys(Je).map(o=>{const r=le(e[o]);return new Array(10).fill(1).reduce((a,l,s)=>(a[`${o}-${s+1}`]=r[s],a),{})}).reduce((o,r)=>(o=A(A({},o),r),o),{});return A(A(A(A(A(A(A({},e),n),mo(e,{generateColorPalettes:vo,generateNeutralColorPalettes:yo})),Co(e.fontSize)),po(e)),fo(e)),ho(e))}function be(e){return e>=0&&e<=255}function re(e,n){const{r:o,g:r,b:a,a:l}=new H(e).toRgb();if(l<1)return e;const{r:s,g:c,b:h}=new H(n).toRgb();for(let f=.01;f<=1;f+=.01){const d=Math.round((o-s*(1-f))/f),v=Math.round((r-c*(1-f))/f),x=Math.round((a-h*(1-f))/f);if(be(d)&&be(v)&&be(x))return new H({r:d,g:v,b:x,a:Math.round(f*100)/100}).toRgbString()}return new H({r:o,g:r,b:a,a:1}).toRgbString()}var ko=function(e,n){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o};function So(e){const{override:n}=e,o=ko(e,["override"]),r=A({},n);Object.keys(Me).forEach(C=>{delete r[C]});const a=A(A({},o),r),l=480,s=576,c=768,h=992,f=1200,d=1600,v=2e3;return A(A(A({},a),{colorLink:a.colorInfoText,colorLinkHover:a.colorInfoHover,colorLinkActive:a.colorInfoActive,colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:re(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:re(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:re(a.colorWarningBg,a.colorBgContainer),colorLogo:a.colorLogo,colorSelectedMenu:a.colorSelectedMenu,mainBgColor:a.mainBgColor,fontSizeIcon:a.fontSizeSM,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:re(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
4
4
|
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
5
5
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
6
6
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
13
13
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
14
14
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
15
|
-
`,screenXS:l,screenXSMin:l,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:h-1,screenLG:h,screenLGMin:h,screenLGMax:
|
|
16
|
-
0 1px 2px -2px ${new
|
|
17
|
-
0 3px 6px 0 ${new
|
|
18
|
-
0 5px 12px 4px ${new
|
|
15
|
+
`,screenXS:l,screenXSMin:l,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:h-1,screenLG:h,screenLGMin:h,screenLGMax:f-1,screenXL:f,screenXLMin:f,screenXLMax:d-1,screenXXL:d,screenXXLMin:d,screenXXLMax:v-1,screenXXXL:v,screenXXXLMin:v,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
16
|
+
0 1px 2px -2px ${new H("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
17
|
+
0 3px 6px 0 ${new H("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
18
|
+
0 5px 12px 4px ${new H("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
19
19
|
`,boxShadowDrawerRight:`
|
|
20
20
|
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
21
21
|
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
33
33
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
34
34
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
35
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}const bo=It(ho),xo={token:Ce,hashed:!0},Ze=Symbol("DesignTokenContext"),ye=t.shallowRef(),Co=e=>{t.provide(Ze,e),t.watch(e,()=>{ye.value=t.unref(e),t.triggerRef(ye)},{immediate:!0,deep:!0})};t.defineComponent({props:{value:Pe()},setup(e,{slots:n}){return Co(t.computed(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Ke(){const e=t.inject(Ze,t.computed(()=>ye.value||xo)),n=t.computed(()=>`${jt}-${e.value.hashed||""}`),o=t.computed(()=>e.value.theme||bo),r=zt(o,t.computed(()=>[Ce,e.value.token]),t.computed(()=>({salt:n.value,override:S({override:e.value.token},e.value.components),formatToken:yo})));return[o,t.computed(()=>r.value[0]),t.computed(()=>e.value.hashed?r.value[1]:"")]}const ko={class:"flex flex-wrap tag-cloud"},So={class:"flex flex-wrap"},wo=t.defineComponent({__name:"FilterTagCloud",props:{filters:{}},emits:["update:filters","remove","clear"],setup(e,{emit:n}){const o=e,r=n,[,a]=Ke(),l=t.computed(()=>({color:a.value.colorSelectedMenu,borderColor:a.value.colorBorderSecondary,backgroundColor:a.value.mainBgColor||a.value.colorPrimaryBg})),s=i=>i==null?!1:Array.isArray(i)?i.length>0:!!i,c=t.computed(()=>Object.values(o.filters).some(s));function h(i){return typeof i=="object"&&i!==null&&"name"in i&&typeof i.name=="string"}const u=i=>{if(typeof i=="string")return{key:i,label:i,original:i};if(Array.isArray(i)){if(i.length===2&&typeof i[0]=="string"&&typeof i[1]=="string"){const f=`${i[0]} - ${i[1]}`;return{key:f,label:f,original:i}}const y=i.join(", ");return{key:y,label:y,original:i}}if(h(i)){const y=i.name;return{key:y,label:y,original:i}}const v=JSON.stringify(i);return{key:v,label:v,original:i}},d=i=>i==null?[]:Array.isArray(i)?i.map(v=>u(v)):[u(i)],m=(i,v)=>typeof i=="string"||typeof v=="string"?i===v:JSON.stringify(i)===JSON.stringify(v),C=(i,v,y)=>{if(Array.isArray(v)){const f=v.filter(p=>!m(p,y));r("update:filters",{...o.filters,[i]:f})}else r("update:filters",{...o.filters,[i]:null});r("remove",i,v,y)},b=()=>{r("update:filters",{}),r("clear")};return(i,v)=>{const y=t.resolveComponent("a-tag"),f=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",ko,[t.createElementVNode("div",So,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.entries(e.filters),([p,g])=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:p},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d(g),k=>(t.openBlock(),t.createBlock(y,{key:k.key,class:"filter-tag",closable:!0,style:t.normalizeStyle(l.value),onClose:()=>C(p,g,k.original)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.label),1)]),_:2},1032,["style","onClose"]))),128))],64))),128))]),c.value?(t.openBlock(),t.createBlock(f,{key:0,type:"link",onClick:b},{default:t.withCtx(()=>[...v[0]||(v[0]=[t.createTextVNode(" Очистить все ",-1)])]),_:1})):t.createCommentVNode("",!0)])}}}),z=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},Eo=z(wo,[["__scopeId","data-v-39962791"]]),Bo={class:"flex items-center justify-center text-lg"},ee=t.defineComponent({__name:"TableCellStatus",props:{value:{}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",Bo,[e.value?(t.openBlock(),t.createBlock(t.unref(V.CheckCircleTwoTone),{key:1,"two-tone-color":"#bfbfbf"})):(t.openBlock(),t.createBlock(t.unref(V.CheckCircleTwoTone),{key:0,"two-tone-color":"#4ade80"}))]))}}),Ao={class:"flex items-center justify-center gap-2"},Mo=t.defineComponent({__name:"CardCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=o.canEdit??!0,l=o.editAction??!0,s=u=>r("delete",u),c=u=>r("restore",u),h=u=>r("edit",u);return(u,d)=>{const m=t.resolveComponent("a-button"),C=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",Ao,[t.unref(a)===!1?(t.openBlock(),t.createBlock(C,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(t.unref(V.EyeOutlined)),onClick:d[0]||(d[0]=b=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.unref(a)!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(l)!==!1?(t.openBlock(),t.createBlock(C,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(t.unref(V.EditOutlined)),onClick:d[1]||(d[1]=b=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(C,{title:e.record.deletedAt?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(m,{icon:t.h(e.record.deletedAt?t.unref(V.RedoOutlined):t.unref(V.DeleteOutlined)),onClick:d[2]||(d[2]=b=>e.record.deletedAt?c(e.record):s(e.record))},null,8,["icon"])]),_:1},8,["title"])],64)):t.createCommentVNode("",!0)])}}}),Vo={class:"data-card__header"},To={class:"data-card__body"},No={class:"data-card__label"},Io={class:"data-card__value"},Do={key:0},Fo={key:2},Ho={key:3},$o={key:4},_o={key:5},Lo={key:0,class:"data-card__footer"},Ro=t.defineComponent({__name:"TheCard",props:{loading:{type:Boolean},record:{},columns:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean}},emits:["delete","restore","edit"],setup(e,{emit:n}){const o=e,r=y=>o.record[String(y.dataIndex)],a=y=>{if(y===null||typeof y!="object")return"";if("name"in y){const f=y.name;return typeof f=="string"?f:""}return""},l=y=>y==null?!0:typeof y=="string"?y.trim().length===0:!1,s=y=>y==null?"":typeof y=="string"?y.trim():typeof y=="object"?a(y):String(y),c=y=>{const f=r(y);return Array.isArray(f)?f.map(p=>s(p)).filter(p=>p.trim().length>0):[]},h=y=>c(y).map((f,p)=>({key:`${f}-${p}`,label:f})),u=n,d=o.canEdit??!0,m=o.editAction??!0,C=o.showActionsColumn??!0,b=y=>u("delete",y),i=y=>u("restore",y),v=y=>u("edit",y);return(y,f)=>{const p=t.resolveComponent("a-tag"),g=t.resolveComponent("a-card");return t.openBlock(),t.createBlock(g,{loading:e.loading,bordered:!1,class:"data-card bg-white rounded-3 shadow-sm"},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",Vo,[t.renderSlot(y.$slots,"title",{},void 0,!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",To,[t.renderSlot(y.$slots,"body",{record:e.record,columns:e.columns},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,k=>(t.openBlock(),t.createElementBlock("div",{key:k.dataIndex,class:"data-card__row"},[t.createElementVNode("span",No,t.toDisplayString(k.title)+": ",1),t.createElementVNode("span",Io,[k.dataIndex==="deletedAt"?(t.openBlock(),t.createElementBlock("span",Do,[t.createVNode(ee,{value:e.record.deletedAt},null,8,["value"])])):Array.isArray(r(k))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h(k),w=>(t.openBlock(),t.createBlock(p,{key:w.key,class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(w.label),1)]),_:2},1024))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(c(k),(w,A)=>(t.openBlock(),t.createElementBlock("span",{key:A},[t.createTextVNode(t.toDisplayString(w)+" ",1),A<c(k).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" , ")],64)):t.createCommentVNode("",!0)]))),128))],64)):typeof r(k)=="boolean"?(t.openBlock(),t.createElementBlock("span",Fo,[t.createVNode(ee,{value:!r(k)},null,8,["value"])])):r(k)!==null&&typeof r(k)=="object"?(t.openBlock(),t.createElementBlock("span",Ho,t.toDisplayString(a(r(k))),1)):k.tag===!0?(t.openBlock(),t.createElementBlock("span",$o,[l(r(k))?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(p,{key:0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r(k)),1)]),_:2},1024))])):(t.openBlock(),t.createElementBlock("span",_o,t.toDisplayString(r(k)),1))])]))),128))],!0)]),y.$slots.footer?(t.openBlock(),t.createElementBlock("div",Lo,[t.renderSlot(y.$slots,"footer",{record:e.record,columns:e.columns},void 0,!0)])):t.createCommentVNode("",!0)]),_:2},[t.unref(C)?{name:"actions",fn:t.withCtx(()=>[t.createVNode(Mo,{record:e.record,"can-edit":t.unref(d),"edit-action":t.unref(m),onEdit:v,onDelete:b,onRestore:i},null,8,["record","can-edit","edit-action"])]),key:"0"}:void 0]),1032,["loading"])}}}),Po=z(Ro,[["__scopeId","data-v-c6be2770"]]),Oo={class:"efko-dataview"},Qe=t.defineComponent({__name:"LazyLoadTrigger",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},loading:{type:Boolean}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{var c;l[0].isIntersecting&&((c=n.onIntersect)==null||c.call(n),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r&&r.disconnect()}),(l,s)=>{const c=t.resolveComponent("a-spin");return t.openBlock(),t.createElementBlock("div",Oo,[t.createElementVNode("div",{ref_key:"container",ref:o,style:{height:"1px"},class:"flex items-center justify-center py-5"},[t.createVNode(c,{spinning:e.loading},null,8,["spinning"])],512)])}}}),zo={class:"efko-dataview"},jo={class:"flex flex-col gap-4"},Uo=t.defineComponent({__name:"CardGrid",props:{loading:{type:Boolean},columns:{},dataSource:{},cardLayout:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean},pagination:{type:Boolean},meta:{}},emits:["delete","restore","edit","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n;t.onMounted(()=>{const d=document.querySelector(".card-grid");d!==null&&be(d)});const a=t.computed(()=>o.cardLayout==="row"?"card-grid card-grid--row":"card-grid card-grid--grid"),l=t.computed(()=>o.columns),s=t.ref([]),c=()=>{var C;if(((C=o.meta)==null?void 0:C.currentPage)===1){s.value=[...o.dataSource];return}const d=new Set(s.value.map(b=>b.id)),m=o.dataSource.filter(b=>!d.has(b.id));s.value.push(...m)};c(),t.watch(()=>{var d;return[o.dataSource,(d=o.meta)==null?void 0:d.currentPage]},c,{deep:!0});const h=t.computed(()=>o.meta===void 0?!0:o.meta.currentPage*o.meta.pageSize>=o.meta.total),u=()=>{o.loading||h.value||!o.meta||r("pageChange",o.meta.currentPage+1)};return(d,m)=>(t.openBlock(),t.createElementBlock("div",zo,[t.createElementVNode("div",jo,[t.createElementVNode("div",{class:t.normalizeClass(a.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(C,b)=>(t.openBlock(),t.createBlock(Po,{key:String(C.id??`card-${b}`),loading:e.loading,record:C,columns:l.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,onEdit:m[0]||(m[0]=i=>r("edit",i)),onDelete:m[1]||(m[1]=i=>r("delete",i)),onRestore:m[2]||(m[2]=i=>r("restore",i))},t.createSlots({_:2},[d.$slots.titleCard?{name:"title",fn:t.withCtx(()=>[t.renderSlot(d.$slots,"titleCard",{record:C,columns:l.value},void 0,!0)]),key:"0"}:void 0,d.$slots.bodyCard?{name:"body",fn:t.withCtx(({record:i,columns:v})=>[t.renderSlot(d.$slots,"bodyCard",{record:i,columns:v},void 0,!0)]),key:"1"}:void 0,d.$slots.footerCard?{name:"footer",fn:t.withCtx(({record:i,columns:v})=>[t.renderSlot(d.$slots,"footerCard",{record:i,columns:v},void 0,!0)]),key:"2"}:void 0]),1032,["loading","record","columns","can-edit","edit-action","show-actions-column"]))),128))],2),e.pagination&&!h.value?(t.openBlock(),t.createBlock(Qe,{key:0,loading:e.loading,once:!1,"on-intersect":u},null,8,["loading"])):t.createCommentVNode("",!0)])]))}}),Je=z(Uo,[["__scopeId","data-v-e3e3f0a2"]]),Ye="10",Go="20",Xo="50",Wo="100",qo="1000",Zo=1,Ko=Ye;var $=(e=>(e.SEARCH="search",e.SELECT="select",e.DATE="date",e))($||{}),et=(e=>(e.SMALL="10",e.MEDIUM="20",e.LARGE="50",e.EXTRA_LARGE="100",e.ULTRA="1000",e))(et||{});const Qo=["10","20","50","100"];var tt=(e=>(e[e.NONE=0]="NONE",e[e.SMALL=10]="SMALL",e[e.MEDIUM=20]="MEDIUM",e[e.LARGE=50]="LARGE",e))(tt||{}),ot=(e=>(e[e.DEFAULT_CURRENT_PAGE=1]="DEFAULT_CURRENT_PAGE",e))(ot||{}),te=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(te||{}),nt=(e=>(e.ASC="asc",e.DESC="desc",e))(nt||{});const Jo=t.defineComponent({name:"MultiselectWrapper",components:{VueMultiselect:ft},props:{modelValue:{type:[Array,String,Number,Object,Boolean,null],default:null}},emits:["update:modelValue"],data(){return{simpleImage:pt.Empty.PRESENTED_IMAGE_SIMPLE}}});function Yo(e,n,o,r,a,l){const s=t.resolveComponent("a-empty"),c=t.resolveComponent("VueMultiselect");return t.openBlock(),t.createBlock(c,t.mergeProps(e.$attrs,{class:"filter-select",modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=h=>e.$emit("update:modelValue",h)),label:"name","value-prop":"id"}),{nooptions:t.withCtx(()=>[t.createVNode(s,{image:e.simpleImage},null,8,["image"])]),_:1},16,["modelValue"])}const rt=z(Jo,[["render",Yo],["__scopeId","data-v-cfb3f123"]]),en={class:"efko-dataview"},tn={class:"flex items-center gap-2 p-2"},on=t.defineComponent({__name:"FilterDropdown",props:{placeholder:{},filterMode:{},componentProps:{}},emits:["update:modelValue","apply"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===$.SEARCH?"a-input":o.filterMode===$.SELECT?rt:o.filterMode===$.DATE?"a-range-picker":null),l=t.ref(null),s=()=>{r("update:modelValue",l.value),r("apply")};return(c,h)=>{const u=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",en,[t.createElementVNode("div",tn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":h[0]||(h[0]=d=>l.value=d),modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=d=>l.value=d),placeholder:e.placeholder,style:{"min-width":"240px","max-width":"300px","font-size":"14px"},object:""}),null,16,["value","modelValue","placeholder"])),t.createVNode(u,{type:"primary",size:"small",onClick:s},{default:t.withCtx(()=>[...h[2]||(h[2]=[t.createTextVNode(" Добавить ",-1)])]),_:1})])])}}}),nn={class:"flex items-center justify-center gap-2"},rn=t.defineComponent({__name:"TableCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=c=>{r("delete",c)},l=c=>{r("restore",c)},s=c=>{r("edit",c)};return(c,h)=>{const u=t.resolveComponent("a-button"),d=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",nn,[o.canEdit===!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(u,{icon:t.h(t.unref(V.EyeOutlined)),onClick:h[0]||(h[0]=m=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.canEdit!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.editAction!==!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(u,{icon:t.h(t.unref(V.EditOutlined)),onClick:h[1]||(h[1]=m=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.deleteAction!==!1?(t.openBlock(),t.createBlock(d,{key:1,title:e.record.isDeleted?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(u,{icon:t.h(e.record.isDeleted?t.unref(V.RedoOutlined):t.unref(V.DeleteOutlined)),onClick:h[2]||(h[2]=m=>e.record.isDeleted?l(e.record):a(e.record))},null,8,["icon"])]),_:1},8,["title"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)])}}}),an={key:0},ln={key:1},sn={key:2},cn={key:3},dn={key:4},un={key:5},at=t.defineComponent({__name:"TableBodyCell",props:{loading:{type:Boolean},column:{},record:{},tagStyle:{}},setup(e){const n=e,o=t.computed(()=>n.record[String(n.column.dataIndex)]),r=u=>u==null?!0:typeof u=="string"?u.trim().length===0:!1,a=u=>{if(u===null||typeof u!="object")return"";if("name"in u){const d=u.name;return typeof d=="string"?d:""}return""},l=u=>u==null?"":typeof u=="string"?u.trim():typeof u=="object"?a(u):String(u),s=t.computed(()=>{const u=o.value;return Array.isArray(u)?u.map(d=>l(d)).filter(d=>d.trim().length>0):[]}),c=t.computed(()=>s.value.map((u,d)=>({key:`${u}-${d}`,label:u}))),h=t.computed(()=>!r(o.value));return(u,d)=>{const m=t.resolveComponent("a-skeleton"),C=t.resolveComponent("a-tag");return e.loading?(t.openBlock(),t.createBlock(m,{key:0,active:!0,loading:!0,title:!1,paragraph:{rows:1}})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.column.dataIndex==="isDeleted"?(t.openBlock(),t.createElementBlock("span",an,[t.createVNode(ee,{value:e.record.isDeleted},null,8,["value"])])):Array.isArray(o.value)?(t.openBlock(),t.createElementBlock("span",ln,[e.column.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(c.value,b=>(t.openBlock(),t.createBlock(C,{key:b.key,style:t.normalizeStyle(e.tagStyle),class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:2},1032,["style"]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(s.value,(b,i)=>(t.openBlock(),t.createElementBlock("span",{key:i},[t.createTextVNode(t.toDisplayString(b)+" ",1),i<s.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)]))),128))])):typeof o.value=="boolean"?(t.openBlock(),t.createElementBlock("span",sn,[t.createVNode(ee,{value:!o.value},null,8,["value"])])):o.value!==null&&typeof o.value=="object"?(t.openBlock(),t.createElementBlock("span",cn,t.toDisplayString(a(o.value)),1)):e.column.tag===!0?(t.openBlock(),t.createElementBlock("span",dn,[h.value?(t.openBlock(),t.createBlock(C,{key:0,style:t.normalizeStyle(e.tagStyle)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(o.value)),1)]),_:1},8,["style"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64))])):(t.openBlock(),t.createElementBlock("span",un,t.toDisplayString(o.value),1))],64))}}}),fn={class:"efko-dataview"},pn={class:"flex items-center justify-between"},mn={class:"flex items-center gap-2"},lt=t.defineComponent({__name:"TheTable",props:{loading:{type:Boolean},pagination:{type:Boolean},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean},showActionsColumn:{type:Boolean},columnsVisibility:{},disableColumnFilterDropdowns:{type:Boolean},showFilterButton:{type:Boolean}},emits:["update:filterValues","filterApply","restore","edit","delete","sortChange","pageChange","sizeChange","openColumnDrawer","openFilterDrawer"],setup(e,{emit:n}){const[,o]=Ke(),r=e,a=n,l=t.computed(()=>r.showFilterButton===!0),s=t.ref(r.filterValues||{}),c=t.ref([...r.columns]),h=t.ref({}),u=t.computed(()=>r.disableColumnFilterDropdowns===!0?[]:c.value.filter(f=>f.filterable)),d=t.computed(()=>{const p=c.value.filter(g=>{if(g.filterOnly)return!1;const k=g.key||String(g.dataIndex);return r.columnsVisibility[k]!==!1}).map(g=>{const{headerAlign:k,cellAlign:w,...A}=g;return{...A,sorter:!!A.sortable,sortDirections:A.sortable?[te.ASCEND,te.DESCEND]:void 0,customHeaderCell:()=>k?{style:{textAlign:k}}:void 0,customCell:()=>w?{style:{textAlign:w}}:void 0,customFilterDropdown:!!A.filterable,slots:A.filterable?{filterDropdown:`filter${String(A.dataIndex)}Dropdown`}:void 0}});return r.showActionsColumn!==!1&&r.columnsVisibility.actions!==!1&&p.push({title:"Действия",key:"actions",dataIndex:"actions",width:100,slots:{customRender:"actionColumn"}}),p}),m=t.computed(()=>Object.keys(r.columnsVisibility).filter(f=>r.columnsVisibility[f]===!1).length),C=t.computed(()=>({color:o.value.colorSelectedMenu,borderColor:o.value.colorBorderSecondary,backgroundColor:o.value.mainBgColor||o.value.colorPrimaryBg})),b=(f,p)=>{const g=s.value[f];if(p===null){const w={...s.value,[f]:null};h.value[f]=null,a("filterApply",{key:f,value:[]}),a("update:filterValues",w),s.value=w;return}if(G.isEqual(g,p)){h.value[f]=null;return}const k={...s.value,[f]:p};a("filterApply",{key:f,value:[p]}),a("update:filterValues",k),s.value=k,h.value[f]=null},i=f=>f.isGroup?"parent-row":"",v=(f,p,g)=>{a("sortChange",{columnKey:g.columnKey||"",order:g.order||null})},y=(f,p)=>{const g=p.key||String(p.dataIndex),k=c.value.findIndex(w=>(w.key||String(w.dataIndex))===g);k!==-1&&c.value.splice(k,1,{...p,width:f})};return t.watch(()=>r.filterValues,f=>{s.value=f||{}}),t.watch(()=>r.columns,f=>{c.value=[...f]},{immediate:!0}),t.onMounted(()=>{const f=document.querySelector(".the-table tbody");f!==null&&be(f)}),(f,p)=>{var R,Se,we,Ee;const g=t.resolveComponent("Icon"),k=t.resolveComponent("a-button"),w=t.resolveComponent("a-badge"),A=t.resolveComponent("a-table"),x=t.resolveComponent("a-pagination");return t.openBlock(),t.createElementBlock("div",fn,[t.createVNode(A,{bordered:"","table-layout":"fixed",class:"the-table",loading:e.loading,columns:d.value,"data-source":e.dataSource,"row-key":E=>E.id,pagination:!1,scroll:{x:"max-content"},"row-class-name":i,onChange:v,onResizeColumn:y},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",pn,[t.createElementVNode("div",mn,[t.createVNode(w,{dot:"",count:m.value},{default:t.withCtx(()=>[t.createVNode(k,{class:"flex items-center justify-center p-2",onClick:p[0]||(p[0]=E=>f.$emit("openColumnDrawer"))},{default:t.withCtx(()=>[t.createVNode(g,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),l.value?(t.openBlock(),t.createBlock(k,{key:0,class:"flex items-center justify-center p-2",onClick:p[1]||(p[1]=E=>f.$emit("openFilterDrawer"))},{default:t.withCtx(()=>[t.createVNode(g,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(f.$slots,"title")])]),bodyCell:t.withCtx(({column:E,record:F})=>[t.renderSlot(f.$slots,"bodyCell",{column:E,record:F},()=>[t.createVNode(at,{loading:e.loading,column:E,record:F,"tag-style":C.value},null,8,["loading","column","record","tag-style"])])]),actionColumn:t.withCtx(({record:E})=>[t.renderSlot(f.$slots,"actionColumn",{record:E},()=>[t.createVNode(rn,{"edit-action":e.editAction,"delete-action":e.deleteAction,"can-edit":e.canEdit,record:E,onEdit:()=>f.$emit("edit",E),onDelete:()=>f.$emit("delete",E),onRestore:()=>f.$emit("restore",E)},null,8,["edit-action","delete-action","can-edit","record","onEdit","onDelete","onRestore"])])]),_:2},[t.renderList(u.value,E=>({name:`filter${String(E.dataIndex)}Dropdown`,fn:t.withCtx(()=>[t.createVNode(on,{modelValue:h.value[E.dataIndex],"onUpdate:modelValue":[F=>h.value[E.dataIndex]=F,F=>b(E.dataIndex,F)],"filter-mode":E.filterMode,"component-props":E.componentProps,placeholder:E.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])])}))]),1032,["loading","columns","data-source","row-key"]),e.pagination?(t.openBlock(),t.createBlock(x,{key:0,class:"mt-4 text-right",current:(R=e.meta)==null?void 0:R.currentPage,"page-size":(Se=e.meta)==null?void 0:Se.pageSize,total:(we=e.meta)==null?void 0:we.total,"show-total":E=>`Всего ${E} элементов`,"page-size-options":(Ee=e.meta)==null?void 0:Ee.pageSizeOptions,"show-size-changer":!0,onChange:p[2]||(p[2]=E=>f.$emit("pageChange",E)),onShowSizeChange:p[3]||(p[3]=(E,F)=>f.$emit("sizeChange",E,F))},null,8,["current","page-size","total","show-total","page-size-options"])):t.createCommentVNode("",!0)])}}}),gn={class:"mb-4"},hn={class:"flex flex-col gap-1"},it=t.defineComponent({__name:"ColumnSettingsDrawer",props:{visible:{type:Boolean},columns:{},modelValue:{},showActionsColumn:{type:Boolean},disableViewMode:{type:Boolean},viewMode:{},cardLayout:{}},emits:["update:visible","update:modelValue","update:viewMode","update:cardLayout"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.ref(o.viewMode),s=t.ref(o.cardLayout),c=t.reactive({...o.modelValue}),h=t.computed(()=>l.value==="grid"),u=o.disableViewMode||!1;return t.watch(()=>o.visible,d=>{a.value=d}),t.watch(a,d=>{r("update:visible",d)}),t.watch(()=>o.viewMode,d=>{l.value=d}),t.watch(l,d=>{r("update:viewMode",d)}),t.watch(()=>o.cardLayout,d=>{s.value=d}),t.watch(s,d=>{r("update:cardLayout",d)}),t.watch(()=>o.modelValue,d=>Object.assign(c,d),{deep:!0}),t.watch(c,d=>r("update:modelValue",{...d}),{deep:!0}),o.showActionsColumn&&c.actions===void 0&&(c.actions=!0),(d,m)=>{const C=t.resolveComponent("a-checkbox"),b=t.resolveComponent("a-radio"),i=t.resolveComponent("a-radio-group"),v=t.resolveComponent("a-radio-button"),y=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(y,{open:a.value,"onUpdate:open":m[2]||(m[2]=f=>a.value=f),class:"efko-dataview",title:"Настройки представления",placement:"right"},{default:t.withCtx(()=>[t.createElementVNode("section",gn,[m[3]||(m[3]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Отображение колонок",-1)),t.createElementVNode("div",hn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,f=>(t.openBlock(),t.createElementBlock("div",{key:f.key??f.dataIndex},[t.createVNode(C,{checked:c[f.key??f.dataIndex],"onUpdate:checked":p=>c[f.key??f.dataIndex]=p,disabled:h.value,class:"flex"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f.title),1)]),_:2},1032,["checked","onUpdate:checked","disabled"])]))),128))])]),t.createElementVNode("section",null,[m[8]||(m[8]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Вид",-1)),t.createVNode(i,{value:l.value,"onUpdate:value":m[0]||(m[0]=f=>l.value=f),"button-style":"solid",class:"mb-3",disabled:t.unref(u)},{default:t.withCtx(()=>[t.createVNode(b,{value:"table"},{default:t.withCtx(()=>[...m[4]||(m[4]=[t.createTextVNode("Таблица",-1)])]),_:1}),t.createVNode(b,{value:"grid"},{default:t.withCtx(()=>[...m[5]||(m[5]=[t.createTextVNode("Карточки",-1)])]),_:1})]),_:1},8,["value","disabled"]),t.createVNode(i,{value:s.value,"onUpdate:value":m[1]||(m[1]=f=>s.value=f),"button-style":"solid",disabled:!h.value},{default:t.withCtx(()=>[t.createVNode(v,{value:"grid"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.AppstoreOutlined),{class:"mr-2"}),m[6]||(m[6]=t.createTextVNode("Сетка ",-1))]),_:1}),t.createVNode(v,{value:"row"},{default:t.withCtx(()=>[t.createVNode(t.unref(V.PicCenterOutlined),{class:"mr-2"}),m[7]||(m[7]=t.createTextVNode("Строка ",-1))]),_:1})]),_:1},8,["value","disabled"])])]),_:1},8,["open"])}}}),st=t.defineComponent({__name:"FilterInput",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null]},filterMode:{},componentProps:{},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===$.SEARCH?"a-input":o.filterMode===$.SELECT?rt:o.filterMode===$.DATE?"a-range-picker":"a-input"),l=t.ref(o.modelValue);return t.watch(()=>o.modelValue,s=>{l.value=s}),t.watch(l,s=>r("update:modelValue",s)),(s,c)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":c[0]||(c[0]=h=>l.value=h),modelValue:l.value,"onUpdate:modelValue":c[1]||(c[1]=h=>l.value=h),placeholder:e.placeholder,class:"w-full text-sm"}),null,16,["value","modelValue","placeholder"]))}}),vn={class:"text-sm font-medium"},yn={class:"mt-2 flex flex-col gap-2"},bn=t.defineComponent({__name:"CardFiltersDrawer",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>Array.isArray(i)?i:i!=null?[i]:[],h=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,u=t.computed(()=>o.columns.filter(i=>i.filterable)),d=t.computed(()=>Object.keys(l).some(i=>!G.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(v=>{delete l[v]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const C=()=>{const i={...o.filterValues};Object.entries(l).forEach(([v,y])=>{if(h(y)){i[v]=null,r("filterApply",{key:v,value:[]});return}i[v]=y,r("filterApply",{key:v,value:c(y)})}),r("update:filterValues",i),a.value=!1},b=()=>{Object.keys(l).forEach(v=>{delete l[v]}),r("update:filterValues",{})};return(i,v)=>{const y=t.resolveComponent("a-button"),f=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(f,{open:a.value,"onUpdate:open":v[0]||(v[0]=p=>a.value=p),class:"efko-dataview",placement:"right",width:"360",title:"Фильтры","body-style":"padding: 24px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,p=>(t.openBlock(),t.createElementBlock("section",{key:s(p),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",vn,t.toDisplayString(p.title),1),t.createVNode(st,{modelValue:l[s(p)],"onUpdate:modelValue":g=>l[s(p)]=g,"filter-mode":p.filterMode,"component-props":p.componentProps,placeholder:p.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128)),t.createElementVNode("div",yn,[t.createVNode(y,{block:"",onClick:b},{default:t.withCtx(()=>[...v[1]||(v[1]=[t.createTextVNode(" Сбросить ",-1)])]),_:1}),t.createVNode(y,{type:"primary",block:"",disabled:!d.value,onClick:C},{default:t.withCtx(()=>[...v[2]||(v[2]=[t.createTextVNode(" Применить ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),ct=z(bn,[["__scopeId","data-v-2b4aab81"]]),xn={class:"text-sm font-medium"},Cn=t.defineComponent({__name:"CardFiltersModal",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>Array.isArray(i)?i:i!=null?[i]:[],h=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,u=t.computed(()=>o.columns.filter(i=>i.filterable)),d=t.computed(()=>Object.keys(l).some(i=>!G.isEqual(l[i],o.filterValues[i]))),m=i=>{Object.keys(l).forEach(v=>{delete l[v]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&m(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{m(i)},{deep:!0});const C=()=>{const i={...o.filterValues};Object.entries(l).forEach(([v,y])=>{if(h(y)){i[v]=null,r("filterApply",{key:v,value:[]});return}i[v]=y,r("filterApply",{key:v,value:c(y)})}),r("update:filterValues",i),a.value=!1},b=()=>{a.value=!1};return(i,v)=>{const y=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(y,{visible:a.value,"onUpdate:visible":v[0]||(v[0]=f=>a.value=f),class:"efko-dataview",title:"Фильтры","destroy-on-close":"","ok-text":"Применить","cancel-text":"Сбросить","ok-button-props":{disabled:!d.value},onOk:C,onCancel:b},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,f=>(t.openBlock(),t.createElementBlock("section",{key:s(f),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",xn,t.toDisplayString(f.title),1),t.createVNode(st,{modelValue:l[s(f)],"onUpdate:modelValue":p=>l[s(f)]=p,"filter-mode":f.filterMode,"component-props":f.componentProps,placeholder:f.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128))]),_:1},8,["visible","ok-button-props"])}}}),dt=z(Cn,[["__scopeId","data-v-f8bc496a"]]);var oe=(e=>(e.Table="table",e.Grid="grid",e))(oe||{}),ke=(e=>(e.Grid="grid",e.Row="row",e))(ke||{});const kn={class:"efko-dataview"},Sn={class:"flex items-center justify-between gap-2 mb-2"},wn={class:"flex items-center gap-1"},ut=t.defineComponent({__name:"DataView",props:{viewMode:{},loading:{type:Boolean},pagination:{type:Boolean,default:!1},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean,default:!0},editAction:{type:Boolean,default:!0},deleteAction:{type:Boolean,default:!0},showActionsColumn:{type:Boolean,default:!0},disableViewMode:{type:Boolean,default:!1},enableTableFilterDrawer:{type:Boolean,default:!1},disableColumnFilterDropdowns:{type:Boolean,default:!1},useFilterModal:{type:Boolean,default:!1}},emits:["update:viewMode","update:filterValues","filterApply","edit","delete","restore","sortChange","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.viewMode||oe.Table),l=t.computed(()=>(a==null?void 0:a.value)===oe.Grid),s=t.ref(ke.Grid),c=t.ref(o.filterValues||{}),h=t.ref(null),u=p=>{c.value=p,r("update:filterValues",p)},d=(p,g,k)=>{const w={...c.value};if(g===void 0){u(w);return}if(Array.isArray(g)){w[p]=g.filter(A=>!G.isEqual(A,k)),u(w);return}if(G.isEqual(g,k)){w[p]=[],u(w);return}w[p]=[g],u(w)},m=()=>u({}),C=p=>{r("filterApply",p)},b=t.ref(!1),i=t.ref(!1),v=t.ref({}),y=t.computed(()=>a.value==="table"?Object.keys(v.value).filter(p=>v.value[p]===!1).length:0),f=p=>{p.forEach(g=>{const k=g.key??String(g.dataIndex);v.value[k]===void 0&&(v.value[k]=!0)}),o.showActionsColumn&&v.value.actions===void 0&&(v.value.actions=!0)};return t.watch(()=>o.filterValues,p=>{c.value=p||{}}),t.watch(()=>o.viewMode,p=>{p!==void 0&&(a.value=p)}),t.watch(()=>o.columns,f),t.watch(a,p=>r("update:viewMode",p)),t.onMounted(()=>f(o.columns)),t.onMounted(()=>{h.value&&be(h.value)}),(p,g)=>{const k=t.resolveComponent("Icon"),w=t.resolveComponent("a-button"),A=t.resolveComponent("a-badge");return t.openBlock(),t.createElementBlock("div",kn,[t.createElementVNode("div",{ref_key:"tagCloudContainer",ref:h},[t.createVNode(Eo,{filters:c.value,"onUpdate:filters":u,onRemove:d,onClear:m},null,8,["filters"])],512),l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Sn,[t.createElementVNode("div",wn,[t.createVNode(A,{dot:"",count:y.value},{default:t.withCtx(()=>[t.createVNode(w,{class:"flex items-center justify-center p-2",onClick:g[0]||(g[0]=x=>i.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),t.createVNode(w,{class:"flex items-center justify-center p-2",onClick:g[1]||(g[1]=x=>b.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})]),t.renderSlot(p.$slots,"headerCardContainer"),t.renderSlot(p.$slots,"title")]),l.value?(t.openBlock(),t.createBlock(Je,{key:0,loading:e.loading,columns:e.columns,"data-source":e.dataSource,"card-layout":s.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,pagination:e.pagination,meta:e.meta,onRestore:g[2]||(g[2]=x=>r("restore",x)),onEdit:g[3]||(g[3]=x=>r("edit",x)),onDelete:g[4]||(g[4]=x=>r("delete",x)),onPageChange:g[5]||(g[5]=x=>r("pageChange",x)),onSizeChange:g[6]||(g[6]=(x,R)=>r("sizeChange",x,R))},t.createSlots({_:2},[p.$slots.titleCard?{name:"titleCard",fn:t.withCtx(x=>[t.renderSlot(p.$slots,"titleCard",t.normalizeProps(t.guardReactiveProps(x)))]),key:"0"}:void 0,p.$slots.body?{name:"bodyCard",fn:t.withCtx(x=>[t.renderSlot(p.$slots,"body",t.normalizeProps(t.guardReactiveProps(x)))]),key:"1"}:void 0,p.$slots.footer?{name:"footerCard",fn:t.withCtx(x=>[t.renderSlot(p.$slots,"footer",t.normalizeProps(t.guardReactiveProps(x)))]),key:"2"}:void 0]),1032,["loading","columns","data-source","card-layout","can-edit","edit-action","show-actions-column","pagination","meta"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(lt,{key:1,loading:e.loading,pagination:e.pagination,columns:e.columns,"data-source":e.dataSource,"filter-values":c.value,meta:e.meta,"can-edit":e.canEdit,"edit-action":e.editAction,"delete-action":e.deleteAction,"show-actions-column":e.showActionsColumn,"columns-visibility":v.value,"disable-column-filter-dropdowns":o.disableColumnFilterDropdowns===!0,"show-filter-button":o.enableTableFilterDrawer===!0,onOpenColumnDrawer:g[7]||(g[7]=x=>i.value=!0),onOpenFilterDrawer:g[8]||(g[8]=x=>b.value=!0),"onUpdate:filterValues":u,onFilterApply:g[9]||(g[9]=x=>r("filterApply",x)),onRestore:g[10]||(g[10]=x=>r("restore",x)),onEdit:g[11]||(g[11]=x=>r("edit",x)),onDelete:g[12]||(g[12]=x=>r("delete",x)),onSortChange:g[13]||(g[13]=x=>r("sortChange",x)),onPageChange:g[14]||(g[14]=x=>r("pageChange",x)),onSizeChange:g[15]||(g[15]=(x,R)=>r("sizeChange",x,R))},{title:t.withCtx(()=>[t.renderSlot(p.$slots,"title")]),bodyCell:t.withCtx(x=>[t.renderSlot(p.$slots,"bodyCell",t.normalizeProps(t.guardReactiveProps(x)))]),actionColumn:t.withCtx(x=>[t.renderSlot(p.$slots,"actionColumn",t.normalizeProps(t.guardReactiveProps(x)))]),_:3},8,["loading","pagination","columns","data-source","filter-values","meta","can-edit","edit-action","delete-action","show-actions-column","columns-visibility","disable-column-filter-dropdowns","show-filter-button"])),t.renderSlot(p.$slots,"filtersDrawer",{visible:b.value,setVisible:x=>{b.value=x},filters:c.value,updateFilters:u,emitFilterApply:C},()=>[o.useFilterModal===!0?(t.openBlock(),t.createBlock(dt,{key:0,visible:b.value,"onUpdate:visible":g[16]||(g[16]=x=>b.value=x),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":u,onFilterApply:g[17]||(g[17]=x=>r("filterApply",x))},null,8,["visible","columns","filter-values"])):(t.openBlock(),t.createBlock(ct,{key:1,visible:b.value,"onUpdate:visible":g[18]||(g[18]=x=>b.value=x),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":u,onFilterApply:g[19]||(g[19]=x=>r("filterApply",x))},null,8,["visible","columns","filter-values"]))]),t.createVNode(it,{visible:i.value,"onUpdate:visible":g[20]||(g[20]=x=>i.value=x),"model-value":v.value,"onUpdate:modelValue":g[21]||(g[21]=x=>v.value=x),"view-mode":a.value,"onUpdate:viewMode":g[22]||(g[22]=x=>a.value=x),"card-layout":s.value,"onUpdate:cardLayout":g[23]||(g[23]=x=>s.value=x),columns:e.columns,"show-actions-column":e.showActionsColumn,"disable-view-mode":e.disableViewMode},null,8,["visible","model-value","view-mode","card-layout","columns","show-actions-column","disable-view-mode"])])}}}),En=t.defineComponent({__name:"LazyLoadContainer",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},rootMargin:{default:"0px"}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{l[0].isIntersecting&&n.onIntersect&&(n.onIntersect(),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold,rootMargin:n.rootMargin}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r==null||r.disconnect()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:o},[t.renderSlot(l.$slots,"default")],512))}});exports.CardFiltersDrawer=ct;exports.CardFiltersModal=dt;exports.CardGrid=Je;exports.CardLayout=ke;exports.ColumnSettingsDrawer=it;exports.DEFAULT_PAGE_NUMBER=Zo;exports.DEFAULT_PAGE_SIZE=Ko;exports.DataTable=lt;exports.DataView=ut;exports.FilterMode=$;exports.LazyLoadContainer=En;exports.LazyLoadTrigger=Qe;exports.PAGE_SIZE_EXTRA_LARGE=Wo;exports.PAGE_SIZE_LARGE=Xo;exports.PAGE_SIZE_MEDIUM=Go;exports.PAGE_SIZE_OPTIONS=Qo;exports.PAGE_SIZE_SMALL=Ye;exports.PAGE_SIZE_ULTRA=qo;exports.PageSizes=et;exports.SkipSizes=tt;exports.SortOrder=nt;exports.TableBodyCell=at;exports.TableDefaults=ot;exports.TableSortOrder=te;exports.ViewMode=oe;exports.default=ut;
|
|
35
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}const wo=_t(xo),Ao={token:Me,hashed:!0},et=Symbol("DesignTokenContext"),Ae=t.shallowRef(),Eo=e=>{t.provide(et,e),t.watch(e,()=>{Ae.value=t.unref(e),t.triggerRef(Ae)},{immediate:!0,deep:!0})};t.defineComponent({props:{value:Ge()},setup(e,{slots:n}){return Eo(t.computed(()=>e.value)),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function tt(){const e=t.inject(et,t.computed(()=>Ae.value||Ao)),n=t.computed(()=>`${qt}-${e.value.hashed||""}`),o=t.computed(()=>e.value.theme||wo),r=Wt(o,t.computed(()=>[Me,e.value.token]),t.computed(()=>({salt:n.value,override:A({override:e.value.token},e.value.components),formatToken:So})));return[o,t.computed(()=>r.value[0]),t.computed(()=>e.value.hashed?r.value[1]:"")]}const Bo={class:"flex flex-wrap tag-cloud"},Mo={class:"flex flex-wrap"},To=t.defineComponent({__name:"FilterTagCloud",props:{filters:{}},emits:["update:filters","remove","clear"],setup(e,{emit:n}){const o=e,r=n,[,a]=tt(),l=t.computed(()=>(console.log(a),{color:a.value.colorSelectedMenu,borderColor:a.value.colorBorderSecondary,backgroundColor:a.value.mainBgColor||a.value.colorPrimaryBg})),s=p=>p==null?!1:Array.isArray(p)?p.length>0:!!p,c=t.computed(()=>Object.values(o.filters).some(s));function h(p){return typeof p=="object"&&p!==null&&"name"in p&&typeof p.name=="string"}const f=p=>{if(typeof p=="string")return{key:p,label:p,original:p};if(Array.isArray(p)){if(p.length===2&&typeof p[0]=="string"&&typeof p[1]=="string"){const m=`${p[0]} - ${p[1]}`;return{key:m,label:m,original:p}}const i=p.join(", ");return{key:i,label:i,original:p}}if(h(p)){const i=p.name;return{key:i,label:i,original:p}}const S=JSON.stringify(p);return{key:S,label:S,original:p}},d=p=>p==null?[]:Array.isArray(p)?p.map(S=>f(S)):[f(p)],v=(p,S)=>typeof p=="string"||typeof S=="string"?p===S:JSON.stringify(p)===JSON.stringify(S),x=(p,S,i)=>{if(Array.isArray(S)){const m=S.filter(b=>!v(b,i));r("update:filters",{...o.filters,[p]:m})}else r("update:filters",{...o.filters,[p]:null});r("remove",p,S,i)},C=()=>{r("update:filters",{}),r("clear")};return(p,S)=>{const i=t.resolveComponent("a-tag"),m=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",Bo,[t.createElementVNode("div",Mo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.entries(e.filters),([b,g])=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d(g),k=>(t.openBlock(),t.createBlock(i,{key:k.key,class:"filter-tag",closable:!0,style:t.normalizeStyle(l.value),onClose:()=>x(b,g,k.original)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k.label),1)]),_:2},1032,["style","onClose"]))),128))],64))),128))]),c.value?(t.openBlock(),t.createBlock(m,{key:0,type:"link",onClick:C},{default:t.withCtx(()=>[...S[0]||(S[0]=[t.createTextVNode(" Очистить все ",-1)])]),_:1})):t.createCommentVNode("",!0)])}}}),G=(e,n)=>{const o=e.__vccOpts||e;for(const[r,a]of n)o[r]=a;return o},Vo=G(To,[["__scopeId","data-v-a32f7554"]]),No={class:"flex items-center justify-center text-lg"},ie=t.defineComponent({__name:"TableCellStatus",props:{value:{}},setup(e){return(n,o)=>(t.openBlock(),t.createElementBlock("div",No,[e.value?(t.openBlock(),t.createBlock(t.unref(D.CheckCircleTwoTone),{key:1,"two-tone-color":"#bfbfbf"})):(t.openBlock(),t.createBlock(t.unref(D.CheckCircleTwoTone),{key:0,"two-tone-color":"#4ade80"}))]))}}),Do={class:"flex items-center justify-center gap-2"},Io=t.defineComponent({__name:"CardCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=o.canEdit??!0,l=o.editAction??!0,s=f=>r("delete",f),c=f=>r("restore",f),h=f=>r("edit",f);return(f,d)=>{const v=t.resolveComponent("a-button"),x=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",Do,[t.unref(a)===!1?(t.openBlock(),t.createBlock(x,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(t.unref(D.EyeOutlined)),onClick:d[0]||(d[0]=C=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.unref(a)!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(l)!==!1?(t.openBlock(),t.createBlock(x,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(t.unref(D.EditOutlined)),onClick:d[1]||(d[1]=C=>h(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(x,{title:e.record.deletedAt?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(v,{icon:t.h(e.record.deletedAt?t.unref(D.RedoOutlined):t.unref(D.DeleteOutlined)),onClick:d[2]||(d[2]=C=>e.record.deletedAt?c(e.record):s(e.record))},null,8,["icon"])]),_:1},8,["title"])],64)):t.createCommentVNode("",!0)])}}}),Fo={class:"data-card__header"},Ho={class:"data-card__body"},$o={class:"data-card__label"},_o={class:"data-card__value"},Lo={key:0},Ro={key:2},Po={key:3},Oo={key:4},zo={key:5},jo={key:0,class:"data-card__footer"},Uo=t.defineComponent({__name:"TheCard",props:{loading:{type:Boolean},record:{},columns:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean}},emits:["delete","restore","edit"],setup(e,{emit:n}){const o=e,r=i=>o.record[String(i.dataIndex)],a=i=>{if(i===null||typeof i!="object")return"";if("name"in i){const m=i.name;return typeof m=="string"?m:""}return""},l=i=>i==null?!0:typeof i=="string"?i.trim().length===0:!1,s=i=>i==null?"":typeof i=="string"?i.trim():typeof i=="object"?a(i):String(i),c=i=>{const m=r(i);return Array.isArray(m)?m.map(b=>s(b)).filter(b=>b.trim().length>0):[]},h=i=>c(i).map((m,b)=>({key:`${m}-${b}`,label:m})),f=n,d=o.canEdit??!0,v=o.editAction??!0,x=o.showActionsColumn??!0,C=i=>f("delete",i),p=i=>f("restore",i),S=i=>f("edit",i);return(i,m)=>{const b=t.resolveComponent("a-tag"),g=t.resolveComponent("a-card");return t.openBlock(),t.createBlock(g,{loading:e.loading,bordered:!1,class:"data-card bg-white rounded-3 shadow-sm"},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",Fo,[t.renderSlot(i.$slots,"title",{},void 0,!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",Ho,[t.renderSlot(i.$slots,"body",{record:e.record,columns:e.columns},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,k=>(t.openBlock(),t.createElementBlock("div",{key:k.dataIndex,class:"data-card__row"},[t.createElementVNode("span",$o,t.toDisplayString(k.title)+": ",1),t.createElementVNode("span",_o,[k.dataIndex==="deletedAt"?(t.openBlock(),t.createElementBlock("span",Lo,[t.createVNode(ie,{value:e.record.deletedAt},null,8,["value"])])):Array.isArray(r(k))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[k.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h(k),M=>(t.openBlock(),t.createBlock(b,{key:M.key,class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(M.label),1)]),_:2},1024))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(c(k),(M,y)=>(t.openBlock(),t.createElementBlock("span",{key:y},[t.createTextVNode(t.toDisplayString(M)+" ",1),y<c(k).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" , ")],64)):t.createCommentVNode("",!0)]))),128))],64)):typeof r(k)=="boolean"?(t.openBlock(),t.createElementBlock("span",Ro,[t.createVNode(ie,{value:!r(k)},null,8,["value"])])):r(k)!==null&&typeof r(k)=="object"?(t.openBlock(),t.createElementBlock("span",Po,t.toDisplayString(a(r(k))),1)):k.tag===!0?(t.openBlock(),t.createElementBlock("span",Oo,[l(r(k))?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(b,{key:0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r(k)),1)]),_:2},1024))])):(t.openBlock(),t.createElementBlock("span",zo,t.toDisplayString(r(k)),1))])]))),128))],!0)]),i.$slots.footer?(t.openBlock(),t.createElementBlock("div",jo,[t.renderSlot(i.$slots,"footer",{record:e.record,columns:e.columns},void 0,!0)])):t.createCommentVNode("",!0)]),_:2},[t.unref(x)?{name:"actions",fn:t.withCtx(()=>[t.createVNode(Io,{record:e.record,"can-edit":t.unref(d),"edit-action":t.unref(v),onEdit:S,onDelete:C,onRestore:p},null,8,["record","can-edit","edit-action"])]),key:"0"}:void 0]),1032,["loading"])}}}),Go=G(Uo,[["__scopeId","data-v-c6be2770"]]),Xo={class:"efko-dataview"},ot=t.defineComponent({__name:"LazyLoadTrigger",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},loading:{type:Boolean}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{var c;l[0].isIntersecting&&((c=n.onIntersect)==null||c.call(n),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r&&r.disconnect()}),(l,s)=>{const c=t.resolveComponent("a-spin");return t.openBlock(),t.createElementBlock("div",Xo,[t.createElementVNode("div",{ref_key:"container",ref:o,style:{height:"1px"},class:"flex items-center justify-center py-5"},[t.createVNode(c,{spinning:e.loading},null,8,["spinning"])],512)])}}}),Wo={class:"efko-dataview"},qo={class:"flex flex-col gap-4"},Zo=t.defineComponent({__name:"CardGrid",props:{loading:{type:Boolean},columns:{},dataSource:{},cardLayout:{},canEdit:{type:Boolean},editAction:{type:Boolean},showActionsColumn:{type:Boolean},pagination:{type:Boolean},meta:{}},emits:["delete","restore","edit","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n;t.onMounted(()=>{const d=document.querySelector(".card-grid");d!==null&&Ee(d)});const a=t.computed(()=>o.cardLayout==="row"?"card-grid card-grid--row":"card-grid card-grid--grid"),l=t.computed(()=>o.columns),s=t.ref([]),c=()=>{var x;if(((x=o.meta)==null?void 0:x.currentPage)===1){s.value=[...o.dataSource];return}const d=new Set(s.value.map(C=>C.id)),v=o.dataSource.filter(C=>!d.has(C.id));s.value.push(...v)};c(),t.watch(()=>{var d;return[o.dataSource,(d=o.meta)==null?void 0:d.currentPage]},c,{deep:!0});const h=t.computed(()=>o.meta===void 0?!0:o.meta.currentPage*o.meta.pageSize>=o.meta.total),f=()=>{o.loading||h.value||!o.meta||r("pageChange",o.meta.currentPage+1)};return(d,v)=>(t.openBlock(),t.createElementBlock("div",Wo,[t.createElementVNode("div",qo,[t.createElementVNode("div",{class:t.normalizeClass(a.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(x,C)=>(t.openBlock(),t.createBlock(Go,{key:String(x.id??`card-${C}`),loading:e.loading,record:x,columns:l.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,onEdit:v[0]||(v[0]=p=>r("edit",p)),onDelete:v[1]||(v[1]=p=>r("delete",p)),onRestore:v[2]||(v[2]=p=>r("restore",p))},t.createSlots({_:2},[d.$slots.titleCard?{name:"title",fn:t.withCtx(()=>[t.renderSlot(d.$slots,"titleCard",{record:x,columns:l.value},void 0,!0)]),key:"0"}:void 0,d.$slots.bodyCard?{name:"body",fn:t.withCtx(({record:p,columns:S})=>[t.renderSlot(d.$slots,"bodyCard",{record:p,columns:S},void 0,!0)]),key:"1"}:void 0,d.$slots.footerCard?{name:"footer",fn:t.withCtx(({record:p,columns:S})=>[t.renderSlot(d.$slots,"footerCard",{record:p,columns:S},void 0,!0)]),key:"2"}:void 0]),1032,["loading","record","columns","can-edit","edit-action","show-actions-column"]))),128))],2),e.pagination&&!h.value?(t.openBlock(),t.createBlock(ot,{key:0,loading:e.loading,once:!1,"on-intersect":f},null,8,["loading"])):t.createCommentVNode("",!0)])]))}}),nt=G(Zo,[["__scopeId","data-v-e3e3f0a2"]]),rt="10",Ko="20",Yo="50",Qo="100",Jo="1000",en=1,tn=rt;var N=(e=>(e.SEARCH="search",e.SELECT="select",e.DATE="date",e))(N||{}),at=(e=>(e.SMALL="10",e.MEDIUM="20",e.LARGE="50",e.EXTRA_LARGE="100",e.ULTRA="1000",e))(at||{});const on=["10","20","50","100"];var lt=(e=>(e[e.NONE=0]="NONE",e[e.SMALL=10]="SMALL",e[e.MEDIUM=20]="MEDIUM",e[e.LARGE=50]="LARGE",e))(lt||{}),it=(e=>(e[e.DEFAULT_CURRENT_PAGE=1]="DEFAULT_CURRENT_PAGE",e))(it||{}),se=(e=>(e.ASCEND="ascend",e.DESCEND="descend",e))(se||{}),st=(e=>(e.ASC="asc",e.DESC="desc",e))(st||{});const nn=t.defineComponent({name:"MultiselectWrapper",components:{VueMultiselect:vt},props:{modelValue:{type:[Array,String,Number,Object,Boolean,null],default:null}},emits:["update:modelValue"],data(){return{simpleImage:yt.Empty.PRESENTED_IMAGE_SIMPLE}}});function rn(e,n,o,r,a,l){const s=t.resolveComponent("a-empty"),c=t.resolveComponent("VueMultiselect");return t.openBlock(),t.createBlock(c,t.mergeProps(e.$attrs,{class:"filter-select",modelValue:e.modelValue,"onUpdate:modelValue":n[0]||(n[0]=h=>e.$emit("update:modelValue",h)),label:"name","value-prop":"id"}),{nooptions:t.withCtx(()=>[t.createVNode(s,{image:e.simpleImage},null,8,["image"])]),_:1},16,["modelValue"])}const ct=G(nn,[["render",rn],["__scopeId","data-v-cfb3f123"]]),an={class:"efko-dataview"},ln={class:"flex items-center gap-2 p-2"},sn=t.defineComponent({__name:"FilterDropdown",props:{placeholder:{},filterMode:{},componentProps:{}},emits:["update:modelValue","apply"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===N.SEARCH?"a-input":o.filterMode===N.SELECT?ct:o.filterMode===N.DATE?"a-range-picker":null),l=t.ref(null),s=()=>{r("update:modelValue",l.value),r("apply"),l.value=null};return(c,h)=>{const f=t.resolveComponent("a-button");return t.openBlock(),t.createElementBlock("div",an,[t.createElementVNode("div",ln,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":h[0]||(h[0]=d=>l.value=d),modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=d=>l.value=d),placeholder:e.placeholder,style:{"min-width":"240px","max-width":"300px","font-size":"14px"},object:""}),null,16,["value","modelValue","placeholder"])),t.createVNode(f,{type:"primary",size:"small",onClick:s},{default:t.withCtx(()=>[...h[2]||(h[2]=[t.createTextVNode(" Добавить ",-1)])]),_:1})])])}}}),cn={class:"flex items-center justify-center gap-2"},un=t.defineComponent({__name:"TableCellActions",props:{record:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean}},emits:["edit","delete","restore"],setup(e,{emit:n}){const o=e,r=n,a=c=>{r("delete",c)},l=c=>{r("restore",c)},s=c=>{r("edit",c)};return(c,h)=>{const f=t.resolveComponent("a-button"),d=t.resolveComponent("a-tooltip");return t.openBlock(),t.createElementBlock("div",cn,[o.canEdit===!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Смотреть"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(D.EyeOutlined)),onClick:h[0]||(h[0]=v=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.canEdit!==!1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.editAction!==!1?(t.openBlock(),t.createBlock(d,{key:0,title:"Редактировать"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(t.unref(D.EditOutlined)),onClick:h[1]||(h[1]=v=>s(e.record))},null,8,["icon"])]),_:1})):t.createCommentVNode("",!0),e.deleteAction!==!1?(t.openBlock(),t.createBlock(d,{key:1,title:e.record.isDeleted?"Восстановить":"Удалить"},{default:t.withCtx(()=>[t.createVNode(f,{icon:t.h(e.record.isDeleted?t.unref(D.RedoOutlined):t.unref(D.DeleteOutlined)),onClick:h[2]||(h[2]=v=>e.record.isDeleted?l(e.record):a(e.record))},null,8,["icon"])]),_:1},8,["title"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)])}}}),dn={key:0},fn={key:1},pn={key:2},mn={key:3},gn={key:4},hn={key:5},ut=t.defineComponent({__name:"TableBodyCell",props:{loading:{type:Boolean},column:{},record:{},tagStyle:{}},setup(e){const n=e,o=t.computed(()=>n.record[String(n.column.dataIndex)]),r=f=>f==null?!0:typeof f=="string"?f.trim().length===0:!1,a=f=>{if(f===null||typeof f!="object")return"";if("name"in f){const d=f.name;return typeof d=="string"?d:""}return""},l=f=>f==null?"":typeof f=="string"?f.trim():typeof f=="object"?a(f):String(f),s=t.computed(()=>{const f=o.value;return Array.isArray(f)?f.map(d=>l(d)).filter(d=>d.trim().length>0):[]}),c=t.computed(()=>s.value.map((f,d)=>({key:`${f}-${d}`,label:f}))),h=t.computed(()=>!r(o.value));return(f,d)=>{const v=t.resolveComponent("a-skeleton"),x=t.resolveComponent("a-tag");return e.loading?(t.openBlock(),t.createBlock(v,{key:0,active:!0,loading:!0,title:!1,paragraph:{rows:1}})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.column.dataIndex==="isDeleted"?(t.openBlock(),t.createElementBlock("span",dn,[t.createVNode(ie,{value:e.record.isDeleted},null,8,["value"])])):Array.isArray(o.value)?(t.openBlock(),t.createElementBlock("span",fn,[e.column.tag===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(c.value,C=>(t.openBlock(),t.createBlock(x,{key:C.key,style:t.normalizeStyle(e.tagStyle),class:"mr-1 mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(C.label),1)]),_:2},1032,["style"]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(s.value,(C,p)=>(t.openBlock(),t.createElementBlock("span",{key:p},[t.createTextVNode(t.toDisplayString(C)+" ",1),p<s.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(", ")],64)):t.createCommentVNode("",!0)]))),128))])):typeof o.value=="boolean"?(t.openBlock(),t.createElementBlock("span",pn,[t.createVNode(ie,{value:!o.value},null,8,["value"])])):o.value!==null&&typeof o.value=="object"?(t.openBlock(),t.createElementBlock("span",mn,t.toDisplayString(a(o.value)),1)):e.column.tag===!0?(t.openBlock(),t.createElementBlock("span",gn,[h.value?(t.openBlock(),t.createBlock(x,{key:0,style:t.normalizeStyle(e.tagStyle)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(String(o.value)),1)]),_:1},8,["style"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[],64))])):(t.openBlock(),t.createElementBlock("span",hn,t.toDisplayString(o.value),1))],64))}}}),vn={class:"efko-dataview"},yn={class:"flex items-center justify-between"},bn={class:"flex items-center gap-2"},dt=t.defineComponent({__name:"TheTable",props:{loading:{type:Boolean},pagination:{type:Boolean},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean},editAction:{type:Boolean},deleteAction:{type:Boolean},showActionsColumn:{type:Boolean},columnsVisibility:{},disableColumnFilterDropdowns:{type:Boolean},showFilterButton:{type:Boolean},multiColumnFilters:{type:Boolean}},emits:["update:filterValues","filterApply","restore","edit","delete","sortChange","pageChange","sizeChange","openColumnDrawer","openFilterDrawer"],setup(e,{emit:n}){const[,o]=tt(),r=e,a=n,l=t.computed(()=>r.showFilterButton===!0),s=t.ref(r.filterValues||{}),c=t.ref([...r.columns]),h=t.ref({}),f=t.computed(()=>r.disableColumnFilterDropdowns===!0?[]:c.value.filter(y=>y.filterable)),d=t.computed(()=>{const u=c.value.filter(w=>{if(w.filterOnly)return!1;const B=w.key||String(w.dataIndex);return r.columnsVisibility[B]!==!1}).map(w=>{const{headerAlign:B,cellAlign:I,...$}=w;return{...$,sorter:!!$.sortable,sortDirections:$.sortable?[se.ASCEND,se.DESCEND]:void 0,customHeaderCell:()=>B?{style:{textAlign:B}}:void 0,customCell:()=>I?{style:{textAlign:I}}:void 0,customFilterDropdown:!!$.filterable,slots:$.filterable?{filterDropdown:`filter${String($.dataIndex)}Dropdown`}:void 0}});return r.showActionsColumn!==!1&&r.columnsVisibility.actions!==!1&&u.push({title:"Действия",key:"actions",dataIndex:"actions",width:100,slots:{customRender:"actionColumn"}}),u}),v=t.computed(()=>Object.keys(r.columnsVisibility).filter(y=>r.columnsVisibility[y]===!1).length),x=t.computed(()=>({color:o.value.colorSelectedMenu,borderColor:o.value.colorBorderSecondary,backgroundColor:o.value.mainBgColor||o.value.colorPrimaryBg})),C=y=>{const u=s.value[y];return Array.isArray(u)?u:u!=null?[u]:[]},p=y=>Array.isArray(y)&&y.length===2&&typeof y[0]=="string"&&typeof y[1]=="string",S=y=>{if(typeof y=="string")return y;if(y!==null&&typeof y=="object"){const u=y.format;if(typeof u=="function")return u("YYYY-MM-DD");const w=y.toISOString;if(typeof w=="function")return w()}return String(y)},i=(y,u)=>{if(u==null)return[];if(y.filterMode===N.SEARCH){if(typeof u!="string")return[];const w=u.trim();return w.length===0?[]:[w]}return y.filterMode===N.DATE?!Array.isArray(u)||u.length!==2?[]:[[S(u[0]),S(u[1])]]:Array.isArray(u)?u:[u]},m=(y,u)=>{const w={...s.value};if(u===null)w[y]=null,a("filterApply",{key:y,value:[]});else if(Array.isArray(u)){const B=u.filter(I=>I!=null);B.length===0?(w[y]=null,a("filterApply",{key:y,value:[]})):B.length===1&&!p(B[0])?(w[y]=B[0],a("filterApply",{key:y,value:B})):(w[y]=B,a("filterApply",{key:y,value:B}))}else w[y]=u,a("filterApply",{key:y,value:[u]});a("update:filterValues",w),s.value=w,h.value[y]=null},b=(y,u)=>{const w=String(y.dataIndex),B=i(y,u);if(B.length===0){h.value[w]=null;return}if(!((y.filterMultiple??r.multiColumnFilters??!0)!==!1)){if(y.filterMode===N.DATE){m(w,B);return}if(Array.isArray(u)){m(w,B[B.length-1]);return}m(w,B[0]);return}const X=[...C(w)];let W=!1;if(B.forEach(q=>{X.some(J=>Y.isEqual(J,q))||(X.push(q),W=!0)}),!W){h.value[w]=null;return}m(w,X)},g=y=>y.isGroup?"parent-row":"",k=(y,u,w)=>{a("sortChange",{columnKey:w.columnKey||"",order:w.order||null})},M=(y,u)=>{const w=u.key||String(u.dataIndex),B=c.value.findIndex(I=>(I.key||String(I.dataIndex))===w);B!==-1&&c.value.splice(B,1,{...u,width:y})};return t.watch(()=>r.filterValues,y=>{s.value=y||{}}),t.watch(()=>r.columns,y=>{c.value=[...y]},{immediate:!0}),t.onMounted(()=>{const y=document.querySelector(".the-table tbody");y!==null&&Ee(y)}),(y,u)=>{var W,q,J,Ve;const w=t.resolveComponent("Icon"),B=t.resolveComponent("a-button"),I=t.resolveComponent("a-badge"),$=t.resolveComponent("a-table"),X=t.resolveComponent("a-pagination");return t.openBlock(),t.createElementBlock("div",vn,[t.createVNode($,{bordered:"","table-layout":"fixed",class:"the-table",loading:e.loading,columns:d.value,"data-source":e.dataSource,"row-key":E=>E.id,pagination:!1,scroll:{x:"max-content"},"row-class-name":g,onChange:k,onResizeColumn:M},t.createSlots({title:t.withCtx(()=>[t.createElementVNode("div",yn,[t.createElementVNode("div",bn,[t.createVNode(I,{dot:"",count:v.value},{default:t.withCtx(()=>[t.createVNode(B,{class:"flex items-center justify-center p-2",onClick:u[0]||(u[0]=E=>y.$emit("openColumnDrawer"))},{default:t.withCtx(()=>[t.createVNode(w,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),l.value?(t.openBlock(),t.createBlock(B,{key:0,class:"flex items-center justify-center p-2",onClick:u[1]||(u[1]=E=>y.$emit("openFilterDrawer"))},{default:t.withCtx(()=>[t.createVNode(w,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})):t.createCommentVNode("",!0)]),t.renderSlot(y.$slots,"title")])]),bodyCell:t.withCtx(({column:E,record:R})=>[t.renderSlot(y.$slots,"bodyCell",{column:E,record:R},()=>[t.createVNode(ut,{loading:e.loading,column:E,record:R,"tag-style":x.value},null,8,["loading","column","record","tag-style"])])]),actionColumn:t.withCtx(({record:E})=>[t.renderSlot(y.$slots,"actionColumn",{record:E},()=>[t.createVNode(un,{"edit-action":e.editAction,"delete-action":e.deleteAction,"can-edit":e.canEdit,record:E,onEdit:()=>y.$emit("edit",E),onDelete:()=>y.$emit("delete",E),onRestore:()=>y.$emit("restore",E)},null,8,["edit-action","delete-action","can-edit","record","onEdit","onDelete","onRestore"])])]),_:2},[t.renderList(f.value,E=>({name:`filter${String(E.dataIndex)}Dropdown`,fn:t.withCtx(()=>[t.createVNode(sn,{modelValue:h.value[E.dataIndex],"onUpdate:modelValue":[R=>h.value[E.dataIndex]=R,R=>b(E,R)],"filter-mode":E.filterMode,"component-props":E.componentProps,placeholder:E.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])])}))]),1032,["loading","columns","data-source","row-key"]),e.pagination?(t.openBlock(),t.createBlock(X,{key:0,class:"mt-4 text-right",current:(W=e.meta)==null?void 0:W.currentPage,"page-size":(q=e.meta)==null?void 0:q.pageSize,total:(J=e.meta)==null?void 0:J.total,"show-total":E=>`Всего ${E} элементов`,"page-size-options":(Ve=e.meta)==null?void 0:Ve.pageSizeOptions,"show-size-changer":!0,onChange:u[2]||(u[2]=E=>y.$emit("pageChange",E)),onShowSizeChange:u[3]||(u[3]=(E,R)=>y.$emit("sizeChange",E,R))},null,8,["current","page-size","total","show-total","page-size-options"])):t.createCommentVNode("",!0)])}}}),Cn={class:"mb-4"},xn={class:"flex flex-col gap-1"},ft=t.defineComponent({__name:"ColumnSettingsDrawer",props:{visible:{type:Boolean},columns:{},modelValue:{},showActionsColumn:{type:Boolean},disableViewMode:{type:Boolean},viewMode:{},cardLayout:{}},emits:["update:visible","update:modelValue","update:viewMode","update:cardLayout"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.ref(o.viewMode),s=t.ref(o.cardLayout),c=t.reactive({...o.modelValue}),h=t.computed(()=>l.value==="grid"),f=o.disableViewMode||!1;return t.watch(()=>o.visible,d=>{a.value=d}),t.watch(a,d=>{r("update:visible",d)}),t.watch(()=>o.viewMode,d=>{l.value=d}),t.watch(l,d=>{r("update:viewMode",d)}),t.watch(()=>o.cardLayout,d=>{s.value=d}),t.watch(s,d=>{r("update:cardLayout",d)}),t.watch(()=>o.modelValue,d=>Object.assign(c,d),{deep:!0}),t.watch(c,d=>r("update:modelValue",{...d}),{deep:!0}),o.showActionsColumn&&c.actions===void 0&&(c.actions=!0),(d,v)=>{const x=t.resolveComponent("a-checkbox"),C=t.resolveComponent("a-radio"),p=t.resolveComponent("a-radio-group"),S=t.resolveComponent("a-radio-button"),i=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(i,{open:a.value,"onUpdate:open":v[2]||(v[2]=m=>a.value=m),class:"efko-dataview",title:"Настройки представления",placement:"right"},{default:t.withCtx(()=>[t.createElementVNode("section",Cn,[v[3]||(v[3]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Отображение колонок",-1)),t.createElementVNode("div",xn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,m=>(t.openBlock(),t.createElementBlock("div",{key:m.key??m.dataIndex},[t.createVNode(x,{checked:c[m.key??m.dataIndex],"onUpdate:checked":b=>c[m.key??m.dataIndex]=b,disabled:h.value,class:"flex"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.title),1)]),_:2},1032,["checked","onUpdate:checked","disabled"])]))),128))])]),t.createElementVNode("section",null,[v[8]||(v[8]=t.createElementVNode("h3",{class:"font-bold text-base mb-2"},"Вид",-1)),t.createVNode(p,{value:l.value,"onUpdate:value":v[0]||(v[0]=m=>l.value=m),"button-style":"solid",class:"mb-3",disabled:t.unref(f)},{default:t.withCtx(()=>[t.createVNode(C,{value:"table"},{default:t.withCtx(()=>[...v[4]||(v[4]=[t.createTextVNode("Таблица",-1)])]),_:1}),t.createVNode(C,{value:"grid"},{default:t.withCtx(()=>[...v[5]||(v[5]=[t.createTextVNode("Карточки",-1)])]),_:1})]),_:1},8,["value","disabled"]),t.createVNode(p,{value:s.value,"onUpdate:value":v[1]||(v[1]=m=>s.value=m),"button-style":"solid",disabled:!h.value},{default:t.withCtx(()=>[t.createVNode(S,{value:"grid"},{default:t.withCtx(()=>[t.createVNode(t.unref(D.AppstoreOutlined),{class:"mr-2"}),v[6]||(v[6]=t.createTextVNode("Сетка ",-1))]),_:1}),t.createVNode(S,{value:"row"},{default:t.withCtx(()=>[t.createVNode(t.unref(D.PicCenterOutlined),{class:"mr-2"}),v[7]||(v[7]=t.createTextVNode("Строка ",-1))]),_:1})]),_:1},8,["value","disabled"])])]),_:1},8,["open"])}}}),pt=t.defineComponent({__name:"FilterInput",props:{modelValue:{type:[String,Number,Boolean,Object,Array,null]},filterMode:{},componentProps:{},placeholder:{}},emits:["update:modelValue"],setup(e,{emit:n}){const o=e,r=n,a=t.computed(()=>o.filterMode===N.SEARCH?"a-input":o.filterMode===N.SELECT?ct:o.filterMode===N.DATE?"a-range-picker":"a-input"),l=t.ref(o.modelValue);return t.watch(()=>o.modelValue,s=>{l.value=s}),t.watch(l,s=>r("update:modelValue",s)),(s,c)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),t.mergeProps(e.componentProps,{value:l.value,"onUpdate:value":c[0]||(c[0]=h=>l.value=h),modelValue:l.value,"onUpdate:modelValue":c[1]||(c[1]=h=>l.value=h),placeholder:e.placeholder,class:"w-full text-sm"}),null,16,["value","modelValue","placeholder"]))}}),kn={class:"text-sm font-medium"},Sn={class:"mt-2 flex flex-col gap-2"},wn=t.defineComponent({__name:"CardFiltersDrawer",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>{if(typeof i=="string")return i;if(i!==null&&typeof i=="object"){const m=i.format;if(typeof m=="function")return m("YYYY-MM-DD");const b=i.toISOString;if(typeof b=="function")return b()}return String(i)},h=(i,m)=>{if(m!==void 0)return i.filterMode===N.DATE&&Array.isArray(m)&&m.length===2?[[c(m[0]),c(m[1])]]:m},f=i=>Array.isArray(i)?i:i!=null?[i]:[],d=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=t.computed(()=>o.columns.filter(i=>i.filterable)),x=t.computed(()=>Object.keys(l).some(i=>!Y.isEqual(l[i],o.filterValues[i]))),C=i=>{Object.keys(l).forEach(m=>{delete l[m]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&C(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{C(i)},{deep:!0});const p=()=>{const i={...o.filterValues};Object.entries(l).forEach(([m,b])=>{const g=o.columns.find(M=>String(s(M))===m),k=g?h(g,b):b;if(d(b)){i[m]=null,r("filterApply",{key:m,value:[]});return}i[m]=k,r("filterApply",{key:m,value:f(k)})}),r("update:filterValues",i),a.value=!1},S=()=>{Object.keys(l).forEach(m=>{delete l[m]}),r("update:filterValues",{})};return(i,m)=>{const b=t.resolveComponent("a-button"),g=t.resolveComponent("a-drawer");return t.openBlock(),t.createBlock(g,{open:a.value,"onUpdate:open":m[0]||(m[0]=k=>a.value=k),class:"efko-dataview",placement:"right",width:"360",title:"Фильтры","body-style":"padding: 24px"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,k=>(t.openBlock(),t.createElementBlock("section",{key:s(k),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",kn,t.toDisplayString(k.title),1),t.createVNode(pt,{modelValue:l[s(k)],"onUpdate:modelValue":M=>l[s(k)]=M,"filter-mode":k.filterMode,"component-props":k.componentProps,placeholder:k.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128)),t.createElementVNode("div",Sn,[t.createVNode(b,{block:"",onClick:S},{default:t.withCtx(()=>[...m[1]||(m[1]=[t.createTextVNode(" Сбросить ",-1)])]),_:1}),t.createVNode(b,{type:"primary",block:"",disabled:!x.value,onClick:p},{default:t.withCtx(()=>[...m[2]||(m[2]=[t.createTextVNode(" Применить ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),mt=G(wn,[["__scopeId","data-v-c29393f2"]]),An={class:"text-sm font-medium"},En=t.defineComponent({__name:"CardFiltersModal",props:{visible:{type:Boolean},columns:{},filterValues:{}},emits:["update:visible","update:filterValues","filterApply"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.visible),l=t.reactive({...o.filterValues}),s=i=>i.key??String(i.dataIndex),c=i=>{if(typeof i=="string")return i;if(i!==null&&typeof i=="object"){const m=i.format;if(typeof m=="function")return m("YYYY-MM-DD");const b=i.toISOString;if(typeof b=="function")return b()}return String(i)},h=(i,m)=>{if(m!==void 0)return i.filterMode===N.DATE&&Array.isArray(m)&&m.length===2?[[c(m[0]),c(m[1])]]:m},f=i=>Array.isArray(i)?i:i!=null?[i]:[],d=i=>i==null?!0:Array.isArray(i)?i.length===0:typeof i=="string"?i.trim()==="":!1,v=t.computed(()=>o.columns.filter(i=>i.filterable)),x=t.computed(()=>Object.keys(l).some(i=>!Y.isEqual(l[i],o.filterValues[i]))),C=i=>{Object.keys(l).forEach(m=>{delete l[m]}),Object.assign(l,i)};t.watch(()=>o.visible,i=>{a.value=i,i&&C(o.filterValues)}),t.watch(a,i=>{r("update:visible",i)}),t.watch(()=>o.filterValues,i=>{C(i)},{deep:!0});const p=()=>{const i={...o.filterValues};Object.entries(l).forEach(([m,b])=>{const g=o.columns.find(M=>String(s(M))===m),k=g?h(g,b):b;if(d(b)){i[m]=null,r("filterApply",{key:m,value:[]});return}i[m]=k,r("filterApply",{key:m,value:f(k)})}),r("update:filterValues",i),a.value=!1},S=()=>{a.value=!1};return(i,m)=>{const b=t.resolveComponent("a-modal");return t.openBlock(),t.createBlock(b,{visible:a.value,"onUpdate:visible":m[0]||(m[0]=g=>a.value=g),class:"efko-dataview",title:"Фильтры","destroy-on-close":"","ok-text":"Применить","cancel-text":"Сбросить","ok-button-props":{disabled:!x.value},onOk:p,onCancel:S},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,g=>(t.openBlock(),t.createElementBlock("section",{key:s(g),class:"mb-4 flex flex-col gap-2"},[t.createElementVNode("span",An,t.toDisplayString(g.title),1),t.createVNode(pt,{modelValue:l[s(g)],"onUpdate:modelValue":k=>l[s(g)]=k,"filter-mode":g.filterMode,"component-props":g.componentProps,placeholder:g.title},null,8,["modelValue","onUpdate:modelValue","filter-mode","component-props","placeholder"])]))),128))]),_:1},8,["visible","ok-button-props"])}}}),gt=G(En,[["__scopeId","data-v-4171d5f0"]]);var ce=(e=>(e.Table="table",e.Grid="grid",e))(ce||{}),Te=(e=>(e.Grid="grid",e.Row="row",e))(Te||{});const Bn={class:"efko-dataview"},Mn={class:"flex items-center justify-between gap-2 mb-2"},Tn={class:"flex items-center gap-1"},ht=t.defineComponent({__name:"DataView",props:{viewMode:{},loading:{type:Boolean},pagination:{type:Boolean,default:!1},columns:{},dataSource:{},filterValues:{},meta:{},canEdit:{type:Boolean,default:!0},editAction:{type:Boolean,default:!0},deleteAction:{type:Boolean,default:!0},showActionsColumn:{type:Boolean,default:!0},disableViewMode:{type:Boolean,default:!1},enableTableFilterDrawer:{type:Boolean,default:!1},disableColumnFilterDropdowns:{type:Boolean,default:!1},useFilterModal:{type:Boolean,default:!1},multiColumnFilters:{type:Boolean,default:!0}},emits:["update:viewMode","update:filterValues","filterApply","edit","delete","restore","sortChange","pageChange","sizeChange"],setup(e,{emit:n}){const o=e,r=n,a=t.ref(o.viewMode||ce.Table),l=t.computed(()=>(a==null?void 0:a.value)===ce.Grid),s=t.ref(Te.Grid),c=t.ref(o.filterValues||{}),h=t.ref(null),f=b=>{c.value=b,r("update:filterValues",b)},d=(b,g,k)=>{const M={...c.value};if(g!==void 0){if(Array.isArray(g)){const y=g.filter(u=>!Y.isEqual(u,k));y.length===0?M[b]=null:y.length===1&&!Array.isArray(y[0])?M[b]=y[0]:M[b]=y,f(M);return}Y.isEqual(g,k)&&(M[b]=null,f(M))}},v=()=>f({}),x=b=>{r("filterApply",b)},C=t.ref(!1),p=t.ref(!1),S=t.ref({}),i=t.computed(()=>a.value==="table"?Object.keys(S.value).filter(b=>S.value[b]===!1).length:0),m=b=>{b.forEach(g=>{const k=g.key??String(g.dataIndex);S.value[k]===void 0&&(S.value[k]=!0)}),o.showActionsColumn&&S.value.actions===void 0&&(S.value.actions=!0)};return t.watch(()=>o.filterValues,b=>{c.value=b||{}}),t.watch(()=>o.viewMode,b=>{b!==void 0&&(a.value=b)}),t.watch(()=>o.columns,m),t.watch(a,b=>r("update:viewMode",b)),t.onMounted(()=>m(o.columns)),t.onMounted(()=>{h.value&&Ee(h.value)}),(b,g)=>{const k=t.resolveComponent("Icon"),M=t.resolveComponent("a-button"),y=t.resolveComponent("a-badge");return t.openBlock(),t.createElementBlock("div",Bn,[t.createElementVNode("div",{ref_key:"tagCloudContainer",ref:h},[t.createVNode(Vo,{filters:c.value,"onUpdate:filters":f,onRemove:d,onClear:v},null,8,["filters"])],512),l.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",Mn,[t.createElementVNode("div",Tn,[t.createVNode(y,{dot:"",count:i.value},{default:t.withCtx(()=>[t.createVNode(M,{class:"flex items-center justify-center p-2",onClick:g[0]||(g[0]=u=>p.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"solar:settings-outline",class:"text-lg"})]),_:1})]),_:1},8,["count"]),t.createVNode(M,{class:"flex items-center justify-center p-2",onClick:g[1]||(g[1]=u=>C.value=!0)},{default:t.withCtx(()=>[t.createVNode(k,{name:"ant-design:filter-outlined",class:"text-lg"})]),_:1})]),t.renderSlot(b.$slots,"headerCardContainer"),t.renderSlot(b.$slots,"title")]),l.value?(t.openBlock(),t.createBlock(nt,{key:0,loading:e.loading,columns:e.columns,"data-source":e.dataSource,"card-layout":s.value,"can-edit":e.canEdit,"edit-action":e.editAction,"show-actions-column":e.showActionsColumn,pagination:e.pagination,meta:e.meta,onRestore:g[2]||(g[2]=u=>r("restore",u)),onEdit:g[3]||(g[3]=u=>r("edit",u)),onDelete:g[4]||(g[4]=u=>r("delete",u)),onPageChange:g[5]||(g[5]=u=>r("pageChange",u)),onSizeChange:g[6]||(g[6]=(u,w)=>r("sizeChange",u,w))},t.createSlots({_:2},[b.$slots.titleCard?{name:"titleCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"titleCard",t.normalizeProps(t.guardReactiveProps(u)))]),key:"0"}:void 0,b.$slots.body?{name:"bodyCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"body",t.normalizeProps(t.guardReactiveProps(u)))]),key:"1"}:void 0,b.$slots.footer?{name:"footerCard",fn:t.withCtx(u=>[t.renderSlot(b.$slots,"footer",t.normalizeProps(t.guardReactiveProps(u)))]),key:"2"}:void 0]),1032,["loading","columns","data-source","card-layout","can-edit","edit-action","show-actions-column","pagination","meta"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(dt,{key:1,loading:e.loading,pagination:e.pagination,columns:e.columns,"data-source":e.dataSource,"filter-values":c.value,meta:e.meta,"can-edit":e.canEdit,"edit-action":e.editAction,"delete-action":e.deleteAction,"show-actions-column":e.showActionsColumn,"columns-visibility":S.value,"disable-column-filter-dropdowns":o.disableColumnFilterDropdowns===!0,"show-filter-button":o.enableTableFilterDrawer===!0,"multi-column-filters":o.multiColumnFilters,onOpenColumnDrawer:g[7]||(g[7]=u=>p.value=!0),onOpenFilterDrawer:g[8]||(g[8]=u=>C.value=!0),"onUpdate:filterValues":f,onFilterApply:g[9]||(g[9]=u=>r("filterApply",u)),onRestore:g[10]||(g[10]=u=>r("restore",u)),onEdit:g[11]||(g[11]=u=>r("edit",u)),onDelete:g[12]||(g[12]=u=>r("delete",u)),onSortChange:g[13]||(g[13]=u=>r("sortChange",u)),onPageChange:g[14]||(g[14]=u=>r("pageChange",u)),onSizeChange:g[15]||(g[15]=(u,w)=>r("sizeChange",u,w))},{title:t.withCtx(()=>[t.renderSlot(b.$slots,"title")]),bodyCell:t.withCtx(u=>[t.renderSlot(b.$slots,"bodyCell",t.normalizeProps(t.guardReactiveProps(u)))]),actionColumn:t.withCtx(u=>[t.renderSlot(b.$slots,"actionColumn",t.normalizeProps(t.guardReactiveProps(u)))]),_:3},8,["loading","pagination","columns","data-source","filter-values","meta","can-edit","edit-action","delete-action","show-actions-column","columns-visibility","disable-column-filter-dropdowns","show-filter-button","multi-column-filters"])),t.renderSlot(b.$slots,"filtersDrawer",{visible:C.value,setVisible:u=>{C.value=u},filters:c.value,updateFilters:f,emitFilterApply:x},()=>[o.useFilterModal===!0?(t.openBlock(),t.createBlock(gt,{key:0,visible:C.value,"onUpdate:visible":g[16]||(g[16]=u=>C.value=u),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":f,onFilterApply:g[17]||(g[17]=u=>r("filterApply",u))},null,8,["visible","columns","filter-values"])):(t.openBlock(),t.createBlock(mt,{key:1,visible:C.value,"onUpdate:visible":g[18]||(g[18]=u=>C.value=u),columns:e.columns,"filter-values":c.value,"onUpdate:filterValues":f,onFilterApply:g[19]||(g[19]=u=>r("filterApply",u))},null,8,["visible","columns","filter-values"]))]),t.createVNode(ft,{visible:p.value,"onUpdate:visible":g[20]||(g[20]=u=>p.value=u),"model-value":S.value,"onUpdate:modelValue":g[21]||(g[21]=u=>S.value=u),"view-mode":a.value,"onUpdate:viewMode":g[22]||(g[22]=u=>a.value=u),"card-layout":s.value,"onUpdate:cardLayout":g[23]||(g[23]=u=>s.value=u),columns:e.columns,"show-actions-column":e.showActionsColumn,"disable-view-mode":e.disableViewMode},null,8,["visible","model-value","view-mode","card-layout","columns","show-actions-column","disable-view-mode"])])}}}),Vn=t.defineComponent({__name:"LazyLoadContainer",props:{onIntersect:{},threshold:{default:.1},once:{type:Boolean,default:!1},rootMargin:{default:"0px"}},setup(e){const n=e,o=t.ref(null);let r=null;const a=l=>{l[0].isIntersecting&&n.onIntersect&&(n.onIntersect(),n.once&&r&&r.disconnect())};return t.onMounted(()=>{r=new IntersectionObserver(a,{threshold:n.threshold,rootMargin:n.rootMargin}),o.value&&r.observe(o.value)}),t.onBeforeUnmount(()=>{r==null||r.disconnect()}),(l,s)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:o},[t.renderSlot(l.$slots,"default")],512))}});exports.CardFiltersDrawer=mt;exports.CardFiltersModal=gt;exports.CardGrid=nt;exports.CardLayout=Te;exports.ColumnSettingsDrawer=ft;exports.DEFAULT_PAGE_NUMBER=en;exports.DEFAULT_PAGE_SIZE=tn;exports.DataTable=dt;exports.DataView=ht;exports.FilterMode=N;exports.LazyLoadContainer=Vn;exports.LazyLoadTrigger=ot;exports.PAGE_SIZE_EXTRA_LARGE=Qo;exports.PAGE_SIZE_LARGE=Yo;exports.PAGE_SIZE_MEDIUM=Ko;exports.PAGE_SIZE_OPTIONS=on;exports.PAGE_SIZE_SMALL=rt;exports.PAGE_SIZE_ULTRA=Jo;exports.PageSizes=at;exports.SkipSizes=lt;exports.SortOrder=st;exports.TableBodyCell=ut;exports.TableDefaults=it;exports.TableSortOrder=se;exports.ViewMode=ce;exports.default=ht;
|
|
36
36
|
//# sourceMappingURL=data-view.cjs.js.map
|