@pennsieve-viz/tsviewer 1.0.0 → 1.0.1
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/{BFLibraryButton-BiLkvU6m.cjs → BFLibraryButton-BI_luZjc.cjs} +1 -1
- package/dist/{BFLibraryButton-C6aAhW1T.js → BFLibraryButton-BP-P5nDS.js} +1 -1
- package/dist/{IconSelection-DGTELjPb.cjs → IconSelection-B3B4x81f.cjs} +1 -1
- package/dist/{IconSelection-Bud2XLOy.js → IconSelection-DkGAJih_.js} +1 -1
- package/dist/{TSAnnotationCanvas-CMZHn8mY.js → TSAnnotationCanvas-CPNo-Z2t.js} +6 -5
- package/dist/TSAnnotationCanvas-Cq5fLEeQ.cjs +1 -0
- package/dist/TSAnnotationModal-BfpdK288.js +4429 -0
- package/dist/TSAnnotationModal-BvPKePsi.cjs +1 -0
- package/dist/{TSFilterModal-BtLOK_nq.js → TSFilterModal-BUuabfh0.js} +59 -55
- package/dist/TSFilterModal-DXfg6Vbt.cjs +1 -0
- package/dist/{TSScrubber-CTjzX-Xq.js → TSScrubber-BWay2z2E.js} +1 -1
- package/dist/{TSScrubber-DAnIUBuC.cjs → TSScrubber-DuOBdGF2.cjs} +1 -1
- package/dist/TSViewerCanvas-BDAfmQM_.cjs +11 -0
- package/dist/{TSViewerCanvas-DkKV70m8.js → TSViewerCanvas-DjV4CQ2G.js} +205 -209
- package/dist/{TSViewerLayerWindow-zI_48DIx.js → TSViewerLayerWindow-BuXB_NVG.js} +39 -36
- package/dist/TSViewerLayerWindow-C40On1cL.cjs +1 -0
- package/dist/TSViewerToolbar-CGLoEe3Z.cjs +1 -0
- package/dist/{TSViewerToolbar-BMZIlD4q.js → TSViewerToolbar-gOCiS_4U.js} +92 -88
- package/dist/{TsAnnotationDeleteDialog-Iwpo79Pe.js → TsAnnotationDeleteDialog-C3P2teV8.js} +82 -80
- package/dist/TsAnnotationDeleteDialog-Dr6JB0ms.cjs +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/base-C3K_VdPK.cjs +12 -0
- package/dist/base-Dd-o8fN6.js +1413 -0
- package/dist/el-button-B3mito7d.cjs +1 -0
- package/dist/el-button-DVykS1Of.js +769 -0
- package/dist/el-input-BQKTli-S.cjs +1 -0
- package/dist/el-input-BxM2cCbI.js +4667 -0
- package/dist/el-input-number-8Z4UFuyU.cjs +1 -0
- package/dist/el-input-number-DtWxZ2F-.js +265 -0
- package/dist/el-overlay-BJQNirx2.cjs +1 -0
- package/dist/el-overlay-DfCO_8B5.js +517 -0
- package/dist/{index-CGSfhm_E.cjs → index-CW1sKrzq.cjs} +1 -1
- package/dist/index-CiwHOd9w.cjs +1 -0
- package/dist/index-CtMh8Ff9.js +22 -0
- package/dist/{index-Cexzl5Xu.js → index-D41jNOo7.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{pathOr-Do2dduwx.js → pathOr-CSuna3IF.js} +1 -1
- package/dist/{pathOr-D0158Gk1.cjs → pathOr-DWeJPuhG.cjs} +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/TSAnnotationCanvas-C3-VI46n.cjs +0 -1
- package/dist/TSAnnotationModal-BcqWVXP_.js +0 -199
- package/dist/TSAnnotationModal-DskdoFo4.cjs +0 -1
- package/dist/TSFilterModal-DEOWfIi6.cjs +0 -1
- package/dist/TSViewerCanvas-Jbu-Kh9F.cjs +0 -11
- package/dist/TSViewerLayerWindow-wHkjTl6e.cjs +0 -1
- package/dist/TSViewerToolbar-C6yy7GJr.cjs +0 -1
- package/dist/TsAnnotationDeleteDialog-Be3AJIyo.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("vue"),h=require("./base-C3K_VdPK.cjs"),w=require("./el-input-BQKTli-S.cjs"),z=Symbol("buttonGroupContextKey"),O=(e,r)=>{h.useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},i.computed(()=>e.type==="text"));const t=i.inject(z,void 0),n=h.useGlobalConfig("button"),{form:a}=w.useFormItem(),o=w.useFormSize(i.computed(()=>t==null?void 0:t.size)),s=w.useFormDisabled(),f=i.ref(),c=i.useSlots(),v=i.computed(()=>{var u;return e.type||(t==null?void 0:t.type)||((u=n.value)==null?void 0:u.type)||""}),y=i.computed(()=>{var u,d,b;return(b=(d=e.autoInsertSpace)!=null?d:(u=n.value)==null?void 0:u.autoInsertSpace)!=null?b:!1}),M=i.computed(()=>{var u,d,b;return(b=(d=e.plain)!=null?d:(u=n.value)==null?void 0:u.plain)!=null?b:!1}),H=i.computed(()=>{var u,d,b;return(b=(d=e.round)!=null?d:(u=n.value)==null?void 0:u.round)!=null?b:!1}),B=i.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),R=i.computed(()=>{var u;const d=(u=c.default)==null?void 0:u.call(c);if(y.value&&(d==null?void 0:d.length)===1){const b=d[0];if((b==null?void 0:b.type)===i.Text){const q=b.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(q.trim())}}return!1});return{_disabled:s,_size:o,_type:v,_ref:f,_props:B,_plain:M,_round:H,shouldAddSpace:R,handleClick:u=>{if(s.value||e.loading){u.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),r("click",u)}}},W=["default","primary","success","warning","info","danger","text",""],U=["button","submit","reset"],E=h.buildProps({size:w.useSizeProp,disabled:Boolean,type:{type:String,values:W,default:""},icon:{type:h.iconPropType},nativeType:{type:String,values:U,default:"button"},loading:Boolean,loadingIcon:{type:h.iconPropType,default:()=>h.loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:h.definePropType([String,Object]),default:"button"}}),K={click:e=>e instanceof MouseEvent};function l(e,r){L(e)&&(e="100%");var t=Z(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function _(e){return Math.min(1,Math.max(0,e))}function L(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Z(e){return typeof e=="string"&&e.indexOf("%")!==-1}function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function A(e){return e<=1?"".concat(Number(e)*100,"%"):e}function x(e){return e.length===1?"0"+e:String(e)}function J(e,r,t){return{r:l(e,255)*255,g:l(r,255)*255,b:l(t,255)*255}}function P(e,r,t){e=l(e,255),r=l(r,255),t=l(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),o=0,s=0,f=(n+a)/2;if(n===a)s=0,o=0;else{var c=n-a;switch(s=f>.5?c/(2-n-a):c/(n+a),n){case e:o=(r-t)/c+(r<t?6:0);break;case r:o=(t-e)/c+2;break;case t:o=(e-r)/c+4;break}o/=6}return{h:o,s,l:f}}function C(e,r,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(r-e)*(6*t):t<1/2?r:t<2/3?e+(r-e)*(2/3-t)*6:e}function Q(e,r,t){var n,a,o;if(e=l(e,360),r=l(r,100),t=l(t,100),r===0)a=t,o=t,n=t;else{var s=t<.5?t*(1+r):t+r-t*r,f=2*t-s;n=C(f,s,e+1/3),a=C(f,s,e),o=C(f,s,e-1/3)}return{r:n*255,g:a*255,b:o*255}}function V(e,r,t){e=l(e,255),r=l(r,255),t=l(t,255);var n=Math.max(e,r,t),a=Math.min(e,r,t),o=0,s=n,f=n-a,c=n===0?0:f/n;if(n===a)o=0;else{switch(n){case e:o=(r-t)/f+(r<t?6:0);break;case r:o=(t-e)/f+2;break;case t:o=(e-r)/f+4;break}o/=6}return{h:o,s:c,v:s}}function X(e,r,t){e=l(e,360)*6,r=l(r,100),t=l(t,100);var n=Math.floor(e),a=e-n,o=t*(1-r),s=t*(1-a*r),f=t*(1-(1-a)*r),c=n%6,v=[t,s,o,o,f,t][c],y=[f,t,t,s,o,o][c],M=[o,o,f,t,t,s][c];return{r:v*255,g:y*255,b:M*255}}function $(e,r,t,n){var a=[x(Math.round(e).toString(16)),x(Math.round(r).toString(16)),x(Math.round(t).toString(16))];return n&&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 Y(e,r,t,n,a){var o=[x(Math.round(e).toString(16)),x(Math.round(r).toString(16)),x(Math.round(t).toString(16)),x(tt(n))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function tt(e){return Math.round(parseFloat(e)*255).toString(16)}function G(e){return g(e)/255}function g(e){return parseInt(e,16)}function et(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var F={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 rt(e){var r={r:0,g:0,b:0},t=1,n=null,a=null,o=null,s=!1,f=!1;return typeof e=="string"&&(e=ot(e)),typeof e=="object"&&(m(e.r)&&m(e.g)&&m(e.b)?(r=J(e.r,e.g,e.b),s=!0,f=String(e.r).substr(-1)==="%"?"prgb":"rgb"):m(e.h)&&m(e.s)&&m(e.v)?(n=A(e.s),a=A(e.v),r=X(e.h,n,a),s=!0,f="hsv"):m(e.h)&&m(e.s)&&m(e.l)&&(n=A(e.s),o=A(e.l),r=Q(e.h,n,o),s=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=D(t),{ok:s,format:e.format||f,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:t}}var nt="[-\\+]?\\d+%?",at="[-\\+]?\\d*\\.\\d+%?",S="(?:".concat(at,")|(?:").concat(nt,")"),T="[\\s|\\(]+(".concat(S,")[,|\\s]+(").concat(S,")[,|\\s]+(").concat(S,")\\s*\\)?"),N="[\\s|\\(]+(".concat(S,")[,|\\s]+(").concat(S,")[,|\\s]+(").concat(S,")[,|\\s]+(").concat(S,")\\s*\\)?"),p={CSS_UNIT:new RegExp(S),rgb:new RegExp("rgb"+T),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+T),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+T),hsva:new RegExp("hsva"+N),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 ot(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(F[e])e=F[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=p.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=p.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=p.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=p.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=p.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=p.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=p.hex8.exec(e),t?{r:g(t[1]),g:g(t[2]),b:g(t[3]),a:G(t[4]),format:r?"name":"hex8"}:(t=p.hex6.exec(e),t?{r:g(t[1]),g:g(t[2]),b:g(t[3]),format:r?"name":"hex"}:(t=p.hex4.exec(e),t?{r:g(t[1]+t[1]),g:g(t[2]+t[2]),b:g(t[3]+t[3]),a:G(t[4]+t[4]),format:r?"name":"hex8"}:(t=p.hex3.exec(e),t?{r:g(t[1]+t[1]),g:g(t[2]+t[2]),b:g(t[3]+t[3]),format:r?"name":"hex"}:!1)))))))))}function m(e){return!!p.CSS_UNIT.exec(String(e))}var it=(function(){function e(r,t){r===void 0&&(r=""),t===void 0&&(t={});var n;if(r instanceof e)return r;typeof r=="number"&&(r=et(r)),this.originalInput=r;var a=rt(r);this.originalInput=r,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=(n=t.format)!==null&&n!==void 0?n:a.format,this.gradientType=t.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 r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},e.prototype.getLuminance=function(){var r=this.toRgb(),t,n,a,o=r.r/255,s=r.g/255,f=r.b/255;return o<=.03928?t=o/12.92:t=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),f<=.03928?a=f/12.92:a=Math.pow((f+.055)/1.055,2.4),.2126*t+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(r){return this.a=D(r),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var r=this.toHsl().s;return r===0},e.prototype.toHsv=function(){var r=V(this.r,this.g,this.b);return{h:r.h*360,s:r.s,v:r.v,a:this.a}},e.prototype.toHsvString=function(){var r=V(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.v*100);return this.a===1?"hsv(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var r=P(this.r,this.g,this.b);return{h:r.h*360,s:r.s,l:r.l,a:this.a}},e.prototype.toHslString=function(){var r=P(this.r,this.g,this.b),t=Math.round(r.h*360),n=Math.round(r.s*100),a=Math.round(r.l*100);return this.a===1?"hsl(".concat(t,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(r){return r===void 0&&(r=!1),$(this.r,this.g,this.b,r)},e.prototype.toHexString=function(r){return r===void 0&&(r=!1),"#"+this.toHex(r)},e.prototype.toHex8=function(r){return r===void 0&&(r=!1),Y(this.r,this.g,this.b,this.a,r)},e.prototype.toHex8String=function(r){return r===void 0&&(r=!1),"#"+this.toHex8(r)},e.prototype.toHexShortString=function(r){return r===void 0&&(r=!1),this.a===1?this.toHexString(r):this.toHex8String(r)},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 r=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(r,", ").concat(t,", ").concat(n,")"):"rgba(".concat(r,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var r=function(t){return"".concat(Math.round(l(t,255)*100),"%")};return{r:r(this.r),g:r(this.g),b:r(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var r=function(t){return Math.round(l(t,255)*100)};return this.a===1?"rgb(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%)"):"rgba(".concat(r(this.r),"%, ").concat(r(this.g),"%, ").concat(r(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var r="#"+$(this.r,this.g,this.b,!1),t=0,n=Object.entries(F);t<n.length;t++){var a=n[t],o=a[0],s=a[1];if(r===s)return o}return!1},e.prototype.toString=function(r){var t=!!r;r=r??this.format;var n=!1,a=this.a<1&&this.a>=0,o=!t&&a&&(r.startsWith("hex")||r==="name");return o?r==="name"&&this.a===0?this.toName():this.toRgbString():(r==="rgb"&&(n=this.toRgbString()),r==="prgb"&&(n=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(n=this.toHexString()),r==="hex3"&&(n=this.toHexString(!0)),r==="hex4"&&(n=this.toHex8String(!0)),r==="hex8"&&(n=this.toHex8String()),r==="name"&&(n=this.toName()),r==="hsl"&&(n=this.toHslString()),r==="hsv"&&(n=this.toHsvString()),n||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(r){r===void 0&&(r=10);var t=this.toHsl();return t.l+=r/100,t.l=_(t.l),new e(t)},e.prototype.brighten=function(r){r===void 0&&(r=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(r/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(r/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(r/100)))),new e(t)},e.prototype.darken=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.l-=r/100,t.l=_(t.l),new e(t)},e.prototype.tint=function(r){return r===void 0&&(r=10),this.mix("white",r)},e.prototype.shade=function(r){return r===void 0&&(r=10),this.mix("black",r)},e.prototype.desaturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s-=r/100,t.s=_(t.s),new e(t)},e.prototype.saturate=function(r){r===void 0&&(r=10);var t=this.toHsl();return t.s+=r/100,t.s=_(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(r){var t=this.toHsl(),n=(t.h+r)%360;return t.h=n<0?360+n:n,new e(t)},e.prototype.mix=function(r,t){t===void 0&&(t=50);var n=this.toRgb(),a=new e(r).toRgb(),o=t/100,s={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return new e(s)},e.prototype.analogous=function(r,t){r===void 0&&(r=6),t===void 0&&(t=30);var n=this.toHsl(),a=360/t,o=[this];for(n.h=(n.h-(a*r>>1)+720)%360;--r;)n.h=(n.h+a)%360,o.push(new e(n));return o},e.prototype.complement=function(){var r=this.toHsl();return r.h=(r.h+180)%360,new e(r)},e.prototype.monochromatic=function(r){r===void 0&&(r=6);for(var t=this.toHsv(),n=t.h,a=t.s,o=t.v,s=[],f=1/r;r--;)s.push(new e({h:n,s:a,v:o})),o=(o+f)%1;return s},e.prototype.splitcomplement=function(){var r=this.toHsl(),t=r.h;return[this,new e({h:(t+72)%360,s:r.s,l:r.l}),new e({h:(t+216)%360,s:r.s,l:r.l})]},e.prototype.onBackground=function(r){var t=this.toRgb(),n=new e(r).toRgb(),a=t.a+n.a*(1-t.a);return new e({r:(t.r*t.a+n.r*n.a*(1-t.a))/a,g:(t.g*t.a+n.g*n.a*(1-t.a))/a,b:(t.b*t.a+n.b*n.a*(1-t.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(r){for(var t=this.toHsl(),n=t.h,a=[this],o=360/r,s=1;s<r;s++)a.push(new e({h:(n+s*o)%360,s:t.s,l:t.l}));return a},e.prototype.equals=function(r){return this.toRgbString()===new e(r).toRgbString()},e})();function k(e,r=20){return e.mix("#141414",r).toString()}function st(e){const r=w.useFormDisabled(),t=h.useNamespace("button");return i.computed(()=>{let n={},a=e.color;if(a){const o=a.match(/var\((.*?)\)/);o&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const s=new it(a),f=e.dark?s.tint(20).toString():k(s,20);if(e.plain)n=t.cssVarBlock({"bg-color":e.dark?k(s,90):s.tint(90).toString(),"text-color":a,"border-color":e.dark?k(s,50):s.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":f,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":f}),r.value&&(n[t.cssVarBlockName("disabled-bg-color")]=e.dark?k(s,90):s.tint(90).toString(),n[t.cssVarBlockName("disabled-text-color")]=e.dark?k(s,50):s.tint(50).toString(),n[t.cssVarBlockName("disabled-border-color")]=e.dark?k(s,80):s.tint(80).toString());else{const c=e.dark?k(s,30):s.tint(30).toString(),v=s.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(n=t.cssVarBlock({"bg-color":a,"text-color":v,"border-color":a,"hover-bg-color":c,"hover-text-color":v,"hover-border-color":c,"active-bg-color":f,"active-border-color":f}),r.value){const y=e.dark?k(s,50):s.tint(50).toString();n[t.cssVarBlockName("disabled-bg-color")]=y,n[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,n[t.cssVarBlockName("disabled-border-color")]=y}}}return n})}const ft=i.defineComponent({name:"ElButton"}),ut=i.defineComponent({...ft,props:E,emits:K,setup(e,{expose:r,emit:t}){const n=e,a=st(n),o=h.useNamespace("button"),{_ref:s,_size:f,_type:c,_disabled:v,_props:y,_plain:M,_round:H,shouldAddSpace:B,handleClick:R}=O(n,t),I=i.computed(()=>[o.b(),o.m(c.value),o.m(f.value),o.is("disabled",v.value),o.is("loading",n.loading),o.is("plain",M.value),o.is("round",H.value),o.is("circle",n.circle),o.is("text",n.text),o.is("link",n.link),o.is("has-bg",n.bg)]);return r({ref:s,size:f,type:c,disabled:v,shouldAddSpace:B}),(u,d)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.tag),i.mergeProps({ref_key:"_ref",ref:s},i.unref(y),{class:i.unref(I),style:i.unref(a),onClick:i.unref(R)}),{default:i.withCtx(()=>[u.loading?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[u.$slots.loading?i.renderSlot(u.$slots,"loading",{key:0}):(i.openBlock(),i.createBlock(i.unref(h.ElIcon),{key:1,class:i.normalizeClass(i.unref(o).is("loading"))},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.loadingIcon)))]),_:1},8,["class"]))],64)):u.icon||u.$slots.icon?(i.openBlock(),i.createBlock(i.unref(h.ElIcon),{key:1},{default:i.withCtx(()=>[u.icon?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.icon),{key:0})):i.renderSlot(u.$slots,"icon",{key:1})]),_:3})):i.createCommentVNode("v-if",!0),u.$slots.default?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass({[i.unref(o).em("text","expand")]:i.unref(B)})},[i.renderSlot(u.$slots,"default")],2)):i.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var ct=h._export_sfc(ut,[["__file","button.vue"]]);const lt={size:E.size,type:E.type},ht=i.defineComponent({name:"ElButtonGroup"}),dt=i.defineComponent({...ht,props:lt,setup(e){const r=e;i.provide(z,i.reactive({size:i.toRef(r,"size"),type:i.toRef(r,"type")}));const t=h.useNamespace("button");return(n,a)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(t).b("group"))},[i.renderSlot(n.$slots,"default")],2))}});var j=h._export_sfc(dt,[["__file","button-group.vue"]]);const gt=h.withInstall(ct,{ButtonGroup:j}),bt=h.withNoopInstall(j);exports.ElButton=gt;exports.ElButtonGroup=bt;
|