diff --git a/assets/index.85f11597.js b/assets/index.39e6e614.js similarity index 96% rename from assets/index.85f11597.js rename to assets/index.39e6e614.js index 260d774..09d87b9 100644 --- a/assets/index.85f11597.js +++ b/assets/index.39e6e614.js @@ -126,7 +126,7 @@ hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min c1.5-1.3,2.4-3.2,2.4-5.1c0-2.1-0.9-4-2.6-5.3c-0.2-0.1-0.4-0.1-0.5,0.1c-0.1,0.2-0.1,0.4,0.1,0.5c1.5,1.2,2.3,2.9,2.3,4.7 c0,1.8-0.8,3.4-2.1,4.6c-0.2,0.1-0.2,0.4,0,0.5c0.1,0.1,0.2,0.1,0.3,0.1C39,47.4,39.1,47.4,39.2,47.3z`})],-1)),_hoisted_3$6=[_hoisted_2$8];function _sfc_render$b(e,t){return openBlock(),createElementBlock("svg",_hoisted_1$9,_hoisted_3$6)}const IconSensor=_export_sfc(_sfc_main$b,[["render",_sfc_render$b],["__scopeId","data-v-1ca21f0d"]]),_imports_0$1=""+new URL("app-icon-512.a5eb7b3f.png",import.meta.url).href,Header_vue_vue_type_style_index_0_scoped_a4474917_lang="",_sfc_main$a={components:{IconSensor},data(){return{locale:localStorage.getItem("locale")||this.$i18n.locale||"en",store:useStore()}},watch:{locale(e){this.$i18n.locale=e,localStorage.setItem("locale",e)}},computed:{countPoints(){return this.store.sensors.length}}},_withScopeId$5=e=>(pushScopeId("data-v-a4474917"),e=e(),popScopeId(),e),_hoisted_1$8={class:"flexline space-between"},_hoisted_2$7={class:"flexline align-start"},_hoisted_3$5=_withScopeId$5(()=>createBaseVNode("img",{alt:"App logo",src:_imports_0$1},null,-1)),_hoisted_4$4={key:0,class:"sensorscount"},_hoisted_5$4={class:"flexline"},_hoisted_6$4=_withScopeId$5(()=>createBaseVNode("option",{value:"en"},"English",-1)),_hoisted_7$4=_withScopeId$5(()=>createBaseVNode("option",{value:"ru"},"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",-1)),_hoisted_8$4=[_hoisted_6$4,_hoisted_7$4],_hoisted_9$4={id:"about",class:"popover popover-top-right",popover:""},_hoisted_10$3=createStaticVNode('
\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 \u043E\u0442\u043A\u0440\u044B\u0442\u0443\u044E \u0441\u0435\u0442\u044C \u0434\u0430\u0442\u0447\u0438\u043A\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u043F\u043E\u0441\u0442\u0440\u043E\u0435\u043D\u0430 \u043D\u0430 open-source \u043F\u0440\u0438\u043D\u0446\u0438\u043F\u0430\u0445 \u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u044D\u043D\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u0430\u043C\u0438 (\u0441\u043C. the free will of individuals). \u041A\u0430\u0440\u0442\u0430 \u043F\u0440\u0435\u0434\u043B\u0430\u0433\u0430\u0435\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043D\u044B\u0445 \u0443\u0440\u043E\u0432\u043D\u044F \u0434\u0435\u0446\u0435\u043D\u0442\u0440\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438: \u043F\u0440\u044F\u043C\u0430\u044F peer-to-peer \u0441\u0432\u044F\u0437\u044C \u0434\u0430\u0442\u0447\u0438\u043A\u043E\u0432 \u0438 \u0431\u043B\u043E\u043A\u0447\u0435\u0439\u043D \u0434\u043B\u044F \u0441\u0431\u043E\u0440\u0430 \u0438 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0441 \u0434\u0430\u0442\u0447\u0438\u043A\u043E\u0432. \u0422\u0443\u0442 \u043C\u043E\u0436\u043D\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u0438\u0442\u044C\u0441\u044F \u0431\u043E\u043B\u0435\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E \u0441 \u0442\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u043E\u0439.
\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0441\u043E\u0431\u0440\u0430\u0442\u044C \u0441\u0432\u043E\u0439 \u0434\u0430\u0442\u0447\u0438\u043A, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044F \u043A\u043E\u043C\u043F\u043B\u0435\u043A\u0442\u0443\u044E\u0449\u0438\u0435 \u043D\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u043E\u043C \u0440\u044B\u043D\u043A\u0435 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0438, \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0434\u0430\u0442\u0447\u0438\u043A \u043D\u0430 \u043A\u0430\u0440\u0442\u0443. \u041C\u044B \u0441 \u0440\u0430\u0434\u043E\u0441\u0442\u044C\u044E \u043F\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u043C \u043D\u043E\u0432\u044B\u0445 \u0443\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u043E\u0432 \u0441\u043E\u043E\u0431\u0449\u0435\u0441\u0442\u0432\u0430. \u041F\u0440\u0438\u0441\u043E\u0435\u0434\u0438\u043D\u044F\u0439\u0442\u0435\u0441\u044C!
',5),_hoisted_15$2=createStaticVNode('Welcome to the decentralized opensource sensors map which operates with the sole intent of serving the free will of individuals, without any beneficiaries. It offers two distinct layers of decentralization at your choise: peer-to-peer connectivity for direct access to sensor data, and the federative concept for accumulating sensor data and displaying measurement history. Click here for further technical details.
You can assemble your own sensor using components available on the free market. Follow the instructions provided to connect your sensor to the map. We welcome your participation and look forward to expanding our community together. Join us today!
',5),_hoisted_20$2=_withScopeId$5(()=>createBaseVNode("hr",null,null,-1)),_hoisted_21$2={class:"navlinks"},_hoisted_22$2={href:"https://github.com/airalab/sensors.robonomics.network",target:"_blank",rel:"noopener"},_hoisted_23$2={class:"popovercontrol",popovertarget:"about"};function _sfc_render$a(e,t,r,n,o,a){const l=resolveComponent("router-link"),c=resolveComponent("IconSensor"),u=resolveComponent("font-awesome-icon");return openBlock(),createElementBlock("header",_hoisted_1$8,[createBaseVNode("div",_hoisted_2$7,[createVNode(l,{to:"/",class:"appicon"},{default:withCtx(()=>[_hoisted_3$5]),_:1}),a.countPoints>0?(openBlock(),createElementBlock("b",_hoisted_4$4,[createVNode(c),createTextVNode(" "+toDisplayString$1(a.countPoints),1)])):createCommentVNode("",!0)]),createBaseVNode("div",_hoisted_5$4,[withDirectives(createBaseVNode("select",{"onUpdate:modelValue":t[0]||(t[0]=g=>o.locale=g)},_hoisted_8$4,512),[[vModelSelect,o.locale]]),createBaseVNode("div",_hoisted_9$4,[o.locale==="ru"?(openBlock(),createElementBlock(Fragment,{key:0},[_hoisted_10$3],64)):(openBlock(),createElementBlock(Fragment,{key:1},[_hoisted_15$2],64)),_hoisted_20$2,createBaseVNode("section",_hoisted_21$2,[createBaseVNode("a",_hoisted_22$2,toDisplayString$1(e.$t("links.github")),1),createVNode(l,{to:"/air-measurements"},{default:withCtx(()=>[createTextVNode(toDisplayString$1(e.$t("links.measurement")),1)]),_:1}),createVNode(l,{to:"/privacy-policy"},{default:withCtx(()=>[createTextVNode(toDisplayString$1(e.$t("links.privacy")),1)]),_:1})])]),createBaseVNode("button",_hoisted_23$2,[createVNode(u,{icon:"fa-solid fa-bars"})])])])}const Header=_export_sfc(_sfc_main$a,[["render",_sfc_render$a],["__scopeId","data-v-a4474917"]]),_imports_0=""+new URL("sensors-world-app.8a0828bb.png",import.meta.url).href,InstallPWA_vue_vue_type_style_index_0_scoped_b59a209f_lang="",_sfc_main$9={data(){return{deferredPrompt:null,isSupported:!1,db:null,isInstalled:"loading",isBrowserSupport:!0,browsers:{chrome:!1,safari:!1,firefox:!1,edge:!1,opera:!1}}},methods:{async getDb(){return new Promise((e,t)=>{let r=window.indexedDB.open("SensorsDB",1);r.onerror=n=>{console.log("Error opening db",n),t("Error")},r.onsuccess=n=>{e(n.target.result)},r.onupgradeneeded=n=>{n.target.result.createObjectStore("install",{autoIncrement:!0,keyPath:"id"})}})},async getData(){return new Promise(e=>{let t=this.db.transaction(["install"],"readonly");t.oncomplete=()=>{e(n)};let r=t.objectStore("install"),n=null;r.openCursor().onsuccess=o=>{let a=o.target.result;a&&(n=a.value,a.continue())}})},async addDataToDb(e=!1,t=!1){return new Promise(r=>{let n=this.db.transaction(["install"],"readwrite");n.oncomplete=()=>{r()};let o=n.objectStore("install");o.delete(1),o.add({id:1,removed:e,installed:t})})},async installApp(){if(this.addDataToDb(!1,!0),this.deferredPrompt!==null){this.deferredPrompt.prompt();const{outcome:e}=await this.deferredPrompt.userChoice;e==="accepted"&&(this.deferredPrompt=null,this.isSupported=!1,this.isInstalled="installed")}},removeInstall(){this.addDataToDb(!0,!1),this.isInstalled="removed"},checkBrowser(){let e=navigator.userAgent;this.browsers.chrome=e.indexOf("Chrome")>-1,this.browsers.firefox=e.indexOf("Firefox")>-1,this.browsers.safari=e.indexOf("Safari")>-1,this.browsers.chrome&&this.browsers.safari&&(this.browsers.safari=!1),this.browsers.opera=e.indexOf("OP")>-1,this.browsers.chrome&&this.browsers.opera&&(this.browsers.chrome=!1)}},async created(){this.db=await this.getDb(),this.isInstalled=await this.getData()?await this.getData():null},mounted(){window.addEventListener("beforeinstallprompt",e=>{this.isSupported=!0,this.deferredPrompt=e}),window.matchMedia("(display-mode: standalone)").matches?this.isSupported=!0:this.isSupported=!1,this.checkBrowser(),(this.browsers.safari||this.browsers.firefox||this.browsers.opera)&&(this.isBrowserSupport=!1)}},_withScopeId$4=e=>(pushScopeId("data-v-b59a209f"),e=e(),popScopeId(),e),_hoisted_1$7={key:0,class:"container install-pwa__container"},_hoisted_2$6={class:"install-pwa__content"},_hoisted_3$4=_withScopeId$4(()=>createBaseVNode("img",{src:_imports_0,alt:"sensors-cy-app"},null,-1)),_hoisted_4$3={class:"install-pwa__text"},_hoisted_5$3=_withScopeId$4(()=>createBaseVNode("h3",null,"Available as web application (PWA)",-1));function _sfc_render$9(e,t,r,n,o,a){return!o.isInstalled&&o.isBrowserSupport?(openBlock(),createElementBlock("div",_hoisted_1$7,[createBaseVNode("div",_hoisted_2$6,[_hoisted_3$4,createBaseVNode("div",_hoisted_4$3,[_hoisted_5$3,createBaseVNode("button",{onClick:t[0]||(t[0]=(...l)=>a.installApp&&a.installApp(...l)),class:"install-pwa__btn"},"Install")])]),createBaseVNode("button",{onClick:t[1]||(t[1]=(...l)=>a.removeInstall&&a.removeInstall(...l)),class:"install-pwa__remove"})])):createCommentVNode("",!0)}const InstallPWA=_export_sfc(_sfc_main$9,[["render",_sfc_render$9],["__scopeId","data-v-b59a209f"]]),MessagePopup_vue_vue_type_style_index_0_scoped_c5bfb7c2_lang="";function preloadImages(e,t){let r=0;const n={};function o(){if(r++,r==e.length){const a=[],l=[];for(const c of e)n[c]&&n[c]>0?(console.log(`Bad image ${c}`),l.push(c)):a.push(c);t(a,l)}}for(let a of e){let l=document.createElement("img");l.onload=()=>{n[a]=0,o()},l.onerror=()=>{n[a]||(n[a]=0),n[a]++,n[a]<3?l.src=a:o()},l.src=a}}const _sfc_main$8={props:["data"],data(){return{isImages:!1,images:[],badImages:[],imagesLoaded:!1,state:"neutral"}},computed:{dateMsg:function(){return hooks(this.data.timestamp,"X").format("DD.MM.YYYY HH:mm:ss")},classList(){return{["sensor-popup__header"]:!0,[`sensor-popup__header--${this.state}`]:this.state}}},watch:{data(){this.imagesLoad()}},created(){this.imagesLoad()},methods:{replaceWithBr(e){return e.replace(/\n/g,"