PageSourceSearch

https://www.themitrew11.co.uk/dist/gk-jss-app/js/7380.65a4dc1a.js

js themitrew11.co.uk collected 2026-10-08 18:39:30 UTC 8,399 bytes, 2 lines download raw bytes

1"use strict";(globalThis["webpackChunkgk_jss_app"]=globalThis["webpackChunkgk_jss_app"]||[]).push([[7380],{7380:(i,e,n)=>{n.d(e,{default:()=>y});var t=n(25),s=n(46499),o=n(29880),r=n(16238);const a={Tn:function(i){const e=(i+"=".repeat((4-i.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),t=new Uint8Array(n.length);for(let s=0;s<n.length;++s)t[s]=n.charCodeAt(s);return t}},u=a;var c=n(90663),h=n(312),f=n(73072),p=n(57442);class l{constructor(i,e,n,t,s,o,r,a,u,c,h){this.en=i,this.sn=e,this.on=n,this.un=s,this.an=o,this.hn=r,this.h=a,this.cn=u,this.fn=c,this.j=h,this.en=i,this.sn=e,this.on=n,this.ln=t+"/safari/"+e,this.un=s||"/service-worker.js",this.hn=r,this.h=a,this.cn=u||!1,this.fn=c||!1,this.j=h,this.dn=f.A.pn(),this.bn=f.A.yn()}mn(){return this.fn}gn(i,e,n,t,s){i.unsubscribe().then((i=>{i?this.vn(e,n,t,s):(r.A.error("Failed to unsubscribe device from push."),"function"==typeof s&&s(!1))})).catch((i=>{r.A.error("Push unsubscription error: "+i),"function"==typeof s&&s(!1)}))}wn(i,e,n){var t;const s=(i=>{if("string"==typeof i)return i;if(0!==i.endpoint.indexOf("https://android.googleapis.com/gcm/send"))return i.endpoint;let e=i.endpoint;const n=i;return n.kn&&-1===i.endpoint.indexOf(n.kn)&&(e=i.endpoint+"/"+n.kn),e})(i);let o=null,a=null;const u=i;if(null!=u.getKey)try{const i=Array.from(new Uint8Array(u.getKey("p256dh"))),e=Array.from(new Uint8Array(u.getKey("auth")));o=btoa(String.fromCharCode.apply(null,i)),a=btoa(String.fromCharCode.apply(null,e))}catch(i){r.A.error((0,p.u)(i))}const c=(i=>{let e;return i.options&&(e=i.options.applicationServerKey)&&e.byteLength&&e.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(e)))).replace(/\+/g,"-").replace(/\//g,"_"):null})(u);null===(t=this.en)||void 0===t||t.Pn(s,e,o,a,c),s&&"function"==typeof n&&n(s,o,a)}Dn(){var i;null===(i=this.en)||void 0===i||i.Sn(!0)}An(i,e){var n;null===(n=this.en)||void 0===n||n.Sn(!1),r.A.info(i),"function"==typeof e&&e(!1)}jn(i,e,n,t){var s;if("default"===e.permission)try{window.safari.pushNotification.requestPermission(this.ln,i,{api_key:this.sn,device_id:(null===(s=this.on)||void 0===s?void 0:s.fe().id)||""},(e=>{"granted"===e.permission&&this.en&&this.en.setPushNotificationSubscriptionType(h.A.NotificationSubscriptionTypes.OPTED_IN),this.jn(i,e,n,t)}))}catch(i){this.An("Could not request permission for push: "+i,t)}else"denied"===e.permission?this.An("The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.",t):"granted"===e.permission&&(r.A.info("Device successfully subscribed to push."),this.wn(e.deviceToken,new Date,n))}requestPermission(i,e,n){const t=t=>{switch(t){case"granted":return void("function"==typeof i&&i());case"default":return void("function"==typeof e&&e());case"denied":return void("function"==typeof n&&n());default:r.A.error("Received unexpected permission result "+t)}};let s=!1;if("default"!==window.Notification.permission)t(Notification.permission);else{const i=window.Notification.requestPermission((i=>{s&&t(i)}));i?i.then((i=>{t(i)})):s=!0}}vn(i,e,n,t){const s={userVisibleOnly:!0};null!=e&&(s.applicationServerKey=e),i.pushManager.subscribe(s).then((i=>{r.A.info("Device successfully subscribed to push."),this.wn(i,new Date,n)})).catch((i=>{f.A.isPushBlocked()?(r.A.info("Permission for push notifications was denied."),"function"==typeof t&&t(!1)):(r.A.error("Push subscription failed: "+i),"function"==typeof t&&t(!0))}))}xn(){if(this.cn)return navigator.serviceWorker.getRegistration(this.un);const i=this.an?{scope:this.an}:void 0;return navigator.serviceWorker.register(this.un,i).then((()=>navigator.serviceWorker.ready.then((i=>(i&&"function"==typeof i.update&&i.update().catch((i=>{r.A.info("ServiceWorker update failed: "+i)})),i)))))}Nn(i){this.cn||(i.unregister(),r.A.info("Service worker successfully unregistered."))}subscribe(i,e){if(!f.A.isPushSupported())return r.A.info(l.Un),void("function"==typeof e&&e(!1));if(this.dn){if(!this.cn&&null!=window.location){let i=this.un;-1===i.indexOf(window.location.host)&&(i=window.location.host+i),-1===i.indexOf(window.location.protocol)&&(i=window.location.protocol+"//"+i)}if(f.A.isPushBlocked())return void this.An("Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.",e);if(this.h&&!this.h.Wn()&&0===this.h.Ft())return r.A.info("Waiting for VAPID key from server config before subscribing to push."),void this.h._n((()=>{this.subscribe(i,e)}));const n=()=>{r.A.info("Permission for push notifications was denied."),"function"==typeof e&&e(!1)},t=()=>{let i="Permission for push notifications was ignored.";f.A.isPushBlocked()&&(i+=" The browser has automatically blocked further permission requests for a period (probably 1 week)."),r.A.info(i),"function"==typeof e&&e(!0)},a=f.A.isPushPermissionGranted(),p=()=>{!a&&this.en&&this.en.setPushNotificationSubscriptionType(h.A.NotificationSubscriptionTypes.OPTED_IN),this.xn().then((n=>{if(null==n)return r.A.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to fal
1se or ensure that your service worker is registered before calling registerPush."),void("function"==typeof e&&e(!0));n.pushManager.getSubscription().then((t=>{var a;let h=null;if(null!=(null===(a=this.h)||void 0===a?void 0:a.Wn())&&(h=u.Tn(this.h.Wn())),t){let a,u=null,f=null;if(this.j&&(a=this.j.lt(c.d.ct.In)),a&&!(0,s.cy)(a)){let i;try{i=o.A.qn(a).Vn}catch(e){i=null}null==i||isNaN(i.getTime())||0===i.getTime()||(u=i,f=new Date(u),f.setMonth(u.getMonth()+6))}null!=h&&t.options&&t.options.applicationServerKey&&t.options.applicationServerKey.byteLength&&t.options.applicationServerKey.byteLength>0&&!(0,s.n4)(h,new Uint8Array(t.options.applicationServerKey))?(t.options.applicationServerKey.byteLength>12?r.A.info("Device was already subscribed to push using a different VAPID provider, creating new subscription."):r.A.info("Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription."),this.gn(t,n,h,i,e)):t.expirationTime&&new Date(t.expirationTime).valueOf()<=(new Date).valueOf()?(r.A.info("Push subscription is expired, creating new subscription."),this.gn(t,n,h,i,e)):a&&(0,s.cy)(a)?this.gn(t,n,h,i,e):null==f?(r.A.info("No push subscription creation date found, creating new subscription."),this.gn(t,n,h,i,e)):f.valueOf()<=(new Date).valueOf()?(r.A.info("Push subscription older than 6 months, creating new subscription."),this.gn(t,n,h,i,e)):(r.A.info("Device already subscribed to push, sending existing subscription to backend."),this.wn(t,u,i))}else this.vn(n,h,i,e)})).catch((i=>{r.A.error("Error checking current push subscriptions: "+i)}))})).catch((i=>{r.A.error("ServiceWorker registration failed: "+i)}))};this.requestPermission(p,t,n)}else if(this.bn){if(null==this.hn||""===this.hn)return r.A.error("You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari"),void("function"==typeof e&&e(!0));const n=window.safari.pushNotification.permission(this.hn);this.jn(this.hn,n,i,e)}}unsubscribe(i,e){if(!f.A.isPushSupported())return r.A.info(l.Un),void("function"==typeof e&&e());this.dn?navigator.serviceWorker.getRegistration(this.un).then((n=>{n?n.pushManager.getSubscription().then((t=>{t?(this.Dn(),t.unsubscribe().then((t=>{t?(r.A.info("Device successfully unsubscribed from push."),"function"==typeof i&&i()):(r.A.error("Failed to unsubscribe device from push."),"function"==typeof e&&e()),this.Nn(n)})).catch((i=>{r.A.error("Push unsubscription error: "+i),"function"==typeof e&&e()}))):(r.A.info("Device already unsubscribed from push."),"function"==typeof i&&i())})).catch((i=>{r.A.error("Error unsubscribing from push: "+i),"function"==typeof e&&e()})):(r.A.info("Device already unsubscribed from push."),"function"==typeof i&&i())})):this.bn&&(this.Dn(),r.A.info("Device unsubscribed from push."),"function"==typeof i&&i())}}l.Un="Push notifications are not supported in this browser.";const d={i:!1,aa:null,ea:()=>(d.t(),d.aa||(d.aa=new l(t.Ay.gr(),t.Ay.ba(),t.Ay.de(),t.Ay.V(),t.Ay.ee(t.lw.Ma),t.Ay.ee(t.lw._a),t.Ay.ee(t.lw.ka),t.Ay.l(),t.Ay.ee(t.lw.qa),t.Ay.ee(t.lw.Aa),t.Ay.p())),d.aa),t:()=>{d.i||(t.Ay.g(d),d.i=!0)},destroy:()=>{d.aa=null,d.i=!1}},y=d}}]);
2//# sourceMappingURL=7380.65a4dc1a.js.map

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.