1import{a as e,r as t}from"./rolldown-runtime-B0Z9INg1.js";import{t as n}from"./preload-helper-CxFQXtKk.js";import{a as r,n as i,o as a}from"./appShell-CVrY4tb3.js";var o=t({NativeBridgeTimeoutError:()=>w,checkNativeAsync:()=>C,despiaAsync:()=>m,despiaCall:()=>p,getAppShell:()=>i,getInstallId:()=>k,getPushPermission:()=>T,hapticNative:()=>x,isDespiaNative:()=>h,openAppSettings:()=>S,openExternal:()=>g,openFileViewer:()=>b,savePageScreenshot:()=>y,saveToCameraRoll:()=>v,shareNative:()=>_,storageVaultRead:()=>D,storageVaultWrite:()=>E}),s=null,c=null;function l(){return!a()||typeof window>`u`?Promise.resolve(null):s||(s=n(()=>import(`./despia-native-B2H-Lrfo.js`).then(t=>e(t.default,1)).then(e=>{let t=e,n=typeof t==`function`?t:t.default??null;return n&&(c=n),n}),[]).catch(()=>null),s)}typeof window<`u`&&l();var u=/^[a-z][a-z0-9+.-]*:\/\//i;function d(e){return u.test(e)?e:`despia://${e}`}function f(e){try{window.location.href=d(e)}catch{}}function p(e){if(!(!a()||typeof window>`u`)){try{if(c){c(d(e));return}}catch{}f(e)}}async function m(e){if(!a()||typeof window>`u`)return!1;let t=await Promise.race([l(),new Promise(e=>window.setTimeout(()=>e(null),1200))]);if(t)try{return await Promise.race([Promise.resolve(t(d(e))),new Promise((e,t)=>window.setTimeout(()=>t(Error(`Native command timed out`)),1200))]),!0}catch{}return f(e),!0}function h(){return r()}function g(e){if(!(!a()||typeof window>`u`))try{window.open(e,`_blank`)}catch{}}function _(e,t){p(`shareapp://${`message?=${encodeURIComponent(e)}&url=${encodeURIComponent(t)}`}`)}function v(e){p(`savethisimage://?url=${encodeURIComponent(e)}`)}function y(){p(`takescreenshot://`)}function b(e,t){if(!a()||typeof window>`u`)return;let n=e.trim();try{n=new URL(n,location.href).href}catch{}if(!n.startsWith(`https://`))return;let r=new URLSearchParams({src:n});t&&r.set(`theme`,t),p(`fileviewer://?${r.toString()}`)}function x(e=`light`){p(`${{light:`lighthaptic`,medium:`lighthaptic`,heavy:`heavyhaptic`,selection:`lighthaptic`,success:`successhaptic`,warning:`warninghaptic`,error:`errorhaptic`}[e]}://`)}function S(){p(`settingsapp://`)}async function C(e,t,n){if(!a()||typeof window>`u`)return{};let r=n?.timeoutMs,i,o=r&&r>0?new Promise((t,n)=>{i=window.setTimeout(()=>n(new w(e)),r)}):null;try{let n=o?await Promise.race([l(),o]):await l();if(!n)return{};let r=Promise.resolve(n(d(e),t));return(o?await Promise.race([r,o]):await r)??{}}catch(e){if(n?.throwOnTimeout&&e instanceof w)throw e;return{}}finally{i!==void 0&&window.clearTimeout(i)}}var w=class extends Error{constructor(e){super(`Native bridge timed out: ${e}`),this.name=`NativeBridgeTimeoutError`}};function T(){if(typeof window>`u`)return`default`;try{if(typeof Notification<`u`&&Notification.permission)return Notification.permission}catch{}return`default`}function E(e,t,n=!1){p(`setvault://?${new URLSearchParams({key:e,value:t,locked:n?`true`:`false`}).toString()}`)}async function D(e){if(!a())return null;let t=(await C(`readvault://?${new URLSearchParams({key:e}).toString()}`,[e]))[e];return typeof t==`string`?t:t==null?null:String(t)}var O=`despia_install_fallback`;async function k(){if(typeof window<`u`&&a())try{let e=(await l())?.uuid;if(typeof e==`string`&&e.length>0)return e}catch{}try{let e=localStorage.getItem(O);if(e)return e;let t=globalThis.crypto?.randomUUID?.()??`fb_${Date.now()}_${Math.random().toString(36).slice(2)}`;return localStorage.setItem(O,t),t}catch{return`fb_${Date.now()}_${Math.random().toString(36).slice(2)}`}}export{k as a,g as c,E as d,o as i,_ as l,m as n,T as o,p as r,S as s,C as t,D as u};
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.