-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue-dark-mode-switch.umd.min.js
2 lines (2 loc) · 4.62 KB
/
vue-dark-mode-switch.umd.min.js
1
2
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-dark-mode-switch"]=e():t["vue-dark-mode-switch"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.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 i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));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")}({"237f":function(t,e,r){"use strict";r("d36d")},8875:function(t,e,r){var n,i,a;(function(r,s){i=[],n=s,a="function"===typeof n?n.apply(e,i):n,void 0===a||(t.exports=a)})("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,i,a=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,c=a.exec(p.stack)||s.exec(p.stack),o=c&&c[1]||!1,u=c&&c[2]||!1,l=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");o===l&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(u-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=r.replace(n,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===o)return d[f];if(o===l&&d[f].innerHTML&&d[f].innerHTML.trim()===i)return d[f]}return null}}return t}))},d36d:function(t,e,r){},fb15:function(t,e,r){"use strict";if(r.r(e),"undefined"!==typeof window){var n=window.document.currentScript,i=r("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var a=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(r.p=a[1])}var s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"toggleWrapper"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.isEnabled,expression:"isEnabled"}],attrs:{type:"checkbox",id:"themeSwitch"},domProps:{checked:Array.isArray(t.isEnabled)?t._i(t.isEnabled,null)>-1:t.isEnabled},on:{change:function(e){var r=t.isEnabled,n=e.target,i=!!n.checked;if(Array.isArray(r)){var a=null,s=t._i(r,a);n.checked?s<0&&(t.isEnabled=r.concat([a])):s>-1&&(t.isEnabled=r.slice(0,s).concat(r.slice(s+1)))}else t.isEnabled=i}}}),t._m(0)])},c=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("label",{staticClass:"toggle",attrs:{for:"themeSwitch"}},[r("span",{staticClass:"toggle__handler"},[r("span",{staticClass:"crater crater--1"}),r("span",{staticClass:"crater crater--2"}),r("span",{staticClass:"crater crater--3"})]),r("span",{staticClass:"star star--1"}),r("span",{staticClass:"star star--2"}),r("span",{staticClass:"star star--3"}),r("span",{staticClass:"star star--4"}),r("span",{staticClass:"star star--5"}),r("span",{staticClass:"star star--6"})])}],o={props:["initialState"],data:function(){return{isEnabled:this.initialState||!1}},watch:{isEnabled:function(t){this.$emit("switched",t)}}},u=o;r("237f");function l(t,e,r,n,i,a,s,c){var o,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),s?(o=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=o):i&&(o=c?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),o)if(u.functional){u._injectStyles=o;var l=u.render;u.render=function(t,e){return o.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,o):[o]}return{exports:t,options:u}}var d=l(u,s,c,!1,null,"53a5133a",null),f=d.exports,p=f;e["default"]=p}})}));
//# sourceMappingURL=vue-dark-mode-switch.umd.min.js.map