vue-speed-meter
Version:
Vue component to display round gauges such as speedometer, thermometer, barometer or tachometer.
2 lines • 28.9 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-speed-meter"]=e():t["vue-speed-meter"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="fb15")}({"06cf":function(t,e,r){var n=r("83ab"),o=r("d1e7"),i=r("5c6c"),a=r("fc6a"),c=r("c04e"),s=r("5135"),u=r("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=n?l:function(t,e){if(t=a(t),e=c(e,!0),u)try{return l(t,e)}catch(r){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},"0cfb":function(t,e,r){var n=r("83ab"),o=r("d039"),i=r("cc12");t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"1be4":function(t,e,r){var n=r("d066");t.exports=n("document","documentElement")},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,r){var n=r("d039"),o=r("b622"),i=r("2d00"),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[],r=e.constructor={};return r[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,r){var n=r("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},"23e7":function(t,e,r){var n=r("da84"),o=r("06cf").f,i=r("9112"),a=r("6eeb"),c=r("ce4e"),s=r("e893"),u=r("94ca");t.exports=function(t,e){var r,l,f,d,p,h,v=t.target,m=t.global,y=t.stat;if(l=m?n:y?n[v]||c(v,{}):(n[v]||{}).prototype,l)for(f in e){if(p=e[f],t.noTargetGet?(h=o(l,f),d=h&&h.value):d=l[f],r=u(m?f:v+(y?".":"#")+f,t.forced),!r&&void 0!==d){if(typeof p===typeof d)continue;s(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),a(l,f,p,t)}}},"241c":function(t,e,r){var n=r("ca84"),o=r("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},"24fb":function(t,e,r){"use strict";function n(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"===typeof btoa){var i=o(n),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[r].concat(a).concat([i]).join("\n")}return[r].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(r," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<t.length;c++){var s=[].concat(t[c]);n&&o[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),e.push(s))}},e}},"258f":function(t,e,r){var n=r("9b61");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=r("499e").default;o("06d88059",n,!0,{sourceMap:!1,shadowMode:!1})},"2d00":function(t,e,r){var n,o,i=r("da84"),a=r("342f"),c=i.process,s=c&&c.versions,u=s&&s.v8;u?(n=u.split("."),o=n[0]+n[1]):a&&(n=a.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/),n&&(o=n[1]))),t.exports=o&&+o},"342f":function(t,e,r){var n=r("d066");t.exports=n("navigator","userAgent")||""},"37e8":function(t,e,r){var n=r("83ab"),o=r("9bf2"),i=r("825a"),a=r("df75");t.exports=n?Object.defineProperties:function(t,e){i(t);var r,n=a(e),c=n.length,s=0;while(c>s)o.f(t,r=n[s++],e[r]);return t}},"3bbe":function(t,e,r){var n=r("861d");t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3d02":function(t,e,r){"use strict";var n=r("258f"),o=r.n(n);o.a},"428f":function(t,e,r){var n=r("da84");t.exports=n},"44ad":function(t,e,r){var n=r("d039"),o=r("c6b6"),i="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},4930:function(t,e,r){var n=r("d039");t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"499e":function(t,e,r){"use strict";function n(t,e){for(var r=[],n={},o=0;o<e.length;o++){var i=e[o],a=i[0],c=i[1],s=i[2],u=i[3],l={id:t+":"+o,css:c,media:s,sourceMap:u};n[a]?n[a].parts.push(l):r.push(n[a]={id:a,parts:[l]})}return r}r.r(e),r.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]),c=null,s=0,u=!1,l=function(){},f=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,r,o){u=r,f=o||{};var a=n(t,e);return v(a),function(e){for(var r=[],o=0;o<a.length;o++){var c=a[o],s=i[c.id];s.refs--,r.push(s)}e?(a=n(t,e),v(a)):a=[];for(o=0;o<r.length;o++){s=r[o];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete i[s.id]}}}}function v(t){for(var e=0;e<t.length;e++){var r=t[e],n=i[r.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](r.parts[o]);for(;o<r.parts.length;o++)n.parts.push(y(r.parts[o]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var a=[];for(o=0;o<r.parts.length;o++)a.push(y(r.parts[o]));i[r.id]={id:r.id,refs:1,parts:a}}}}function m(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function y(t){var e,r,n=document.querySelector("style["+d+'~="'+t.id+'"]');if(n){if(u)return l;n.parentNode.removeChild(n)}if(p){var o=s++;n=c||(c=m()),e=b.bind(null,n,o,!1),r=b.bind(null,n,o,!0)}else n=m(),e=x.bind(null,n),r=function(){n.parentNode.removeChild(n)};return e(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;e(t=n)}else r()}}var g=function(){var t=[];return function(e,r){return t[e]=r,t.filter(Boolean).join("\n")}}();function b(t,e,r,n){var o=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=g(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 r=e.css,n=e.media,o=e.sourceMap;if(n&&t.setAttribute("media",n),f.ssrId&&t.setAttribute(d,e.id),o&&(r+="\n/*# sourceURL="+o.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=r;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}},"4d64":function(t,e,r){var n=r("fc6a"),o=r("50c4"),i=r("23cb"),a=function(t){return function(e,r,a){var c,s=n(e),u=o(s.length),l=i(a,u);if(t&&r!=r){while(u>l)if(c=s[l++],c!=c)return!0}else for(;u>l;l++)if((t||l in s)&&s[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},"50c4":function(t,e,r){var n=r("a691"),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},5135:function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},5692:function(t,e,r){var n=r("c430"),o=r("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,r){var n=r("d066"),o=r("241c"),i=r("7418"),a=r("825a");t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=i.f;return r?e.concat(r(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,r){var n=r("1d80"),o=r("5899"),i="["+o+"]",a=RegExp("^"+i+i+"*"),c=RegExp(i+i+"*$"),s=function(t){return function(e){var r=String(n(e));return 1&t&&(r=r.replace(a,"")),2&t&&(r=r.replace(c,"")),r}};t.exports={start:s(1),end:s(2),trim:s(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"65f0":function(t,e,r){var n=r("861d"),o=r("e8b5"),i=r("b622"),a=i("species");t.exports=function(t,e){var r;return o(t)&&(r=t.constructor,"function"!=typeof r||r!==Array&&!o(r.prototype)?n(r)&&(r=r[a],null===r&&(r=void 0)):r=void 0),new(void 0===r?Array:r)(0===e?0:e)}},"69f3":function(t,e,r){var n,o,i,a=r("7f9a"),c=r("da84"),s=r("861d"),u=r("9112"),l=r("5135"),f=r("f772"),d=r("d012"),p=c.WeakMap,h=function(t){return i(t)?o(t):n(t,{})},v=function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}};if(a){var m=new p,y=m.get,g=m.has,b=m.set;n=function(t,e){return b.call(m,t,e),e},o=function(t){return y.call(m,t)||{}},i=function(t){return g.call(m,t)}}else{var x=f("state");d[x]=!0,n=function(t,e){return u(t,x,e),e},o=function(t){return l(t,x)?t[x]:{}},i=function(t){return l(t,x)}}t.exports={set:n,get:o,has:i,enforce:h,getterFor:v}},"6eeb":function(t,e,r){var n=r("da84"),o=r("9112"),i=r("5135"),a=r("ce4e"),c=r("8925"),s=r("69f3"),u=s.get,l=s.enforce,f=String(String).split("String");(t.exports=function(t,e,r,c){var s=!!c&&!!c.unsafe,u=!!c&&!!c.enumerable,d=!!c&&!!c.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),l(r).source=f.join("string"==typeof e?e:"")),t!==n?(s?!d&&t[e]&&(u=!0):delete t[e],u?t[e]=r:o(t,e,r)):u?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||c(this)}))},7156:function(t,e,r){var n=r("861d"),o=r("d2bb");t.exports=function(t,e,r){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==r&&n(a=i.prototype)&&a!==r.prototype&&o(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,r){var n=r("1d80");t.exports=function(t){return Object(n(t))}},"7c73":function(t,e,r){var n,o=r("825a"),i=r("37e8"),a=r("7839"),c=r("d012"),s=r("1be4"),u=r("cc12"),l=r("f772"),f=">",d="<",p="prototype",h="script",v=l("IE_PROTO"),m=function(){},y=function(t){return d+h+f+t+d+"/"+h+f},g=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){var t,e=u("iframe"),r="java"+h+":";return e.style.display="none",s.appendChild(e),e.src=String(r),t=e.contentWindow.document,t.open(),t.write(y("document.F=Object")),t.close(),t.F},x=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=n?g(n):b();var t=a.length;while(t--)delete x[p][a[t]];return x()};c[v]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(m[p]=o(t),r=new m,m[p]=null,r[v]=t):r=x(),void 0===e?r:i(r,e)}},"7f9a":function(t,e,r){var n=r("da84"),o=r("8925"),i=n.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,r){var n=r("861d");t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,r){var n=r("d039");t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,r){"use strict";var n=r("c04e"),o=r("9bf2"),i=r("5c6c");t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,r){var n,o,i;(function(r,a){o=[],n=a,i="function"===typeof n?n.apply(e,o):n,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var r,n,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,c=i.exec(p.stack)||a.exec(p.stack),s=c&&c[1]||!1,u=c&&c[2]||!1,l=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");s===l&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=r.replace(n,"$1").trim());for(var d=0;d<f.length;d++){if("interactive"===f[d].readyState)return f[d];if(f[d].src===s)return f[d];if(s===l&&f[d].innerHTML&&f[d].innerHTML.trim()===o)return f[d]}return null}}return t}))},8925:function(t,e,r){var n=r("c6cd"),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return o.call(t)}),t.exports=n.inspectSource},"90e3":function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+n).toString(36)}},9112:function(t,e,r){var n=r("83ab"),o=r("9bf2"),i=r("5c6c");t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},"94ca":function(t,e,r){var n=r("d039"),o=/#|\.prototype\./,i=function(t,e){var r=c[a(t)];return r==u||r!=s&&("function"==typeof e?n(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},s=i.NATIVE="N",u=i.POLYFILL="P";t.exports=i},"99af":function(t,e,r){"use strict";var n=r("23e7"),o=r("d039"),i=r("e8b5"),a=r("861d"),c=r("7b0b"),s=r("50c4"),u=r("8418"),l=r("65f0"),f=r("1dde"),d=r("b622"),p=r("2d00"),h=d("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",y=p>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),g=f("concat"),b=function(t){if(!a(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)},x=!y||!g;n({target:"Array",proto:!0,forced:x},{concat:function(t){var e,r,n,o,i,a=c(this),f=l(a,0),d=0;for(e=-1,n=arguments.length;e<n;e++)if(i=-1===e?a:arguments[e],b(i)){if(o=s(i.length),d+o>v)throw TypeError(m);for(r=0;r<o;r++,d++)r in i&&u(f,d,i[r])}else{if(d>=v)throw TypeError(m);u(f,d++,i)}return f.length=d,f}})},"9b61":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Oswald:wght@200&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Old+Standard+TT&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Kameron&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Copse&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Lato:wght@100;300&display=swap);"]),e.push([t.i,"@import url(https://fonts.googleapis.com/css2?family=Titillium+Web:wght@200&display=swap);"]),e.push([t.i,".main-container[data-v-489335d8],.svg-container[data-v-489335d8]{height:var(--circle-size);width:var(--circle-size)}.scale-circles[data-v-489335d8]{fill:none;stroke:var(--scale-color)}.scale-bigger-width[data-v-489335d8]{stroke-width:var(--scale-bigger-width)}.scale-small-width[data-v-489335d8]{stroke-width:var(--scale-small-width)}.outer-circle[data-v-489335d8]{fill:var(--main-background-color);stroke:var(--border-color);stroke-width:1%}.bottom-circle[data-v-489335d8]{stroke:var(--main-background-color)}.scale-values[data-v-489335d8]{font-size:var(--scale-values-font-size);font-family:var(--scale-values-font-family);fill:var(--scale-values-color)}.needle-circle[data-v-489335d8]{fill:var(--needle-circle-color)}.speedometer-needle[data-v-489335d8]{fill:var(--needle-color)}",""]),t.exports=e},"9bf2":function(t,e,r){var n=r("83ab"),o=r("0cfb"),i=r("825a"),a=r("c04e"),c=Object.defineProperty;e.f=n?c:function(t,e,r){if(i(t),e=a(e,!0),i(r),o)try{return c(t,e,r)}catch(n){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},a691:function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},a9e3:function(t,e,r){"use strict";var n=r("83ab"),o=r("da84"),i=r("94ca"),a=r("6eeb"),c=r("5135"),s=r("c6b6"),u=r("7156"),l=r("c04e"),f=r("d039"),d=r("7c73"),p=r("241c").f,h=r("06cf").f,v=r("9bf2").f,m=r("58a8").trim,y="Number",g=o[y],b=g.prototype,x=s(d(b))==y,S=function(t){var e,r,n,o,i,a,c,s,u=l(t,!1);if("string"==typeof u&&u.length>2)if(u=m(u),e=u.charCodeAt(0),43===e||45===e){if(r=u.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(i=u.slice(2),a=i.length,c=0;c<a;c++)if(s=i.charCodeAt(c),s<48||s>o)return NaN;return parseInt(i,n)}return+u};if(i(y,!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var w,C=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof C&&(x?f((function(){b.valueOf.call(r)})):s(r)!=y)?u(new g(S(e)),r,C):S(e)},_=n?p(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),P=0;_.length>P;P++)c(g,w=_[P])&&!c(C,w)&&v(C,w,h(g,w));C.prototype=b,b.constructor=C,a(o,y,C)}},b622:function(t,e,r){var n=r("da84"),o=r("5692"),i=r("5135"),a=r("90e3"),c=r("4930"),s=r("fdbf"),u=o("wks"),l=n.Symbol,f=s?l:l&&l.withoutSetter||a;t.exports=function(t){return i(u,t)||(c&&i(l,t)?u[t]=l[t]:u[t]=f("Symbol."+t)),u[t]}},c04e:function(t,e,r){var n=r("861d");t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},c6cd:function(t,e,r){var n=r("da84"),o=r("ce4e"),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},c8ba:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},ca84:function(t,e,r){var n=r("5135"),o=r("fc6a"),i=r("4d64").indexOf,a=r("d012");t.exports=function(t,e){var r,c=o(t),s=0,u=[];for(r in c)!n(a,r)&&n(c,r)&&u.push(r);while(e.length>s)n(c,r=e[s++])&&(~i(u,r)||u.push(r));return u}},cc12:function(t,e,r){var n=r("da84"),o=r("861d"),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},ce4e:function(t,e,r){var n=r("da84"),o=r("9112");t.exports=function(t,e){try{o(n,t,e)}catch(r){n[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,r){var n=r("428f"),o=r("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},d2bb:function(t,e,r){var n=r("825a"),o=r("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(r,[]),e=r instanceof Array}catch(i){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},da84:function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")()}).call(this,r("c8ba"))},df75:function(t,e,r){var n=r("ca84"),o=r("7839");t.exports=Object.keys||function(t){return n(t,o)}},e893:function(t,e,r){var n=r("5135"),o=r("56ef"),i=r("06cf"),a=r("9bf2");t.exports=function(t,e){for(var r=o(e),c=a.f,s=i.f,u=0;u<r.length;u++){var l=r[u];n(t,l)||c(t,l,s(e,l))}}},e8b5:function(t,e,r){var n=r("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}},f772:function(t,e,r){var n=r("5692"),o=r("90e3"),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,r){"use strict";if(r.r(e),"undefined"!==typeof window){var n=window.document.currentScript,o=r("8875");n=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"main-container",style:t.cssVar},[r("svg",{staticClass:"svg-container"},[r("defs",[r("filter",{attrs:{id:"outer-shadow"}},[r("feDropShadow",{attrs:{dx:"0",dy:"0",stdDeviation:.007*t.size,"flood-color":t.needleCircleBorderColor}})],1)]),r("circle",{staticClass:"outer-circle",attrs:{r:t.outerCircleRadius,cx:t.centerPoint,cy:t.centerPoint}}),r("g",{staticClass:"scale-circles",attrs:{transform:"rotate(89.35 "+t.centerPoint+" "+t.centerPoint+") "}},[r("circle",{staticClass:"scale-bigger-width",attrs:{r:t.scaleRadius,cx:t.centerPoint,cy:t.centerPoint,"stroke-dasharray":this.calculateLongScaleLines()}}),r("circle",{staticClass:"scale-small-width",attrs:{r:t.scaleRadius,cx:t.centerPoint,cy:t.centerPoint,"stroke-dasharray":this.calculateShortScaleLines()}}),r("circle",{staticClass:"bottom-circle",attrs:{r:t.scaleRadius,cx:t.centerPoint,cy:t.centerPoint,"stroke-dasharray":"24% 150%","stroke-width":t.scaleBiggerWidth+2}})]),r("polygon",{key:t.customCurrentValue,staticClass:"speedometer-needle",attrs:{points:t.calculateNeedlePoint(),transform:"rotate("+t.currentValueInDegrees+" "+t.centerPoint+" "+t.centerPoint+")"}},[t.needleAnimation?[r("animateTransform",{attrs:{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 "+t.centerPoint+" "+t.centerPoint,to:t.currentValueInDegrees+" "+t.centerPoint+" "+t.centerPoint,dur:this.animationTime+"s"}})]:t._e()],2),r("circle",{staticClass:"needle-circle",attrs:{r:t.needleCircleRadius,cx:t.centerPoint,cy:t.centerPoint,filter:t.shadowFilter?"url(#outer-shadow)":""}}),r("path",{attrs:{id:"text-path-"+this._uid,fill:"transparent",d:t.circleToPath(),transform:"rotate(-90 "+t.centerPoint+" "+t.centerPoint+") "}}),r("text",{staticClass:"scale-values",attrs:{"letter-spacing":-.005*this.size,filter:t.shadowFilter?"url(#outer-shadow)":""}},[r("textPath",{attrs:{"xlink:href":"#text-path-"+this._uid}},[r("tspan",{attrs:{id:"value-1-"+this._uid,x:"30%"},domProps:{textContent:t._s(t.scaleStartValue)}}),r("tspan",{attrs:{id:"value-2-"+this._uid,x:"45%"},domProps:{textContent:t._s(t.scaleStartValue+t.scaleStep)}}),r("tspan",{attrs:{id:"value-3-"+this._uid,x:"60%"},domProps:{textContent:t._s(t.scaleStartValue+2*t.scaleStep)}}),r("tspan",{attrs:{id:"value-4-"+this._uid,x:"75%"},domProps:{textContent:t._s(t.scaleStartValue+3*t.scaleStep)}}),r("tspan",{attrs:{id:"value-5-"+this._uid,x:"90%"},domProps:{textContent:t._s(t.scaleStartValue+4*t.scaleStep)}}),r("tspan",{attrs:{id:"value-6-"+this._uid,x:"105.5%"},domProps:{textContent:t._s(t.scaleStartValue+5*t.scaleStep)}}),r("tspan",{attrs:{id:"value-7-"+this._uid,x:"120.5%"},domProps:{textContent:t._s(t.scaleStartValue+6*t.scaleStep)}}),r("tspan",{attrs:{id:"value-8-"+this._uid,x:"136%"},domProps:{textContent:t._s(t.scaleStartValue+7*t.scaleStep)}}),r("tspan",{attrs:{id:"value-9-"+this._uid,x:"151%"},domProps:{textContent:t._s(t.scaleStartValue+8*t.scaleStep)}}),r("tspan",{attrs:{id:"value-10-"+this._uid,x:"166%"},domProps:{textContent:t._s(t.scaleStartValue+9*t.scaleStep)}}),r("tspan",{attrs:{id:"value-11-"+this._uid,x:"181%"},domProps:{textContent:t._s(t.scaleStartValue+10*t.scaleStep)}}),r("tspan",{attrs:{id:"value-12-"+this._uid,x:"196%"},domProps:{textContent:t._s(t.scaleStartValue+11*t.scaleStep)}}),r("tspan",{attrs:{id:"value-13-"+this._uid,x:"211%"},domProps:{textContent:t._s(t.scaleMaxValue)}})])])])])},c=[],s=(r("99af"),r("a9e3"),{name:"VueSpeedMeter",props:{customStyle:{type:Object,default:function(){return{}}},customCurrentValue:{type:Number,default:0},shadowFilter:{type:Boolean,default:!0},needleAnimation:{type:Boolean,default:!0}},data:function(){return{size:this.customStyle.size||400,scaleStartValue:this.customStyle.scaleStartValue||0,animationTime:this.customStyle.animationTime||1,needleCircleBorderColor:this.customStyle.needleCircleBorderColor||"#62A6F1"}},computed:{cssVar:function(){return{"--main-background-color":this.customStyle.mainBackgroundColor||"#051226","--circle-size":this.size+"px","--border-color":this.customStyle.borderColor||"#041326","--scale-color":this.customStyle.scaleColor||"#B0CBE9","--center-point":this.centerPoint,"--scale-small-width":this.scaleSmallWidth,"--scale-bigger-width":this.scaleBiggerWidth,"--scale-values-font-size":this.scaleValuesFontSize,"--scale-values-font-family":this.customStyle.scaleValuesFontFamily||"'Titillium Web', sans-serif","--scale-values-color":this.customStyle.scaleValuesColor||"#B0CBE9","--needle-circle-color":this.customStyle.needleCircleColor||"#041326","--needle-circle-border-color":this.needleCircleBorderColor,"--needle-color":this.customStyle.needleColor||"#FE3816"}},scaleStep:function(){return this.customStyle.scaleStep&&this.customStyle.scaleStep>0?this.customStyle.scaleStep:20},outerCircleRadius:function(){return this.size/2-.005*this.size},centerPoint:function(){return this.size/2},scaleSmallWidth:function(){return.04*this.size},scaleBiggerWidth:function(){return.08*this.size},scaleRadius:function(){return this.size/3.2},scaleValuesRadius:function(){return this.size/2.6},needleCircleRadius:function(){return this.size/14},scaleCircumference:function(){return 2*Math.PI*this.scaleRadius},scaleOneSectionLength:function(){return this.scaleCircumference/16},scaleValuesFontSize:function(){return.06*this.size+"px"},scaleRange:function(){return this.scaleStartValue+12*this.scaleStep-this.scaleStartValue},scaleMaxValue:function(){return this.scaleStartValue+12*this.scaleStep},valueOnScale:function(){return this.customCurrentValue-this.scaleStartValue},currentValueInDegrees:function(){return this.customCurrentValue>=this.scaleStartValue&&this.customCurrentValue<=this.scaleMaxValue?270*this.valueOnScale/this.scaleRange:this.customCurrentValue>this.scaleMaxValue?270:0}},methods:{circleToPath:function(){var t=this.size/2.6;return"M "+this.centerPoint+" "+this.centerPoint+" m -"+t+", 0 a "+t+","+t+" 0 1,1 "+2*t+",0 a "+t+","+t+" 0 1,1 -"+2*t+",0"},calculateLongScaleLines:function(){var t=this.scaleOneSectionLength/36,e=2*t+" "+34*t;return e},calculateShortScaleLines:function(){var t=this.scaleOneSectionLength/36,e="0 "+8*t+" "+t+" "+6*t+" "+t+" "+6*t+" "+t+" "+6*t+" "+t+" "+6*t;return e},calculateNeedlePoint:function(){var t=this.needleCircleRadius/3.5,e=this.size/2.4;return this.pointOnCircumference(t,225)+", "+this.pointOnCircumference(t,45)+", "+this.pointOnCircumference(e,135)},pointOnCircumference:function(t,e){var r=e*(Math.PI/180),n=this.centerPoint+t*Math.cos(r),o=this.centerPoint+t*Math.sin(r);return n+" "+o},shiftValuesCenter:function(){for(var t=1;t<=13;t++){var e=document.getElementById("value-".concat(t,"-").concat(this._uid)),r=e.getComputedTextLength();e.setAttribute("dx",-r/2)}}},mounted:function(){this.shiftValuesCenter()}}),u=s;r("3d02");function l(t,e,r,n,o,i,a,c){var s,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(s=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)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(t,e){return s.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:u}}var f=l(u,a,c,!1,null,"489335d8",null),d=f.exports,p=d;e["default"]=p},fc6a:function(t,e,r){var n=r("44ad"),o=r("1d80");t.exports=function(t){return n(o(t))}},fdbf:function(t,e,r){var n=r("4930");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
//# sourceMappingURL=vue-speed-meter.umd.min.js.map