@bluepic/embed 0.4.0-next.98 → 0.5.0

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.
Files changed (122) hide show
  1. package/dist/bluepic-embed.iife.js +402 -178
  2. package/dist/bluepic-embed.umd.js +402 -178
  3. package/dist/c-B4BAHWS4.cjs +1 -0
  4. package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
  5. package/dist/components/AssetViewer/AssetViewer.vue.d.ts +71 -0
  6. package/dist/components/BxAudioPlayButton.vue.d.ts +24 -0
  7. package/dist/components/BxCard.vue.d.ts +35 -0
  8. package/dist/components/BxInput.vue.d.ts +7 -1
  9. package/dist/components/BxList.vue.d.ts +9 -0
  10. package/dist/components/BxListItem.vue.d.ts +13 -1
  11. package/dist/components/BxPopover.vue.d.ts +7 -0
  12. package/dist/components/BxPreviewLayer.vue.d.ts +18 -0
  13. package/dist/components/BxScrollbar.vue.d.ts +7 -0
  14. package/dist/components/BxSelect.vue.d.ts +16 -2
  15. package/dist/components/BxTable.vue.d.ts +109 -0
  16. package/dist/components/BxTabs.vue.d.ts +7 -0
  17. package/dist/components/BxWaveformThumb.vue.d.ts +27 -0
  18. package/dist/components/CollectionFieldPopup.vue.d.ts +4 -0
  19. package/dist/components/PopoverElement.vue.d.ts +10 -1
  20. package/dist/components/TemplateEditor/BatchCell.vue.d.ts +18 -0
  21. package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +264 -0
  22. package/dist/components/TemplateEditor/BatchExportPopup.vue.d.ts +68 -0
  23. package/dist/components/TemplateEditor/BatchImportPopup.vue.d.ts +25 -0
  24. package/dist/components/TemplateEditor/BxLiveTemplate.vue.d.ts +8 -0
  25. package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +285 -16
  26. package/dist/components/TemplateEditor/FieldHintsLayer.vue.d.ts +86 -0
  27. package/dist/components/TemplateEditor/TemplateView.vue.d.ts +77 -2
  28. package/dist/components/User/UserInfo.vue.d.ts +12 -1
  29. package/dist/components/directives/usePopup.d.ts +5 -0
  30. package/dist/components/fields/Collection.vue.d.ts +3 -0
  31. package/dist/components/fields/Image.vue.d.ts +19 -5
  32. package/dist/components/fields/ImageEdit.vue.d.ts +6 -1
  33. package/dist/components/fields/Text.vue.d.ts +1 -1
  34. package/dist/cpp-BfO2fOQK.cjs +1 -0
  35. package/dist/{cpp-CH0U-pDu.js → cpp-DxGBPWa5.js} +60 -39
  36. package/dist/{css-DXX4BvrO.js → css-Cx1gP-zj.js} +13 -8
  37. package/dist/css-DTF39MN3.cjs +1 -0
  38. package/dist/embed/embed.d.ts +1024 -228
  39. package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
  40. package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
  41. package/dist/{index-CWm6zOv7.js → index-C99_zLhc.js} +9 -9
  42. package/dist/index-D8N6IfRw.cjs +1 -0
  43. package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
  44. package/dist/java-DFXAwvvK.cjs +1 -0
  45. package/dist/javascript-C2jY0XE6.cjs +1 -0
  46. package/dist/{javascript-BAHKs5qZ.js → javascript-CgRUYx2b.js} +1 -0
  47. package/dist/main.cjs +240 -162
  48. package/dist/main.d.ts +20 -0
  49. package/dist/main.mjs +79357 -68780
  50. package/dist/markdown-BmL9j9cU.cjs +1 -0
  51. package/dist/{markdown-ga2-2-T7.js → markdown-D19noYwn.js} +9 -10
  52. package/dist/markdown-it-5-ieF6Bh.js +3790 -0
  53. package/dist/markdown-it-CLB5Jta6.cjs +16 -0
  54. package/dist/postal-mime-Df-WB8Vq.js +3337 -0
  55. package/dist/postal-mime-_7WF5UBe.cjs +28 -0
  56. package/dist/{python-CymlFLB0.js → python-BBUuE3AY.js} +20 -15
  57. package/dist/python-Clt6L10q.cjs +1 -0
  58. package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
  59. package/dist/rust-_vvcEGSJ.cjs +1 -0
  60. package/dist/{scss-DybQU0yX.js → scss-BWo_aR1L.js} +6 -1
  61. package/dist/scss-ex7iHSUb.cjs +1 -0
  62. package/dist/style.css +1 -1
  63. package/dist/theme/bridge.d.ts +14 -0
  64. package/dist/theme/color.d.ts +80 -0
  65. package/dist/theme/css.d.ts +8 -0
  66. package/dist/theme/index.d.ts +19 -0
  67. package/dist/theme/legacy.d.ts +3 -0
  68. package/dist/theme/resolve.d.ts +10 -0
  69. package/dist/theme/tokens.d.ts +129 -0
  70. package/dist/theme/types-contract.d.ts +13 -0
  71. package/dist/theme.cjs +1 -0
  72. package/dist/theme.mjs +1313 -0
  73. package/dist/{typescript-BRD67TAB.js → typescript-BHqLHF13.js} +1 -0
  74. package/dist/typescript-DYRnLHqF.cjs +1 -0
  75. package/dist/util/analytics.d.ts +16 -0
  76. package/dist/util/assetAuth.d.ts +35 -0
  77. package/dist/util/audioPreview.d.ts +8 -0
  78. package/dist/util/batch/csv.d.ts +58 -0
  79. package/dist/util/batch/export.d.ts +92 -0
  80. package/dist/util/batch/fields.d.ts +22 -0
  81. package/dist/util/batch/parseCSV.d.ts +72 -0
  82. package/dist/util/batch/useBatchRows.d.ts +67 -0
  83. package/dist/util/cloneDeep.d.ts +5 -5
  84. package/dist/util/cloudflareImages.d.ts +8 -1
  85. package/dist/util/contextCapture.d.ts +19 -0
  86. package/dist/util/export.d.ts +65 -18
  87. package/dist/util/fieldHints/chipAction.d.ts +23 -0
  88. package/dist/util/fieldHints/fieldFocus.d.ts +81 -0
  89. package/dist/util/fieldHints/geometry.d.ts +52 -0
  90. package/dist/util/fieldHints/index.d.ts +20 -0
  91. package/dist/util/fieldHints/probe.d.ts +84 -0
  92. package/dist/util/fieldHints/resolve.d.ts +55 -0
  93. package/dist/util/fieldHints/textProbe.d.ts +71 -0
  94. package/dist/util/fieldHints/useCanvasTextEditing.d.ts +125 -0
  95. package/dist/util/fieldHints/useChipHighlight.d.ts +29 -0
  96. package/dist/util/fieldHints/useFieldHitboxes.d.ts +5601 -0
  97. package/dist/util/fieldHints/useHintReveal.d.ts +10 -0
  98. package/dist/util/fieldTree.d.ts +20 -0
  99. package/dist/util/fields.d.ts +1 -1
  100. package/dist/util/gallery.d.ts +78 -32
  101. package/dist/util/popoverArrow.d.ts +33 -0
  102. package/dist/util/popupHeaderTools.d.ts +26 -0
  103. package/dist/util/scrollPassthrough.d.ts +9 -0
  104. package/dist/util/useTheme.d.ts +36 -1
  105. package/dist/util/visualViewport.d.ts +47 -0
  106. package/dist/xlsx-BopDBbWb.js +24176 -0
  107. package/dist/xlsx-qn1xoUuv.cjs +105 -0
  108. package/dist/{xml-B7THKYqr.js → xml-Bse49fPV.js} +9 -16
  109. package/dist/{xml-CII3FKiI.cjs → xml-CVmug_x4.cjs} +1 -1
  110. package/package.json +18 -5
  111. package/dist/c-C_Sx7N-F.cjs +0 -1
  112. package/dist/cpp-CEORmSCT.cjs +0 -1
  113. package/dist/css-l--Pv1Vb.cjs +0 -1
  114. package/dist/index-DFXQWOGQ.cjs +0 -1
  115. package/dist/java-BIk0G-rH.cjs +0 -1
  116. package/dist/javascript-NPBda6fN.cjs +0 -1
  117. package/dist/markdown-BbPYOuo6.cjs +0 -1
  118. package/dist/python-B6_9AjJr.cjs +0 -1
  119. package/dist/rust-DKnYCg2f.cjs +0 -1
  120. package/dist/scss-C_iicH8I.cjs +0 -1
  121. package/dist/typescript-ro3bsRwC.cjs +0 -1
  122. package/dist/util/backgroundRemoval.d.ts +0 -51
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e){const n={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:n,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,illegal:/["']/}]}]}}exports.default=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e){const n={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:n,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,illegal:/["']/}]}]}}exports.default=t;
@@ -1,4 +1,4 @@
1
- function c(e) {
1
+ function r(e) {
2
2
  const n = {
3
3
  keyword: [
4
4
  "break",
@@ -110,6 +110,11 @@ function c(e) {
110
110
  // leading 0o octal
111
111
  relevance: 0
112
112
  },
113
+ {
114
+ match: /-?\b0[bB](_?[01])*i?/,
115
+ // leading 0b binary
116
+ relevance: 0
117
+ },
113
118
  {
114
119
  match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
115
120
  // decimal without a present digit before . (making a digit afterwards required)
@@ -147,5 +152,5 @@ function c(e) {
147
152
  };
148
153
  }
149
154
  export {
150
- c as default
155
+ r as default
151
156
  };
@@ -34,9 +34,9 @@ function v(t, n = t) {
34
34
  e.enqueue(r), i += r.byteLength;
35
35
  }
36
36
  }
37
- }, cancel(e) {
37
+ }, async cancel(e) {
38
38
  var i;
39
- (i = n.throw) == null || i.call(n, e);
39
+ await ((i = n.throw) == null ? void 0 : i.call(n, e));
40
40
  } });
41
41
  }
42
42
  function S(t) {
@@ -46,17 +46,17 @@ function I(t, n, e) {
46
46
  let [i, o] = function(r) {
47
47
  return r ? r instanceof Uint8Array ? [r, 1] : ArrayBuffer.isView(r) || r instanceof ArrayBuffer ? [u(r), 1] : [y(r), 0] : [void 0, 0];
48
48
  }(n);
49
- if (t instanceof File) return { i: p(i || y(t.name)), o: BigInt(t.size), u: o };
49
+ if (t instanceof File) return { i: w(i || y(t.name)), o: BigInt(t.size), u: o };
50
50
  if (t instanceof Response) {
51
51
  const r = t.headers.get("content-disposition"), f = r && r.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i), a = f && f[1] || t.url && new URL(t.url).pathname.split("/").findLast(Boolean), l = a && decodeURIComponent(a), d = e || +t.headers.get("content-length");
52
- return { i: p(i || y(l)), o: BigInt(d), u: o };
52
+ return { i: w(i || y(l)), o: BigInt(d), u: o };
53
53
  }
54
- return i = p(i, t !== void 0 || e !== void 0), typeof t == "string" ? { i, o: BigInt(y(t).length), u: o } : t instanceof Blob ? { i, o: BigInt(t.size), u: o } : t instanceof ArrayBuffer || ArrayBuffer.isView(t) ? { i, o: BigInt(t.byteLength), u: o } : { i, o: R(t, e), u: o };
54
+ return i = w(i, t !== void 0 || e !== void 0), typeof t == "string" ? { i, o: BigInt(y(t).length), u: o } : t instanceof Blob ? { i, o: BigInt(t.size), u: o } : t instanceof ArrayBuffer || ArrayBuffer.isView(t) ? { i, o: BigInt(t.byteLength), u: o } : { i, o: R(t, e), u: o };
55
55
  }
56
56
  function R(t, n) {
57
57
  return n > -1 ? BigInt(n) : t ? void 0 : 0n;
58
58
  }
59
- function p(t, n = 1) {
59
+ function w(t, n = 1) {
60
60
  if (!t || t.every((e) => e === 47)) throw new Error("The file must have a name.");
61
61
  if (n) for (; t[t.length - 1] === 47; ) t = t.subarray(0, -1);
62
62
  else t[t.length - 1] !== 47 && (t = new Uint8Array([...t, 47]));
@@ -153,10 +153,10 @@ function j(t, n = {}) {
153
153
  const r = [];
154
154
  let f = 0n, a = 0n, l = 0;
155
155
  for await (const s of i) {
156
- const w = L(s, o.buffersAreUTF8);
157
- yield N(s, w), yield new Uint8Array(s.i), s.isFile && (yield* T(s));
156
+ const p = L(s, o.buffersAreUTF8);
157
+ yield N(s, p), yield new Uint8Array(s.i), s.isFile && (yield* T(s));
158
158
  const h = s.o >= 0xffffffffn, m = 12 * (f >= 0xffffffffn) | 28 * h;
159
- yield E(s, h), r.push(z(s, f, w, m)), r.push(s.i), m && r.push(V(s, f, m)), h && (f += 8n), a++, f += BigInt(46 + s.i.length) + s.o, l || (l = h);
159
+ yield E(s, h), r.push(z(s, f, p, m)), r.push(s.i), m && r.push(V(s, f, m)), h && (f += 8n), a++, f += BigInt(46 + s.i.length) + s.o, l || (l = h);
160
160
  }
161
161
  let d = 0n;
162
162
  for (const s of r) yield s, d += BigInt(s.length);
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(t,n,e){const i=Number(0xffffffffn&n),o=Number(n>>32n);this.setUint32(t+(e?0:4),i,e),this.setUint32(t+(e?4:0),o,e)}});var U=t=>new DataView(new ArrayBuffer(t)),u=t=>new Uint8Array(t.buffer||t),y=t=>new TextEncoder().encode(String(t)),c=t=>Math.min(4294967295,Number(t)),b=t=>Math.min(65535,Number(t));function R(t,n,e){n===void 0||n instanceof Date||(n=new Date(n));const i=t!==void 0;if(e||(e=i?436:509),t instanceof File)return{isFile:i,t:n||new Date(t.lastModified),bytes:t.stream(),mode:e};if(t instanceof Response)return{isFile:i,t:n||new Date(t.headers.get("Last-Modified")||Date.now()),bytes:t.body,mode:e};if(n===void 0)n=new Date;else if(isNaN(n))throw new Error("Invalid modification date.");if(!i)return{isFile:i,t:n,mode:e};if(typeof t=="string")return{isFile:i,t:n,bytes:y(t),mode:e};if(t instanceof Blob)return{isFile:i,t:n,bytes:t.stream(),mode:e};if(t instanceof Uint8Array||t instanceof ReadableStream)return{isFile:i,t:n,bytes:t,mode:e};if(t instanceof ArrayBuffer||ArrayBuffer.isView(t))return{isFile:i,t:n,bytes:u(t),mode:e};if(Symbol.asyncIterator in t)return{isFile:i,t:n,bytes:v(t[Symbol.asyncIterator]()),mode:e};throw new TypeError("Unsupported input format.")}function v(t,n=t){return new ReadableStream({async pull(e){let i=0;for(;e.desiredSize>i;){const o=await t.next();if(!o.value){e.close();break}{const r=M(o.value);e.enqueue(r),i+=r.byteLength}}},async cancel(e){var i;await((i=n.throw)==null?void 0:i.call(n,e))}})}function M(t){return typeof t=="string"?y(t):t instanceof Uint8Array?t:u(t)}function I(t,n,e){let[i,o]=function(r){return r?r instanceof Uint8Array?[r,1]:ArrayBuffer.isView(r)||r instanceof ArrayBuffer?[u(r),1]:[y(r),0]:[void 0,0]}(n);if(t instanceof File)return{i:w(i||y(t.name)),o:BigInt(t.size),u:o};if(t instanceof Response){const r=t.headers.get("content-disposition"),f=r&&r.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),a=f&&f[1]||t.url&&new URL(t.url).pathname.split("/").findLast(Boolean),l=a&&decodeURIComponent(a),d=e||+t.headers.get("content-length");return{i:w(i||y(l)),o:BigInt(d),u:o}}return i=w(i,t!==void 0||e!==void 0),typeof t=="string"?{i,o:BigInt(y(t).length),u:o}:t instanceof Blob?{i,o:BigInt(t.size),u:o}:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?{i,o:BigInt(t.byteLength),u:o}:{i,o:T(t,e),u:o}}function T(t,n){return n>-1?BigInt(n):t?void 0:0n}function w(t,n=1){if(!t||t.every(e=>e===47))throw new Error("The file must have a name.");if(n)for(;t[t.length-1]===47;)t=t.subarray(0,-1);else t[t.length-1]!==47&&(t=new Uint8Array([...t,47]));return t}var F=new Uint32Array(256);for(let t=0;t<256;++t){let n=t;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);F[t]=n}function B(t,n=0){n=~n;for(var e=0,i=t.length;e<i;e++)n=n>>>8^F[255&n^t[e]];return~n>>>0}function A(t,n,e=0){const i=t.getSeconds()>>1|t.getMinutes()<<5|t.getHours()<<11,o=t.getDate()|t.getMonth()+1<<5|t.getFullYear()-1980<<9;n.setUint16(e,i,1),n.setUint16(e+2,o,1)}function L({i:t,u:n},e){return 8*(!n||(e??function(i){try{N.decode(i)}catch{return 0}return 1}(t)))}var N=new TextDecoder("utf8",{fatal:1});function E(t,n=0){const e=U(30);return e.setUint32(0,1347093252),e.setUint32(4,754976768|n),A(t.t,e,10),e.setUint16(26,t.i.length,1),u(e)}async function*z(t){let{bytes:n}=t;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,t.l=B(n,0),t.o=BigInt(n.length);else{t.o=0n;const e=n.getReader();for(;;){const{value:i,done:o}=await e.read();if(o)break;t.l=B(i,t.l),t.o+=BigInt(i.length),yield i}}}function V(t,n){const e=U(16+(n?8:0));return e.setUint32(0,1347094280),e.setUint32(4,t.isFile?t.l:0,1),n?(e.setBigUint64(8,t.o,1),e.setBigUint64(16,t.o,1)):(e.setUint32(8,c(t.o),1),e.setUint32(12,c(t.o),1)),u(e)}function C(t,n,e=0,i=0){const o=U(46);return o.setUint32(0,1347092738),o.setUint32(4,755182848),o.setUint16(8,2048|e),A(t.t,o,12),o.setUint32(16,t.isFile?t.l:0,1),o.setUint32(20,c(t.o),1),o.setUint32(24,c(t.o),1),o.setUint16(28,t.i.length,1),o.setUint16(30,i,1),o.setUint16(40,t.mode|(t.isFile?32768:16384),1),o.setUint32(42,c(n),1),u(o)}function j(t,n,e){const i=U(e);return i.setUint16(0,1,1),i.setUint16(2,e-4,1),16&e&&(i.setBigUint64(4,t.o,1),i.setBigUint64(12,t.o,1)),i.setBigUint64(e-8,n,1),u(i)}function S(t){return t instanceof File||t instanceof Response?[[t],[t]]:[[t.input,t.name,t.size],[t.input,t.lastModified,t.mode]]}var D=t=>function(n){let e=BigInt(22),i=0n,o=0;for(const r of n){if(!r.i)throw new Error("Every file must have a non-empty name.");if(r.o===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(r.i)}".`);const f=r.o>=0xffffffffn,a=i>=0xffffffffn;i+=BigInt(46+r.i.length+(f&&8))+r.o,e+=BigInt(r.i.length+46+(12*a|28*f)),o||(o=f)}return(o||i>=0xffffffffn)&&(e+=BigInt(76)),e+i}(function*(n){for(const e of n)yield I(...S(e)[0])}(t));function O(t,n={}){const e={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof n.length=="bigint"||Number.isInteger(n.length))&&n.length>0&&(e["Content-Length"]=String(n.length)),n.metadata&&(e["Content-Length"]=String(D(n.metadata))),new Response(x(t,n),{headers:e})}function x(t,n={}){const e=function(i){var r;const o=i[Symbol.iterator in i?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const f=await o.next();if(f.done)return f;const[a,l]=S(f.value);return{done:0,value:Object.assign(R(...l),I(...a))}},throw:(r=o.throw)==null?void 0:r.bind(o),[Symbol.asyncIterator](){return this}}}(t);return v(async function*(i,o){const r=[];let f=0n,a=0n,l=0;for await(const s of i){const p=L(s,o.buffersAreUTF8);yield E(s,p),yield new Uint8Array(s.i),s.isFile&&(yield*z(s));const h=s.o>=0xffffffffn,m=12*(f>=0xffffffffn)|28*h;yield V(s,h),r.push(C(s,f,p,m)),r.push(s.i),m&&r.push(j(s,f,m)),h&&(f+=8n),a++,f+=BigInt(46+s.i.length)+s.o,l||(l=h)}let d=0n;for(const s of r)yield s,d+=BigInt(s.length);if(l||f>=0xffffffffn){const s=U(76);s.setUint32(0,1347094022),s.setBigUint64(4,BigInt(44),1),s.setUint32(12,755182848),s.setBigUint64(24,a,1),s.setBigUint64(32,a,1),s.setBigUint64(40,d,1),s.setBigUint64(48,f,1),s.setUint32(56,1347094023),s.setBigUint64(64,f+d,1),s.setUint32(72,1,1),yield u(s)}const g=U(22);g.setUint32(0,1347093766),g.setUint16(8,b(a),1),g.setUint16(10,b(a),1),g.setUint32(12,c(d),1),g.setUint32(16,c(f),1),yield u(g)}(e,n),e)}exports.downloadZip=O;exports.makeZip=x;exports.predictLength=D;
@@ -1,15 +1,15 @@
1
- var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", _ = {
1
+ var a = "[0-9](_*[0-9])*", c = `\\.(${a})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", l = {
2
2
  className: "number",
3
3
  variants: [
4
4
  // DecimalFloatingPointLiteral
5
5
  // including ExponentPart
6
- { begin: `(\\b(${n})((${r})|\\.)?|(${r}))[eE][+-]?(${n})[fFdD]?\\b` },
6
+ { begin: `(\\b(${a})((${c})|\\.)?|(${c}))[eE][+-]?(${a})[fFdD]?\\b` },
7
7
  // excluding ExponentPart
8
- { begin: `\\b(${n})((${r})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
9
- { begin: `(${r})[fFdD]?\\b` },
10
- { begin: `\\b(${n})[fFdD]\\b` },
8
+ { begin: `\\b(${a})((${c})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
9
+ { begin: `(${c})[fFdD]?\\b` },
10
+ { begin: `\\b(${a})[fFdD]\\b` },
11
11
  // HexadecimalFloatingPointLiteral
12
- { begin: `\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${n})[fFdD]?\\b` },
12
+ { begin: `\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${a})[fFdD]?\\b` },
13
13
  // DecimalIntegerLiteral
14
14
  { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
15
15
  // HexIntegerLiteral
@@ -21,11 +21,15 @@ var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", _
21
21
  ],
22
22
  relevance: 0
23
23
  };
24
- function b(e, t, a) {
25
- return a === -1 ? "" : e.replace(t, (c) => b(e, t, a - 1));
24
+ function O(e, s, n) {
25
+ return n === -1 ? "" : e.replace(s, (t) => O(e, s, n - 1));
26
26
  }
27
- function M(e) {
28
- const t = e.regex, a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", c = a + b("(?:<" + a + "~~~(?:\\s*,\\s*" + a + "~~~)*>)?", /~~~/g, 2), s = {
27
+ function A(e) {
28
+ const s = e.regex, n = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", t = "(?:(?:\\s*\\[\\s*])+)?", o = n + "<@@@>" + t, _ = "(?:" + ("\\?(?:\\s+(?:extends|super)\\s+" + o + ")?") + "|" + o + ")", E = O(
29
+ "(?:\\s*<\\s*" + _ + "(?:\\s*,\\s*" + _ + ")*\\s*>)?",
30
+ /<@@@>/g,
31
+ 2
32
+ ), r = {
29
33
  keyword: [
30
34
  "synchronized",
31
35
  "abstract",
@@ -91,9 +95,9 @@ function M(e) {
91
95
  "super",
92
96
  "this"
93
97
  ]
94
- }, o = {
98
+ }, b = {
95
99
  className: "meta",
96
- begin: "@" + a,
100
+ begin: "@" + n,
97
101
  contains: [
98
102
  {
99
103
  begin: /\(/,
@@ -102,11 +106,11 @@ function M(e) {
102
106
  // allow nested () inside our annotation
103
107
  }
104
108
  ]
105
- }, l = {
109
+ }, d = {
106
110
  className: "params",
107
111
  begin: /\(/,
108
112
  end: /\)/,
109
- keywords: s,
113
+ keywords: r,
110
114
  relevance: 0,
111
115
  contains: [e.C_BLOCK_COMMENT_MODE],
112
116
  endsParent: !0
@@ -114,7 +118,7 @@ function M(e) {
114
118
  return {
115
119
  name: "Java",
116
120
  aliases: ["jsp"],
117
- keywords: s,
121
+ keywords: r,
118
122
  illegal: /<\/|#/,
119
123
  contains: [
120
124
  e.COMMENT(
@@ -155,7 +159,7 @@ function M(e) {
155
159
  match: [
156
160
  /\b(?:class|interface|enum|extends|implements|new)/,
157
161
  /\s+/,
158
- a
162
+ n
159
163
  ],
160
164
  className: {
161
165
  1: "keyword",
@@ -167,62 +171,67 @@ function M(e) {
167
171
  match: /non-sealed/,
168
172
  scope: "keyword"
169
173
  },
174
+ {
175
+ // Expression keywords prevent keyword-led expressions from being
176
+ // recognized as variable or method declarations.
177
+ beginKeywords: "new throw return else yield assert",
178
+ relevance: 0
179
+ },
170
180
  {
171
181
  begin: [
172
- t.concat(/(?!else)/, a),
173
- /\s+/,
174
- a,
175
- /\s+/,
182
+ n,
183
+ s.concat(E, t, /\s+/),
184
+ n,
185
+ t,
186
+ /\s*/,
176
187
  /=(?!=)/
177
188
  ],
178
189
  className: {
179
190
  1: "type",
180
191
  3: "variable",
181
- 5: "operator"
192
+ 6: "operator"
182
193
  }
183
194
  },
184
195
  {
185
196
  begin: [
186
197
  /record/,
187
198
  /\s+/,
188
- a
199
+ n
189
200
  ],
190
201
  className: {
191
202
  1: "keyword",
192
203
  3: "title.class"
193
204
  },
194
205
  contains: [
195
- l,
206
+ d,
196
207
  e.C_LINE_COMMENT_MODE,
197
208
  e.C_BLOCK_COMMENT_MODE
198
209
  ]
199
210
  },
200
- {
201
- // Expression keywords prevent 'keyword Name(...)' from being
202
- // recognized as a function definition
203
- beginKeywords: "new throw return else",
204
- relevance: 0
205
- },
206
211
  {
207
212
  begin: [
208
- "(?:" + c + "\\s+)",
209
- e.UNDERSCORE_IDENT_RE,
213
+ n,
214
+ s.concat(E, t, /\s+/),
215
+ n,
210
216
  /\s*(?=\()/
211
217
  ],
212
- className: { 2: "title.function" },
213
- keywords: s,
218
+ className: {
219
+ 1: "type",
220
+ 3: "title.function"
221
+ },
222
+ keywords: r,
214
223
  contains: [
215
224
  {
216
225
  className: "params",
217
226
  begin: /\(/,
218
227
  end: /\)/,
219
- keywords: s,
228
+ keywords: r,
220
229
  relevance: 0,
221
230
  contains: [
222
- o,
231
+ b,
223
232
  e.APOS_STRING_MODE,
224
233
  e.QUOTE_STRING_MODE,
225
- _,
234
+ l,
226
235
  e.C_BLOCK_COMMENT_MODE
227
236
  ]
228
237
  },
@@ -230,11 +239,11 @@ function M(e) {
230
239
  e.C_BLOCK_COMMENT_MODE
231
240
  ]
232
241
  },
233
- _,
234
- o
242
+ l,
243
+ b
235
244
  ]
236
245
  };
237
246
  }
238
247
  export {
239
- M as default
248
+ A as default
240
249
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var a="[0-9](_*[0-9])*",i=`\\.(${a})`,c="[0-9a-fA-F](_*[0-9a-fA-F])*",E={className:"number",variants:[{begin:`(\\b(${a})((${i})|\\.)?|(${i}))[eE][+-]?(${a})[fFdD]?\\b`},{begin:`\\b(${a})((${i})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${i})[fFdD]?\\b`},{begin:`\\b(${a})[fFdD]\\b`},{begin:`\\b0[xX]((${c})\\.?|(${c})?\\.(${c}))[pP][+-]?(${a})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${c})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function d(e,t,n){return n===-1?"":e.replace(t,s=>d(e,t,n-1))}function N(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s="(?:(?:\\s*\\[\\s*])+)?",o=n+"<@@@>"+s,_="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+o+")?")+"|"+o+")",b=d("(?:\\s*<\\s*"+_+"(?:\\s*,\\s*"+_+")*\\s*>)?",/<@@@>/g,2),r={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},l={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},O={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:[n,t.concat(b,s,/\s+/),n,s,/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:[n,t.concat(b,s,/\s+/),n,/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[l,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,E,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},E,l]}}exports.default=N;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="[A-Za-z$_][0-9A-Za-z$_]*",G=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],K=["true","false","null","undefined","NaN","Infinity"],v=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],L=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],w=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],H=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],J=[].concat(w,v,L);function W(e){const a=e.regex,B=(t,{after:r})=>{const l="</"+t[0].slice(1);return t.input.indexOf(l,r)!==-1},n=p,A={begin:"<>",end:"</>"},h=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,r)=>{const l=t[0].length+t.index,d=t.input[l];if(d==="<"||d===","){r.ignoreMatch();return}d===">"&&(B(t,{after:l})||r.ignoreMatch());let u;const M=t.input.substring(l);if(u=M.match(/^\s*=/)){r.ignoreMatch();return}if((u=M.match(/^\s+extends\s+/))&&u.index===0){r.ignoreMatch();return}}},s={$pattern:p,keyword:G,literal:K,built_in:J,"variable.language":H},_="[0-9](_?[0-9])*",E=`\\.(${_})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",S={className:"number",variants:[{begin:`(\\b(${N})((${E})|\\.)?|(${E}))[eE][+-]?(${_})\\b`},{begin:`\\b(${N})\\b((${E})\\b|\\.)?|(${E})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},f={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},R={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,T,f,R,{match:/\$\d+/},S];c.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});const I=[].concat(g,c.contains),b=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(I)}]),i={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},U={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,a.concat(n,"(",a.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:a.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...v,...L]}},x={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[i],illegal:/%/},k={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(t){return a.concat("(?!",t.join("|"),")")}const $={match:a.concat(/\b/,P([...w,"super","import","await"].map(t=>`${t}\\s*\\(`)),n,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:a.concat(/\./,a.lookahead(a.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},i]},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",z={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[i]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:O},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,T,f,R,g,{match:/\$\d+/},S,O,{scope:"attr",match:n+a.lookahead(":"),relevance:0},z,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:A.begin,end:A.end},{match:h},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[i,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[i]},$,k,U,F,{match:/\$[(.]/}]}}exports.default=W;
@@ -137,6 +137,7 @@ const p = "[A-Za-z$_][0-9A-Za-z$_]*", G = [
137
137
  "localStorage",
138
138
  "sessionStorage",
139
139
  "module",
140
+ "self",
140
141
  "global"
141
142
  // Node.js
142
143
  ], J = [].concat(