UNPKG

wcolorpicker

Version:

vue2的颜色选择器支持渐变色 样式仿照element ui

2 lines 47.4 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["wcolorpicker"]=e():t["wcolorpicker"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="2b1f")}({"01dc":function(t,e){t.exports=!1},"09ee":function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"11a6":function(t,e,n){var r=n("1966"),o=n("e71d");t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},"11ea":function(t,e,n){var r=n("9978"),o=n("ca86"),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},"11eb":function(t,e,n){var r=n("60f0"),o=Object;t.exports=function(t){return o(r(t))}},"11f6":function(t,e,n){var r=n("f812"),o=n("e71d");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1287:function(t,e,n){var r=n("dbe0");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("3a8fc464",r,!0,{sourceMap:!1,shadowMode:!1})},1966:function(t,e,n){var r=n("e71d");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"1acc":function(t,e,n){var r=n("f5e4");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("2c90eaa2",r,!0,{sourceMap:!1,shadowMode:!1})},"1aef":function(t,e,n){var r=n("11f6");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"1c88":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?r:n)(e)}},"1c99":function(t,e,n){"use strict";n("1acc")},"1dd0":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"1f09":function(t,e,n){"use strict";var r=n("1966"),o=n("2b46"),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"1f21":function(t,e,n){var r=n("784d"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},"21dc":function(t,e,n){var r=n("9978"),o=n("b82f"),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},"23fe":function(t,e,n){var r=n("90ea"),o=n("11eb"),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},2409:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},"29b0":function(t,e,n){var r=n("a1a8");e=r(!1),e.push([t.i,"*{outline:none;border:none;padding:0;margin:0;box-sizing:border-box}:root{--main-slider-width:280px;--main-view-width:40px;--main-color:#409eff}.fit-content{width:-moz-fit-content;width:fit-content}.flex-center-between{display:flex;align-items:center;justify-content:space-between}.slider-bar{width:220px;height:12px;position:relative}.slider-bar-pointer{position:absolute;cursor:pointer;box-sizing:border-box;left:0;top:0;width:4px;height:100%;border-radius:1px;border:1px solid #f0f0f0;box-shadow:0 0 2px rgba(0,0,0,.6);z-index:1}",""]),t.exports=e},"2b1f":function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=function(){var t=this,e=t._self._c;return e("div",{ref:"w-color-picker",staticClass:"fit-content",staticStyle:{display:"inline-block"}},[e("div",{ref:"show-picker",staticClass:"w-showResult fit-content"},[e("div",{class:["w-input-color",t.disabled?"w-disabled":"w-no-disabled"],on:{click:t.handleTrigger}},[e("div",{class:["w-show-bg",t.disabled?"w-disabled":"w-no-disabled"],style:{background:t.currentColor}})])]),e("div",[e("div",{directives:[{name:"show",rawName:"v-show",value:t.popView,expression:"popView"}],ref:"w-picke-box",class:["w-color-picke-box",t.popperClass||""]},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.showChange,expression:"showChange"}],staticClass:"w-color-type-heard flex-center-between",style:{marginBottom:t.gradientcolor?"0px":"10px"}},[e("label",{class:t.gradientcolor?"w-nobtn":"w-selectbtn",on:{click:function(e){return t.changType(0)}}},[t._v("单色")]),e("label",{class:t.gradientcolor?"w-selectbtn":"w-nobtn",on:{click:function(e){return t.changType(1)}}},[t._v("渐变")])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.gradientcolor,expression:"gradientcolor"}]},[e("WsliderGradient",{ref:"wslidergradient",attrs:{color:t.color}})],1),e("Wpanel",{ref:"wpanel",attrs:{color:t.color}}),e("div",{staticClass:"w-color-alpha flex-center-between"},[e("div",{staticClass:"w-color-alpha-box"},[e("WsliderColor",{ref:"wsliderColor",attrs:{color:t.color}}),e("WsliderAlpha",{directives:[{name:"show",rawName:"v-show",value:t.showAlpha,expression:"showAlpha"}],ref:"wsliderAlpha",attrs:{color:t.color}})],1),e("WPreview",{ref:"wPreview",attrs:{color:t.color}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.predefine.length>0,expression:"predefine.length > 0"}]},[e("div",{staticClass:"w-predefine-colors"},t._l(t.predefine,(function(n){return e("div",{key:n,staticClass:"w-predefine-selector"},[e("div",{style:{background:n},on:{click:function(e){return t.setCurrentColor(n,!0)}}})])})),0)]),e("div",{staticClass:"w-oper-box"},[e("div",{staticClass:"w-cancal-btn",on:{click:t.cancal}},[t._v("取消")]),e("div",{staticClass:"w-sure-btn",on:{click:t.sure}},[t._v("确定")])])],1)])])},a=[];n("a717");const s=(t,e,n)=>{const r=(2-e)*n;return e=0===n||0===e?0:e*n/(r>1?2-r:r),{h:t,s:100*e,l:r/2*100}},c=function(t){return"string"===typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)},l=function(t){return"string"===typeof t&&-1!==t.indexOf("%")},u=function(t,e){c(t)&&(t="100%");const n=l(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)},d=function(t,e,n){t=u(t,255),e=u(e,255),n=u(n,255);const r=Math.max(t,e,n),o=Math.min(t,e,n);let i,a,s=r;const c=r-o;if(a=0===r?0:c/r,r===o)i=0;else{switch(r){case t:i=(e-n)/c+(e<n?6:0);break;case e:i=(n-t)/c+2;break;case n:i=(t-e)/c+4;break}i/=6}return{h:Math.round(360*i),s:Math.round(100*a),v:Math.round(100*s)}},f=function(t,e,n){t=6*u(t,360),e=u(e,100),n=u(n,100);const r=Math.floor(t),o=t-r,i=n*(1-e),a=n*(1-o*e),s=n*(1-(1-o)*e),c=r%6,l=[n,a,i,i,s,n][c],d=[s,n,n,a,i,i][c],f=[i,i,s,n,n,a][c];return{r:Math.round(255*l),g:Math.round(255*d),b:Math.round(255*f)}},p=(t,e,n)=>{e/=100,n/=100;let r=e;const o=Math.max(n,.01);let i,a;return n*=2,e*=n<=1?n:2-n,r*=o<=1?o:2-o,a=(n+e)/2,i=0===n?2*r/(o+r):2*e/(n+e),{h:Math.round(t),s:Math.round(100*i),v:Math.round(100*a)}},h={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},g=function({r:t,g:e,b:n}){const r=function(t){t=Math.min(Math.round(t),255);const e=Math.floor(t/16),n=t%16;return""+(h[e]||e)+(h[n]||n)};return isNaN(t)||isNaN(e)||isNaN(n)?"":"#"+r(t)+r(e)+r(n)};var v=function(t,e){var n,r="";for(n=0;n<t.length;n++)"string"===typeof t[n]?r+=t[n]:r+=t[n].source;return new RegExp(r,e)},b=function(){var t="gi",e=/(?:[+-]?\d*\.?\d+)(?:deg|grad|rad|turn)/,n=/to\s+((?:(?:left|right)(?:\s+(?:top|bottom))?))/,r=/\s*,\s*/,o=/\#(?:[a-f0-9]{6}|[a-f0-9]{3})/,i=/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)/,a=/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)/,s=/(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?/,c=/[_a-z-][_a-z0-9-]*/,l=v(["(?:",o,"|","(?:rgb|hsl)",i,"|","(?:rgba|hsla)",a,"|",c,")"],""),u=v([l,"(?:\\s+",s,"(?:\\s+",s,")?)?"],""),d=v(["(?:",u,r,")*",u],""),f=v(["(?:(",e,")|",n,")"],""),p=v(["(?:(",f,")",r,")?(",d,")"],t),h=v(["\\s*(",l,")","(?:\\s+","(",s,"))?","(?:",r,"\\s*)?"],t);return{gradientSearch:p,colorStopSearch:h}},w=function(t,e){var n,r,o,i;if(t.gradientSearch.lastIndex=0,r=t.gradientSearch.exec(e),null!==r){n={original:r[0],colorStopList:[]},r[1]&&(n.line=r[1]),r[2]&&(n.angle=r[2]),r[3]&&(n.sideCorner=r[3]),t.colorStopSearch.lastIndex=0,o=t.colorStopSearch.exec(r[4]);while(null!==o)i={color:o[1]},o[2]&&(i.position=o[2]),n.colorStopList.push(i),o=t.colorStopSearch.exec(r[4])}return n},m=function(t,e){var n,r=/.*gradient\s*\(((?:\([^\)]*\)|[^\)\(]*)*)\)/,o=r.exec(e);return null!==o?(n=w(t,o[1]),n.original.trim()!==o[1].trim()&&(n.parseWarning=!0)):n="Failed to find gradient",n};const x=t=>{var e=b();return m(e,t)},y="linear-gradient(90deg, rgb(241,29,0) 0%, rgb(73,106,220) 100%)",_=()=>(1+4294967295*Math.random()).toString(16),C=(t=y)=>x(t),M=C();class k{constructor(t){this.enableAlpha=!1,this.format="rgb",this.gradientDots=2,this._hue=0,this._saturation=100,this._value=100,this.colorValue="",this._alpha=100,this._gradientcolor=!1,this._angle=90,this._genGradientPoint=[],this._genGradientPoint=M.colorStopList.map(t=>({color:t.color,position:t.position,genid:_()})),this._angle=M.angle.replace(/deg/g,""),this.currentgenid=this._genGradientPoint[0].genid,this._lineMove=this._genGradientPoint[0].position,this.gradientcolorValue="",t=t||{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e]);this.doOnChange()}init(t,e){e||(this._hue=0,this._saturation=100,this._value=100,this.colorValue="",this._alpha=100,this._gradientcolor=!1,this._angle=90,this._genGradientPoint=[],this._genGradientPoint=M.colorStopList.map(t=>({color:t.color,position:t.position,genid:_()})),this._angle=M.angle.replace(/deg/g,""),this.currentgenid=this._genGradientPoint[0].genid,this._lineMove=this._genGradientPoint[0].position,this.gradientcolorValue=""),this.doOnChange(),t&&this.haveColor(t,e)}haveColor(t,e){if(e)this.colorValue=t,this.doChangeLineposition(),this.setcurrentHSVA(),this.doOnChange();else{let e,n=/.*gradient\s*\(((?:\([^\)]*\)|[^\)\(]*)*)\)/;if(n.lastIndex=0,e=n.exec(t),this._gradientcolor=!!e,this._gradientcolor){this.gradientcolorValue=t;const e=C(t);this._genGradientPoint=e.colorStopList.map(t=>({color:t.color,position:t.position,genid:_()})),this._angle=e.angle.replace(/deg/g,""),this.currentgenidChang(this._genGradientPoint[0].genid)}else this.colorValue=t,this.setcurrentHSVA(),this.doOnChange()}}changProps(t,e){this[t]=e}set(t,e){if(1!==arguments.length||"object"!==typeof t)this["_"+t]=e,this.doOnChange(),this._gradientcolor&&this.doChangeLineposition();else for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n])}get(t){return this["_"+t]}doOnChange(){const{_hue:t,_saturation:e,_value:n,_alpha:r,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const o=s(t,e/100,n/100);this.colorValue=`hsla(${o.h}, ${Math.round(o.s)}%, ${Math.round(o.l)}%,${r/100})`;break}case"hsv":this.colorValue=`hsva(${t}, ${Math.round(e)}%, ${Math.round(n)}%,${r/100})`;break;default:{const{r:o,g:i,b:a}=f(t,e,n);this.colorValue=`rgba(${o}, ${i}, ${a},${r/100})`;break}}else switch(o){case"hsl":{const r=s(t,e/100,n/100);this.colorValue=`hsl(${r.h}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;break}case"hsv":this.colorValue=`hsv(${t}, ${Math.round(e)}%, ${Math.round(n)}%)`;break;case"rgb":{const{r:r,g:o,b:i}=f(t,e,n);this.colorValue=`rgb(${r}, ${o}, ${i})`;break}default:this.colorValue=g(f(t,e,n))}}addgradientPoint(t){this.gradientDots>this._genGradientPoint.length&&(this._genGradientPoint.push(t),this._genGradientPoint.sort((t,e)=>Number(t.position.replace("%",""))-Number(e.position.replace("%",""))),this.currentgenidChang(t.genid))}deletePoint(t){let e=this._genGradientPoint.findIndex(t=>t.genid===this.currentgenid);const{length:n}=this._genGradientPoint;["delete","backspace"].includes(t.key.toLocaleLowerCase())&&n>2&&e>=0&&e<=n-1&&(this._genGradientPoint.splice(e,1),this._genGradientPoint[e]||(e=this._genGradientPoint[e+1]?e+1:this._genGradientPoint[e-1]?e-1:0),this.currentgenidChang(this._genGradientPoint[e].genid))}doChangeLineposition(){const t=this._genGradientPoint.findIndex(t=>t.genid===this.currentgenid);if(-1===t)return;const e=this._genGradientPoint[t];this._genGradientPoint.splice(t,1,{color:this.colorValue,position:this._lineMove,genid:e.genid}),this._genGradientPoint.sort((t,e)=>Number(t.position.replace("%",""))-Number(e.position.replace("%",""))),this.handleColorsChange()}currentgenidChang(t){this.currentgenid=t;const e=this._genGradientPoint.findIndex(t=>t.genid===this.currentgenid);if(-1===e)return;const n=this._genGradientPoint[e];this._lineMove=n.position,this.colorValue=n.color,this.setcurrentHSVA(),this.handleColorsChange()}setcurrentHSVA(){const t=(t,e,n)=>{this._hue=Math.max(0,Math.min(360,t)),this._saturation=Math.max(0,Math.min(100,e)),this._value=Math.max(0,Math.min(100,n))};if(-1!==this.colorValue.indexOf("hsl")){const e=this.colorValue.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(t=>""!==t).map((t,e)=>e>2?parseFloat(t):parseInt(t,10));if(4===e.length?this._alpha=Math.floor(100*parseFloat(e[3])):3===e.length&&(this._alpha=100),e.length>=3){const{h:n,s:r,v:o}=p(e[0],e[1],e[2]);t(n,r,o)}}else if(-1!==this.colorValue.indexOf("hsv")){const e=this.colorValue.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(t=>""!==t).map((t,e)=>e>2?parseFloat(t):parseInt(t,10));4===e.length?this._alpha=Math.floor(100*parseFloat(e[3])):3===e.length&&(this._alpha=100),e.length>=3&&t(e[0],e[1],e[2])}else if(-1!==this.colorValue.indexOf("rgb")){let e=this.colorValue.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(t=>""!==t).map((t,e)=>e>2?parseFloat(t):parseInt(t,10));if(4===e.length?this._alpha=Math.floor(100*parseFloat(e[3])):3===e.length&&(this._alpha=100),e.length>=3){const{h:n,s:r,v:o}=d(e[0],e[1],e[2]);t(n,r,o)}}else value.indexOf("#")}handleColorsChange(){let t=this._genGradientPoint.map(t=>t.color+" "+t.position);t=t.join(),this._angle?this.gradientcolorValue=`linear-gradient(${this._angle}deg,${t})`:this.gradientcolorValue=`linear-gradient(${t})`}}var S=function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-gradient-box"},[e("div",{ref:"w-g-colorBar",staticClass:"w-g-color-picker-bar",style:{background:t.linebackground},attrs:{tabindex:"0"},on:{keyup:t.deletePoint,click:t.handleClick}},t._l(t.gradientPoint,(function(n){return e("div",{key:n.genid,staticClass:"slider-bar-pointer",class:t.currentgenid==n.genid?"w-active":"",style:{left:n.position,background:n.color},attrs:{title:"选中按del键删除"},on:{mousedown:function(e){return t.mousedown(n.genid)},click:t=>t.stopPropagation()}})})),0),e("div",{staticStyle:{position:"relative"}},[e("input",{ref:"deg",staticClass:"input-deg",attrs:{autocomplete:"off"},on:{keydown:t.numTxtKeyDown,input:t.input,blur:t.inputBlur,focus:()=>t.showdeg=!1}}),e("span",{directives:[{name:"show",rawName:"v-show",value:t.showdeg,expression:"showdeg"}],staticClass:"degtips"},[t._v("°")])])])},P=[],V={name:"w-slider-gradient",props:{color:{required:!0}},data(){return{isDragging:!1,linebackground:y,sliderLeft:0,selsectID:"",showdeg:!0}},computed:{gradientPoint(){return this.color.get("genGradientPoint")},currentgenid(){return this.color.currentgenid}},watch:{gradientPoint(t){this.updateView()}},mounted(){this.updateView()},methods:{handleClick(t){let e=this.$refs["w-g-colorBar"].getBoundingClientRect(),n=t.clientX-e.left;n=Math.max(0,Math.min(e.width,n)),n=Math.round(n/e.width*100);const r={position:n+"%",color:this.color.colorValue,genid:_()};this.color.addgradientPoint(r)},mousedown(t){this.isDragging||(this.color.currentgenidChang(t),console.log("按下"),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",this.moveFn),document.addEventListener("mouseup",this.upFn),this.isDragging=!0)},moveFn(t){let e=this.$refs["w-g-colorBar"].getBoundingClientRect();this.$refs["w-g-colorBar"].focus();let n=t.clientX-e.left;n=Math.max(0,Math.min(e.width,n)),n=Math.round(n/e.width*100),this.color.set("lineMove",n+"%")},upFn(t){console.log("松开"),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("mouseup",this.upFn),document.onselectstart=null,document.ondragstart=null,this.isDragging=!1},inputBlur(t){/^([1-9]|([1-9][0-9])|([1-2][0-9][0-9])|([3][0-5][0-9])|([0]{1}))$|^[3][6][0]$/.test(t.target.value)?t.target.value=t.target.value.replace(/\D/g,""):t.target.value=null,this.color.set("angle",t.target.value),this.showdeg=!0},input(t){/^([1-9]|([1-9][0-9])|([1-2][0-9][0-9])|([3][0-5][0-9])|([0]{1}))$|^[3][6][0]$/.test(t.target.value)?t.target.value=t.target.value.replace(/\D/g,""):t.target.value=null},deletePoint(t){this.color.deletePoint(t)},numTxtKeyDown(t){const e=t.keyCode;if(38==e){if(!isNaN(t.target.value))return t.target.value=Number(t.target.value)+1,!1}else if(40==e)return isNaN(t.target.value)||(Number(t.target.value)<=0?t.target.value=0:t.target.value=Number(t.target.value)-1),!1},updateView(){this.$nextTick(()=>{const t=this.$refs["deg"];t.value=this.color.get("angle")}),this.linebackground=this.color.gradientcolorValue}}},O=V;n("6245");function $(t,e,n,r,o,i,a,s){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):o&&(c=s?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}var j=$(O,S,P,!1,null,"2edf8313",null),E=j.exports,A=function(){var t=this,e=t._self._c;return e("div",[e("div",{ref:"w-panel",staticClass:"w-color-panel-box",style:{backgroundColor:t.background},on:{click:t.handleClick}},[e("div",{staticClass:"w-color-panel w-color-panel__white"}),e("div",{staticClass:"w-color-panel w-color-panel__black"}),e("div",{ref:"w-markerpoints",staticClass:"w-color-panel__cursor",style:{top:t.cursorTop+"px",left:t.cursorLeft+"px"}},[e("div")])])])},L=[],F={name:"w-panel",props:{color:{required:!0}},data(){return{isDragging:!1,cursorTop:0,cursorLeft:0,background:"hsl(0, 100%, 50%)",bg:"hsl(0, 100%, 50%)"}},computed:{colorValue(){const t=this.color.colorValue;return t}},watch:{colorValue(t){this.updateView()}},mounted(){let t=this,e=this.$refs["w-panel"];this.updateView(),e.addEventListener("mousedown",e=>{t.isDragging||(console.log("按下"),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",t.moveFn),document.addEventListener("mouseup",t.upFn),t.isDragging=!0)})},methods:{handleClick(t){const e=this.$refs["w-markerpoints"],n=t.target;n!==e&&this.moveFn(t)},moveFn(t){console.log("移动");let e=this.$refs["w-panel"].getBoundingClientRect(),n=t.clientX-e.left;n=Math.min(n,e.width),n=Math.max(0,n),this.cursorLeft=n;let r=t.clientY-e.top;r=Math.min(r,e.height),r=Math.max(0,r),this.cursorTop=r;let o=n/e.width*100,i=100-r/e.height*100;this.color.set({saturation:o,value:i})},upFn(t){console.log("松开"),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("mouseup",this.upFn),document.onselectstart=null,document.ondragstart=null,this.isDragging=!1},updateView(){let t=this.$refs["w-panel"].getBoundingClientRect();this.background="hsl("+this.color.get("hue")+", 100%, 50%)";let e=this.color.get("saturation"),n=this.color.get("value");this.cursorLeft=e*t.width/100,this.cursorTop=(100-n)*t.height/100}}},D=F,T=(n("fb9d"),$(D,A,L,!1,null,"72cb9368",null)),N=T.exports,B=function(){var t=this,e=t._self._c;return e("div",{ref:"w-colorBar",staticClass:"slider-bar w-sloder-color",on:{click:t.handleClick}},[e("div",{ref:"w-barpicker",staticClass:"slider-bar-pointer bg-color",style:{left:t.sliderLeft+"px"}})])},G=[],R={name:"w-slider-color",props:{color:{required:!0},sliderType:{type:String,default:"color"}},data(){return{isDragging:!1,sliderLeft:0}},computed:{hueValue(){const t=this.color.get("hue");return t}},watch:{hueValue(t){this.updateView()}},mounted(){let t=this,e=this.$refs["w-colorBar"];this.updateView(),e.addEventListener("mousedown",e=>{t.isDragging||(console.log("按下"),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",t.moveFn),document.addEventListener("mouseup",t.upFn),t.isDragging=!0)})},methods:{handleClick(t){const e=this.$refs["w-barpicker"],n=t.target;n!==e&&this.moveFn(t)},moveFn(t){let e=this.$refs["w-colorBar"].getBoundingClientRect(),n=this.$refs["w-barpicker"],r=t.clientX-e.left;r=Math.min(r,e.width-n.offsetWidth/2),r=Math.max(n.offsetWidth/2,r);let o=Math.round((r-n.offsetWidth/2)/(e.width-n.offsetWidth)*360);this.color.set("hue",o)},upFn(t){console.log("松开"),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("mouseup",this.upFn),document.onselectstart=null,document.ondragstart=null,this.isDragging=!1},updateView(){let t=this.$refs["w-colorBar"].getBoundingClientRect(),e=this.$refs["w-barpicker"];const n=this.color.get("hue");this.sliderLeft=Math.round(n/360*(t.width-e.offsetWidth)),console.log("移动距离",this.sliderLeft)}}},I=R,W=(n("f648"),$(I,B,G,!1,null,"9fbf2cea",null)),z=W.exports,U=function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-color-picker-right-bar"},[e("div",{ref:"w-alphaBar",staticClass:"slider-bar",style:{background:t.bg},on:{click:t.handleClick}},[e("div",{ref:"w-alphaPoint",staticClass:"slider-bar-pointer bg-alpha",style:{left:t.sliderLeft+"px"}})])])},H=[],X={name:"w-slider-alpha",props:{color:{required:!0}},data(){return{isDragging:!1,sliderLeft:0}},computed:{alphaValue(){const t=this.color.get("alpha");return t},bg(){return`linear-gradient(to right, rgba(255, 69, 0, 0) 0%,${this.color.colorValue} 100%)`}},watch:{alphaValue(t){this.updateView()}},mounted(){let t=this,e=this.$refs["w-alphaBar"];this.updateView(),e.addEventListener("mousedown",e=>{t.isDragging||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",t.moveFn),document.addEventListener("mouseup",t.upFn),t.isDragging=!0)})},methods:{handleClick(t){const e=this.$refs["w-alphaPoint"],n=t.target;n!==e&&this.moveFn(t)},moveFn(t){let e=this.$refs["w-alphaBar"].getBoundingClientRect(),n=this.$refs["w-alphaPoint"],r=t.clientX-e.left;r=Math.min(r,e.width-n.offsetWidth/2),r=Math.max(n.offsetWidth/2,r);let o=Math.round((r-n.offsetWidth/2)/(e.width-n.offsetWidth)*100);this.color.set("alpha",o)},upFn(t){console.log("松开"),document.removeEventListener("mousemove",this.moveFn),document.removeEventListener("mouseup",this.upFn),document.onselectstart=null,document.ondragstart=null,this.isDragging=!1},updateView(){let t=this.$refs["w-alphaBar"].getBoundingClientRect(),e=this.$refs["w-alphaPoint"];const n=this.color.get("alpha");this.sliderLeft=Math.round(n/100*(t.width-e.offsetWidth))}}},q=X,Y=(n("ee06"),$(q,U,H,!1,null,"d7a9d736",null)),J=Y.exports,K=function(){var t=this,e=t._self._c;return e("div",{staticClass:"w-color-preview",style:{background:t.background}})},Q=[],Z={name:"w-preview",props:{color:{required:!0}},computed:{background(){return this.color.colorValue}}},tt=Z,et=(n("9325"),$(tt,K,Q,!1,null,"84e7f268",null)),nt=et.exports,rt={name:"wcolorpicker",props:{value:String,showAlpha:{type:Boolean,default:!1},colorFormat:{type:String,default:"rgb"},gradientDots:{type:Number,default:2},showChange:{type:Boolean,default:!0},predefine:{type:Array,default:()=>[]},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{WsliderGradient:E,Wpanel:N,WsliderColor:z,WsliderAlpha:J,WPreview:nt},data(){const t=new k({enableAlpha:this.showAlpha,format:this.colorFormat,gradientDots:this.gradientDots});return{color:t,popView:!1,direction:!0,currentColor:""}},computed:{gradientcolor(){return this.color.get("gradientcolor")}},watch:{gradientcolor:{handler(t){this.updateView()},immediate:!0},value:{handler(t){t?this.currentColor=t:this.popView=!1},immediate:!0},showAlpha(t){this.color.changProps("enableAlpha",t)},gradientDots(t){this.color.changProps("gradientDots",t)}},mounted(){window.addEventListener("scroll",t=>{this.updateView()}),window.addEventListener("click",t=>{let e=this.$refs["w-color-picker"];e&&(e.contains(t.target)||(this.popView=!1))})},methods:{changType(t){0===t?this.color.set("gradientcolor",!1):this.color.set("gradientcolor",!0)},updateView(){this.$nextTick(()=>{let t=document.documentElement.clientHeight;const{top:e,left:n,width:r,height:o}=this.$refs["show-picker"].getBoundingClientRect(),{width:i,height:a}=this.$refs["w-picke-box"].getBoundingClientRect();this.$refs["w-picke-box"].style.marginTop=t-(e+a)>30?"0px":0-a-o+"px"})},handleTrigger(){if(this.disabled)return!1;this.popView=!this.popView,console.log(this.popView),this.updateView(),1==this.popView&&this.setCurrentColor(this.currentColor,!1)},setCurrentColor(t,e){this.$nextTick(()=>{this.color.init(t,e),this.$refs.wslidergradient.updateView(),this.$refs.wpanel.updateView(),this.$refs.wsliderColor.updateView(),this.$refs.wsliderAlpha.updateView()})},sure(){1==this.gradientcolor?this.$emit("input",this.color.gradientcolorValue):this.$emit("input",this.color.colorValue),this.popView=!1,this.$emit("Confirm")},cancal(){this.$emit("input",""),this.$emit("cancal"),this.currentColor="",this.popView=!1}}},ot=rt,it=(n("1c99"),$(ot,i,a,!1,null,"04d697b8",null)),at=it.exports;const st=[at],ct=function(t){st.forEach(e=>{t.component(e.name,e)})};var lt=ct;e["default"]=lt},"2b46":function(t,e,n){var r=n("98d4");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"2f56":function(t,e,n){var r=n("48b9"),o=n("ca86"),i=n("fbae"),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw a("Can't convert object to primitive value")}},"31c1":function(t,e,n){var r=n("9978"),o=n("deac").f,i=n("8659"),a=n("5420"),s=n("b82f"),c=n("fa50"),l=n("49f9");t.exports=function(t,e){var n,u,d,f,p,h,g=t.target,v=t.global,b=t.stat;if(u=v?r:b?r[g]||s(g,{}):(r[g]||{}).prototype,u)for(d in e){if(p=e[d],t.dontCallGetSet?(h=o(u,d),f=h&&h.value):f=u[d],n=l(v?d:g+(b?".":"#")+d,t.forced),!n&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(u,d,p,t)}}},"32c6":function(t,e,n){var r=n("e71d");t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},"38c2":function(t,e,n){var r=n("77e2"),o=n("a564");t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},3955:function(t,e,n){var r=n("90ea"),o=n("ca86"),i=n("21dc"),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},"42da":function(t,e){var n=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw n("Maximum allowed index exceeded");return t}},"48b9":function(t,e,n){var r=n("32c6"),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},"49f9":function(t,e,n){var r=n("e71d"),o=n("ca86"),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n==u||n!=l&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",u=a.POLYFILL="P";t.exports=a},5420:function(t,e,n){var r=n("ca86"),o=n("d771"),i=n("d997"),a=n("b82f");t.exports=function(t,e,n,s){s||(s={});var c=s.enumerable,l=void 0!==s.name?s.name:e;if(r(n)&&i(n,l,s),s.global)c?t[e]=n:a(e,n);else{try{s.unsafe?t[e]&&(c=!0):delete t[e]}catch(u){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},"54e2":function(t,e){t.exports=function(t){return null===t||void 0===t}},"57df":function(t,e,n){var r=n("90ea"),o=n("23fe"),i=n("7f47"),a=n("bab8").indexOf,s=n("dc67"),c=r([].push);t.exports=function(t,e){var n,r=i(t),l=0,u=[];for(n in r)!o(s,n)&&o(r,n)&&c(u,n);while(e.length>l)o(r,n=e[l++])&&(~a(u,n)||c(u,n));return u}},5925:function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],s=i[1],c=i[2],l=i[3],u={id:t+":"+o,css:s,media:c,sourceMap:l};r[a]?r[a].parts.push(u):n.push(r[a]={id:a,parts:[u]})}return n}n.r(e),n.d(e,"default",(function(){return h}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,l=!1,u=function(){},d=null,f="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,n,o){l=n,d=o||{};var a=r(t,e);return g(a),function(e){for(var n=[],o=0;o<a.length;o++){var s=a[o],c=i[s.id];c.refs--,n.push(c)}e?(a=r(t,e),g(a)):a=[];for(o=0;o<n.length;o++){c=n[o];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(b(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(b(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function b(t){var e,n,r=document.querySelector("style["+f+'~="'+t.id+'"]');if(r){if(l)return u;r.parentNode.removeChild(r)}if(p){var o=c++;r=s||(s=v()),e=m.bind(null,r,o,!1),n=m.bind(null,r,o,!0)}else r=v(),e=x.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var w=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function x(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),d.ssrId&&t.setAttribute(f,e.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"5c78":function(t,e,n){var r=n("e343"),o=n("54e2");t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},"60f0":function(t,e,n){var r=n("54e2"),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},6245:function(t,e,n){"use strict";n("fc25")},"747b":function(t,e){e.f=Object.getOwnPropertySymbols},"76db":function(t,e,n){var r=n("fbae"),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},"77e2":function(t,e,n){var r=n("48b9"),o=n("fbae"),i=n("a564"),a=n("5c78"),s=n("2f56"),c=n("bc07"),l=TypeError,u=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=a(t,u);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},"784d":function(t,e,n){var r=n("1c88");t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},"78f5":function(t,e,n){var r=n("90ea"),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},"7a6f":function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},"7f47":function(t,e,n){var r=n("d6ef"),o=n("60f0");t.exports=function(t){return r(o(t))}},"811a":function(t,e,n){var r=n("9978"),o=n("fbae"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},8659:function(t,e,n){var r=n("1966"),o=n("d771"),i=n("1dd0");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"8fdb":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},"90ea":function(t,e,n){var r=n("32c6"),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);t.exports=r?a:function(t){return function(){return i.apply(t,arguments)}}},9189:function(t,e,n){var r=n("1f21");t.exports=function(t){return r(t.length)}},9325:function(t,e,n){"use strict";n("c608")},"94ab":function(t,e,n){var r=n("01dc"),o=n("21dc");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.1",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"95b2":function(t,e,n){var r,o,i,a=n("efed"),s=n("9978"),c=n("fbae"),l=n("8659"),u=n("23fe"),d=n("21dc"),f=n("f024"),p=n("dc67"),h="Object already initialized",g=s.TypeError,v=s.WeakMap,b=function(t){return i(t)?o(t):r(t,{})},w=function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(a||d.state){var m=d.state||(d.state=new v);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw g(h);return e.facade=t,m.set(t,e),e},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var x=f("state");p[x]=!0,r=function(t,e){if(u(t,x))throw g(h);return e.facade=t,l(t,x,e),e},o=function(t){return u(t,x)?t[x]:{}},i=function(t){return u(t,x)}}t.exports={set:r,get:o,has:i,enforce:b,getterFor:w}},"979d":function(t,e,n){var r=n("1966"),o=n("e71d"),i=n("811a");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"98d4":function(t,e,n){var r=n("90ea"),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},9978:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("2409"))},"9b52":function(t,e,n){var r=n("a1a8"),o=n("29b0");e=r(!1),e.i(o),e.push([t.i,"*[data-v-2edf8313]{outline:none}.w-gradient-box[data-v-2edf8313]{display:flex;padding:5px 0;justify-content:space-between;align-items:center;width:280px}.w-g-color-picker-bar[data-v-2edf8313]{width:210px;height:12px;position:relative}.input-deg[data-v-2edf8313]{width:60px;height:24px;padding:2px 15px;border-radius:3px;border:1px solid #e6e6e6;outline:none;text-align:center}.input-deg[data-v-2edf8313]:focus{border-color:#409eff}.degtips[data-v-2edf8313]{position:absolute;top:2px;right:8px}",""]),t.exports=e},a1a8:function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var i=o(r),a=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},a564:function(t,e,n){var r=n("11ea"),o=n("ca86"),i=n("f1b1"),a=n("1aef"),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},a717:function(t,e,n){"use strict";var r=n("31c1"),o=n("11eb"),i=n("9189"),a=n("1f09"),s=n("42da"),c=n("e71d"),l=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=l||!u();r({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=o(this),n=i(e),r=arguments.length;s(n+r);for(var c=0;c<r;c++)e[n]=arguments[c],n++;return a(e,n),n}})},afd9:function(t,e,n){var r=n("1966"),o=n("23fe"),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,l=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},b2a1:function(t,e,n){var r=n("a1a8");e=r(!1),e.push([t.i,".w-color-preview[data-v-84e7f268]{width:40px;height:40px;border-radius:6px}",""]),t.exports=e},b343:function(t,e,n){var r=n("a1a8"),o=n("29b0");e=r(!1),e.i(o),e.push([t.i,".w-color-picker-right-bar[data-v-d7a9d736]{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.bg-alpha[data-v-d7a9d736]{background:#fff}",""]),t.exports=e},b4da:function(t,e,n){var r=n("57df"),o=n("09ee"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},b602:function(t,e,n){var r=n("d465");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("11270cae",r,!0,{sourceMap:!1,shadowMode:!1})},b82f:function(t,e,n){var r=n("9978"),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},b911:function(t,e,n){var r=n("b343");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("46a2d041",r,!0,{sourceMap:!1,shadowMode:!1})},b930:function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},ba6c:function(t,e,n){var r=n("784d"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},bab8:function(t,e,n){var r=n("7f47"),o=n("ba6c"),i=n("9189"),a=function(t){return function(e,n,a){var s,c=r(e),l=i(c),u=o(a,l);if(t&&n!=n){while(l>u)if(s=c[u++],s!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},bc07:function(t,e,n){var r=n("9978"),o=n("94ab"),i=n("23fe"),a=n("78f5"),s=n("11f6"),c=n("1aef"),l=r.Symbol,u=o("wks"),d=c?l["for"]||l:l&&l.withoutSetter||a;t.exports=function(t){return i(u,t)||(u[t]=s&&i(l,t)?l[t]:d("Symbol."+t)),u[t]}},c608:function(t,e,n){var r=n("b2a1");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("2c0a0dd4",r,!0,{sourceMap:!1,shadowMode:!1})},ca86:function(t,e,n){var r=n("fca0"),o=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},d465:function(t,e,n){var r=n("a1a8");e=r(!1),e.push([t.i,".w-color-panel-box[data-v-72cb9368]{position:relative;width:280px;height:180px}.w-color-panel[data-v-72cb9368]{position:absolute;top:0;left:0;right:0;bottom:0}.w-color-panel__white[data-v-72cb9368]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.w-color-panel__black[data-v-72cb9368]{background:linear-gradient(0deg,#000,transparent)}.w-color-panel__cursor[data-v-72cb9368]{position:absolute}.w-color-panel__cursor>div[data-v-72cb9368]{cursor:head;width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);border-radius:50%;transform:translate(-2px,-2px);cursor:pointer}",""]),t.exports=e},d6ef:function(t,e,n){var r=n("90ea"),o=n("e71d"),i=n("98d4"),a=Object,s=r("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?s(t,""):a(t)}:a},d771:function(t,e,n){var r=n("1966"),o=n("979d"),i=n("11a6"),a=n("76db"),s=n("38c2"),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",p="writable";e.f=r?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var r=u(t,e);r&&r[p]&&(t[e]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return l(t,e,n)}catch(r){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},d997:function(t,e,n){var r=n("90ea"),o=n("e71d"),i=n("ca86"),a=n("23fe"),s=n("1966"),c=n("afd9").CONFIGURABLE,l=n("3955"),u=n("95b2"),d=u.enforce,f=u.get,p=String,h=Object.defineProperty,g=r("".slice),v=r("".replace),b=r([].join),w=s&&!o((function(){return 8!==h((function(){}),"length",{value:8}).length})),m=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===g(p(e),0,7)&&(e="["+v(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),w&&n&&a(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var r=d(t);return a(r,"source")||(r.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return i(this)&&f(this).source||l(this)}),"toString")},db12:function(t,e,n){var r=n("11ea"),o=n("90ea"),i=n("b4da"),a=n("747b"),s=n("76db"),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?c(e,n(t)):e}},dbe0:function(t,e,n){var r=n("a1a8"),o=n("29b0");e=r(!1),e.i(o),e.push([t.i,".w-sloder-color[data-v-9fbf2cea]{background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.bg-color[data-v-9fbf2cea]{background:#fff}",""]),t.exports=e},dc67:function(t,e){t.exports={}},deac:function(t,e,n){var r=n("1966"),o=n("48b9"),i=n("7a6f"),a=n("1dd0"),s=n("7f47"),c=n("38c2"),l=n("23fe"),u=n("979d"),d=Object.getOwnPropertyDescriptor;e.f=r?d:function(t,e){if(t=s(t),e=c(e),u)try{return d(t,e)}catch(n){}if(l(t,e))return a(!o(i.f,t,e),t[e])}},e343:function(t,e,n){var r=n("ca86"),o=n("b930"),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},e71d:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},ee06:function(t,e,n){"use strict";n("b911")},efed:function(t,e,n){var r=n("9978"),o=n("ca86"),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},f024:function(t,e,n){var r=n("94ab"),o=n("78f5"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},f1b1:function(t,e,n){var r=n("90ea");t.exports=r({}.isPrototypeOf)},f5e4:function(t,e,n){var r=n("a1a8"),o=n("29b0");e=r(!1),e.i(o),e.push([t.i,".w-disabled[data-v-04d697b8]{cursor:not-allowed;background:#cfd0d3}.w-no-disabled[data-v-04d697b8]{cursor:pointer}.w-showResult[data-v-04d697b8]{position:relative}.w-input-color[data-v-04d697b8],.w-showResult[data-v-04d697b8]{display:flex;align-items:center}.w-input-color[data-v-04d697b8]{border-radius:4px;border:1px solid #dcdfe6;box-sizing:border-box;color:#606266;width:40px;height:40px;justify-content:center}.w-show-bg[data-v-04d697b8]{display:inline-block;box-sizing:border-box;height:30px;width:30px;padding:4px;border:1px solid #e6e6e6;border-radius:4px;font-size:0;left:5px}.w-color-picke-box[data-v-04d697b8]{padding:10px;position:absolute;z-index:99999;box-sizing:content-box;background-color:#fff;border:1px solid #ebeef5;border-radius:4px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1)}.w-color-type-heard[data-v-04d697b8]{background:#f1f1f1;border-radius:6px;width:100px;padding:4px;cursor:pointer;font-size:13px}.w-selectbtn[data-v-04d697b8]{background:#fff}.w-nobtn[data-v-04d697b8],.w-selectbtn[data-v-04d697b8]{padding:3px 10px;border-radius:2px}.w-nobtn[data-v-04d697b8]{background:transparent}.w-color-alpha[data-v-04d697b8]{padding:5px 0;width:var(--main-slider-width)}.w-color-alpha-box[data-v-04d697b8]{height:var(--main-view-width);display:flex;flex-wrap:wrap;flex:1;align-content:space-around}.w-predefine-colors[data-v-04d697b8]{display:flex;flex:1;flex-wrap:wrap;width:280px}.w-predefine-selector[data-v-04d697b8]{margin:0 0 8px 8px;width:20px;height:20px;border-radius:4px;cursor:pointer}.w-predefine-selector[data-v-04d697b8]:nth-child(10n+1){margin-left:0}.w-predefine-selector>div[data-v-04d697b8]{height:100%;width:100%}.w-oper-box[data-v-04d697b8]{padding-top:10px;display:flex;justify-content:flex-end}.w-sure-btn[data-v-04d697b8]{padding:7px 15px;font-size:12px;border-radius:3px;display:inline-block;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;text-align:center;box-sizing:border-box;outline:none;font-weight:500}.w-sure-btn[data-v-04d697b8]:hover{background:#fff;border-color:#409eff;color:#409eff}.w-cancal-btn[data-v-04d697b8]{color:#409eff;font-size:12px;padding:7px 15px;cursor:pointer;font-weight:500}.w-cancal-btn[data-v-04d697b8]:hover{color:#66b1ff}",""]),t.exports=e},f648:function(t,e,n){"use strict";n("1287")},f812:function(t,e,n){var r,o,i=n("9978"),a=n("8fdb"),s=i.process,c=i.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(r=u.split("."),o=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(o=+r[1]))),t.exports=o},fa50:function(t,e,n){var r=n("23fe"),o=n("db12"),i=n("deac"),a=n("d771");t.exports=function(t,e,n){for(var s=o(e),c=a.f,l=i.f,u=0;u<s.length;u++){var d=s[u];r(t,d)||n&&r(n,d)||c(t,d,l(e,d))}}},fb9d:function(t,e,n){"use strict";n("b602")},fbae:function(t,e,n){var r=n("ca86"),o=n("fca0"),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},fc25:function(t,e,n){var r=n("9b52");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("5925").default;o("099a3eaa",r,!0,{sourceMap:!1,shadowMode:!1})},fca0:function(t,e){var n="object"==typeof document&&document.all,r="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:r}}})})); //# sourceMappingURL=wcolorpicker.umd.min.js.map