PageSourceSearch

https://apprms.web.app/chunk-CHSGBLBB.js

js apprms.web.app collected 2026-10-03 12:18:56 UTC 15,321 bytes, 2 lines download raw bytes

1import"./chunk-J6LMQHIZ.js";import{$ as h,U as w,V as m,_ as k,da as T,ea as x,ia as F,la as S,u as K,v as P,w as R,y as j}from"./chunk-HZKDECJI.js";import{e as L}from"./chunk-ITL2CWPT.js";import{k as r}from"./chunk-Q762RTV7.js";var te="/firebase-messaging-sw.js",ne="/firebase-cloud-messaging-push-scope",q="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",ie="https://fcmregistrations.googleapis.com/v1",V="google.c.a.c_id",oe="google.c.a.c_l",re="google.c.a.ts",ae="google.c.a.e";var v=function(e){return e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked",e}(v||{});function u(e){let t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function se(e){let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),i=atob(n),o=new Uint8Array(i.length);for(let a=0;a<i.length;++a)o[a]=i.charCodeAt(a);return o}var _="fcm_token_details_db",ce=5,W="fcm_token_object_Store";function de(e){return r(this,null,function*(){if("databases"in indexedDB&&!(yield indexedDB.databases()).map(a=>a.name).includes(_))return null;let t=null;return(yield k(_,ce,{upgrade:(i,o,a,c)=>r(this,null,function*(){var f;if(o<2||!i.objectStoreNames.contains(W))return;let g=c.objectStore(W),b=yield g.index("fcmSenderId").get(e);if(yield g.clear(),!!b){if(o===2){let s=b;if(!s.auth||!s.p256dh||!s.endpoint)return;t={token:s.fcmToken,createTime:(f=s.createTime)!==null&&f!==void 0?f:Date.now(),subscriptionOptions:{auth:s.auth,p256dh:s.p256dh,endpoint:s.endpoint,swScope:s.swScope,vapidKey:typeof s.vapidKey=="string"?s.vapidKey:u(s.vapidKey)}}}else if(o===3){let s=b;t={token:s.fcmToken,createTime:s.createTime,subscriptionOptions:{auth:u(s.auth),p256dh:u(s.p256dh),endpoint:s.endpoint,swScope:s.swScope,vapidKey:u(s.vapidKey)}}}else if(o===4){let s=b;t={token:s.fcmToken,createTime:s.createTime,subscriptionOptions:{auth:u(s.auth),p256dh:u(s.p256dh),endpoint:s.endpoint,swScope:s.swScope,vapidKey:u(s.vapidKey)}}}}})})).close(),yield h(_),yield h("fcm_vapid_details_db"),yield h("undefined"),ue(t)?t:null})}function ue(e){if(!e||!e.subscriptionOptions)return!1;let{subscriptionOptions:t}=e;return typeof e.createTime=="number"&&e.createTime>0&&typeof e.token=="string"&&e.token.length>0&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}var pe="firebase-messaging-database",fe=1,p="firebase-messaging-store",E=null;function N(){return E||(E=k(pe,fe,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(p)}}})),E}function G(e){return r(this,null,function*(){let t=O(e),i=yield(yield N()).transaction(p).objectStore(p).get(t);if(i)return i;{let o=yield de(e.appConfig.senderId);if(o)return yield D(e,o),o}})}function D(e,t){return r(this,null,function*(){let n=O(e),o=(yield N()).transaction(p,"readwrite");return yield o.objectStore(p).put(t,n),yield o.done,t})}function le(e){return r(this,null,function*(){let t=O(e),i=(yield N()).transaction(p,"readwrite");yield i.objectStore(p).delete(t),yield i.done})}function O({appConfig:e}){return e.appId}var ge={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invali
1d-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."},d=new j("messaging","Messaging",ge);function we(e,t){return r(this,null,function*(){let n=yield C(e),i=J(t),o={method:"POST",headers:n,body:JSON.stringify(i)},a;try{a=yield(yield fetch(M(e.appConfig),o)).json()}catch(c){throw d.create("token-subscribe-failed",{errorInfo:c==null?void 0:c.toString()})}if(a.error){let c=a.error.message;throw d.create("token-subscribe-failed",{errorInfo:c})}if(!a.token)throw d.create("token-subscribe-no-token");return a.token})}function be(e,t){return r(this,null,function*(){let n=yield C(e),i=J(t.subscriptionOptions),o={method:"PATCH",headers:n,body:JSON.stringify(i)},a;try{a=yield(yield fetch(`${M(e.appConfig)}/${t.token}`,o)).json()}catch(c){throw d.create("token-update-failed",{errorInfo:c==null?void 0:c.toString()})}if(a.error){let c=a.error.message;throw d.create("token-update-failed",{errorInfo:c})}if(!a.token)throw d.create("token-update-no-token");return a.token})}function Y(e,t){return r(this,null,function*(){let i={method:"DELETE",headers:yield C(e)};try{let a=yield(yield fetch(`${M(e.appConfig)}/${t}`,i)).json();if(a.error){let c=a.error.message;throw d.create("token-unsubscribe-failed",{errorInfo:c})}}catch(o){throw d.create("token-unsubscribe-failed",{errorInfo:o==null?void 0:o.toString()})}})}function M({projectId:e}){return`${ie}/projects/${e}/registrations`}function C(n){return r(this,arguments,function*({appConfig:e,installations:t}){let i=yield t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${i}`})})}function J({p256dh:e,auth:t,endpoint:n,vapidKey:i}){let o={web:{endpoint:n,auth:t,p256dh:e}};return i!==q&&(o.web.applicationPubKey=i),o}var he=7*24*60*60*1e3;function ve(e){return r(this,null,function*(){let t=yield ke(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:u(t.getKey("auth")),p256dh:u(t.getKey("p256dh"))},i=yield G(e.firebaseDependencies);if(i){if(Te(i.subscriptionOptions,n))return Date.now()>=i.createTime+he?me(e,{token:i.token,createTime:Date.now(),subscriptionOptions:n}):i.token;try{yield Y(e.firebaseDependencies,i.token)}catch(o){console.warn(o)}return B(e.firebaseDependencies,n)}else return B(e.firebaseDependencies,n)})}function ye(e){return r(this,null,function*(){let t=yield G(e.firebaseDependencies);t&&(yield Y(e.firebaseDependencies,t.token),yield le(e.firebaseDependencies));let n=yield e.swRegistration.pushManager.getSubscription();return n?n.unsubscribe():!0})}function me(e,t){return r(this,null,function*(){try{let n=yield be(e.firebaseDependencies,t),i=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});return yield D(e.firebaseDependencies,i),n}catch(n){throw n}})}function B(e,t){return r(this,null,function*(){let i={token:yield we(e,t),createTime:Date.now(),subscriptionOptions:t};return yield D(e,i),i.token})}function ke(e,t){return r(this,null,function*(){let n=yield e.pushManager.getSubscription();return n||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:se(t)})})}function Te(e,t){let n=t.vapidKey===e.vapidKey,i=t.endpoint===e.endpoint,o=t.auth===e.auth,a=t.p256dh===e.p256dh;return n&&i&&o&&a}function U(e){let t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return Se(t,e),_e(t,e),Ee(t,e),t}function Se(e,t){if(!t.notification)return;e.notification={};let n=t.notification.title;n&&(e.notification.title=n);let i=t.notification.body;i&&(e.notification.body=i);let o=t.notification.image;o&&(e.notification.image=o);let a=t.notification.icon;a&&(e.notification.icon=a)}function _e(e,t){t.data&&(e.data=t.data)}function Ee(e,t){var n,i,o,a,c;if(!t.fcmOptions&&!(!((n=t.notification)===null||n===void 0)&&n.click_action))return;e.fcmOptions={};let f=(o=(i=t.fcmOptions)===null||i===void 0?void 0:i.link)!==null&&o!==void 0?o:(a=t.notification)===null||a===void 0?void 0:a.click_action;f&&(e.fcmOptions.link=f);let g=(c=t.fcmOptions)===null||c===void 0?void 0:c.analytics_label;g&&(e.fcmOptions.analyticsLabel=g)}function Ie(e){return typeof e=="object"&&!!e&&V in e}Ae("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");function Ae(e,t){let n=[];for(let i=0;i<e.length;i++)n.push(e.charAt(i)),i<t.length&&n.push(t.charAt(i));return n.join("")}function Ne(e){if(!e||!e.options)throw I("App Configuration Object");
1if(!e.name)throw I("App Name");let t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(let i of t)if(!n[i])throw I(i);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}function I(e){return d.create("missing-app-config-values",{valueName:e})}var A=class{constructor(t,n,i){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;let o=Ne(t);this.firebaseDependencies={app:t,appConfig:o,installations:n,analyticsProvider:i}}_delete(){return Promise.resolve()}};function z(e){return r(this,null,function*(){try{e.swRegistration=yield navigator.serviceWorker.register(te,{scope:ne}),e.swRegistration.update().catch(()=>{})}catch(t){throw d.create("failed-service-worker-registration",{browserErrorMessage:t==null?void 0:t.message})}})}function De(e,t){return r(this,null,function*(){if(!t&&!e.swRegistration&&(yield z(e)),!(!t&&e.swRegistration)){if(!(t instanceof ServiceWorkerRegistration))throw d.create("invalid-sw-registration");e.swRegistration=t}})}function Oe(e,t){return r(this,null,function*(){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=q)})}function Q(e,t){return r(this,null,function*(){if(!navigator)throw d.create("only-available-in-window");if(Notification.permission==="default"&&(yield Notification.requestPermission()),Notification.permission!=="granted")throw d.create("permission-blocked");return yield Oe(e,t==null?void 0:t.vapidKey),yield De(e,t==null?void 0:t.serviceWorkerRegistration),ve(e)})}function Me(e,t,n){return r(this,null,function*(){let i=Ce(t);(yield e.firebaseDependencies.analyticsProvider.get()).logEvent(i,{message_id:n[V],message_name:n[oe],message_time:n[re],message_device_time:Math.floor(Date.now()/1e3)})})}function Ce(e){switch(e){case v.NOTIFICATION_CLICKED:return"notification_open";case v.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function Ke(e,t){return r(this,null,function*(){let n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===v.PUSH_RECEIVED&&(typeof e.onMessageHandler=="function"?e.onMessageHandler(U(n)):e.onMessageHandler.next(U(n)));let i=n.data;Ie(i)&&i[ae]==="1"&&(yield Me(e,n.messageType,i))})}var H="@firebase/messaging",$="0.12.12";var Pe=e=>{let t=new A(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",n=>Ke(t,n)),t},Re=e=>{let t=e.getProvider("messaging").getImmediate();return{getToken:i=>Q(t,i)}};function je(){T(new m("messaging",Pe,"PUBLIC")),T(new m("messaging-internal",Re,"PRIVATE")),S(H,$),S(H,$,"esm2017")}function l(){return r(this,null,function*(){try{yield P()}catch{return!1}return typeof window<"u"&&K()&&R()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")})}function xe(e){return r(this,null,function*(){if(!navigator)throw d.create("only-available-in-window");return e.swRegistration||(yield z(e)),ye(e)})}function Fe(e,t){if(!navigator)throw d.create("only-available-in-window");return e.onMessageHandler=t,()=>{e.onMessageHandler=null}}function y(e=F()){return l().then(t=>{if(!t)throw d.create("unsupported-browser")},t=>{throw d.create("indexed-db-unsupported")}),x(w(e),"messaging").getImmediate()}function X(e,t){return r(this,null,function*(){return e=w(e),Q(e,t)})}function Z(e){return e=w(e),xe(e)}function ee(e,t){return e=w(e),Fe(e,t)}je();var ze=(()=>{class e extends L{constructor(){super(),l().then(n=>{if(!n)return;let i=y();ee(i,o=>this.handleNotificationReceived(o))})}checkPermissions(){return r(this,null,function*(){return(yield l())?{receive:this.convertNotificationPermissionToPermissionState(Notification.permission)}:{receive:"denied"}})}requestPermissions(){return r(this,null,function*(){if(!(yield l()))return{receive:"denied"};let i=yield Notification.requestPermission();return{receive:this.convertNotificationPermissionToPermissionState(i)}})}isSupported(){return r(this,null,function*(){return{isSupported:yield l()}})}getToken(n){return r(this,null,function*(){let i=y();return{token:yield X(i,{vapidKey:n.vapidKey,serviceWorkerRegistration:n.serviceWorkerRegistration})}})}deleteToken(){return r(this,null,function*(){let n=y();yield Z(n)})}getDeliveredNotifications(){return r(this,null,function*(){this.throwUnavailableError()})}removeDeliveredNotifications(n){return r(this,null,function*(){this.throwUnavailableError()})}removeAllDeliveredNotifications(){return r(this,null,function*(){this.throwUnavailableError()})}subscribeToTopic(n){return r(this,null,function*(){this.throwUnavailableError()})}unsubscribeFromTopic(n){return r(this,null,function*(){this.throwUnavailableError()})}createChannel(n){return r(this,null,function*(){this.throwUnavailableError()})}deleteChannel(n){return r(this,null,function*(){this.throwUnavailableError()})}listChannels(){return r(this,null,function*(){this.throwUnavailableError()})}handleNotificationReceived(n){let o={notification:this.createNotificationResult(n)};this.notifyListeners(e.notificationReceivedEvent,o)}createNotificationResult(n){var i,o,a;return{body:(i=n.notification)===null||i===void 0?void 0:i.body,data:n.data,id:n.messageId,image:(o=n.notification)===null||o===void 0?void 0:o.image,title:(a=n.notification)===null||a===void 0?void 0:a.title}}convertNotificationPermissionToPermissionState(n){let i="prompt";switch(n){case"granted":i="granted";break;case"denied":i="denied";break}return i}throwUnavailableError(){throw this.unavailable("Not available on web.")}}return e.notificationReceivedEvent="notificationReceived",e})();export{ze as FirebaseMessagingWeb};
2//# sourceMappingURL=chunk-CHSGBLBB.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.