@fkn/lib 0.9.45 → 0.9.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{account-generation-B-6Pn0b5.cjs → account-generation-9VhfEDoW.cjs} +1 -1
- package/{account-generation-XNWOvLea.js → account-generation-hUekEHGW.js} +1 -1
- package/account.cjs +1 -1
- package/account.js +2 -2
- package/{api-Cuf3ynZX.d.ts → api-DIBhBtcU.d.ts} +2 -24
- package/api-DMnVye0K.cjs +3 -0
- package/{api-DIgTslNb.js → api-ySazPAwN.js} +97 -59
- package/api.cjs +1 -1
- package/api.d.ts +2 -2
- package/api.js +1 -1
- package/busy-BXbVH595.cjs +1 -0
- package/{busy-B189uX--.js → busy-DsMWrSzc.js} +6 -3
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -1
- package/cloud/fs/promises.d.ts +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +2 -2
- package/cloud/fs.js +2 -2
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +2 -2
- package/cloud-BD7uzz5h.js +548 -0
- package/{cloud-KBzjWzt1.d.ts → cloud-Bdw5nX-B.d.ts} +4 -4
- package/cloud-DL4i8kvf.cjs +1 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +4 -4
- package/cloud.js +2 -2
- package/{contract-DP_jc5pZ.d.ts → contract-LOcbTDjP.d.ts} +8 -55
- package/contract.cjs +1 -1
- package/contract.d.ts +4 -4
- package/contract.js +3 -9
- package/dgram.cjs +1 -1
- package/dgram.d.ts +3 -3
- package/dgram.js +19 -19
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -1
- package/dns.js +1 -1
- package/extension-BeIkBEi3.js +94 -0
- package/{extension-X8cnvZej.d.ts → extension-Bsvr9OaV.d.ts} +21 -3
- package/extension-eG1RMTDc.cjs +1 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +2 -2
- package/extension.js +3 -3
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +1 -1
- package/fs/promises.js +1 -1
- package/fs-BY0Csn2V.js +515 -0
- package/fs-DnF1cQuE.cjs +1 -0
- package/{fs-KA1Mgisv.d.ts → fs-lKZe5xIo.d.ts} +1 -1
- package/fs.cjs +1 -1
- package/fs.d.ts +2 -2
- package/fs.js +2 -2
- package/http.d.ts +1 -1
- package/{index-DKr9L2RI.d.ts → index-D9x6A-Gx.d.ts} +1 -1
- package/{index-C8Y-YHrU.d.ts → index-iawzrUiB.d.ts} +92 -33
- package/index.cjs +1 -1
- package/index.d.ts +9 -8
- package/index.js +30 -32
- package/lib-CK2F5cc1.cjs +53 -0
- package/{lib-H5-e2A1h.js → lib-zMHWCUXz.js} +677 -497
- package/{net-eyWUIVn2.d.ts → net-taIhsmvu.d.ts} +5 -5
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +11 -12
- package/{node-fs-CK2wWIYS.js → node-fs-DY2fO5zd.js} +1 -1
- package/{node-fs-nfX7wisL.cjs → node-fs-vsWuoMGa.cjs} +1 -1
- package/opfs.cjs +1 -1
- package/opfs.js +1 -1
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.d.ts +1 -1
- package/packages.js +2 -2
- package/{proxy-Dixbk1WL.js → proxy-BXkxwBxK.js} +2 -2
- package/{proxy-CFK-KiwE.cjs → proxy-BfkfFsNI.cjs} +1 -1
- package/{proxy-8Zp-G5da.d.ts → proxy-CSKLtRTm.d.ts} +2 -2
- package/rooms.cjs +1 -1
- package/rooms.d.ts +1 -1
- package/rooms.js +13 -21
- package/{storage-BLBsmkmp.d.ts → storage-B_mXNAdB.d.ts} +4 -5
- package/{storage-Dn1gTLSZ.js → storage-C6F9SnDM.js} +2 -2
- package/{storage-D2cUJlVH.cjs → storage-DmRIhg1P.cjs} +1 -1
- package/utils-BpHmMkIR.cjs +1 -0
- package/{utils-C-cAd4r4.js → utils-Cyq8uJiy.js} +7 -9
- package/{wire-BwA4JjZH.d.ts → wire-Fk5pJaoy.d.ts} +8 -1
- package/wire.cjs +1 -1
- package/wire.d.ts +2 -2
- package/wire.js +2 -2
- package/api--LOXTOpv.cjs +0 -3
- package/busy-Dv8wzE5M.cjs +0 -1
- package/cloud-CKCrMMB_.cjs +0 -1
- package/cloud-CVWGyZRT.js +0 -559
- package/extension-Dmnh5pcs.js +0 -94
- package/extension-YBe6Q6r_.cjs +0 -1
- package/fs-CVnmXRf7.js +0 -513
- package/fs-p0bOOj5n.cjs +0 -1
- package/lib-D4uqe_rb.cjs +0 -53
- package/utils-BvgGdrgN.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./api
|
|
1
|
+
const e=require("./api-DMnVye0K.cjs");var t=0,n=new Set,r=2e3,i=null,a=e=>{e?.switched!==!1&&(t+=1,i&&=(clearTimeout(i.timer),null));for(let e of[...n])try{e()}catch{}},o=!1,s=0,c=()=>{let t=e.c();t&&s!==t.epoch&&(s=t.epoch,Promise.resolve(t.remote.account.onChange(a)).catch(()=>{s===t.epoch&&(s=0)}))},l=()=>{!o&&e.l&&(o=!0,e.u(c))},u=()=>t,d=e=>(n.add(e),l(),()=>{n.delete(e)}),f=e=>{if(e!==t||i?.generation===e)return;let n=setTimeout(()=>{i?.timer===n&&(i=null,t===e&&a({switched:!0}))},r);i={generation:e,timer:n}};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e, l as t, u as n } from "./api-
|
|
1
|
+
import { c as e, l as t, u as n } from "./api-ySazPAwN.js";
|
|
2
2
|
//#region src/account-generation.ts
|
|
3
3
|
var r = 0, i = /* @__PURE__ */ new Set(), a = 2e3, o = null, s = (e) => {
|
|
4
4
|
e?.switched !== !1 && (r += 1, o &&= (clearTimeout(o.timer), null));
|
package/account.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-DMnVye0K.cjs"),n=require("./account-generation-9VhfEDoW.cjs");var r=e.t({info:()=>o,login:()=>i,logout:()=>a,onChange:()=>s}),i=async()=>typeof window>`u`?!1:(await t.o).account.login(location.origin).catch(()=>!1),a=async()=>{typeof window<`u`&&await(await t.o).account.logout().catch(()=>{})},o=async()=>{if(typeof window>`u`)return null;let e=await t.o.then(e=>e.account.info()).catch(()=>null);return e?{name:e.name,image:e.image,premium:e.premium,premiumUntil:e.premiumUntil?Date.parse(e.premiumUntil):null}:null},s=async e=>t.l?n.i(e):()=>{};exports.info=o,exports.login=i,exports.logout=a,exports.onChange=s,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
package/account.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { l as t, o as n } from "./api-
|
|
3
|
-
import { i as r } from "./account-generation-
|
|
2
|
+
import { l as t, o as n } from "./api-ySazPAwN.js";
|
|
3
|
+
import { i as r } from "./account-generation-hUekEHGW.js";
|
|
4
4
|
//#region src/account.ts
|
|
5
5
|
var i = /* @__PURE__ */ e({
|
|
6
6
|
info: () => s,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as TcpSocketOption,
|
|
1
|
+
import { D as IpFamily, Dt as UdpSocketOptions, Et as UdpDatagram, H as ProxyFetchInput, I as PackagesErrorCode, J as RoomClaimOptions, K as Resolvers, N as OverlayState, Nt as WriteData, P as PackageQuery, Q as RoomEvent, R as PickOptions, St as TcpSocketListenerOptions, T as InstallOptions, V as ProxyFetchInit, a as AccountChange, at as RoomPermission, b as FrameConsentAnswer, c as AdoptRequest, d as ConflictRequest, et as RoomJoinOptions, it as RoomOpenOptions, l as AdoptState, m as ConnectOptions, o as AccountPinOptions, p as ConnectAvailability, st as RoomsErrorCode, tt as RoomMailbox, u as ConflictChoice, wt as TcpSocketOptions, x as FrameConsentRequest, z as Placement } from "./contract-LOcbTDjP.js";
|
|
2
|
+
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-Fk5pJaoy.js";
|
|
3
3
|
import { Remote } from "osra";
|
|
4
4
|
//#region src/api-epochs.d.ts
|
|
5
5
|
type EpochListener<T> = (remote: T, epoch: number) => void;
|
|
@@ -724,17 +724,6 @@ declare const onApiEpoch: (listener: EpochListener<{
|
|
|
724
724
|
onUpdateTaken: (callback: () => void) => Promise<() => Promise<void>>;
|
|
725
725
|
applyUpdate: () => Promise<boolean>;
|
|
726
726
|
};
|
|
727
|
-
proxyJar: {
|
|
728
|
-
key: (options?: {
|
|
729
|
-
prompt?: boolean;
|
|
730
|
-
} | undefined) => Promise<{
|
|
731
|
-
key: Uint8Array;
|
|
732
|
-
jar: string;
|
|
733
|
-
verified: boolean;
|
|
734
|
-
} | {
|
|
735
|
-
refused: ProxyJarRefusal;
|
|
736
|
-
}>;
|
|
737
|
-
};
|
|
738
727
|
proxyFetch: (input: ProxyFetchInput, init: ProxyFetchInit) => Promise<Response>;
|
|
739
728
|
webVpnTcpSocket: (options: TcpSocketOptions) => Promise<{
|
|
740
729
|
localAddress: string;
|
|
@@ -1473,17 +1462,6 @@ declare const currentApiEpoch: () => {
|
|
|
1473
1462
|
onUpdateTaken: (callback: () => void) => Promise<() => Promise<void>>;
|
|
1474
1463
|
applyUpdate: () => Promise<boolean>;
|
|
1475
1464
|
};
|
|
1476
|
-
proxyJar: {
|
|
1477
|
-
key: (options?: {
|
|
1478
|
-
prompt?: boolean;
|
|
1479
|
-
} | undefined) => Promise<{
|
|
1480
|
-
key: Uint8Array;
|
|
1481
|
-
jar: string;
|
|
1482
|
-
verified: boolean;
|
|
1483
|
-
} | {
|
|
1484
|
-
refused: ProxyJarRefusal;
|
|
1485
|
-
}>;
|
|
1486
|
-
};
|
|
1487
1465
|
proxyFetch: (input: ProxyFetchInput, init: ProxyFetchInit) => Promise<Response>;
|
|
1488
1466
|
webVpnTcpSocket: (options: TcpSocketOptions) => Promise<{
|
|
1489
1467
|
localAddress: string;
|
package/api-DMnVye0K.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
let e=require("osra");var t=1e4,n=16,r=e=>{let t;try{t=e.contentWindow}catch{return!0}if(!t)return!0;try{let e=t.location.href;return e!==``&&e!==`about:blank`}catch{return!0}},i=(e,i=t)=>new Promise(t=>{if(r(e))return t();let a=()=>{clearInterval(o),clearTimeout(s),e.removeEventListener(`load`,a),t()},o=setInterval(()=>{r(e)&&a()},n),s=setTimeout(a,i);e.addEventListener(`load`,a)}),a=32,o=8,s=120,c=typeof CSS<`u`&&CSS.supports(`clip-path`,`path('M0 0H1V1H0Z')`),l=typeof CSS<`u`&&CSS.supports(`clip-path`,`polygon(nonzero, 0px 0px, 1px 0px, 1px 1px)`),u=e=>{let t=e.style;t.setProperty(`display`,`block`,`important`),t.setProperty(`position`,`fixed`,`important`),t.setProperty(`top`,`0`,`important`),t.setProperty(`left`,`0`,`important`),t.setProperty(`width`,`100%`,`important`),t.setProperty(`height`,`100%`,`important`),t.setProperty(`border`,`none`,`important`),t.setProperty(`padding`,`0`,`important`),t.setProperty(`box-sizing`,`border-box`,`important`),t.setProperty(`clip-path`,`inset(100%)`,`important`),t.setProperty(`background`,`transparent`),t.setProperty(`color-scheme`,`normal`),t.setProperty(`z-index`,`2147483647`),e.setAttribute(`title`,`FKN`)},d=({x:e,y:t,width:n,height:r,radius:i})=>{if(!i)return`M${e} ${t}h${n}v${r}h${-n}Z`;let a=Math.min(n,r)/2,[o,s,c,l]=i.map(e=>Math.max(0,Math.min(e,a)));return`M${e+o} ${t}h${n-o-s}a${s} ${s} 0 0 1 ${s} ${s}v${r-s-c}a${c} ${c} 0 0 1 ${-c} ${c}h${-(n-c-l)}a${l} ${l} 0 0 1 ${-l} ${-l}v${-(r-l-o)}a${o} ${o} 0 0 1 ${o} ${-o}Z`},f=()=>c&&l,p=({x:e,y:t,width:n,height:r})=>[[e,t],[e+n,t],[e+n,t+r],[e,t+r],[e,t]],m=e=>{let t=e[0];if(!t)return[];let n=p(t)[0],r=[];return e.forEach((t,i)=>{r.push(...p(t)),i>0&&i<e.length-1&&r.push(n)}),r},h=e=>`polygon(nonzero, ${m(e).map(([e,t])=>`${e}px ${t}px`).join(`, `)})`,g=({x:e,y:t,width:n,height:r,radius:i},a)=>{let o=`${t}px ${a.width-e-n}px ${a.height-t-r}px ${e}px`;return i?`inset(${o} round ${i.map(e=>`${e}px`).join(` `)})`:`inset(${o})`},ee=(e,t,n)=>{if(t)return`none`;if(e.length===0)return`inset(100%)`;let r=e.length===1?e[0]:void 0;return r?g(r,n):l&&e.length<=5&&!e.some(e=>e.radius)?h(e):`path('${e.map(d).join(``)}')`},_=e=>{if(e.length<2)return null;let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y));return{x:t,y:n,width:Math.max(...e.map(e=>e.x+e.width))-t,height:Math.max(...e.map(e=>e.y+e.height))-n}},te=(e,t,n)=>t>=e.x&&t<e.x+e.width&&n>=e.y&&n<e.y+e.height,ne=16,v=(e,t,n)=>t===1?e*ne:t===2?e*n:e,re=(e,t,n)=>{let r=getComputedStyle(e);return n!==0&&/auto|scroll/.test(r.overflowY)&&e.scrollHeight>e.clientHeight?!0:t!==0&&/auto|scroll/.test(r.overflowX)&&e.scrollWidth>e.clientWidth},ie=(e,t,n)=>{for(let r=e;r;r=r.parentElement)if(re(r,t,n))return r;return document.scrollingElement},y=null,b=null,x=e=>({width:e.offsetWidth||window.innerWidth,height:e.offsetHeight||window.innerHeight}),S=e=>{if(!b||!y||!te(b,e.clientX,e.clientY))return;let t=document.elementFromPoint(e.clientX,e.clientY);if(!t||t===y)return;let n=v(e.deltaX,e.deltaMode,window.innerWidth),r=v(e.deltaY,e.deltaMode,window.innerHeight),i=ie(t,n,r);i&&(i.scrollBy({left:n,top:r,behavior:`instant`}),e.cancelable&&e.preventDefault())},ae=e=>{let t=b!==null;b=e,t!==(e!==null)&&(e?window.addEventListener(`wheel`,S,{capture:!0,passive:!1}):window.removeEventListener(`wheel`,S,{capture:!0}))},C=0,oe=e=>{if(e===C)return;C=e;let t=document.documentElement.style;e>0?(t.setProperty(`margin-top`,`${e}px`,`important`),t.setProperty(`--fkn-inset-top`,`${e}px`)):(t.removeProperty(`margin-top`),t.removeProperty(`--fkn-inset-top`))},w=(e,{modal:t,rects:n,inset:r},i)=>{if(oe(r),!c){let r=t||n.length>0;e.style.setProperty(`pointer-events`,r?`auto`:`none`,`important`),e.style.setProperty(`visibility`,r?`visible`:`hidden`,`important`);return}let a=ee(n,t,i),o=a===`none`||CSS.supports(`clip-path`,a)?a:`inset(100%)`;e.style.setProperty(`clip-path`,o,`important`),ae(t||o!==a?null:_(n))},se=e=>{if(typeof e!=`object`||!e)return 0;let{top:t}=e;return typeof t!=`number`||!Number.isFinite(t)||t<=0?0:Math.min(Math.round(t),s)},ce=e=>{if(Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`&&Number.isFinite(e)&&e>=0))return e.some(e=>e>0)?e:void 0},le=(e,t)=>{if(typeof e!=`object`||!e)return null;let{x:n,y:r,width:i,height:a}=e;if(![n,r,i,a].every(e=>typeof e==`number`&&Number.isFinite(e)))return null;let o=t.width,s=t.height,c=Math.max(0,Math.min(Math.round(n),o)),l=Math.max(0,Math.min(Math.round(r),s)),u=Math.max(c,Math.min(Math.round(n+i),o)),d=Math.max(l,Math.min(Math.round(r+a),s)),f=ce(e.radius);return{x:c,y:l,width:u-c,height:d-l,...f?{radius:f}:{}}},T={"not-rendered":`this page is not painting it at all, so it or an ancestor is display:none, or the frame was moved out of the layout`,clipped:`it is clipped away or positioned outside the viewport`,"not-shown":`it is rendered but would not be seen, so either something is drawn over it, or it or an ancestor has opacity below 1, visibility:hidden, or a filter`},ue=e=>Array.isArray(e)?e.slice(0,o).flatMap(e=>{if(typeof e!=`object`||!e)return[];let{kind:t,cause:n,level:r}=e;return typeof t!=`string`||t.length>40||typeof n!=`string`||!(n in T)||r!==`full`&&r!==`liveness`?[]:[{kind:t,cause:n,level:r}]}):[],E=new Set,de=e=>{for(let{kind:t,cause:n,level:r}of e)E.has(t)||(E.add(t),console.error(`[FKN] The FKN ${JSON.stringify(t)} is not visible on this page: ${T[n]}. Nobody using this page can see or answer it.
|
|
2
|
+
@fkn/lib draws its UI inside <iframe title="FKN"> and sets display, position, top, left, width, height, border, padding, box-sizing, clip-path and z-index on that element. Leave those as they are, then check for an ancestor with opacity, visibility, display or a clipping transform, and for an element stacked above it.`+(r===`liveness`?`
|
|
3
|
+
This browser reports limited detail, so the cause above is a best guess.`:``)))},D=(e,t)=>{if(typeof e!=`object`||!e)return null;let n=e,r=(Array.isArray(n.rects)?n.rects.slice(0,a):[]).map(e=>le(e,t)).filter(e=>e!==null&&e.width>0&&e.height>0);return{modal:n.modal===!0,rects:r,hidden:ue(n.hidden),inset:se(n.inset)}},fe=()=>y!==null,O=null,k=null,pe=()=>{if(!y||O===null)return;let e=x(y),t=D(O,e);t&&w(y,t,e)},me=e=>{typeof ResizeObserver<`u`&&(k??=new ResizeObserver(pe),k.disconnect(),k.observe(e))},he=e=>{u(e),w(e,{modal:!1,rects:[],hidden:[],inset:0},x(e)),y=e,me(e)},ge=e=>{if(!y)return;let t=x(y),n=D(e,t);n&&(O=e,w(y,n,t),de(n.hidden))},_e=[`fkn.app`,`fkn.dev`,`sdbx.app`,`fkn.cloudflareaccess.com`,`horionsoftware.com`,`62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com`,`web-b3z.pages.dev`,`fkn-console.pages.dev`,`dev-dms.pages.dev`,`fkn-www.pages.dev`,`fkn-homepage.pages.dev`,`fkn-sandbox.pages.dev`,`internal-3ar.pages.dev`,`stub-ben.pages.dev`,`ripple-3t3.pages.dev`,`media-player-e3s.pages.dev`,`youtube-3c4.pages.dev`,`horionsoftware.pages.dev`,`container-ckf.pages.dev`,`stub-plugin.pages.dev`,`stub.plugins.banou.dev`],ve=e=>e.replace(/\.+$/,``),ye=[`79.127.204.69`,`152.233.49.59`],A=e=>{let t;try{t=new URL(`http://${e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}/`).hostname}catch{return}let n=/^\[(?:::ffff:|64:ff9b::)([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(n){let e=parseInt(n[1],16),t=parseInt(n[2],16);return[e>>8,e&255,t>>8,t&255].join(`.`)}return/^\d+\.\d+\.\d+\.\d+$/.test(t)?t:void 0},j=e=>{let t=ve(e);if(_e.some(e=>t===e||t.endsWith(`.${e}`)))return!0;let n=A(t);return n!==void 0&&ye.includes(n)},M=e=>{let t=typeof e==`string`?e:e instanceof URL?e.href:e.url,n;try{n=new URL(t)}catch{return}if(j(n.hostname))throw Error(`fetch refuses FKN platform domains (${n.hostname})`)},N=`autoplay.fullscreen.picture-in-picture.encrypted-media.screen-wake-lock.speaker-selection.captured-surface-control.camera.microphone.display-capture.geolocation.midi.usb.serial.hid.bluetooth.gamepad.keyboard-map.xr-spatial-tracking.accelerometer.gyroscope.magnetometer.ambient-light-sensor.compute-pressure.clipboard-read.clipboard-write.storage-access.window-management.local-fonts.idle-detection.web-share.sync-xhr.unload.payment.publickey-credentials-get.publickey-credentials-create.otp-credentials.identity-credentials-get.digital-credentials-get.local-network.local-network-access.loopback-network`.split(`.`),P=()=>{try{let e=globalThis.document?.featurePolicy?.features?.();return e===void 0?void 0:new Set(e)}catch{return}},F=(e=!0,t=P())=>[...N,...e?[`cross-origin-isolated`]:[]].filter(e=>t===void 0||t.has(e)).join(`; `),I=`https://fkn.app`,L=typeof globalThis<`u`&&globalThis.document?globalThis.document:void 0,R=typeof globalThis<`u`&&globalThis.crossOriginIsolated===!0,z=`${I}/api${R?`?coi=1`:``}`,be=`fkn-api-port`,xe=`fkn-api-port-ack`,Se=2e3,Ce=()=>{if(!L||typeof window>`u`||window.parent===window)return Promise.resolve(void 0);let e;try{e=window.parent}catch{return Promise.resolve(void 0)}let t=new MessageChannel;return new Promise(n=>{let r=e=>{if(clearTimeout(a),t.port1.removeEventListener(`message`,i),!e)try{t.port1.close()}catch{}n(e)},i=e=>{e.data?.type===xe&&r(t.port1)},a=setTimeout(()=>r(void 0),Se);t.port1.addEventListener(`message`,i),t.port1.start();try{e.postMessage({type:be},I,[t.port2])}catch{r(void 0)}})},B,we=()=>{if(B||!L)return B;let e=L.querySelector(`iframe[src="${z}"]`);if(e)B=e;else{let e=L.createElement(`iframe`);e.setAttribute(`allow`,F(R)),e.src=z,L.body.appendChild(e),B=e}return he(B),B},V=(async()=>{if(!L)return;let e=await Ce();if(e)return{receive:e,emit:e};let t=we();if(!t)return;await i(t);let n=t.contentWindow;return n?{receive:window,emit:n}:void 0})(),Te=(e,{boundRetired:t=e=>e}={})=>{let n,r=0,i=!1,a=()=>{},o=()=>new Promise(e=>{a=e}),s=o(),c=s,l=new Set,u=new Set,d=0,f=0,p=()=>{let e=[...u];u.clear();let t=Error(`FKN: the broker was replaced while this call was pending; retry it`);for(let n of e)try{n(t)}catch{}};(async()=>{for await(let t of e){let e=++r;n={remote:t,epoch:e};let i=a;s=o(),i(t),p();for(let n of[...l])try{n(t,e)}catch{}}})().catch(()=>{});let m=async(e,r)=>{let a=n?.remote??await(i?t(s):s);for(let t of e.slice(0,-1))a=a[t];let o=a[e[e.length-1]??``];d=Date.now(),f+=1;let c=()=>{},l=new Promise((e,t)=>{c=t});u.add(c);try{return await Promise.race([Promise.resolve(o.apply(a,r)),l])}finally{--f,u.delete(c),d=Date.now()}},h=new Map,g=e=>{let t=e.join(`\0`),r=h.get(t);if(r)return r;let i=new Proxy(function(){},{get:(t,r)=>{if(typeof r!=`string`||r===`then`)return;let i=n;if(i){let t=i.remote;for(let n of e)t=t?.[n];if(t?.[r]===void 0)return}return g([...e,r])},apply:(t,n,r)=>m(e,r)});return h.set(t,i),i};return{facade:g([]),first:c.then(()=>{}),current:()=>n,onEpoch:e=>{if(l.add(e),n)try{e(n.remote,n.epoch)}catch{}return()=>{l.delete(e)}},lastCall:()=>d,inFlight:()=>f,routable:()=>n?Promise.resolve():s.then(()=>{}),retire:()=>{i=!0,n=void 0,p()}}},H=!1,U=new Set,W=()=>H,Ee=()=>{if(!H){H=!0;for(let e of[...U])try{e()}catch{}U.clear()}},G=e=>{H?e():U.add(e)},De=typeof window<`u`||typeof self<`u`,Oe=async()=>{if(typeof window<`u`)return V;if(typeof self<`u`)return{receive:self,emit:self}},ke=`fkn-api`,Ae=`fkn-api-window`,K=Te({async*[Symbol.asyncIterator](){let t=await Oe();if(!t){await new Promise(()=>{});return}if(!W()){let n=new AbortController;G(()=>n.abort());for await(let r of(0,e.expose)({},{key:ke,transport:t,unregisterSignal:n.signal})){if(n.signal.aborted)break;yield r}}yield*(0,e.expose)({},{key:Ae,transport:t})}},{boundRetired:e=>Q(e,()=>new Z)});G(()=>K.retire());var q=Promise.race([K.first,new Promise(e=>G(e))]).then(()=>K.facade),J=8e3,je=1e3,Y=!1,X=class extends Error{constructor(e,t){super(`@fkn/lib: no broker connection within ${t}ms, so ${e} could not be requested`),this.name=`BrokerUnreachableError`}},Z=class extends Error{constructor(){super(`FKN @fkn/lib: this page relays its FKN channel to a worker, and the FKN page it reached predates a channel of the page's own; reload`),this.name=`OwnChannelUnavailableError`}},Q=(e,t)=>{let n=Y?je:J;return Promise.race([e,new Promise((e,r)=>setTimeout(()=>{Y=!0,r(t(n))},n))])},Me=e=>W()?Q(K.routable().then(()=>K.facade),()=>new Z):Q(q,t=>new X(e,t));G(()=>{let e=setTimeout(()=>console.error(new Z),J);K.routable().then(()=>clearTimeout(e))});var $=K.onEpoch,Ne=K.current,Pe=K.lastCall,Fe=K.inFlight;$(e=>{fe()&&e.overlay.setHost(ge,{exactClips:f()}).catch(()=>{})}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return $}});
|
|
@@ -45,12 +45,12 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
45
45
|
}, h = (e) => `polygon(nonzero, ${m(e).map(([e, t]) => `${e}px ${t}px`).join(", ")})`, g = ({ x: e, y: t, width: n, height: r, radius: i }, a) => {
|
|
46
46
|
let o = `${t}px ${a.width - e - n}px ${a.height - t - r}px ${e}px`;
|
|
47
47
|
return i ? `inset(${o} round ${i.map((e) => `${e}px`).join(" ")})` : `inset(${o})`;
|
|
48
|
-
},
|
|
48
|
+
}, ee = (e, t, n) => {
|
|
49
49
|
if (t) return "none";
|
|
50
50
|
if (e.length === 0) return "inset(100%)";
|
|
51
51
|
let r = e.length === 1 ? e[0] : void 0;
|
|
52
52
|
return r ? g(r, n) : l && e.length <= 5 && !e.some((e) => e.radius) ? h(e) : `path('${e.map(d).join("")}')`;
|
|
53
|
-
},
|
|
53
|
+
}, _ = (e) => {
|
|
54
54
|
if (e.length < 2) return null;
|
|
55
55
|
let t = Math.min(...e.map((e) => e.x)), n = Math.min(...e.map((e) => e.y));
|
|
56
56
|
return {
|
|
@@ -84,26 +84,26 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
84
84
|
capture: !0,
|
|
85
85
|
passive: !1
|
|
86
86
|
}) : window.removeEventListener("wheel", S, { capture: !0 }));
|
|
87
|
-
}, C = 0,
|
|
87
|
+
}, C = 0, oe = (e) => {
|
|
88
88
|
if (e === C) return;
|
|
89
89
|
C = e;
|
|
90
90
|
let t = document.documentElement.style;
|
|
91
91
|
e > 0 ? (t.setProperty("margin-top", `${e}px`, "important"), t.setProperty("--fkn-inset-top", `${e}px`)) : (t.removeProperty("margin-top"), t.removeProperty("--fkn-inset-top"));
|
|
92
|
-
},
|
|
93
|
-
if (
|
|
92
|
+
}, w = (e, { modal: t, rects: n, inset: r }, i) => {
|
|
93
|
+
if (oe(r), !c) {
|
|
94
94
|
let r = t || n.length > 0;
|
|
95
95
|
e.style.setProperty("pointer-events", r ? "auto" : "none", "important"), e.style.setProperty("visibility", r ? "visible" : "hidden", "important");
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
let a =
|
|
99
|
-
e.style.setProperty("clip-path", o, "important"), ae(t || o !== a ? null :
|
|
100
|
-
},
|
|
98
|
+
let a = ee(n, t, i), o = a === "none" || CSS.supports("clip-path", a) ? a : "inset(100%)";
|
|
99
|
+
e.style.setProperty("clip-path", o, "important"), ae(t || o !== a ? null : _(n));
|
|
100
|
+
}, se = (e) => {
|
|
101
101
|
if (typeof e != "object" || !e) return 0;
|
|
102
102
|
let { top: t } = e;
|
|
103
103
|
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 0 : Math.min(Math.round(t), s);
|
|
104
|
-
},
|
|
104
|
+
}, ce = (e) => {
|
|
105
105
|
if (Array.isArray(e) && e.length === 4 && e.every((e) => typeof e == "number" && Number.isFinite(e) && e >= 0)) return e.some((e) => e > 0) ? e : void 0;
|
|
106
|
-
},
|
|
106
|
+
}, le = (e, t) => {
|
|
107
107
|
if (typeof e != "object" || !e) return null;
|
|
108
108
|
let { x: n, y: r, width: i, height: a } = e;
|
|
109
109
|
if (![
|
|
@@ -112,7 +112,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
112
112
|
i,
|
|
113
113
|
a
|
|
114
114
|
].every((e) => typeof e == "number" && Number.isFinite(e))) return null;
|
|
115
|
-
let o = t.width, s = t.height, c = Math.max(0, Math.min(Math.round(n), o)), l = Math.max(0, Math.min(Math.round(r), s)), u = Math.max(c, Math.min(Math.round(n + i), o)), d = Math.max(l, Math.min(Math.round(r + a), s)), f =
|
|
115
|
+
let o = t.width, s = t.height, c = Math.max(0, Math.min(Math.round(n), o)), l = Math.max(0, Math.min(Math.round(r), s)), u = Math.max(c, Math.min(Math.round(n + i), o)), d = Math.max(l, Math.min(Math.round(r + a), s)), f = ce(e.radius);
|
|
116
116
|
return {
|
|
117
117
|
x: c,
|
|
118
118
|
y: l,
|
|
@@ -120,54 +120,92 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
120
120
|
height: d - l,
|
|
121
121
|
...f ? { radius: f } : {}
|
|
122
122
|
};
|
|
123
|
-
},
|
|
123
|
+
}, T = {
|
|
124
124
|
"not-rendered": "this page is not painting it at all, so it or an ancestor is display:none, or the frame was moved out of the layout",
|
|
125
125
|
clipped: "it is clipped away or positioned outside the viewport",
|
|
126
126
|
"not-shown": "it is rendered but would not be seen, so either something is drawn over it, or it or an ancestor has opacity below 1, visibility:hidden, or a filter"
|
|
127
|
-
},
|
|
127
|
+
}, ue = (e) => Array.isArray(e) ? e.slice(0, o).flatMap((e) => {
|
|
128
128
|
if (typeof e != "object" || !e) return [];
|
|
129
129
|
let { kind: t, cause: n, level: r } = e;
|
|
130
|
-
return typeof t != "string" || t.length > 40 || typeof n != "string" || !(n in
|
|
130
|
+
return typeof t != "string" || t.length > 40 || typeof n != "string" || !(n in T) || r !== "full" && r !== "liveness" ? [] : [{
|
|
131
131
|
kind: t,
|
|
132
132
|
cause: n,
|
|
133
133
|
level: r
|
|
134
134
|
}];
|
|
135
|
-
}) : [],
|
|
136
|
-
for (let { kind: t, cause: n, level: r } of e)
|
|
135
|
+
}) : [], E = /* @__PURE__ */ new Set(), de = (e) => {
|
|
136
|
+
for (let { kind: t, cause: n, level: r } of e) E.has(t) || (E.add(t), console.error(`[FKN] The FKN ${JSON.stringify(t)} is not visible on this page: ${T[n]}. Nobody using this page can see or answer it.
|
|
137
137
|
@fkn/lib draws its UI inside <iframe title="FKN"> and sets display, position, top, left, width, height, border, padding, box-sizing, clip-path and z-index on that element. Leave those as they are, then check for an ancestor with opacity, visibility, display or a clipping transform, and for an element stacked above it.` + (r === "liveness" ? "\nThis browser reports limited detail, so the cause above is a best guess." : "")));
|
|
138
|
-
},
|
|
138
|
+
}, D = (e, t) => {
|
|
139
139
|
if (typeof e != "object" || !e) return null;
|
|
140
|
-
let n = e, r = (Array.isArray(n.rects) ? n.rects.slice(0, a) : []).map((e) =>
|
|
140
|
+
let n = e, r = (Array.isArray(n.rects) ? n.rects.slice(0, a) : []).map((e) => le(e, t)).filter((e) => e !== null && e.width > 0 && e.height > 0);
|
|
141
141
|
return {
|
|
142
142
|
modal: n.modal === !0,
|
|
143
143
|
rects: r,
|
|
144
|
-
hidden:
|
|
145
|
-
inset:
|
|
144
|
+
hidden: ue(n.hidden),
|
|
145
|
+
inset: se(n.inset)
|
|
146
146
|
};
|
|
147
|
-
},
|
|
148
|
-
if (!y ||
|
|
149
|
-
let e = x(y), t =
|
|
150
|
-
t &&
|
|
151
|
-
},
|
|
152
|
-
typeof ResizeObserver < "u" && (
|
|
153
|
-
},
|
|
154
|
-
u(e),
|
|
147
|
+
}, fe = () => y !== null, O = null, k = null, pe = () => {
|
|
148
|
+
if (!y || O === null) return;
|
|
149
|
+
let e = x(y), t = D(O, e);
|
|
150
|
+
t && w(y, t, e);
|
|
151
|
+
}, me = (e) => {
|
|
152
|
+
typeof ResizeObserver < "u" && (k ??= new ResizeObserver(pe), k.disconnect(), k.observe(e));
|
|
153
|
+
}, he = (e) => {
|
|
154
|
+
u(e), w(e, {
|
|
155
155
|
modal: !1,
|
|
156
156
|
rects: [],
|
|
157
157
|
hidden: [],
|
|
158
158
|
inset: 0
|
|
159
|
-
}, x(e)), y = e,
|
|
160
|
-
},
|
|
159
|
+
}, x(e)), y = e, me(e);
|
|
160
|
+
}, ge = (e) => {
|
|
161
161
|
if (!y) return;
|
|
162
|
-
let t = x(y), n =
|
|
163
|
-
n && (
|
|
164
|
-
},
|
|
162
|
+
let t = x(y), n = D(e, t);
|
|
163
|
+
n && (O = e, w(y, n, t), de(n.hidden));
|
|
164
|
+
}, _e = [
|
|
165
165
|
"fkn.app",
|
|
166
166
|
"fkn.dev",
|
|
167
|
-
"sdbx.app"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
"sdbx.app",
|
|
168
|
+
"fkn.cloudflareaccess.com",
|
|
169
|
+
"horionsoftware.com",
|
|
170
|
+
"62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com",
|
|
171
|
+
"web-b3z.pages.dev",
|
|
172
|
+
"fkn-console.pages.dev",
|
|
173
|
+
"dev-dms.pages.dev",
|
|
174
|
+
"fkn-www.pages.dev",
|
|
175
|
+
"fkn-homepage.pages.dev",
|
|
176
|
+
"fkn-sandbox.pages.dev",
|
|
177
|
+
"internal-3ar.pages.dev",
|
|
178
|
+
"stub-ben.pages.dev",
|
|
179
|
+
"ripple-3t3.pages.dev",
|
|
180
|
+
"media-player-e3s.pages.dev",
|
|
181
|
+
"youtube-3c4.pages.dev",
|
|
182
|
+
"horionsoftware.pages.dev",
|
|
183
|
+
"container-ckf.pages.dev",
|
|
184
|
+
"stub-plugin.pages.dev",
|
|
185
|
+
"stub.plugins.banou.dev"
|
|
186
|
+
], ve = (e) => e.replace(/\.+$/, ""), ye = ["79.127.204.69", "152.233.49.59"], A = (e) => {
|
|
187
|
+
let t;
|
|
188
|
+
try {
|
|
189
|
+
t = new URL(`http://${e.includes(":") && !e.startsWith("[") ? `[${e}]` : e}/`).hostname;
|
|
190
|
+
} catch {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
let n = /^\[(?:::ffff:|64:ff9b::)([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);
|
|
194
|
+
if (n) {
|
|
195
|
+
let e = parseInt(n[1], 16), t = parseInt(n[2], 16);
|
|
196
|
+
return [
|
|
197
|
+
e >> 8,
|
|
198
|
+
e & 255,
|
|
199
|
+
t >> 8,
|
|
200
|
+
t & 255
|
|
201
|
+
].join(".");
|
|
202
|
+
}
|
|
203
|
+
return /^\d+\.\d+\.\d+\.\d+$/.test(t) ? t : void 0;
|
|
204
|
+
}, j = (e) => {
|
|
205
|
+
let t = ve(e);
|
|
206
|
+
if (_e.some((e) => t === e || t.endsWith(`.${e}`))) return !0;
|
|
207
|
+
let n = A(t);
|
|
208
|
+
return n !== void 0 && ye.includes(n);
|
|
171
209
|
}, M = (e) => {
|
|
172
210
|
let t = typeof e == "string" ? e : e instanceof URL ? e.href : e.url, n;
|
|
173
211
|
try {
|
|
@@ -175,7 +213,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
175
213
|
} catch {
|
|
176
214
|
return;
|
|
177
215
|
}
|
|
178
|
-
if (
|
|
216
|
+
if (j(n.hostname)) throw Error(`fetch refuses FKN platform domains (${n.hostname})`);
|
|
179
217
|
}, N = /* @__PURE__ */ "autoplay.fullscreen.picture-in-picture.encrypted-media.screen-wake-lock.speaker-selection.captured-surface-control.camera.microphone.display-capture.geolocation.midi.usb.serial.hid.bluetooth.gamepad.keyboard-map.xr-spatial-tracking.accelerometer.gyroscope.magnetometer.ambient-light-sensor.compute-pressure.clipboard-read.clipboard-write.storage-access.window-management.local-fonts.idle-detection.web-share.sync-xhr.unload.payment.publickey-credentials-get.publickey-credentials-create.otp-credentials.identity-credentials-get.digital-credentials-get.local-network.local-network-access.loopback-network".split("."), P = () => {
|
|
180
218
|
try {
|
|
181
219
|
let e = globalThis.document?.featurePolicy?.features?.();
|
|
@@ -183,7 +221,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
183
221
|
} catch {
|
|
184
222
|
return;
|
|
185
223
|
}
|
|
186
|
-
}, F = (e = !0, t = P()) => [...N, ...e ? ["cross-origin-isolated"] : []].filter((e) => t === void 0 || t.has(e)).join("; "), I = "https://fkn.app", L = typeof globalThis < "u" && globalThis.document ? globalThis.document : void 0, R = typeof globalThis < "u" && globalThis.crossOriginIsolated === !0, z = `${I}/api${R ? "?coi=1" : ""}`,
|
|
224
|
+
}, F = (e = !0, t = P()) => [...N, ...e ? ["cross-origin-isolated"] : []].filter((e) => t === void 0 || t.has(e)).join("; "), I = "https://fkn.app", L = typeof globalThis < "u" && globalThis.document ? globalThis.document : void 0, R = typeof globalThis < "u" && globalThis.crossOriginIsolated === !0, z = `${I}/api${R ? "?coi=1" : ""}`, be = "fkn-api-port", xe = "fkn-api-port-ack", Se = 2e3, Ce = () => {
|
|
187
225
|
if (!L || typeof window > "u" || window.parent === window) return Promise.resolve(void 0);
|
|
188
226
|
let e;
|
|
189
227
|
try {
|
|
@@ -199,16 +237,16 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
199
237
|
} catch {}
|
|
200
238
|
n(e);
|
|
201
239
|
}, i = (e) => {
|
|
202
|
-
e.data?.type ===
|
|
203
|
-
}, a = setTimeout(() => r(void 0),
|
|
240
|
+
e.data?.type === xe && r(t.port1);
|
|
241
|
+
}, a = setTimeout(() => r(void 0), Se);
|
|
204
242
|
t.port1.addEventListener("message", i), t.port1.start();
|
|
205
243
|
try {
|
|
206
|
-
e.postMessage({ type:
|
|
244
|
+
e.postMessage({ type: be }, I, [t.port2]);
|
|
207
245
|
} catch {
|
|
208
246
|
r(void 0);
|
|
209
247
|
}
|
|
210
248
|
});
|
|
211
|
-
}, B,
|
|
249
|
+
}, B, we = () => {
|
|
212
250
|
if (B || !L) return B;
|
|
213
251
|
let e = L.querySelector(`iframe[src="${z}"]`);
|
|
214
252
|
if (e) B = e;
|
|
@@ -216,15 +254,15 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
216
254
|
let e = L.createElement("iframe");
|
|
217
255
|
e.setAttribute("allow", F(R)), e.src = z, L.body.appendChild(e), B = e;
|
|
218
256
|
}
|
|
219
|
-
return
|
|
257
|
+
return he(B), B;
|
|
220
258
|
}, V = (async () => {
|
|
221
259
|
if (!L) return;
|
|
222
|
-
let e = await
|
|
260
|
+
let e = await Ce();
|
|
223
261
|
if (e) return {
|
|
224
262
|
receive: e,
|
|
225
263
|
emit: e
|
|
226
264
|
};
|
|
227
|
-
let t =
|
|
265
|
+
let t = we();
|
|
228
266
|
if (!t) return;
|
|
229
267
|
await i(t);
|
|
230
268
|
let n = t.contentWindow;
|
|
@@ -232,7 +270,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
232
270
|
receive: window,
|
|
233
271
|
emit: n
|
|
234
272
|
} : void 0;
|
|
235
|
-
})(),
|
|
273
|
+
})(), Te = (e, { boundRetired: t = (e) => e } = {}) => {
|
|
236
274
|
let n, r = 0, i = !1, a = () => {}, o = () => new Promise((e) => {
|
|
237
275
|
a = e;
|
|
238
276
|
}), s = o(), c = s, l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = 0, f = 0, p = () => {
|
|
@@ -308,7 +346,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
308
346
|
i = !0, n = void 0, p();
|
|
309
347
|
}
|
|
310
348
|
};
|
|
311
|
-
}, H = !1, U = /* @__PURE__ */ new Set(), W = () => H,
|
|
349
|
+
}, H = !1, U = /* @__PURE__ */ new Set(), W = () => H, Ee = () => {
|
|
312
350
|
if (!H) {
|
|
313
351
|
H = !0;
|
|
314
352
|
for (let e of [...U]) try {
|
|
@@ -318,14 +356,14 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
318
356
|
}
|
|
319
357
|
}, G = (e) => {
|
|
320
358
|
H ? e() : U.add(e);
|
|
321
|
-
},
|
|
359
|
+
}, De = typeof window < "u" || typeof self < "u", Oe = async () => {
|
|
322
360
|
if (typeof window < "u") return V;
|
|
323
361
|
if (typeof self < "u") return {
|
|
324
362
|
receive: self,
|
|
325
363
|
emit: self
|
|
326
364
|
};
|
|
327
|
-
},
|
|
328
|
-
let t = await
|
|
365
|
+
}, ke = "fkn-api", Ae = "fkn-api-window", K = Te({ async *[Symbol.asyncIterator]() {
|
|
366
|
+
let t = await Oe();
|
|
329
367
|
if (!t) {
|
|
330
368
|
await new Promise(() => {});
|
|
331
369
|
return;
|
|
@@ -334,7 +372,7 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
334
372
|
let n = new AbortController();
|
|
335
373
|
G(() => n.abort());
|
|
336
374
|
for await (let r of e({}, {
|
|
337
|
-
key:
|
|
375
|
+
key: ke,
|
|
338
376
|
transport: t,
|
|
339
377
|
unregisterSignal: n.signal
|
|
340
378
|
})) {
|
|
@@ -343,12 +381,12 @@ var t = 1e4, n = 16, r = (e) => {
|
|
|
343
381
|
}
|
|
344
382
|
}
|
|
345
383
|
yield* e({}, {
|
|
346
|
-
key:
|
|
384
|
+
key: Ae,
|
|
347
385
|
transport: t
|
|
348
386
|
});
|
|
349
387
|
} }, { boundRetired: (e) => Q(e, () => new Z()) });
|
|
350
388
|
G(() => K.retire());
|
|
351
|
-
var q = Promise.race([K.first, new Promise((e) => G(e))]).then(() => K.facade), J = 8e3,
|
|
389
|
+
var q = Promise.race([K.first, new Promise((e) => G(e))]).then(() => K.facade), J = 8e3, je = 1e3, Y = !1, X = class extends Error {
|
|
352
390
|
constructor(e, t) {
|
|
353
391
|
super(`@fkn/lib: no broker connection within ${t}ms, so ${e} could not be requested`), this.name = "BrokerUnreachableError";
|
|
354
392
|
}
|
|
@@ -357,18 +395,18 @@ var q = Promise.race([K.first, new Promise((e) => G(e))]).then(() => K.facade),
|
|
|
357
395
|
super("FKN @fkn/lib: this page relays its FKN channel to a worker, and the FKN page it reached predates a channel of the page's own; reload"), this.name = "OwnChannelUnavailableError";
|
|
358
396
|
}
|
|
359
397
|
}, Q = (e, t) => {
|
|
360
|
-
let n = Y ?
|
|
398
|
+
let n = Y ? je : J;
|
|
361
399
|
return Promise.race([e, new Promise((e, r) => setTimeout(() => {
|
|
362
400
|
Y = !0, r(t(n));
|
|
363
401
|
}, n))]);
|
|
364
|
-
},
|
|
402
|
+
}, Me = (e) => W() ? Q(K.routable().then(() => K.facade), () => new Z()) : Q(q, (t) => new X(e, t));
|
|
365
403
|
G(() => {
|
|
366
404
|
let e = setTimeout(() => console.error(new Z()), J);
|
|
367
405
|
K.routable().then(() => clearTimeout(e));
|
|
368
406
|
});
|
|
369
|
-
var $ = K.onEpoch,
|
|
407
|
+
var $ = K.onEpoch, Ne = K.current, Pe = K.lastCall, Fe = K.inFlight;
|
|
370
408
|
$((e) => {
|
|
371
|
-
|
|
409
|
+
fe() && e.overlay.setHost(ge, { exactClips: f() }).catch(() => {});
|
|
372
410
|
});
|
|
373
411
|
//#endregion
|
|
374
|
-
export {
|
|
412
|
+
export { Pe as a, Ne as c, Ee as d, V as f, Fe as i, De as l, F as m, X as n, q as o, M as p, Z as r, Me as s, J as t, $ as u };
|
package/api.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api-DMnVye0K.cjs");exports.API_DEADLINE_MS=e.t,exports.BrokerUnreachableError=e.n,exports.OwnChannelUnavailableError=e.r,exports.apiInFlight=e.i,exports.apiLastCall=e.a,exports.apiPromise=e.o,exports.apiWithin=e.s,exports.currentApiEpoch=e.c,exports.hasTransport=e.l,exports.onApiEpoch=e.u;
|
package/api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-
|
|
1
|
+
import { K as Resolvers } from "./contract-LOcbTDjP.js";
|
|
2
|
+
import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-DIBhBtcU.js";
|
|
3
3
|
export { API_DEADLINE_MS, BrokerUnreachableError, OwnChannelUnavailableError, type Resolvers, apiInFlight, apiLastCall, apiPromise, apiWithin, currentApiEpoch, hasTransport, onApiEpoch };
|
package/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./api-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./api-ySazPAwN.js";
|
|
2
2
|
export { c as API_DEADLINE_MS, i as BrokerUnreachableError, o as OwnChannelUnavailableError, n as apiInFlight, e as apiLastCall, a as apiPromise, s as apiWithin, t as currentApiEpoch, r as hasTransport, l as onApiEpoch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=new Map,t=new Set,n=t=>{e.set(t,(e.get(t)??0)+1);let n=!1;return()=>{n||(n=!0,e.set(t,Math.max(0,(e.get(t)??1)-1)))}},r=(e,t)=>{let r=n(e);t?.aborted?r():t?.addEventListener(`abort`,r,{once:!0})},i=(e,n)=>{t.add({kind:e,probe:n})},a=()=>{let n=new Set;for(let[t,r]of e)r>0&&n.add(`${t} (${r})`);for(let{kind:e,probe:r}of t)try{r()&&n.add(e)}catch{n.add(e)}return[...n]};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -5,12 +5,15 @@ var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = (t) => {
|
|
|
5
5
|
return () => {
|
|
6
6
|
n || (n = !0, e.set(t, Math.max(0, (e.get(t) ?? 1) - 1)));
|
|
7
7
|
};
|
|
8
|
-
}, r = (e,
|
|
8
|
+
}, r = (e, t) => {
|
|
9
|
+
let r = n(e);
|
|
10
|
+
t?.aborted ? r() : t?.addEventListener("abort", r, { once: !0 });
|
|
11
|
+
}, i = (e, n) => {
|
|
9
12
|
t.add({
|
|
10
13
|
kind: e,
|
|
11
14
|
probe: n
|
|
12
15
|
});
|
|
13
|
-
},
|
|
16
|
+
}, a = () => {
|
|
14
17
|
let n = /* @__PURE__ */ new Set();
|
|
15
18
|
for (let [t, r] of e) r > 0 && n.add(`${t} (${r})`);
|
|
16
19
|
for (let { kind: e, probe: r } of t) try {
|
|
@@ -21,4 +24,4 @@ var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = (t) => {
|
|
|
21
24
|
return [...n];
|
|
22
25
|
};
|
|
23
26
|
//#endregion
|
|
24
|
-
export { i as n, r, n as t };
|
|
27
|
+
export { i, a as n, r, n as t };
|
package/cloud/dns.d.ts
CHANGED
package/cloud/fetch.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-BfkfFsNI.cjs");exports.fetch=e.t;
|
package/cloud/fetch.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as cloudFetch } from "../proxy-
|
|
1
|
+
import { t as cloudFetch } from "../proxy-CSKLtRTm.js";
|
|
2
2
|
export { cloudFetch as fetch };
|
package/cloud/fetch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../proxy-
|
|
1
|
+
import { t as e } from "../proxy-BXkxwBxK.js";
|
|
2
2
|
export { e as fetch };
|
package/cloud/fs/promises.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../../index-BQgZVQl7.js";
|
|
2
|
-
import "../../fs-
|
|
2
|
+
import "../../fs-lKZe5xIo.js";
|
|
3
3
|
//#region src/cloud/fs-promises.d.ts
|
|
4
4
|
export declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (_path?: import("node:fs").PathLike, _options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
|
|
5
5
|
recursive?: boolean;
|
package/cloud/fs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BIInC43l.cjs"),t=require("../node-fs-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BIInC43l.cjs"),t=require("../node-fs-vsWuoMGa.cjs"),n=require("../messages.cjs"),r=require("../storage-DmRIhg1P.cjs");var i=e.t({STORAGE_ACCOUNT_CHANGED:()=>n.STORAGE_ACCOUNT_CHANGED,STORAGE_ACCOUNT_PIN_UNSUPPORTED:()=>n.STORAGE_ACCOUNT_PIN_UNSUPPORTED,STORAGE_NOT_FOUND:()=>n.STORAGE_NOT_FOUND,StorageAccountChangedError:()=>r.t,StorageAccountPinUnsupportedError:()=>r.n,StorageLockedError:()=>r.r,StorageNotFoundError:()=>r.i,availability:()=>r.a,available:()=>a,encryption:()=>r.s,isAccountChanged:()=>r.c,isNotFound:()=>r.u,list:()=>h,mkdir:()=>d,promises:()=>m,quota:()=>r.m,readFile:()=>o,readFileSealed:()=>g,readdir:()=>u,rename:()=>l,rm:()=>f,stat:()=>p,unlink:()=>c,unlock:()=>r.y,writeFile:()=>s}),{available:a,readFile:o,writeFile:s,unlink:c,rename:l,readdir:u,mkdir:d,rm:f,stat:p,promises:m}=t.t(r.v,{memfs:!1}),h=()=>r.f(),g=e=>r.g(e);exports.STORAGE_ACCOUNT_CHANGED=n.STORAGE_ACCOUNT_CHANGED,exports.STORAGE_ACCOUNT_PIN_UNSUPPORTED=n.STORAGE_ACCOUNT_PIN_UNSUPPORTED,exports.STORAGE_NOT_FOUND=n.STORAGE_NOT_FOUND,exports.StorageAccountChangedError=r.t,exports.StorageAccountPinUnsupportedError=r.n,exports.StorageLockedError=r.r,exports.StorageNotFoundError=r.i,exports.availability=r.a,exports.available=a,exports.encryption=r.s,exports.isAccountChanged=r.c,exports.isNotFound=r.u,exports.list=h,exports.mkdir=d,exports.promises=m,exports.quota=r.m,exports.readFile=o,exports.readFileSealed=g,exports.readdir=u,exports.rename=l,exports.rm=f,exports.stat=p,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}}),exports.unlink=c,exports.unlock=r.y,exports.writeFile=s;
|
package/cloud/fs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as Stats } from "../index-BQgZVQl7.js";
|
|
2
|
-
import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "../storage-
|
|
2
|
+
import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "../storage-B_mXNAdB.js";
|
|
3
3
|
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-d7pvCXPn.js";
|
|
4
|
-
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-
|
|
4
|
+
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-lKZe5xIo.js";
|
|
5
5
|
export { type CloudAvailability, type EncryptionStatus, type FileEntry, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, STORAGE_NOT_FOUND, type SealedRead, type Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, StorageLockedError, StorageNotFoundError, type StorageQuota, availability, available, encryption, isAccountChanged, isNotFound, list, mkdir, promises, quota, readFile, readFileSealed, readdir, rename, rm, stat, unlink, unlock, writeFile };
|
package/cloud/fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { t } from "../node-fs-
|
|
2
|
+
import { t } from "../node-fs-DY2fO5zd.js";
|
|
3
3
|
import { STORAGE_ACCOUNT_CHANGED as n, STORAGE_ACCOUNT_PIN_UNSUPPORTED as r, STORAGE_NOT_FOUND as i } from "../messages.js";
|
|
4
|
-
import { a, c as o, f as s, g as c, i as l, m as u, n as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "../storage-
|
|
4
|
+
import { a, c as o, f as s, g as c, i as l, m as u, n as d, r as f, s as p, t as m, u as h, v as g, y as _ } from "../storage-C6F9SnDM.js";
|
|
5
5
|
//#region src/cloud/fs.ts
|
|
6
6
|
var v = /* @__PURE__ */ e({
|
|
7
7
|
STORAGE_ACCOUNT_CHANGED: () => n,
|
package/cloud/net.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-BpHmMkIR.cjs"),t=require("../net.cjs");exports.Server=t.Server,exports.Socket=t.Socket,exports._default=t._default,exports.default=t._default,exports.connect=t.connect,exports.createConnection=t.createConnection,exports.createServer=t.createServer,exports.isIP=e.t,exports.isIPv4=e.n,exports.isIPv6=e.r;
|
package/cloud/net.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-
|
|
1
|
+
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-taIhsmvu.js";
|
|
2
2
|
export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
|
package/cloud/net.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e, r as t, t as n } from "../utils-Cyq8uJiy.js";
|
|
2
2
|
import { Server as r, Socket as i, _default as a, connect as o, createConnection as s, createServer as c } from "../net.js";
|
|
3
|
-
export { r as Server, i as Socket, a as _default, a as default, o as connect, s as createConnection, c as createServer, n as isIP,
|
|
3
|
+
export { r as Server, i as Socket, a as _default, a as default, o as connect, s as createConnection, c as createServer, n as isIP, e as isIPv4, t as isIPv6 };
|