1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[17],{"HaE+":function(e,n,t){"use strict";function r(e,n,t,r,o,i,a){try{var c=e[i](a),s=c.value}catch(u){return void t(u)}c.done?n(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise((function(o,i){var a=e.apply(n,t);function c(e){r(a,o,i,c,s,"next",e)}function s(e){r(a,o,i,c,s,"throw",e)}c(void 0)}))}}t.d(n,"a",(function(){return o}))},ODXe:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function o(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(s){c=!0,o=s}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||function(e,n){if(e){if("string"===typeof e)return r(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.d(n,"a",(function(){return o}))},Oo8d:function(e,n,t){"use strict";t.r(n);var r=t("nKUr"),o=t("ODXe"),i=t("u9kb"),a=t("g4pe"),c=t.n(a),s=t("q1tI"),u=t("Nn3z"),l=function(e){var n=Object(s.useMemo)((function(){return"undefined"!==typeof localStorage&&localStorage.getItem(e)||void 0}),[]),t=Object(s.useState)(),r=t[0],o=t[1];return Object(s.useEffect)((function(){return o(n)}),[]),[r,Object(s.useCallback)((function(n){return n?localStorage.setItem(e,n):localStorage.removeItem(e),o(n)}),[o])]},d=t("o0o1"),b=t.n(d),f=t("HaE+"),g=function(){var e=Object(s.useState)(),n=e[0],t=e[1];return Object(s.useEffect)((function(){Object(f.a)(b.a.mark((function e(){var n,r,o;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("storage"in navigator)||!("estimate"in navigator.storage)){e.next=9;break}return e.next=3,navigator.storage.estimate();case 3:n=e.sent,r=n.usage,o=n.quota,t(r&&o?{usage:r,quota:o}:{error:'"navigator.storage.estimate" doesn\'t provide info'}),e.next=10;break;case 9:t({error:'"navigator.storage.estimate" unavailable on your device'});case 10:case"end":return e.stop()}}),e)})))()}),[]),n},v=function(){var e=Object(s.useState)(!0),n=e[0],t=e[1];return Object(s.useEffect)((function(){if("ononline"in window&&"onoffline"in window){t(window.navigator.onLine);var e=function(){t(!0)};window.ononline||window.addEventListener("online",e);var n=function(){t(!1)};return window.onoffline||window.addEventListener("offline",n),function(){window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}),[]),n},h=t("mrCC"),j=function(){var e=Object(s.useState)({enabled:!1,error:"unavailable"}),n=e[0],t=e[1],r=Object(h.a)();return[n,Object(s.useCallback)((function(){r&&Object(f.a)(b.a.mark((function e(){var n;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.serviceWorker.ready;case 2:if(!("periodicSync"in e.sent)){e.next=12;break}return console.log('requesting "periodic-background-sync" permission...'),e.next=7,navigator.permissions.query({name:"periodic-background-sync"});case 7:n=e.sent,console.log('"periodic-background-sync" permission status:',n.state),"granted"===n.state?t({enabled:!0}):t({error:"Permission not granted, status: ".concat(n.state)}),e.next=13;break;case 12:t({error:"unavailable"});case 13:case"end":return e.stop()}}),e)})))()}),[r])]},p=t("bQJ4");function m(e,n){if(0==e)return"0 Bytes";var t=n||2,r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(t))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}var w=function(){var e=Object(h.a)(),n=v(),t=g(),a=j(),d=Object(o.a)(a,2),b=d[0],f=d[1],p=!("error"in b)&&b.enabled,w="error"in b?b.error:void 0,y="error"in b&&"unavailable"===b.error,O=l("subscriber_email"),x=Object(o.a)(O,2),k=x[0],S=x[1],E=l("_subscriber_email"),_=Object(o.a)(E,2),B=_[0],I=_[1],C=!Boolean(k)&&!Boolean(B),P=Object(s.useCallback)((function(n){n.target.checked?(S(B),null===e||void 0===e||e.messageSW({type:"update-settings",settings:{isSub:1}})):(I(k),null===e||void 0===e||e.messageSW({type:"update-settings",settings:{isSub:0}}),S(void 0))}),[k,B]);return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(c.a,{children:Object(r.jsx)("title",{children:"Settings"})}),Object(r.jsxs)("div",{children:[Object(r.jsx)(u.a,{children:"Settings"}),Object(r.jsx)(i.g,{children:"These settings might seem unnecessary, but the app is deeply under development, and it might help debug problems."}),Object(r.jsxs)(i.b,{mt:"3",children:[Object(r.jsxs)("label",{children:[Object(r.jsx)("input",{type:"checkbox",name:"is-email-set",checked:Boolean(k),disabled:C,onChange:P})," ",'"Subscribe" form hidden']}),C&&Object(r.jsx)(i.g,{variant:"warning",mt:"3",children:"To toggle this form visibility, you should subscribe first (you can do that in the end of any article)"})]}),Object(r.jsx)(i.b,{mt:"3",children:Object(r.jsxs)("label",{children:[Object(r.jsx)("input",{type:"checkbox",name:"periodic-background-sync",checked:p,disabled:y,onChange:f})," ","Periodic background sync for new articles (when network is available and not in power-safe)",w&&Object(r.jsxs)(i.g,{variant:y?"warning":"danger",mt:"3",children:[Object(r.jsxs)("b",{children:["Error: ",w]}),y&&Object(r.jsxs)("p",{children:["It seems \"periodic-background-sync\" feature isn't supported by your device, and n
1o wonder it is so, it's not even yet listed in"," ",Object(r.jsx)("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/Permissions",target:"_blank",rel:"noopener",children:"MDN Web Docs"}),'. Not to be confused with "background-sync", - they\'re different things (',Object(r.jsx)("a",{href:"https://wicg.github.io/background-sync/spec/PeriodicBackgroundSync-index.html",target:"_blank",rel:"noopener",children:"more info"}),'). Let\'s hope "periodic-background-sync" will become available soon too!']})]})]})}),Object(r.jsxs)(i.b,{mt:"3",children:[Object(r.jsx)(u.a,{as:"h2",children:"Info"}),Object(r.jsxs)("p",{children:["Status: ",n?"Online":"Offline"]}),Object(r.jsxs)("p",{children:["Storage used:"," ",t&&("error"in t?t.error:"".concat(m(t.usage)," / ").concat(m(t.quota)))||"calculating..."]})]})]})]})};w.Layout=p.a;n.default=w},VEf1:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return t("Oo8d")}])},mrCC:function(e,n,t){"use strict";var r=t("q1tI");n.a=function(){var e=Object(r.useState)(),n=e[0],t=e[1];return Object(r.useEffect)((function(){if("serviceWorker"in navigator&&void 0!==window.workbox){var e=window.workbox;t(e)}}),[]),n}},o0o1:function(e,n,t){e.exports=t("ls82")}},[["VEf1",0,2,4,6,1,3,5,7,9]]]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.