(function(){"use strict";var e={2179:function(e,t,a){var n=a(9242),o=a(3396);const r={class:"page container"},i={class:"wavelovers"};function s(e,t,a,n,s,c){const d=(0,o.up)("HeaderItem"),l=(0,o.up)("router-view"),u=(0,o.up)("FooterItem");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Wm)(d),(0,o._)("main",r,[(0,o._)("div",i,[(0,o.Wm)(l)])]),(0,o.Wm)(u)],64)}var c=a(1746);const d={class:"header"},l=(0,o.uE)('
',1),u=[l];function m(e,t,a,n,r,i){return(0,o.wg)(),(0,o.iD)("header",d,u)}var v=(0,o.aZ)({name:"HeaderItem"}),p=a(89);const g=(0,p.Z)(v,[["render",m]]);var f=g;const h={class:"footer"},b=(0,o.uE)('',1),w=[b];function y(e,t,a,n,r,i){return(0,o.wg)(),(0,o.iD)("footer",h,w)}var W=(0,o.aZ)({name:"FooterItem"});const k=(0,p.Z)(W,[["render",y]]);var V=k,_=(0,o.aZ)({name:"App",components:{HeaderItem:f,FooterItem:V},methods:{addEventListeners(){window.addEventListener("gamepadconnected",(e=>c.Z.dispatch("addGamepad",e))),window.addEventListener("gamepaddisconnected",(e=>c.Z.dispatch("deleteGamepad",e)))},removeEventListeners(){window.removeEventListener("gamepadconnected",(e=>c.Z.dispatch("addGamepad",e))),window.removeEventListener("gamepaddisconnected",(e=>c.Z.dispatch("deleteGamepad",e)))}},mounted(){this.addEventListeners()},unmounted(){this.removeEventListeners()}});const M=(0,p.Z)(_,[["render",s]]);var A=M,G=a(2483);const T=(0,o._)("h1",{class:"visually-hidden"},"Wavelovers",-1);function P(e,t,a,n,r,i){const s=(0,o.up)("AppPatterns");return(0,o.wg)(),(0,o.iD)(o.HY,null,[T,(0,o.Wm)(s)],64)}const Z={class:"app-patterns"},C=(0,o.Uk)("Loading..."),E=(0,o.Uk)("Press any gamepad button or connect a new gamepad to vibrate.");function L(e,t,a,n,r,i){const s=(0,o.up)("NavigationList"),c=(0,o.up)("PatternList"),d=(0,o.up)("MessageItem"),l=(0,o.up)("GamepadList");return(0,o.wg)(),(0,o.iD)(o.HY,null,[(0,o.Wm)(s),(0,o._)("div",Z,[e.patterns.length>0?((0,o.wg)(),(0,o.j4)(c,{key:0,patterns:e.patterns,mode:e.mode,isActive:e.isActive,onChange:e.change},null,8,["patterns","mode","isActive","onChange"])):((0,o.wg)(),(0,o.j4)(d,{key:1},{default:(0,o.w5)((()=>[C])),_:1}))]),e.gamepads.length>0?((0,o.wg)(),(0,o.j4)(l,{key:0,gamepads:e.gamepads},null,8,["gamepads"])):((0,o.wg)(),(0,o.j4)(d,{key:1},{default:(0,o.w5)((()=>[E])),_:1}))],64)}var x=a(81),D=a(1850),I=a(2347);const j={class:"content-item pattern-list"};function S(e,t,a,n,r,i){const s=(0,o.up)("PatternItem");return(0,o.wg)(),(0,o.iD)("div",j,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.patterns,((t,a)=>((0,o.wg)(),(0,o.j4)(s,{key:t.name,pattern:t,index:a,mode:e.mode,isActive:e.isActive,onChange:e.change},null,8,["pattern","index","mode","isActive","onChange"])))),128))])}var U=a(7139);const O=["textContent"],N={class:"pattern-item__info-container"},q=["textContent"],F=["textContent"];function z(e,t,a,n,r,i){return(0,o.wg)(),(0,o.iD)("div",{onClick:t[0]||(t[0]=t=>e.change(e.index)),class:(0,U.C_)(["pattern-item",e.index===e.mode&&!0===e.isActive?"pattern-item_selected":""])},[(0,o._)("span",{class:"pattern-item__icon",textContent:(0,U.zw)(e.pattern.icon)},null,8,O),(0,o._)("div",N,[(0,o._)("span",{class:"pattern-item__name",textContent:(0,U.zw)(e.pattern.name)},null,8,q),(0,o._)("span",{class:"pattern-item__type",textContent:(0,U.zw)(e.pattern.type)},null,8,F)])],2)}var H=(0,o.aZ)({name:"PatternItem",props:{pattern:{type:Object},index:{type:Number},mode:{type:Number},isActive:{type:Boolean}},methods:{change:function(e){this.$emit("change",e)}}});const R=(0,p.Z)(H,[["render",z]]);var B=R,Q=(0,o.aZ)({name:"PatternList",props:{patterns:{type:Array},mode:{type:Number},isActive:{type:Boolean}},components:{PatternItem:B},methods:{change:function(e){this.$emit("change",e)}}});const Y=(0,p.Z)(Q,[["render",S]]);var K=Y,$=(0,o.aZ)({name:"AppPatterns",components:{PatternList:K,NavigationList:x.Z,GamepadList:D.Z,MessageItem:I.Z},computed:{gamepads:function(){return c.Z.getters.gamepads},patterns:function(){return c.Z.getters.patterns},mode:function(){return c.Z.getters.mode},isActive:function(){return c.Z.getters.isActive}},methods:{change(e){c.Z.dispatch("change",e)}},mounted(){c.Z.dispatch("loadPatterns")}});const J=(0,p.Z)($,[["render",L]]);var X=J,ee=(0,o.aZ)({name:"PatternsView",components:{AppPatterns:X}});const te=(0,p.Z)(ee,[["render",P]]);var ae=te;function ne(e,t,a){switch(e.fullPath){case"/?custom":me.push("/custom");break;case"/?manual":me.push("/manual");break;case"/?diagnostic":me.push("/diagnostic");break;case"/?faq":me.push("/faq");break;case"/?about":me.push("/about");break;case"/?donate":me.push("/donate");break}return a()}const oe={update:ne};var re=oe;function ie(e,t){e.map((e=>{const a=document.createElement(t);return Object.keys(e).forEach((t=>{a.setAttribute(t,e[t])})),a.setAttribute("data-vue-router-controlled",""),a})).forEach((e=>document.head.appendChild(e)))}function se(e,t,a){const n=e.matched.slice().reverse().find((e=>e.meta&&e.meta.title)),o=e.matched.slice().reverse().find((e=>e.meta&&e.meta.metaTags&&e.meta.linkTags));if(n&&(document.title=n.meta.title),Array.from(document.querySelectorAll("[data-vue-router-controlled]")).map((e=>{e.parentNode&&e.parentNode.removeChild(e)})),!o)return a();const r=o.meta.linkTags,i=o.meta.metaTags;return ie(r,"link"),ie(i,"meta"),a()}const ce={update:se};var de=ce;const le=[{path:"/",name:"patterns-view",component:ae,meta:{title:"Wavelovers",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона"},{name:"description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:title",content:"Wavelovers"},{name:"og:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:url",content:"https://wavelovers.ru/"},{name:"twitter:title",content:"Wavelovers"},{name:"twitter:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/"}]}},{path:"/custom",name:"custom-view",component:()=>a.e(991).then(a.bind(a,4991)),meta:{title:"Wavelovers – Custom",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона"},{name:"description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:title",content:"Wavelovers – Custom"},{name:"og:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:url",content:"https://wavelovers.ru/custom"},{name:"twitter:title",content:"Wavelovers – Custom"},{name:"twitter:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/custom"}]}},{path:"/manual",name:"manual-view",component:()=>a.e(855).then(a.bind(a,7855)),meta:{title:"Wavelovers – Manual",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона"},{name:"description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:title",content:"Wavelovers – Manual"},{name:"og:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:url",content:"https://wavelovers.ru/manual"},{name:"twitter:title",content:"Wavelovers – Manual"},{name:"twitter:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/manual"}]}},{path:"/diagnostic",name:"diagnostic-view",component:()=>a.e(835).then(a.bind(a,9835)),meta:{title:"Wavelovers – Diagnostic",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона"},{name:"description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:title",content:"Wavelovers – Diagnostic"},{name:"og:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."},{name:"og:url",content:"https://wavelovers.ru/diagnostic"},{name:"twitter:title",content:"Wavelovers – Diagnostic"},{name:"twitter:description",content:"Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/diagnostic"}]}},{path:"/faq",name:"faq-view",component:()=>a.e(382).then(a.bind(a,382)),meta:{title:"Wavelovers – FAQ",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, FAQ, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, часто задаваемые вопросы"},{name:"description",content:"Wavelovers. Frequently asked questions page."},{name:"og:title",content:"Wavelovers – FAQ"},{name:"og:description",content:"Wavelovers. Frequently asked questions page."},{name:"og:url",content:"https://wavelovers.ru/faq"},{name:"twitter:title",content:"Wavelovers – FAQ"},{name:"twitter:description",content:"Wavelovers. Frequently asked questions page."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/faq"}]}},{path:"/about",name:"about-view",component:()=>a.e(34).then(a.bind(a,2034)),meta:{title:"Wavelovers – About",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, advertise, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, реклама"},{name:"description",content:"Wavelovers. Page with information about the project and data on donations."},{name:"og:title",content:"Wavelovers – About"},{name:"og:description",content:"Wavelovers. Page with information about the project and data on donations."},{name:"og:url",content:"https://wavelovers.ru/about"},{name:"twitter:title",content:"Wavelovers – About"},{name:"twitter:description",content:"Wavelovers. Page with information about the project and data on donations."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/about"}]}},{path:"/donate",name:"donate-view",component:()=>a.e(442).then(a.bind(a,8442)),meta:{title:"Wavelovers – Donate",metaTags:[{name:"keywords",content:"Wavelovers, Wave Lovers, Wavemaster, Wave Master, Vibration Master, Vibration, Gamepad, Gamepad Vibration, Gamepad Massager, Vibrate Gamepad, Phone Vibration, Gamepad Tester, Phone Vibration Tester, Vibration Tester, Massager, Vibrator, Satisfyer, Womanizer, Relax, Donate, Support, геймпад, джойстик, вибратор, вибромассажер, вибро, вибромассажёр из геймпада, тестер вибрации геймпада, тестер вибрации телефона, задонатить, пожертвовать, помочь, поблагодарить"},{name:"description",content:"Wavelovers. Donate to the author."},{name:"og:title",content:"Wavelovers – Donate"},{name:"og:description",content:"Wavelovers. Donate to the author."},{name:"og:url",content:"https://wavelovers.ru/donate"},{name:"twitter:title",content:"Wavelovers – Donate"},{name:"twitter:description",content:"Wavelovers. Donate to the author."}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/donate"}]}},{path:"/404",name:"404",component:()=>a.e(284).then(a.bind(a,6284)),meta:{title:"Wavelovers – Page not found",metaTags:[{name:"og:title",content:"Wavelovers – Page not found"},{name:"og:url",content:"https://wavelovers.ru/404"}],linkTags:[{rel:"canonical",href:"https://wavelovers.ru/404"}]}},{path:"/:catchAll(.*)*",redirect:"/404"}],ue=(0,G.p7)({history:(0,G.PO)("/"),routes:le});ue.beforeEach(re.update),ue.beforeEach(de.update);var me=ue;(0,n.ri)(A).use(c.Z).use(me).mount("#app")},1746:function(e,t,a){a.d(t,{Z:function(){return m}});var n=a(65),o=a(2482);class r{constructor(e){(0,o.Z)(this,"unit",void 0),(0,o.Z)(this,"id",void 0),(0,o.Z)(this,"canVibrate",void 0),(0,o.Z)(this,"isVibrating",void 0),(0,o.Z)(this,"interval",void 0),this.unit=e,this.id=Date.now(),this.canVibrate=!!this.unit.vibrationActuator,this.isVibrating=!1,this.update=this.update.bind(this),this.interval=setInterval(this.update,1)}update(){const e=navigator.getGamepads();this.unit=e[this.unit.index]}async loop(e){this.isVibrating=!0;const t=10;while(!0===this.isVibrating)for(let a=0;asetTimeout(t,e)))}}var i=r;const s={state:()=>({gamepads:[]}),getters:{gamepads:function(e){return e.gamepads}},mutations:{addGamepad:function(e,t){e.gamepads.push(t)},deleteGamepad:function(e,t){e.gamepads.splice(t,1)}},actions:{addGamepad:function(e,t){const a=t;e.getters.gamepads.length>=1||e.commit("addGamepad",new i(a.gamepad))},deleteGamepad:function(e,t){e.getters.gamepads.forEach(((a,n)=>{a.unit.id===t.gamepad.id&&e.commit("deleteGamepad",n)}))},loop:function(e,t){e.getters.gamepads.forEach((e=>{e.loop(t)}))},vibrate:function(e,t){e.getters.gamepads.forEach((e=>{e.vibrate(t)}))},reset:function(e){e.getters.gamepads.forEach((e=>{e.reset()}))}}};var c=s;const d={state:()=>({patterns:[]}),getters:{patterns:function(e){return e.patterns}},mutations:{setPatterns:function(e,t){e.patterns=t}},actions:{loadPatterns:async function(e){const t="https://wavelovers.ru/assets/patterns.json";try{const a=await fetch(t);if(a.ok){const t=await a.json();e.commit("setPatterns",t)}else console.log("Connect to the Internet for download more patterns...")}catch(a){console.log(a)}}}};var l=d;const u=(0,n.MT)({state:()=>({mode:0,isActive:!1}),getters:{mode:function(e){return e.mode},isActive:function(e){return e.isActive}},mutations:{setMode:function(e,t){e.mode=t},setIsActive:function(e,t){e.isActive=t}},actions:{setMode:function(e,t){e.commit("setMode",t)},setIsActive:function(e,t){e.commit("setIsActive",t)},change:function(e,t){e.getters.mode===t?e.dispatch("setIsActive",!e.getters.isActive):(e.dispatch("setIsActive",!0),e.dispatch("setMode",t)),!0===e.getters.isActive?(e.dispatch("reset"),e.dispatch("loop",e.getters.patterns[e.getters.mode].pattern)):e.dispatch("reset")},startCustom:function(e,t){e.dispatch("setIsActive",!1),e.dispatch("setMode",0),e.dispatch("reset"),e.dispatch("loop",t)}},modules:{MGamepads:c,MPatterns:l}});var m=u},1850:function(e,t,a){a.d(t,{Z:function(){return g}});var n=a(3396),o=a(7139);const r={class:"content-item device-list"};function i(e,t,a,i,s,c){const d=(0,n.up)("GamepadItem");return(0,n.wg)(),(0,n.iD)("div",r,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.gamepads,(e=>((0,n.wg)(),(0,n.j4)(d,{key:e.id,textContent:(0,o.zw)(e.unit.id)},null,8,["textContent"])))),128))])}const s={class:"list-item"};function c(e,t,a,o,r,i){return(0,n.wg)(),(0,n.iD)("div",s)}var d=(0,n.aZ)({name:"GamepadItem"}),l=a(89);const u=(0,l.Z)(d,[["render",c]]);var m=u,v=(0,n.aZ)({name:"GamepadList",props:{gamepads:{type:Array}},components:{GamepadItem:m}});const p=(0,l.Z)(v,[["render",i]]);var g=p},2347:function(e,t,a){a.d(t,{Z:function(){return d}});var n=a(3396);const o={class:"content-item message"};function r(e,t,a,r,i,s){return(0,n.wg)(),(0,n.iD)("div",o,[(0,n._)("span",null,[(0,n.WI)(e.$slots,"default")])])}var i=(0,n.aZ)({name:"MessageItem"}),s=a(89);const c=(0,s.Z)(i,[["render",r]]);var d=c},81:function(e,t,a){a.d(t,{Z:function(){return v}});var n=a(3396);const o={class:"content-item navigation-list"},r=(0,n.Uk)("Patterns"),i=(0,n.Uk)("Custom"),s=(0,n.Uk)("Manual"),c=(0,n.Uk)("Diagnostic");function d(e,t,a,d,l,u){const m=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("div",o,[(0,n.Wm)(m,{to:"/",class:"navigation-item"},{default:(0,n.w5)((()=>[r])),_:1}),(0,n.Wm)(m,{to:"/custom",class:"navigation-item"},{default:(0,n.w5)((()=>[i])),_:1}),(0,n.Wm)(m,{to:"/manual",class:"navigation-item"},{default:(0,n.w5)((()=>[s])),_:1}),(0,n.Wm)(m,{to:"/diagnostic",class:"navigation-item"},{default:(0,n.w5)((()=>[c])),_:1})])}var l=(0,n.aZ)({name:"NavigationList"}),u=a(89);const m=(0,u.Z)(l,[["render",d]]);var v=m}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.m=e,function(){var e=[];a.O=function(t,n,o,r){if(!n){var i=1/0;for(l=0;l=r)&&Object.keys(a.O).every((function(e){return a.O[e](n[c])}))?n.splice(c--,1):(s=!1,r0&&e[l-1][2]>r;l--)e[l]=e[l-1];e[l]=[n,o,r]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))}}(),function(){a.u=function(e){return"js/"+e+"."+{34:"7ff8bfa5",284:"e47dcb1b",382:"2bb7e224",442:"d79586f7",835:"4e809eb1",855:"af1ff25f",991:"8ad47257"}[e]+".js"}}(),function(){a.miniCssF=function(e){return"css/"+e+"."+{835:"10b8ac32",855:"06b3a622",991:"19a8cda3"}[e]+".css"}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="wavelovers:";a.l=function(n,o,r,i){if(e[n])e[n].push(o);else{var s,c;if(void 0!==r)for(var d=document.getElementsByTagName("script"),l=0;l