ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix compatibility with safari/ios 16
Chocobozzza6578275f52f
diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 7bffff9358..6d2e67b63d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -13,7 +13,7 @@ patchedDependencies:hash: 6360e5a7ee3bb2fcc71d0f3c8a8532b01555e32108f8ec2eedcbfaba4ea25704path: pnpm-patches/sharp.patchtinykeys:- hash: 6855931e9590b29110de8402432514ff7aa294934a067557e96dc7eb46f365e3+ hash: 286ec06b460cf7b02035c2e64f11f165dcc17e4141d0c185bbee2a5a9d3b35b9path: pnpm-patches/tinykeys.patchvideo.js:hash: 66459642658d85da52b45ff0472242e9daade1ff3dd765974103db72a7c55377@@ -810,7 +810,7 @@ importers:version: 8.1.1([email protected]([email protected]))tinykeys:specifier: ^4.0.0- version: 4.0.0(patch_hash=6855931e9590b29110de8402432514ff7aa294934a067557e96dc7eb46f365e3)+ version: 4.0.0(patch_hash=286ec06b460cf7b02035c2e64f11f165dcc17e4141d0c185bbee2a5a9d3b35b9)ts-node:specifier: ^10.9.2@@ -23016,7 +23016,7 @@ snapshots:fdir: 6.5.0([email protected])picomatch: 4.0.5- [email protected](patch_hash=6855931e9590b29110de8402432514ff7aa294934a067557e96dc7eb46f365e3): {}+ [email protected](patch_hash=286ec06b460cf7b02035c2e64f11f165dcc17e4141d0c185bbee2a5a9d3b35b9): {}diff --git a/pnpm-patches/tinykeys.patch b/pnpm-patches/tinykeys.patchindex 0f95cfc47b..f485252762 100644--- a/pnpm-patches/tinykeys.patch+++ b/pnpm-patches/tinykeys.patch@@ -1,14 +1,64 @@-diff --git a/package.json b/package.json-index bbda4b2375dbc97a0757df776d5cbf8fbd071fd0..38fc5a5305f3292e77966b79e5e2fad0da0dcb83 100644---- a/package.json-+++ b/package.json-@@ -16,7 +16,8 @@- "exports": {- ".": {- "import": "./dist/tinykeys.module.js",-- "require": "./dist/tinykeys.js"-+ "require": "./dist/tinykeys.js",-+ "types": "./dist/tinykeys.d.ts"- }- },- "keywords": [+diff --git a/dist/tinykeys.cjs b/dist/tinykeys.cjs+index 08c98b6eff3b8fb4b727fe8e6b096951d6ef6347..1f1b17c556d82b31e4449fc11329b2f09e9b3c54 100644+--- a/dist/tinykeys.cjs++++ b/dist/tinykeys.cjs+@@ -74,9 +74,22 @@ function getModifierState(event, mod) {+ * <key> = `(<regex>)` -> `/^(?:<regex>)$/iy` (case-insensitive)+ * ```+ */++function splitKeybindingPress(press) {++ let parts = [];++ let current = "";++ for (let i = 0; i < press.length; i++) {++ let char = press[i];++ if (char === "+" && i > 0 && /[\w\]]/.test(press[i - 1])) {++ parts.push(current);++ current = "";++ } else current += char;++ }++ parts.push(current);++ return parts;++}+ function parseKeybinding(str) {+ return str.trim().split(" ").map((press) => {+- let parts = press.split(/(?<=\w|\])\+/);++ let parts = splitKeybindingPress(press);+ let last = parts.pop();+ let regex = last.match(/^\((.+)\)$/);+ let key = regex ? new RegExp(`^(?:${regex[1]})$`, "iv") : last;+diff --git a/dist/tinykeys.mjs b/dist/tinykeys.mjs+index c289972d2728e03d9b272268c38fd3392e8845bf..2e4d87a7f6544be19c964504474e87ba061d2962 100644+--- a/dist/tinykeys.mjs++++ b/dist/tinykeys.mjs+@@ -73,9 +73,22 @@ function getModifierState(event, mod) {+ * <key> = `(<regex>)` -> `/^(?:<regex>)$/iy` (case-insensitive)+ * ```+ */++function splitKeybindingPress(press) {++ let parts = [];++ let current = "";++ for (let i = 0; i < press.length; i++) {++ let char = press[i];++ if (char === "+" && i > 0 && /[\w\]]/.test(press[i - 1])) {++ parts.push(current);++ current = "";++ } else current += char;++ }++ parts.push(current);++ return parts;++}+ function parseKeybinding(str) {+ return str.trim().split(" ").map((press) => {+- let parts = press.split(/(?<=\w|\])\+/);++ let parts = splitKeybindingPress(press);+ let last = parts.pop();+ let regex = last.match(/^\((.+)\)$/);+ let key = regex ? new RegExp(`^(?:${regex[1]})$`, "iv") : last;+diff --git a/dist/tinykeys.umd.js b/dist/tinykeys.umd.js+index b2a4e157d11fda1505f8ebbaca65eb676e7f0400..0f8a6278da8473fa7f2e5066aed1f1b4c898b001 100644+--- a/dist/tinykeys.umd.js++++ b/dist/tinykeys.umd.js+@@ -1,2 +1,2 @@+-(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.tinykeys={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=[`Shift`,`Meta`,`Alt`,`Control`],n=typeof navigator==`object`?navigator.platform:``,r=/Mac|iPod|iPhone|iPad/.test(n)?`Meta`:`Control`,i=n===`Win32`?[`Control`,`Alt`]:[`Alt`];function a(e){return!!(e.key&&e.code&&e.getModifierState)}function o(e){let t=e.target;return e.repeat||e.isComposing||t!==e.currentTarget&&t.matches(`[contenteditable],input,select,textarea`)}function s(e,t){return typeof e.getModifierState==`function`?e.getModifierState(t)||i.includes(t)&&e.getModifierState(`AltGraph`):!1}function c(e){return e.trim().split(` `).map(e=>{let t=e.split(/(?<=\w|\])\+/),n=t.pop(),i=n.match(/^\((.+)\)$/),a=i?RegExp(`^(?:${i[1]})$`,`iv`):n,o=[],s=[];for(let e of t){let t=e.match(/^\[(.*)\]$/),n=t?.[1]??e;n=n===`$mod`?r:n,t?s.push(n):o.push(n)}return[o,s,a]})}function l(e,[n,r,a]){let o=n.includes(`AltGraph`);return!((a instanceof RegExp?!(a.test(e.key)||a.test(e.code)):a.toUpperCase()!==e.key.toUpperCase()&&a!==e.code)||n.find(t=>!s(e,t))||t.find(t=>!n.includes(t)&&!r.includes(t)&&a!==t&&s(e,t)&&!(o&&i.includes(t))))}function u(e,t={}){let n=t.timeout??1e3,r=t.ignore??o,i=Object.keys(e).map(t=>[t,c(t),e[t]]),u=new Map,d=null;return e=>{if(!a(e)||r(e))return;let t=[];for(let[n,r,a]of i){let[i,...o]=u.get(n)||r;if(!l(e,i))s(e,e.key)||u.delete(n);else if(o.length>0)u.set(n,o),t.push(n);else if(u.delete(n),t.length)console.warn(`tinykeys: Conflict found, "${n}" did not fire, waiting for:`,t);else{a(e);break}}d&&clearTimeout(d),d=setTimeout(()=>u.clear(),n)}}function d(e,t,n={}){let r=n.event??`keydown`,i=u(t,n);return e.addEventListener(r,i,n.capture),()=>{e.removeEventListener(r,i,n.capture)}}e.createKeybindingsHandler=u,e.defaultKeybindingsHandlerIgnore=o,e.matchKeybindingPress=l,e.parseKeybinding=c,e.tinykeys=d});++(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.tinykeys={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=[`Shift`,`Meta`,`Alt`,`Control`],n=typeof navigator==`object`?navigator.platform:``,r=/Mac|iPod|iPhone|iPad/.test(n)?`Meta`:`Control`,i=n===`Win32`?[`Control`,`Alt`]:[`Alt`];function a(e){return!!(e.key&&e.code&&e.getModifierState)}function o(e){let t=e.target;return e.repeat||e.isComposing||t!==e.currentTarget&&t.matches(`[contenteditable],input,select,textarea`)}function s(e,t){return typeof e.getModifierState==`function`?e.getModifierState(t)||i.includes(t)&&e.getModifierState(`AltGraph`):!1}function h(e){let t=[],n="";for(let r=0;r<e.length;r++){let i=e[r];i==="+"&&r>0&&/[\w\]]/.test(e[r-1])?(t.push(n),n=""):n+=i}return t.push(n),t}function c(e){return e.trim().split(` `).map(e=>{let t=h(e),n=t.pop(),i=n.match(/^\((.+)\)$/),a=i?RegExp(`^(?:${i[1]})$`,`iv`):n,o=[],s=[];for(let e of t){let t=e.match(/^\[(.*)\]$/),n=t?.[1]??e;n=n===`$mod`?r:n,t?s.push(n):o.push(n)}return[o,s,a]})}function l(e,[n,r,a]){let o=n.includes(`AltGraph`);return!((a instanceof RegExp?!(a.test(e.key)||a.test(e.code)):a.toUpperCase()!==e.key.toUpperCase()&&a!==e.code)||n.find(t=>!s(e,t))||t.find(t=>!n.includes(t)&&!r.includes(t)&&a!==t&&s(e,t)&&!(o&&i.includes(t))))}function u(e,t={}){let n=t.timeout??1e3,r=t.ignore??o,i=Object.keys(e).map(t=>[t,c(t),e[t]]),u=new Map,d=null;return e=>{if(!a(e)||r(e))return;let t=[];for(let[n,r,a]of i){let[i,...o]=u.get(n)||r;if(!l(e,i))s(e,e.key)||u.delete(n);else if(o.length>0)u.set(n,o),t.push(n);else if(u.delete(n),t.length)console.warn(`tinykeys: Conflict found, "${n}" did not fire, waiting for:`,t);else{a(e);break}}d&&clearTimeout(d),d=setTimeout(()=>u.clear(),n)}}function d(e,t,n={}){let r=n.event??`keydown`,i=u(t,n);return e.addEventListener(r,i,n.capture),()=>{e.removeEventListener(r,i,n.capture)}}e.createKeybindingsHandler=u,e.defaultKeybindingsHandlerIgnore=o,e.matchKeybindingPress=l,e.parseKeybinding=c,e.tinykeys=d});+ //# sourceMappingURL=tinykeys.umd.js.map