1 line
3.5 KiB
JavaScript
1 line
3.5 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{241:function(t,r,n){"use strict";n.d(r,"e",(function(){return o})),n.d(r,"c",(function(){return e})),n.d(r,"b",(function(){return i})),n.d(r,"f",(function(){return s})),n.d(r,"g",(function(){return c})),n.d(r,"h",(function(){return l})),n.d(r,"a",(function(){return f})),n.d(r,"d",(function(){return a})),n.d(r,"i",(function(){return u}));n(91);function o(t,r,n,o={}){const e=Object.keys(r),i=r instanceof Array?t=>t.config:t=>Object.fromEntries(e.map(r=>[r,t[r]]));return function(){const r=i(this);localStorage.setItem(t,JSON.stringify(r));const e={...o,...r};this.$emit("config",n?{...e,text:n(r)}:e)}}const e=(t,r)=>(t>>>0).toString(16).toUpperCase().padStart(r<<1,"0").slice(-(r<<1));function i(t){const r=new DataView(new ArrayBuffer(4));return r.setFloat32(0,t),e(r.getUint32(0),4)}const s=t=>"#"+t.toString(16).padStart(6,"0"),c=t=>parseInt(t.slice(1),16),l=(t,r)=>"#"+t.toString(16).padStart(6,"0")+r.toString(16).padStart(2,"0"),f=t=>"#"+(t>>>0).toString(16).padStart(8,"0"),a=(t,r,n="en-US")=>o=>{const e=o.split(".");for(const o of[r,n]){let r=t[o];for(const t of e){if(null==r)break;r=r[t]}if(null!=r)return r}return null};function u(t,r){const n=[],o=[];for(const e of t)(r(e)?n:o).push(e);return[n,o]}},267:function(t,r,n){},294:function(t,r,n){"use strict";n(267)},337:function(t,r,n){"use strict";n.r(r);var o=n(241),e={props:{config:Object},computed:{transform(){const{x:t,y:r,height:n}=this.config;return`scale(0.9375,1) translate(${t||0}, ${r||0}) scale(${(n||0)/120})`},lw(){const{lw:t}=this.config;return t/6},bg(){const{bgRGB:t,bgA:r,bgLeft:n,bgRight:e,bgTop:i,bgBot:s}=this.config;return{x:n,y:i,w:e-n,h:s-i,fill:Object(o.h)(t,r)}},buttons(){return this.config.buttons.map(t=>({...t,color:Object(o.a)(t.c)}))},sticks(){return this.config.sticks.map(t=>({id:t.id,stroke:{transform:`translate(${t.x||0}, ${t.y||0}) scale(${t.rS||0})`,scale:t.rS,color:Object(o.a)(t.cS)},fill:{x:t.x,y:t.y,r:t.rF,color:Object(o.a)(t.cF)}}))},triggers(){const{cTF:t,cTS:r,triggers:n}=this.config;return n.map(n=>({fill:{color:Object(o.a)(t),x:n.w>0?n.x:n.x+n.wa,y:n.y0,w:Math.abs(n.wa),h:n.y1-n.y0},stroke:{color:Object(o.a)(r),x:n.w>0?n.x:n.x+n.w,y:n.y0,w:Math.abs(n.w),h:n.y1-n.y0}}))}}},i=(n(294),n(10)),s=Object(i.a)(e,(function(){var t=this,r=t._self._c;return r("svg",{attrs:{viewBox:"0 16 600 448"}},[r("defs",[r("polygon",{attrs:{id:"8gon",points:"1,0 0.7071067811865476,0.7071067811865475 0,1 -0.7071067811865475,0.7071067811865476 -1,0 -0.7071067811865477,-0.7071067811865475 0,-1 0.7071067811865474,-0.7071067811865477 1,0"}})]),t._v(" "),r("g",{attrs:{transform:t.transform,"stroke-width":t.lw}},[r("rect",{attrs:{x:t.bg.x,y:t.bg.y,width:t.bg.w,height:t.bg.h,fill:t.bg.fill}}),t._v(" "),t._l(t.buttons,(function(t){return r("g",{key:t.id},[r("circle",{attrs:{cx:t.x,cy:t.y,r:t.r,fill:"none",stroke:t.color}})])})),t._v(" "),t._l(t.sticks,(function(n){return r("g",{key:n.id},[r("use",{attrs:{"stroke-width":t.lw/n.stroke.scale,transform:n.stroke.transform,stroke:n.stroke.color,fill:"none",href:"#8gon"}}),t._v(" "),r("circle",{attrs:{cx:n.fill.x,cy:n.fill.y,r:n.fill.r,fill:n.fill.color,stroke:"none"}})])})),t._v(" "),t._l(t.triggers,(function(n){return r("g",{key:n.id},[r("rect",{attrs:{x:n.stroke.x,y:n.stroke.y,width:n.stroke.w,height:n.stroke.h,stroke:n.stroke.color,fill:"none"}}),t._v(" "),r("rect",{attrs:{x:n.fill.x,y:n.fill.y,width:n.fill.w,height:n.fill.h,fill:n.fill.color,stroke:"none"}})])}))],2)])}),[],!1,null,"3d90b803",null);r.default=s.exports}}]);
|