From 941ffa60c536d7116d0c49343a9b40bb23f48dfb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 12:09:54 +0000 Subject: [PATCH] Deploy to GitHub pages --- .nojekyll | 0 converter/0408b44b6fd78fcf196a.js | 2 + converter/0408b44b6fd78fcf196a.js.map | 1 + converter/1d2bab617f7df0cd5414.js | 3 + converter/1d2bab617f7df0cd5414.js.LICENSE.txt | 1 + converter/1d2bab617f7df0cd5414.js.map | 1 + converter/20fc87c45c11772f288e.js | 71 ++ converter/20fc87c45c11772f288e.js.LICENSE.txt | 22 + converter/20fc87c45c11772f288e.js.map | 1 + converter/2ba55068bb44300b652d.js | 3 + converter/2ba55068bb44300b652d.js.LICENSE.txt | 23 + converter/2ba55068bb44300b652d.js.map | 1 + converter/360cff4bf6981215a1d6.js | 2 + converter/360cff4bf6981215a1d6.js.map | 1 + converter/3d46d0acd2ee8f92cdfa.js | 2 + converter/3d46d0acd2ee8f92cdfa.js.map | 1 + converter/413f167fa27c82813743.js | 3 + converter/413f167fa27c82813743.js.LICENSE.txt | 50 + converter/413f167fa27c82813743.js.map | 1 + converter/47b7fc5dc91d1aadb739.js | 2 + converter/47b7fc5dc91d1aadb739.js.map | 1 + converter/74a0d36eb8170ad36fd0.js | 2 + converter/74a0d36eb8170ad36fd0.js.map | 1 + converter/78333c9878ed6ee78e1b.js | 2 + converter/78333c9878ed6ee78e1b.js.map | 1 + converter/98a0f39ba08a3e1a741b.js | 2 + converter/98a0f39ba08a3e1a741b.js.map | 1 + converter/a9fc8bb7b651bd49fb44.js | 2 + converter/a9fc8bb7b651bd49fb44.js.map | 1 + converter/abc15c67319192d85f38.js | 2 + converter/abc15c67319192d85f38.js.map | 1 + converter/ce018fa2e2b09b63e94f.js | 2 + converter/ce018fa2e2b09b63e94f.js.map | 1 + converter/d201d166f422ad178128.js | 2 + converter/d201d166f422ad178128.js.map | 1 + converter/de4dda2facc175d66bb6.js | 2 + converter/de4dda2facc175d66bb6.js.map | 1 + converter/e37acd904efbb43aa96a.js | 2 + converter/e37acd904efbb43aa96a.js.map | 1 + converter/edc5e3b80eb8cc706b60.js | 3 + converter/edc5e3b80eb8cc706b60.js.LICENSE.txt | 1 + converter/edc5e3b80eb8cc706b60.js.map | 1 + converter/ede0d9c570d71b59984d.js | 2 + converter/ede0d9c570d71b59984d.js.map | 1 + converter/f37c8ad051d692d8504b.js | 2 + converter/f37c8ad051d692d8504b.js.map | 1 + converter/index.html | 1 + ...nifest.74f96f006fa86ffce308728e7246654c.js | 186 ++++ converter/sw.js | 34 + rdf-editor/0408b44b6fd78fcf196a.js | 2 + rdf-editor/0408b44b6fd78fcf196a.js.map | 1 + rdf-editor/1d2bab617f7df0cd5414.js | 3 + .../1d2bab617f7df0cd5414.js.LICENSE.txt | 1 + rdf-editor/1d2bab617f7df0cd5414.js.map | 1 + rdf-editor/2ba55068bb44300b652d.js | 3 + .../2ba55068bb44300b652d.js.LICENSE.txt | 23 + rdf-editor/2ba55068bb44300b652d.js.map | 1 + rdf-editor/360cff4bf6981215a1d6.js | 2 + rdf-editor/360cff4bf6981215a1d6.js.map | 1 + rdf-editor/3d46d0acd2ee8f92cdfa.js | 2 + rdf-editor/3d46d0acd2ee8f92cdfa.js.map | 1 + rdf-editor/413f167fa27c82813743.js | 3 + .../413f167fa27c82813743.js.LICENSE.txt | 50 + rdf-editor/413f167fa27c82813743.js.map | 1 + rdf-editor/47b7fc5dc91d1aadb739.js | 2 + rdf-editor/47b7fc5dc91d1aadb739.js.map | 1 + rdf-editor/74a0d36eb8170ad36fd0.js | 2 + rdf-editor/74a0d36eb8170ad36fd0.js.map | 1 + rdf-editor/78333c9878ed6ee78e1b.js | 2 + rdf-editor/78333c9878ed6ee78e1b.js.map | 1 + rdf-editor/98a0f39ba08a3e1a741b.js | 2 + rdf-editor/98a0f39ba08a3e1a741b.js.map | 1 + rdf-editor/a9fc8bb7b651bd49fb44.js | 2 + rdf-editor/a9fc8bb7b651bd49fb44.js.map | 1 + rdf-editor/abc15c67319192d85f38.js | 2 + rdf-editor/abc15c67319192d85f38.js.map | 1 + rdf-editor/ce018fa2e2b09b63e94f.js | 2 + rdf-editor/ce018fa2e2b09b63e94f.js.map | 1 + rdf-editor/custom-elements.json | 517 +++++++++++ rdf-editor/d201d166f422ad178128.js | 2 + rdf-editor/d201d166f422ad178128.js.map | 1 + rdf-editor/db96c74897fd63df67cc.js | 791 ++++++++++++++++ .../db96c74897fd63df67cc.js.LICENSE.txt | 45 + rdf-editor/db96c74897fd63df67cc.js.map | 1 + rdf-editor/de4dda2facc175d66bb6.js | 2 + rdf-editor/de4dda2facc175d66bb6.js.map | 1 + rdf-editor/e37acd904efbb43aa96a.js | 2 + rdf-editor/e37acd904efbb43aa96a.js.map | 1 + rdf-editor/edc5e3b80eb8cc706b60.js | 3 + .../edc5e3b80eb8cc706b60.js.LICENSE.txt | 1 + rdf-editor/edc5e3b80eb8cc706b60.js.map | 1 + rdf-editor/ede0d9c570d71b59984d.js | 2 + rdf-editor/ede0d9c570d71b59984d.js.map | 1 + rdf-editor/f37c8ad051d692d8504b.js | 2 + rdf-editor/f37c8ad051d692d8504b.js.map | 1 + rdf-editor/index.html | 58 ++ ...nifest.c18b60451c82aab3665c20c95cf0ec19.js | 190 ++++ rdf-editor/sw.js | 34 + rdf-snippet/0d8f58b25e68e2420dcd.js | 2 + rdf-snippet/0d8f58b25e68e2420dcd.js.map | 1 + rdf-snippet/137854b94d33bc32f259.js | 3 + .../137854b94d33bc32f259.js.LICENSE.txt | 23 + rdf-snippet/137854b94d33bc32f259.js.map | 1 + rdf-snippet/1dd8d7b8ec9f33dc7318.js | 2 + rdf-snippet/1dd8d7b8ec9f33dc7318.js.map | 1 + rdf-snippet/205ca8fea4b0cc8a6a3f.js | 877 ++++++++++++++++++ .../205ca8fea4b0cc8a6a3f.js.LICENSE.txt | 45 + rdf-snippet/205ca8fea4b0cc8a6a3f.js.map | 1 + rdf-snippet/2eab4283ff53645b6d7b.js | 2 + rdf-snippet/2eab4283ff53645b6d7b.js.map | 1 + rdf-snippet/2f437c6c944338109150.js | 2 + rdf-snippet/2f437c6c944338109150.js.map | 1 + rdf-snippet/360cff4bf6981215a1d6.js | 2 + rdf-snippet/360cff4bf6981215a1d6.js.map | 1 + rdf-snippet/3dbc2c8cfb9fb6d6fecb.js | 3 + .../3dbc2c8cfb9fb6d6fecb.js.LICENSE.txt | 1 + rdf-snippet/3dbc2c8cfb9fb6d6fecb.js.map | 1 + rdf-snippet/3dc2dce6fd9927d542d4.js | 2 + rdf-snippet/3dc2dce6fd9927d542d4.js.map | 1 + rdf-snippet/62044ac4bef7074f6cd1.js | 3 + .../62044ac4bef7074f6cd1.js.LICENSE.txt | 1 + rdf-snippet/62044ac4bef7074f6cd1.js.map | 1 + rdf-snippet/657101c420f98337fb30.js | 2 + rdf-snippet/657101c420f98337fb30.js.map | 1 + rdf-snippet/6bb496f20b5113585f32.js | 2 + rdf-snippet/6bb496f20b5113585f32.js.map | 1 + rdf-snippet/78daba5bf027be5783f1.js | 2 + rdf-snippet/78daba5bf027be5783f1.js.map | 1 + rdf-snippet/885bff2ebd484d76de2b.js | 2 + rdf-snippet/885bff2ebd484d76de2b.js.map | 1 + rdf-snippet/98a0f39ba08a3e1a741b.js | 2 + rdf-snippet/98a0f39ba08a3e1a741b.js.map | 1 + rdf-snippet/a9fc8bb7b651bd49fb44.js | 2 + rdf-snippet/a9fc8bb7b651bd49fb44.js.map | 1 + rdf-snippet/ce018fa2e2b09b63e94f.js | 2 + rdf-snippet/ce018fa2e2b09b63e94f.js.map | 1 + rdf-snippet/custom-elements.json | 289 ++++++ rdf-snippet/d201d166f422ad178128.js | 2 + rdf-snippet/d201d166f422ad178128.js.map | 1 + rdf-snippet/ee50efb52e8c5db88cc3.js | 3 + .../ee50efb52e8c5db88cc3.js.LICENSE.txt | 50 + rdf-snippet/ee50efb52e8c5db88cc3.js.map | 1 + rdf-snippet/f37c8ad051d692d8504b.js | 2 + rdf-snippet/f37c8ad051d692d8504b.js.map | 1 + rdf-snippet/index.html | 76 ++ ...nifest.f07c471c4048c8bdc3ca11d31db0bce2.js | 190 ++++ rdf-snippet/sw.js | 34 + sparql-editor/449aa05a33107becb1c1.js | 791 ++++++++++++++++ .../449aa05a33107becb1c1.js.LICENSE.txt | 34 + sparql-editor/449aa05a33107becb1c1.js.map | 1 + sparql-editor/7090109440f3d603d94b.js | 2 + sparql-editor/7090109440f3d603d94b.js.map | 1 + sparql-editor/custom-elements.json | 127 +++ sparql-editor/index.html | 60 ++ ...nifest.4d5c08df5bfb8d4ce1cadc626b785ef7.js | 30 + sparql-editor/sw.js | 34 + 156 files changed, 4951 insertions(+) create mode 100644 .nojekyll create mode 100644 converter/0408b44b6fd78fcf196a.js create mode 100644 converter/0408b44b6fd78fcf196a.js.map create mode 100644 converter/1d2bab617f7df0cd5414.js create mode 100644 converter/1d2bab617f7df0cd5414.js.LICENSE.txt create mode 100644 converter/1d2bab617f7df0cd5414.js.map create mode 100644 converter/20fc87c45c11772f288e.js create mode 100644 converter/20fc87c45c11772f288e.js.LICENSE.txt create mode 100644 converter/20fc87c45c11772f288e.js.map create mode 100644 converter/2ba55068bb44300b652d.js create mode 100644 converter/2ba55068bb44300b652d.js.LICENSE.txt create mode 100644 converter/2ba55068bb44300b652d.js.map create mode 100644 converter/360cff4bf6981215a1d6.js create mode 100644 converter/360cff4bf6981215a1d6.js.map create mode 100644 converter/3d46d0acd2ee8f92cdfa.js create mode 100644 converter/3d46d0acd2ee8f92cdfa.js.map create mode 100644 converter/413f167fa27c82813743.js create mode 100644 converter/413f167fa27c82813743.js.LICENSE.txt create mode 100644 converter/413f167fa27c82813743.js.map create mode 100644 converter/47b7fc5dc91d1aadb739.js create mode 100644 converter/47b7fc5dc91d1aadb739.js.map create mode 100644 converter/74a0d36eb8170ad36fd0.js create mode 100644 converter/74a0d36eb8170ad36fd0.js.map create mode 100644 converter/78333c9878ed6ee78e1b.js create mode 100644 converter/78333c9878ed6ee78e1b.js.map create mode 100644 converter/98a0f39ba08a3e1a741b.js create mode 100644 converter/98a0f39ba08a3e1a741b.js.map create mode 100644 converter/a9fc8bb7b651bd49fb44.js create mode 100644 converter/a9fc8bb7b651bd49fb44.js.map create mode 100644 converter/abc15c67319192d85f38.js create mode 100644 converter/abc15c67319192d85f38.js.map create mode 100644 converter/ce018fa2e2b09b63e94f.js create mode 100644 converter/ce018fa2e2b09b63e94f.js.map create mode 100644 converter/d201d166f422ad178128.js create mode 100644 converter/d201d166f422ad178128.js.map create mode 100644 converter/de4dda2facc175d66bb6.js create mode 100644 converter/de4dda2facc175d66bb6.js.map create mode 100644 converter/e37acd904efbb43aa96a.js create mode 100644 converter/e37acd904efbb43aa96a.js.map create mode 100644 converter/edc5e3b80eb8cc706b60.js create mode 100644 converter/edc5e3b80eb8cc706b60.js.LICENSE.txt create mode 100644 converter/edc5e3b80eb8cc706b60.js.map create mode 100644 converter/ede0d9c570d71b59984d.js create mode 100644 converter/ede0d9c570d71b59984d.js.map create mode 100644 converter/f37c8ad051d692d8504b.js create mode 100644 converter/f37c8ad051d692d8504b.js.map create mode 100644 converter/index.html create mode 100644 converter/precache-manifest.74f96f006fa86ffce308728e7246654c.js create mode 100644 converter/sw.js create mode 100644 rdf-editor/0408b44b6fd78fcf196a.js create mode 100644 rdf-editor/0408b44b6fd78fcf196a.js.map create mode 100644 rdf-editor/1d2bab617f7df0cd5414.js create mode 100644 rdf-editor/1d2bab617f7df0cd5414.js.LICENSE.txt create mode 100644 rdf-editor/1d2bab617f7df0cd5414.js.map create mode 100644 rdf-editor/2ba55068bb44300b652d.js create mode 100644 rdf-editor/2ba55068bb44300b652d.js.LICENSE.txt create mode 100644 rdf-editor/2ba55068bb44300b652d.js.map create mode 100644 rdf-editor/360cff4bf6981215a1d6.js create mode 100644 rdf-editor/360cff4bf6981215a1d6.js.map create mode 100644 rdf-editor/3d46d0acd2ee8f92cdfa.js create mode 100644 rdf-editor/3d46d0acd2ee8f92cdfa.js.map create mode 100644 rdf-editor/413f167fa27c82813743.js create mode 100644 rdf-editor/413f167fa27c82813743.js.LICENSE.txt create mode 100644 rdf-editor/413f167fa27c82813743.js.map create mode 100644 rdf-editor/47b7fc5dc91d1aadb739.js create mode 100644 rdf-editor/47b7fc5dc91d1aadb739.js.map create mode 100644 rdf-editor/74a0d36eb8170ad36fd0.js create mode 100644 rdf-editor/74a0d36eb8170ad36fd0.js.map create mode 100644 rdf-editor/78333c9878ed6ee78e1b.js create mode 100644 rdf-editor/78333c9878ed6ee78e1b.js.map create mode 100644 rdf-editor/98a0f39ba08a3e1a741b.js create mode 100644 rdf-editor/98a0f39ba08a3e1a741b.js.map create mode 100644 rdf-editor/a9fc8bb7b651bd49fb44.js create mode 100644 rdf-editor/a9fc8bb7b651bd49fb44.js.map create mode 100644 rdf-editor/abc15c67319192d85f38.js create mode 100644 rdf-editor/abc15c67319192d85f38.js.map create mode 100644 rdf-editor/ce018fa2e2b09b63e94f.js create mode 100644 rdf-editor/ce018fa2e2b09b63e94f.js.map create mode 100644 rdf-editor/custom-elements.json create mode 100644 rdf-editor/d201d166f422ad178128.js create mode 100644 rdf-editor/d201d166f422ad178128.js.map create mode 100644 rdf-editor/db96c74897fd63df67cc.js create mode 100644 rdf-editor/db96c74897fd63df67cc.js.LICENSE.txt create mode 100644 rdf-editor/db96c74897fd63df67cc.js.map create mode 100644 rdf-editor/de4dda2facc175d66bb6.js create mode 100644 rdf-editor/de4dda2facc175d66bb6.js.map create mode 100644 rdf-editor/e37acd904efbb43aa96a.js create mode 100644 rdf-editor/e37acd904efbb43aa96a.js.map create mode 100644 rdf-editor/edc5e3b80eb8cc706b60.js create mode 100644 rdf-editor/edc5e3b80eb8cc706b60.js.LICENSE.txt create mode 100644 rdf-editor/edc5e3b80eb8cc706b60.js.map create mode 100644 rdf-editor/ede0d9c570d71b59984d.js create mode 100644 rdf-editor/ede0d9c570d71b59984d.js.map create mode 100644 rdf-editor/f37c8ad051d692d8504b.js create mode 100644 rdf-editor/f37c8ad051d692d8504b.js.map create mode 100644 rdf-editor/index.html create mode 100644 rdf-editor/precache-manifest.c18b60451c82aab3665c20c95cf0ec19.js create mode 100644 rdf-editor/sw.js create mode 100644 rdf-snippet/0d8f58b25e68e2420dcd.js create mode 100644 rdf-snippet/0d8f58b25e68e2420dcd.js.map create mode 100644 rdf-snippet/137854b94d33bc32f259.js create mode 100644 rdf-snippet/137854b94d33bc32f259.js.LICENSE.txt create mode 100644 rdf-snippet/137854b94d33bc32f259.js.map create mode 100644 rdf-snippet/1dd8d7b8ec9f33dc7318.js create mode 100644 rdf-snippet/1dd8d7b8ec9f33dc7318.js.map create mode 100644 rdf-snippet/205ca8fea4b0cc8a6a3f.js create mode 100644 rdf-snippet/205ca8fea4b0cc8a6a3f.js.LICENSE.txt create mode 100644 rdf-snippet/205ca8fea4b0cc8a6a3f.js.map create mode 100644 rdf-snippet/2eab4283ff53645b6d7b.js create mode 100644 rdf-snippet/2eab4283ff53645b6d7b.js.map create mode 100644 rdf-snippet/2f437c6c944338109150.js create mode 100644 rdf-snippet/2f437c6c944338109150.js.map create mode 100644 rdf-snippet/360cff4bf6981215a1d6.js create mode 100644 rdf-snippet/360cff4bf6981215a1d6.js.map create mode 100644 rdf-snippet/3dbc2c8cfb9fb6d6fecb.js create mode 100644 rdf-snippet/3dbc2c8cfb9fb6d6fecb.js.LICENSE.txt create mode 100644 rdf-snippet/3dbc2c8cfb9fb6d6fecb.js.map create mode 100644 rdf-snippet/3dc2dce6fd9927d542d4.js create mode 100644 rdf-snippet/3dc2dce6fd9927d542d4.js.map create mode 100644 rdf-snippet/62044ac4bef7074f6cd1.js create mode 100644 rdf-snippet/62044ac4bef7074f6cd1.js.LICENSE.txt create mode 100644 rdf-snippet/62044ac4bef7074f6cd1.js.map create mode 100644 rdf-snippet/657101c420f98337fb30.js create mode 100644 rdf-snippet/657101c420f98337fb30.js.map create mode 100644 rdf-snippet/6bb496f20b5113585f32.js create mode 100644 rdf-snippet/6bb496f20b5113585f32.js.map create mode 100644 rdf-snippet/78daba5bf027be5783f1.js create mode 100644 rdf-snippet/78daba5bf027be5783f1.js.map create mode 100644 rdf-snippet/885bff2ebd484d76de2b.js create mode 100644 rdf-snippet/885bff2ebd484d76de2b.js.map create mode 100644 rdf-snippet/98a0f39ba08a3e1a741b.js create mode 100644 rdf-snippet/98a0f39ba08a3e1a741b.js.map create mode 100644 rdf-snippet/a9fc8bb7b651bd49fb44.js create mode 100644 rdf-snippet/a9fc8bb7b651bd49fb44.js.map create mode 100644 rdf-snippet/ce018fa2e2b09b63e94f.js create mode 100644 rdf-snippet/ce018fa2e2b09b63e94f.js.map create mode 100644 rdf-snippet/custom-elements.json create mode 100644 rdf-snippet/d201d166f422ad178128.js create mode 100644 rdf-snippet/d201d166f422ad178128.js.map create mode 100644 rdf-snippet/ee50efb52e8c5db88cc3.js create mode 100644 rdf-snippet/ee50efb52e8c5db88cc3.js.LICENSE.txt create mode 100644 rdf-snippet/ee50efb52e8c5db88cc3.js.map create mode 100644 rdf-snippet/f37c8ad051d692d8504b.js create mode 100644 rdf-snippet/f37c8ad051d692d8504b.js.map create mode 100644 rdf-snippet/index.html create mode 100644 rdf-snippet/precache-manifest.f07c471c4048c8bdc3ca11d31db0bce2.js create mode 100644 rdf-snippet/sw.js create mode 100644 sparql-editor/449aa05a33107becb1c1.js create mode 100644 sparql-editor/449aa05a33107becb1c1.js.LICENSE.txt create mode 100644 sparql-editor/449aa05a33107becb1c1.js.map create mode 100644 sparql-editor/7090109440f3d603d94b.js create mode 100644 sparql-editor/7090109440f3d603d94b.js.map create mode 100644 sparql-editor/custom-elements.json create mode 100644 sparql-editor/index.html create mode 100644 sparql-editor/precache-manifest.4d5c08df5bfb8d4ce1cadc626b785ef7.js create mode 100644 sparql-editor/sw.js diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/converter/0408b44b6fd78fcf196a.js b/converter/0408b44b6fd78fcf196a.js new file mode 100644 index 00000000..1389ab18 --- /dev/null +++ b/converter/0408b44b6fd78fcf196a.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{377:function(t,e,s){if("function"!=typeof queueMicrotask){let t=Promise.resolve();try{queueMicrotask=e=>t.then(e).catch(t=>setTimeout(()=>{throw t},0))}catch(t){}}const i=s(243),r=s(43),n=/^[a-z][a-z0-9+\-.]*:(?:[^\0-\x20<>"{}|^`\\]|\\u[A-Fa-f0-9]{4}|\\U[A-Fa-f0-9]{8})*$/,a=/^[a-z][a-z0-9+\-.]*:[^\0-\x20<>"{}|^`]*$/,l=/^([^\0-\x20<>"{}|^`\\]|\\u[A-Fa-f0-9]{4}|\\U[A-Fa-f0-9]{8})*$/,_=/^([^\0-\x20<>"{}|^`])*$/,o=/\\u([0-9A-Fa-f]{4})|\\U([0-9A-Fa-f]{8})/g,h=(t,e,s)=>String.fromCodePoint(parseInt(e||s,16)),c=/\s*(?:#[^\n]*\n\s*)*\s*/y,f=/\s*(#[^\n]*\n\s*)*\s*/y,d=/[\\]/,u=/[^\n]+\n/y,p=/^(?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_0-9])(?:(?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.])*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?$/u,m=/^[a-z]+(-[a-z0-9]+)*$/,g=/[ \t]*/y,x=/@([A-Za-z]+(?:-[A-Za-z0-9-]+)*)(?:\s+|(?=[.,;\])#]))/y,b=/<([^>]*)>\s*/y,y=(t,e,s,i,r,n)=>{if(e)switch(e){case"t":return"\t";case"n":return"\n";case"r":return"\r";case"f":return"\f";case"b":return"\b";default:console.assert(`bad regex escape char mapping: '${e}'`)}else{if(s)return s;if(i)return String.fromCodePoint(parseInt(i,16));if(r)return String.fromCodePoint(parseInt(r,16));if(n)throw"\\"===n[0]?new Error(`expected string_literal but invalid escape sequence within contents: '${n}'. failed to parse a valid token`):new Error(`expected string_literal but invalid whitespace character within contents: ${JSON.stringify(n)}. failed to parse a valid token`);console.assert("unexpected no match branch in escape sequence replace callback")}},w=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\.))/g,k=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\[^uU]|\\u[^]{4}|\\U[^]{8}))/g,I=t=>t.replace(w,y),[j,$]=(()=>{let t=(()=>{try{new RegExp("(?(e.exec=s,e)}return t=>t()})();return[t(()=>new RegExp("(?new RegExp('(?]*)>|_:([^\x20\t<]+))[\x20\t]*<([^\\>]*)>[\x20\t]*(?:(?:(<[^\\>]*)>|_:([^\x20\t<]+))[\x20\t]*(?:<([^\\>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+|"([^"\\]*)(?:(")(?:\^\^<([^\\>]*)>|@([^\x20\t.]+)|)[\x20\t]*(?:<([^\\>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+)?)/y,A=/(?:<([^>]*)>|_:([^\x20\t<]+))[\x20\t]*<([^>]*)>[\x20\t]*(?:(?:(<[^>]*)>|_:([^\x20\t<]+))[\x20\t]*(?:<([^>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+|"((?:[^"\\]|\\.)*)(?:(")(?:\^\^<([^>]*)>|@([^\x20\t.]+)|)[\x20\t]*(?:<([^>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+)?)/y,v=/_:([^\x20\t<]+)/y;class F extends i.Transform{constructor(t){super({decodeStrings:!1,writableObjectMode:!1,readableObjectMode:!0,flush:t.flush,transform:t.transform}),this.on("pipe",t=>{this._ds_input=t,"function"==typeof t.setEncoding&&t.setEncoding("utf8")})}pipe(t){let e=t;return e._writableState.objectMode?t.isGraphyWritable&&(t=i.quads_to_writable()):t=i.quads_to_json(),t!==e?(super.pipe(t),t.pipe(e)):super.pipe(e)}}class q{constructor(t){let{input:e=null,relax:s=!1,debug:i=!1}=t,o=t.allow_relative_iris||t.allowRelativeIRIs||t.allowRelativeIris||!1,h=this._dc_factory=r.adopt(t.dataFactory||t.data_factory||r.unfiltered),d=this._f_quad=h.quad;Object.assign(this,{s:t.prepend||"",n:0,_b_debug:i,_b_relax:s,_b_destroyed:!1,_b_trim_start:!0,_f_state:this.statement,_kt_subject:null,_kt_predicate:null,_kt_object:null,_s_literal:""}),this._kt_default_graph=h.defaultGraph(),this._kt_rdfs_lang_string=h.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");let u=this._r_clean=c;t.relaxed&&console.warn(new Error("no such option 'relaxed'; did you mean 'relax' ?").stack.replace(/^Error:/,"Warning:")),"validate"in t&&console.warn(new Error("option 'validate' has been removed and validation is now on by default. Use 'relax' option if you wish to disable validation.").stack.replace(/^Error:/,"Warning:"));let g,x=h.namedNode,b=h.blankNode,y=h.languagedLiteral,w=o?l:n,k=o?_:a,I=this;Object.assign(this,s?{create_named_node:x,create_named_node_escapeless:x,create_blank_node:b,create_languaged_literal:y}:{create_named_node:t=>w.test(t)?x(t):I._error(`invalid IRI: "${t}"`),create_named_node_escapeless:t=>k.test(t)?x(t):I._error(`invalid IRI: "${t}"`),create_blank_node:t=>p.test(t)?b(t):I._error(`Invalid blank node label: "${t}"`),create_languaged_literal:(t,e)=>m.test(e)?y(t,e):I._error("Invalid literal language tag: "+e)});let j=!1;if(g=this.transform=new F({transform:(t,e,s)=>{j||(g.emit("ready"),j=!1);let i=this.s+=t;if(this._b_trim_start){u.lastIndex=0;let t=u.exec(i);this.emit_comments&&this.emit_comments(t[1]),this.i=u.lastIndex}else this.i=0;this.n=i.length;try{this.parse(!0)}catch(t){return g.destroy(t)}g.emit("progress",t.length),s()},flush:t=>{if(this.s.length){if(this.s+="\n",this._b_trim_start){u.lastIndex=0;let t=u.exec(this.s);this.emit_comments&&this.emit_comments(t[1]),this.i=u.lastIndex}else this.i=0;try{this.parse()}catch(t){return g.demolish(t)}if(this.s.length)return g.demolish(new Error(`parsing error occurred in state: statement\n ${this.s.substr(0,50)}\n ^ starting here`))}if(this._f_state!==this.statement)return g.demolish(new Error(`parsing error occurred in state: ${this._f_state.name}\n ${this.s.substr(0,50)}\n ^ starting here`));this.s=null,g.emit("progress",0),g.emit("eof"),t()}}),g._destroy=(...t)=>{this.destroy(...t)},this._f_data_quad=(t,e,s,i)=>g.push(d(t,e,s,i)),g.on("newListener",t=>{"comment"===t&&(u=f,this.emit_comments=t=>{if(!t)return;let e=t.slice(1).replace(/\n\s+$/,"").split(/\n+\s*#/g);for(let t of e)g.emit("comment",t)})}),this.bind(t),e)if(e.stream){let t=e.stream;queueMicrotask(()=>{t.pipe(g)})}else{if("string"!=typeof e.string)throw new TypeError("Invalid argument for input parameter: "+("object"==typeof e?JSON.stringify(e):e));{let t=e.string;queueMicrotask(()=>{g.end(t,"utf8")})}}g._graphy_reader=this}_error(t){throw this._b_destroyed=!0,new Error(t)}bind(t){let e=this.transform;t.error&&e.on("error",t.error),t.comment&&e.on("comment",t.comment),t.read&&e.once("read",t.read),t.progress&&e.on("progress",t.progress),t.eof&&e.once("eof",t.eof),t.end&&e.once("end",t.end),t.finish&&e.once("finish",t.finish),t.data&&e.on("data",t.data)}parse(){let t=this._f_state();for(;"function"==typeof t;)t=t.apply(this)}statement(){let t=this.s,e=(this.n,this.i),s=this._f_data_quad,i=this.create_named_node,r=this.create_named_node_escapeless,n=this.create_languaged_literal,a=this.create_blank_node,l=this._dc_factory.simpleLiteral,_=this._dc_factory.datatypedLiteral,c=this._kt_default_graph;for(;;){E.lastIndex=e;let f=E.exec(t);if(f){let i;e=E.lastIndex;let o=!1;if(f[4]){i=r(f[4].slice(1))}else if(f[5])i=a(f[5]);else{o=!0;let s=f[9];if(!f[10]){this._s_literal=s,this.i=e;{let t=f[1];this._kt_subject=t||"string"==typeof t?r(t):a(f[2])}this._kt_predicate=r(f[3]);let i=this.strlit_contents();if(i&&this.statement!==i)return i;{let s=this._r_clean;s.lastIndex=this.i;let i=s.exec(t);this.emit_comments&&this.emit_comments(i[1]),e=s.lastIndex;continue}}if(f[11]){i=_(s,this.create_named_node_escapeless(f[11]))}else if(f[12]){i=n(s,f[12].toLowerCase())}else i=l(s)}let h,d=c;if(o){let t=f[13];t||"string"==typeof t?d=r(t):f[14]&&(d=a(f[14]))}else{let t=f[6];t||"string"==typeof t?d=r(t):f[7]&&(d=a(f[7]))}{let t=f[1];h=t||"string"==typeof t?r(t):a(f[2])}s(h,r(f[3]),i,d),this.emit_comments&&this.emit_comments(f[8]||f[15])}else{A.lastIndex=e;let r=A.exec(t);if(r){let f;e=A.lastIndex;let u=!1;if(r[4]){let t=r[4].slice(1);f=i(d.test(t)?t.replace(o,h):t)}else if(r[5])f=a(d.test(r[5])?r[5].replace(o,h):r[5]);else{u=!0;let s=r[9];if(!r[10]){this._s_literal=s,this.i=e;{let t=r[1];this._kt_subject=t||"string"==typeof t?i(d.test(t)?t.replace(o,h):t):a(r[2])}this._kt_predicate=i(d.test(r[3])?r[3].replace(o,h):r[3]);let n=this.strlit_contents();if(n&&this.statement!==n)return n;{let s=this._r_clean;s.lastIndex=this.i;let i=s.exec(t);this.emit_comments&&this.emit_comments(i[1]),e=s.lastIndex;continue}}if(s=I(s),r[11]){f=_(s,this.create_named_node(r[11]))}else if(r[12]){f=n(s,r[12].toLowerCase())}else f=l(s)}let p,m=c;if(u){let t=r[13];t||"string"==typeof t?m=i(d.test(t)?t.replace(o,h):t):r[14]&&(m=a(r[14]))}else{let t=r[6];t||"string"==typeof t?m=i(d.test(t)?t.replace(o,h):t):r[7]&&(m=a(r[7]))}{let t=r[1];p=t||"string"==typeof t?i(d.test(t)?t.replace(o,h):t):a(r[2])}let g=r[3];s(p,i(d.test(g)?g.replace(o,h):g),f,m),this.emit_comments&&this.emit_comments(r[8]||r[15])}else{if(u.lastIndex=e,!u.exec(t))break;e=u.lastIndex,this._error(`Failed to read statement:\n\`${t.substr(e,80).replace(/\n/g,"⏎")} [...]\`\n ^ starting here`)}}}return this.s=t.substr(e),this._f_state=this.statement,1}strlit_contents(){let{s:t,n:e,i:s}=this;$.lastIndex=s;let i=$.exec(t);if(i){let e=i.index,r=t.slice(s,e);return this._s_literal+=I(r),this.i=e+i[0].length,this._b_trim_start=!0,this.datatype_or_langtag()||this.statement}{let i=t.slice(s),[r,n]=(t=>{let e=j.exec(t);if(e){let s=e.index;return[t.slice(0,s).replace(k,y),t.slice(s)]}return[t.replace(k,y),""]})(i);this._s_literal+=r,this.i=s=e-n.length,this._b_trim_start=!1}return sthis.max_token_length?this.parse_error("strlit_contents"):(this._f_state=this.strlit_contents,this.s=t.slice(s),this.eos&&this.eos(),1)}datatype_or_langtag(){let{s:t,n:e,i:s}=this,i=t[s];for(;sthis.max_token_length?this.parse_error("datatype_or_langtag"):(this._f_state=this.datatype_or_langtag,this.s=t.slice(s),this.eos&&this.eos(),1)}statement_term(){let{s:t,n:e,i:s}=this,i=t.indexOf(".",s);return i>-1?(this._b_trim_start=!0,this.i=i+1,this.statement):(/^\s*$/.test(t.slice(s))||this.parse_error("statement_term"),this._b_trim_start=!1,this._f_state=this.statement_term,this.s=t.slice(s),this.eos&&this.eos(),1)}post_object(){let{s:t,n:e,i:s}=this;if(g.lastIndex=s,g.exec(t),s=g.lastIndex,s>=e)return this._f_state=this.post_object,this.s=t.slice(s),this.eos&&this.eos(),1;switch(t[s]){case".":return this.i=s+1,this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,this._kt_default_graph),this.statement;case"<":case"_":return this.i=s,this.graph();default:this.i=s,this.parse_error("post_object")}}graph(){let{s:t,n:e,i:s}=this;b.lastIndex=s;let i=b.exec(t);if(i){this.i=b.lastIndex;let t=this.create_named_node(i[1]);return this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,t),this.statement_term()}{v.lastIndex=s;let e=v.exec(t);if(e){this.i=v.lastIndex;let t=this._dc_factory.blankNode(e[1]);return this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,t),this.statement_term()}}return this._f_state=this.graph,this.s=t.slice(s),this.eos&&this.eos(),1}parse_error(t){return this._error(`Failed to read ${t}:\n\`${this.s.substr(this.i,80).replace(/\n/g,"⏎")} [...]\`\n ^ starting here`)}destroy(t){this._f_data_quad=()=>{},!t&&this._ds_input&&this._ds_input.destroy(t),this.transform.demolish(t)}}t.exports=function(...t){let e={};if(t.length){let s=t[0];if(s&&s.input&&void 0===s.input.string&&!s.input.stream&&(s=s.input),"string"==typeof s)e.input={string:s};else if(null===s)e.input=null;else if("function"==typeof s.setEncoding)e.input={stream:s};else{if("function"==typeof s.pipeTo)throw new TypeError("Sorry, WHATWG streams are currently not supported :(");if(!s||"object"!=typeof s||"[object Object]"!==Object.prototype.toString.call(s))throw new TypeError("unexpected input type: "+s);if(e=s,t.length>1)throw new TypeError("unexpected argument(s) after config struct: "+t.slice(1))}if(t.length>1&&(Object.assign(e,t[1]),t.length>2))throw new TypeError("unexpected argument(s) after input and config struct: "+t.slice(2))}return new q(e).transform}}}]); +//# sourceMappingURL=0408b44b6fd78fcf196a.js.map \ No newline at end of file diff --git a/converter/0408b44b6fd78fcf196a.js.map b/converter/0408b44b6fd78fcf196a.js.map new file mode 100644 index 00000000..f8d697ac --- /dev/null +++ b/converter/0408b44b6fd78fcf196a.js.map @@ -0,0 +1 @@ +{"version":3,"file":"0408b44b6fd78fcf196a.js","sources":["webpack:///0408b44b6fd78fcf196a.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/1d2bab617f7df0cd5414.js b/converter/1d2bab617f7df0cd5414.js new file mode 100644 index 00000000..e3af11f0 --- /dev/null +++ b/converter/1d2bab617f7df0cd5414.js @@ -0,0 +1,3 @@ +/*! For license information please see 1d2bab617f7df0cd5414.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{221:function(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;t{r.readable||r.emit("end")}),e.on("error",e=>{r.emit("error",e)}),r}}},234:function(e,t,r){"use strict";const i=new Set(["_write","_writableState","writable"]);t.a=function(e){return new Proxy(e,{has(e,t){return!i.has(t)&&Reflect.has(...arguments)},get(e,t){if(i.has(t))return;const r=Reflect.get(...arguments);return r&&"function"==typeof r.bind?r.bind(e):r},set(e,t,r){if(!i.has(t))return Reflect.set(...arguments)}})}},254:function(e,t,r){"use strict";const i="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",a="http://www.w3.org/2000/10/swap/";t.a={xsd:{decimal:s+"decimal",boolean:s+"boolean",double:s+"double",integer:s+"integer",string:s+"string"},rdf:{type:i+"type",nil:i+"nil",first:i+"first",rest:i+"rest",langString:i+"langString"},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:a+"reify#forSome",forAll:a+"reify#forAll"},log:{implies:a+"log#implies"}}},317:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return _}));var i=r(254),s=r(318),a=r.n(s);const{xsd:n}=i.a,u=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,h={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},l=/[\x00-\x20<>\\"\{\}\|\^\`]/,c={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},o=/$0^/;class _{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in c)&&this[e]instanceof RegExp&&(this[e]=o)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,i=r.length;for(;;){let e,u;for(;e=this._newline.exec(r);)this._comments&&(u=this._comment.exec(e[0]))&&s("comment",u[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),i=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(u=this._comment.exec(r))&&s("comment",u[1],"",this._line,r.length),r=null,s("eof","","",this._line,0)),this._input=r;const h=this._line,c=r[0];let o="",_="",d="",f=null,p=0,b=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(p=1,o="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){b=!0;break}case"<":if(f=this._unescapedIri.exec(r))o="IRI",_=f[1];else if(f=this._iri.exec(r)){if(_=this._unescape(f[1]),null===_||l.test(_))return a(this);o="IRI"}else r.length>1&&"<"===r[1]?(o="<<",p=2):this._n3Mode&&r.length>1&&"="===r[1]&&(o="inverse",p=2,_=">");break;case">":r.length>1&&">"===r[1]&&(o=">>",p=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(r+" ")))&&(o="blank",d="_",_=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))_=f[1];else if(({value:_,matchLength:p}=this._parseLiteral(r)),null===_)return a(this);null===f&&0===p||(o="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))_=f[1];else if(({value:_,matchLength:p}=this._parseLiteral(r)),null===_)return a(this);null===f&&0===p||(o="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(o="var",_=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(o="langcode",_=f[1]):(f=this._keyword.exec(r))&&(o=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){o=".",p=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(r+" ")))&&(o="literal",_=f[0],d="string"==typeof f[1]?n.double:"string"==typeof f[2]?n.decimal:n.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?o=f[0].toUpperCase():b=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(o="literal",_=f[0],d=n.boolean):b=!0;break;case"a":(f=this._shortPredicates.exec(r))?(o="abbreviation",_="a"):b=!0;break;case"=":this._n3Mode&&r.length>1&&(o="abbreviation",">"!==r[1]?(p=1,_="="):(p=2,_=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(p=1,o=c);break;default:b=!0}if(b&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(r+" ")))&&(o="prefixed",d=f[1]||"",_=this._unescape(f[2])):(o="prefix",_=f[1]||"")),"^^"===this._previousMarker)switch(o){case"prefixed":o="type";break;case"IRI":o="typeIRI";break;default:o=""}if(!o)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const g=p||f[0].length,x=s(o,_,d,h,g);this.previousToken=x,this._previousMarker=o,r=r.substr(g,r.length)}function s(t,s,a,n,u){const h=r?i-r.length:i,l={type:t,value:s,prefix:a,line:n,start:h,end:h+u};return e(null,l),l}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(u,(e,r,i,s)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof i){let e=Number.parseInt(i,16);return e<=65535?String.fromCharCode(Number.parseInt(i,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return s in h?h[s]:(t=!0,"")});return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let i=Math.max(this._literalClosingPos,r);for(;(i=e.indexOf(t,i))>0;){let t=0;for(;"\\"===e[i-t-1];)t++;if(t%2==0){const t=e.substring(r,i),s=t.split(/\r\n|\r|\n/).length-1,a=i+r;if(1===r&&0!==s||3===r&&this._lineMode)break;return this._line+=s,{value:this._unescape(t),matchLength:a}}i++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(t,r){if(this._line=1,"string"==typeof t){if(this._input=this._readStartingBom(t),"function"!=typeof r){const e=[];let t;if(this._tokenizeToEnd((r,i)=>r?t=r:e.push(i),!0),t)throw t;return e}a()(()=>this._tokenizeToEnd(r,!0))}else this._pendingBuffer=null,"function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",t=>{null!==this._input&&0!==t.length&&(this._pendingBuffer&&(t=e.concat([this._pendingBuffer,t]),this._pendingBuffer=null),128&t[t.length-1]?this._pendingBuffer=t:(void 0===this._input?this._input=this._readStartingBom("string"==typeof t?t:t.toString()):this._input+=t,this._tokenizeToEnd(r,!1)))}),t.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(r,!0)}),t.on("error",r)}}}).call(this,r(2).Buffer)},318:function(e,t){let r;e.exports="function"==typeof queueMicrotask?queueMicrotask:e=>(r||(r=Promise.resolve())).then(e).catch(e=>setTimeout(()=>{throw e},0))},379:function(e,t,r){"use strict";r.r(t);var i=r(221),s=r(61),a=r(234),n=r(317),u=r(254);const{rdf:h,xsd:l}=u.a;let c,o=0;const _={namedNode:function(e){return new p(e)},blankNode:function(e){return new g(e||"n3-"+o++)},variable:function(e){return new x(e)},literal:function(e,t){if("string"==typeof t)return new b(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";""===r&&("boolean"==typeof e?r=l.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?l.integer:l.double:(r=l.double,Number.isNaN(e)||(e=e>0?"INF":"-INF"))));return""===r||r===l.string?new b(`"${e}"`):new b(`"${e}"^^${r}`)},defaultGraph:function(){return c},quad:y,triple:y};var d=_;class f{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof f?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class p extends f{get termType(){return"NamedNode"}}class b extends f{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new n.a({lineMode:h,n3:u}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){k=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,i,s){const a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:i,object:s,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?this._graph.value+".":".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error("Unexpected "+t.type,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const i=this._prefixes[e.prefix];if(void 0===i)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(i+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error("Expected entity but got "+e.type,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+t,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error("Expected graph but got "+e.type,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,i=this._readListItem;const s=this._subject,a=this._contextStack,n=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),i=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(i=this._readPredicate,this._subject===this.RDF_NIL)return i}else if(i=this._getContextEndReader(),this._object===this.RDF_NIL)return i;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,i=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),i=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===s?null===n.predicate?n.subject=r:n.object=r:this._emit(s,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return i}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const i=this._subject,s=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,s&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==i){const e=this._predicate,t=this._object;s?this._emit(t,e,i,r):this._emit(i,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error("Unexpected "+e.type,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const i=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=i):(t=this._object,this._object=i),this._emit(t,r,i,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,i;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(i=this._subject,this._subject=t):(i=this._object,this._object=t),this._emit(t,r,i,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error("Expected >> but got "+e.type,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,i){this._callback(null,this._quad(e,t,r,i||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=v}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",i=-1,s=-1,a=0,n="/";for(;i=s&&(r=r.substr(0,a)),"/"!==n)return`${r}/${e.substr(i+1)}`;a=i+1}}}n=e[++i]}return r+e.substring(a)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${k++}_`,this._prefixCallback=r||v,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,i)=>{e?r=e:i&&t.push(i)},this._lexer.tokenize(e).every(e=>this._readCallback=this._readCallback(e)),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,(e,t)=>{null!==e?(this._callback(e),this._callback=v):this._readCallback&&(this._readCallback=this._readCallback(t))})}}function v(){}function I(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(u.a.rdf.first),e.RDF_REST=r(u.a.rdf.rest),e.RDF_NIL=r(u.a.rdf.nil),e.N3_FORALL=r(u.a.r.forAll),e.N3_FORSOME=r(u.a.r.forSome),e.ABBREVIATIONS={a:r(u.a.rdf.type),"=":r(u.a.owl.sameAs),">":r(u.a.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}I(j.prototype,d);var R=r(26);class P extends R.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;let t,r;new j(e).parse({on:(e,i)=>{switch(e){case"data":t=i;break;case"end":r=i}}},(e,t)=>{e&&this.emit("error",e)||t&&this.push(t)},(e,t)=>{this.emit("prefix",e,t)}),this._transform=(e,r,i)=>{t(e),i()},this._flush=e=>{r(),e()}}import(e){return e.on("data",e=>{this.write(e)}),e.on("end",()=>{this.end()}),e.on("error",e=>{this.emit("error",e)}),this}}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function S(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N(e,t){if(null==e)return{};var r,i,s=function(e,t){if(null==e)return{};var r,i,s={},a=Object.keys(e);for(i=0;i=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var O=class{constructor(e,t={}){let{baseIRI:r="",factory:i=s.a}=t,n=N(t,["baseIRI","factory"]);const u={blankNode:i.blankNode.bind(i),defaultGraph:i.defaultGraph.bind(i),literal:i.literal.bind(i),namedNode:i.namedNode.bind(i),quad:i.quad.bind(i)},h=new P(function(e){for(var t=1;t */ diff --git a/converter/1d2bab617f7df0cd5414.js.map b/converter/1d2bab617f7df0cd5414.js.map new file mode 100644 index 00000000..d049a45c --- /dev/null +++ b/converter/1d2bab617f7df0cd5414.js.map @@ -0,0 +1 @@ +{"version":3,"file":"1d2bab617f7df0cd5414.js","sources":["webpack:///1d2bab617f7df0cd5414.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/20fc87c45c11772f288e.js b/converter/20fc87c45c11772f288e.js new file mode 100644 index 00000000..031386b0 --- /dev/null +++ b/converter/20fc87c45c11772f288e.js @@ -0,0 +1,71 @@ +/*! For license information please see 20fc87c45c11772f288e.js.LICENSE.txt */ +!function(e){function t(t){for(var r,i,o=t[0],s=t[1],a=0,u=[];a=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return W(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return E(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){for(var f=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return M(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function I(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(12))},function(e,t,r){"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error:Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise:Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String:String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean:Boolean,Uint8Array:Uint8Array}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l,u=[],c=!1,f=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f1)for(var r=1;r=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,f=67108863&l,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:c[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,x=S>>>13,k=0|s[5],E=8191&k,A=k>>>13,C=0|s[6],T=8191&C,R=C>>>13,O=0|s[7],P=8191&O,L=O>>>13,N=0|s[8],I=8191&N,j=N>>>13,D=0|s[9],B=8191&D,z=D>>>13,W=0|a[0],U=8191&W,q=W>>>13,F=0|a[1],H=8191&F,$=F>>>13,V=0|a[2],K=8191&V,G=V>>>13,Y=0|a[3],X=8191&Y,Z=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],fe=8191&ce,de=ce>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,U)|0))<<13)|0;u=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(b,U)|0,o=Math.imul(b,q);var me=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(d,H)|0))<<13)|0;u=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,q))+Math.imul(y,U)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,$)|0;var ye=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,$)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0;var ve=(u+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,q))+Math.imul(x,U)|0,o=Math.imul(x,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0;var we=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(A,U)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,q))+Math.imul(R,U)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,q))+Math.imul(L,U)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var Me=(u+(n=n+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,$)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(z,U)|0,o=Math.imul(z,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,H)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var ke=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,$))+Math.imul(z,H)|0,o=Math.imul(z,$),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var Ee=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,G))+Math.imul(z,K)|0,o=Math.imul(z,G),n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(z,X)|0,o=Math.imul(z,Z),n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,de)|0;var Ce=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(z,Q)|0,o=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Te=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(z,re)|0,o=Math.imul(z,ne),n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(L,le)|0,o=o+Math.imul(L,ue)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Re=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,se))+Math.imul(z,oe)|0,o=Math.imul(z,se),n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,ue)|0,n=n+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Oe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(z,le)|0,o=Math.imul(z,ue),n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var Pe=(u+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(L,pe)|0))<<13)|0;u=((o=o+Math.imul(L,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(z,fe)|0,o=Math.imul(z,de);var Le=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863;var Ne=(u+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(z,pe)|0))<<13)|0;return u=((o=Math.imul(z,be))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=me,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=Se,l[7]=Me,l[8]=xe,l[9]=ke,l[10]=Ee,l[11]=Ae,l[12]=Ce,l[13]=Te,l[14]=Re,l[15]=Oe,l[16]=Pe,l[17]=Le,l[18]=Ne,0!==u&&(l[19]=u,r.length++),r};function b(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-o|f>>>o,c=f&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(f)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(v,y),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return m[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,M),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(94)(e))},function(e,t,r){"use strict";r.r(t),r.d(t,"acl",(function(){return l})),r.d(t,"as",(function(){return c})),r.d(t,"bibo",(function(){return d})),r.d(t,"cc",(function(){return p})),r.d(t,"cert",(function(){return g})),r.d(t,"cnt",(function(){return y})),r.d(t,"constant",(function(){return w})),r.d(t,"crm",(function(){return S})),r.d(t,"csvw",(function(){return x})),r.d(t,"ctag",(function(){return E})),r.d(t,"dashSparql",(function(){return C})),r.d(t,"dash",(function(){return R})),r.d(t,"dbo",(function(){return P})),r.d(t,"dc11",(function(){return N})),r.d(t,"dcam",(function(){return j})),r.d(t,"dcat",(function(){return B})),r.d(t,"dcmitype",(function(){return W})),r.d(t,"dcterms",(function(){return q})),r.d(t,"dig",(function(){return H})),r.d(t,"discipline",(function(){return V})),r.d(t,"doap",(function(){return G})),r.d(t,"dpv",(function(){return X})),r.d(t,"dqv",(function(){return J})),r.d(t,"dtype",(function(){return ee})),r.d(t,"duv",(function(){return re})),r.d(t,"earl",(function(){return ie})),r.d(t,"ebucore",(function(){return se})),r.d(t,"exif",(function(){return le})),r.d(t,"foaf",(function(){return ce})),r.d(t,"frbr",(function(){return de})),r.d(t,"geo",(function(){return pe})),r.d(t,"geof",(function(){return ge})),r.d(t,"geor",(function(){return ye})),r.d(t,"gml",(function(){return we})),r.d(t,"gn",(function(){return Se})),r.d(t,"gr",(function(){return xe})),r.d(t,"grddl",(function(){return Ee})),r.d(t,"gs1",(function(){return Ce})),r.d(t,"gtfs",(function(){return Re})),r.d(t,"http",(function(){return Pe})),r.d(t,"hydra",(function(){return Ne})),r.d(t,"ical",(function(){return je})),r.d(t,"la",(function(){return Be})),r.d(t,"ldp",(function(){return We})),r.d(t,"list",(function(){return qe})),r.d(t,"locn",(function(){return He})),r.d(t,"log",(function(){return Ve})),r.d(t,"lvont",(function(){return Ge})),r.d(t,"m4i",(function(){return Xe})),r.d(t,"ma",(function(){return Je})),r.d(t,"mads",(function(){return et})),r.d(t,"math",(function(){return rt})),r.d(t,"oa",(function(){return it})),r.d(t,"og",(function(){return st})),r.d(t,"oidc",(function(){return lt})),r.d(t,"org",(function(){return ct})),r.d(t,"owl",(function(){return dt})),r.d(t,"pim",(function(){return pt})),r.d(t,"prefix",(function(){return gt})),r.d(t,"prov",(function(){return yt})),r.d(t,"qb",(function(){return wt})),r.d(t,"qkdv",(function(){return St})),r.d(t,"quantitykind",(function(){return xt})),r.d(t,"qudt",(function(){return Et})),r.d(t,"rdau",(function(){return Ct})),r.d(t,"rdf",(function(){return Rt})),r.d(t,"rdfa",(function(){return Pt})),r.d(t,"rdfs",(function(){return Nt})),r.d(t,"rev",(function(){return jt})),r.d(t,"rico",(function(){return Bt})),r.d(t,"rr",(function(){return Wt})),r.d(t,"rss",(function(){return qt})),r.d(t,"schema",(function(){return Ht})),r.d(t,"sd",(function(){return Vt})),r.d(t,"sdmx",(function(){return Gt})),r.d(t,"sem",(function(){return Xt})),r.d(t,"set",(function(){return Jt})),r.d(t,"sf",(function(){return er})),r.d(t,"sh",(function(){return rr})),r.d(t,"shex",(function(){return ir})),r.d(t,"shsh",(function(){return sr})),r.d(t,"sioc",(function(){return lr})),r.d(t,"skos",(function(){return cr})),r.d(t,"skosxl",(function(){return dr})),r.d(t,"solid",(function(){return pr})),r.d(t,"sosa",(function(){return gr})),r.d(t,"sou",(function(){return yr})),r.d(t,"ssn",(function(){return wr})),r.d(t,"stat",(function(){return Sr})),r.d(t,"string",(function(){return xr})),r.d(t,"test",(function(){return Er})),r.d(t,"time",(function(){return Cr})),r.d(t,"unit",(function(){return Rr})),r.d(t,"vaem",(function(){return Pr})),r.d(t,"vann",(function(){return Nr})),r.d(t,"vcard",(function(){return jr})),r.d(t,"_void",(function(){return Br})),r.d(t,"vs",(function(){return Wr})),r.d(t,"wdrs",(function(){return qr})),r.d(t,"wgs",(function(){return Hr})),r.d(t,"xhv",(function(){return Vr})),r.d(t,"xkos",(function(){return Gr})),r.d(t,"xsd",(function(){return Xr})),r.d(t,"rif",(function(){return Jr})),r.d(t,"v",(function(){return en})),r.d(t,"wdr",(function(){return rn})),r.d(t,"xml",(function(){return on}));var n={};r.r(n),r.d(n,"default",(function(){return sn})),r.d(n,"acl",(function(){return l})),r.d(n,"as",(function(){return c})),r.d(n,"bibo",(function(){return d})),r.d(n,"cc",(function(){return p})),r.d(n,"cert",(function(){return g})),r.d(n,"cnt",(function(){return y})),r.d(n,"constant",(function(){return w})),r.d(n,"crm",(function(){return S})),r.d(n,"csvw",(function(){return x})),r.d(n,"ctag",(function(){return E})),r.d(n,"dashSparql",(function(){return C})),r.d(n,"dash",(function(){return R})),r.d(n,"dbo",(function(){return P})),r.d(n,"dc11",(function(){return N})),r.d(n,"dcam",(function(){return j})),r.d(n,"dcat",(function(){return B})),r.d(n,"dcmitype",(function(){return W})),r.d(n,"dcterms",(function(){return q})),r.d(n,"dig",(function(){return H})),r.d(n,"discipline",(function(){return V})),r.d(n,"doap",(function(){return G})),r.d(n,"dpv",(function(){return X})),r.d(n,"dqv",(function(){return J})),r.d(n,"dtype",(function(){return ee})),r.d(n,"duv",(function(){return re})),r.d(n,"earl",(function(){return ie})),r.d(n,"ebucore",(function(){return se})),r.d(n,"exif",(function(){return le})),r.d(n,"foaf",(function(){return ce})),r.d(n,"frbr",(function(){return de})),r.d(n,"geo",(function(){return pe})),r.d(n,"geof",(function(){return ge})),r.d(n,"geor",(function(){return ye})),r.d(n,"gml",(function(){return we})),r.d(n,"gn",(function(){return Se})),r.d(n,"gr",(function(){return xe})),r.d(n,"grddl",(function(){return Ee})),r.d(n,"gs1",(function(){return Ce})),r.d(n,"gtfs",(function(){return Re})),r.d(n,"http",(function(){return Pe})),r.d(n,"hydra",(function(){return Ne})),r.d(n,"ical",(function(){return je})),r.d(n,"la",(function(){return Be})),r.d(n,"ldp",(function(){return We})),r.d(n,"list",(function(){return qe})),r.d(n,"locn",(function(){return He})),r.d(n,"log",(function(){return Ve})),r.d(n,"lvont",(function(){return Ge})),r.d(n,"m4i",(function(){return Xe})),r.d(n,"ma",(function(){return Je})),r.d(n,"mads",(function(){return et})),r.d(n,"math",(function(){return rt})),r.d(n,"oa",(function(){return it})),r.d(n,"og",(function(){return st})),r.d(n,"oidc",(function(){return lt})),r.d(n,"org",(function(){return ct})),r.d(n,"owl",(function(){return dt})),r.d(n,"pim",(function(){return pt})),r.d(n,"prefix",(function(){return gt})),r.d(n,"prov",(function(){return yt})),r.d(n,"qb",(function(){return wt})),r.d(n,"qkdv",(function(){return St})),r.d(n,"quantitykind",(function(){return xt})),r.d(n,"qudt",(function(){return Et})),r.d(n,"rdau",(function(){return Ct})),r.d(n,"rdf",(function(){return Rt})),r.d(n,"rdfa",(function(){return Pt})),r.d(n,"rdfs",(function(){return Nt})),r.d(n,"rev",(function(){return jt})),r.d(n,"rico",(function(){return Bt})),r.d(n,"rr",(function(){return Wt})),r.d(n,"rss",(function(){return qt})),r.d(n,"schema",(function(){return Ht})),r.d(n,"sd",(function(){return Vt})),r.d(n,"sdmx",(function(){return Gt})),r.d(n,"sem",(function(){return Xt})),r.d(n,"set",(function(){return Jt})),r.d(n,"sf",(function(){return er})),r.d(n,"sh",(function(){return rr})),r.d(n,"shex",(function(){return ir})),r.d(n,"shsh",(function(){return sr})),r.d(n,"sioc",(function(){return lr})),r.d(n,"skos",(function(){return cr})),r.d(n,"skosxl",(function(){return dr})),r.d(n,"solid",(function(){return pr})),r.d(n,"sosa",(function(){return gr})),r.d(n,"sou",(function(){return yr})),r.d(n,"ssn",(function(){return wr})),r.d(n,"stat",(function(){return Sr})),r.d(n,"string",(function(){return xr})),r.d(n,"test",(function(){return Er})),r.d(n,"time",(function(){return Cr})),r.d(n,"unit",(function(){return Rr})),r.d(n,"vaem",(function(){return Pr})),r.d(n,"vann",(function(){return Nr})),r.d(n,"vcard",(function(){return jr})),r.d(n,"_void",(function(){return Br})),r.d(n,"vs",(function(){return Wr})),r.d(n,"wdrs",(function(){return qr})),r.d(n,"wgs",(function(){return Hr})),r.d(n,"xhv",(function(){return Vr})),r.d(n,"xkos",(function(){return Gr})),r.d(n,"xsd",(function(){return Xr})),r.d(n,"rif",(function(){return Jr})),r.d(n,"v",(function(){return en})),r.d(n,"wdr",(function(){return rn})),r.d(n,"xml",(function(){return on}));var i=r(61);const o={apply:(e,t,r)=>e(r[0]),get:(e,t)=>e(t)};var s=function(e,{factory:t=i.a}={}){const r=(r="")=>t.namedNode(`${e}${r.raw||r}`);return"undefined"==typeof Proxy?r:new Proxy(r,o)};const a=s("http://www.w3.org/ns/auth/acl#"),l=a,u=s("https://www.w3.org/ns/activitystreams#"),c=u,f=s("http://purl.org/ontology/bibo/"),d=f,h=s("http://creativecommons.org/ns#"),p=h,b=s("http://www.w3.org/ns/auth/cert#"),g=b,m=s("http://www.w3.org/2011/content#"),y=m,v=s("http://qudt.org/vocab/constant/"),w=v,_=s("http://www.cidoc-crm.org/cidoc-crm/"),S=_,M=s("http://www.w3.org/ns/csvw#"),x=M,k=s("http://commontag.org/ns#"),E=k,A=s("http://datashapes.org/sparql#"),C=A,T=s("http://datashapes.org/dash#"),R=T,O=s("http://dbpedia.org/ontology/"),P=O,L=s("http://purl.org/dc/elements/1.1/"),N=L,I=s("http://purl.org/dc/dcam/"),j=I,D=s("http://www.w3.org/ns/dcat#"),B=D,z=s("http://purl.org/dc/dcmitype/"),W=z,U=s("http://purl.org/dc/terms/"),q=U,F=s("http://www.ics.forth.gr/isl/CRMdig/"),H=F,$=s("http://qudt.org/vocab/discipline/"),V=$,K=s("http://usefulinc.com/ns/doap#"),G=K,Y=s("http://www.w3.org/ns/dpv#"),X=Y,Z=s("http://www.w3.org/ns/dqv#"),J=Z,Q=s("http://www.linkedmodel.org/schema/dtype#"),ee=Q,te=s("http://www.w3.org/ns/duv#"),re=te,ne=s("http://www.w3.org/ns/earl#"),ie=ne,oe=s("http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#"),se=oe,ae=s("http://www.w3.org/2003/12/exif/ns#"),le=ae,ue=s("http://xmlns.com/foaf/0.1/"),ce=ue,fe=s("http://purl.org/vocab/frbr/core#"),de=fe,he=s("http://www.opengis.net/ont/geosparql#"),pe=he,be=s("http://www.opengis.net/def/function/geosparql/"),ge=be,me=s("http://www.opengis.net/def/rule/geosparql/"),ye=me,ve=s("http://www.opengis.net/ont/gml#"),we=ve,_e=s("http://www.geonames.org/ontology#"),Se=_e,Me=s("http://purl.org/goodrelations/v1#"),xe=Me,ke=s("http://www.w3.org/2003/g/data-view#"),Ee=ke,Ae=s("https://gs1.org/voc/"),Ce=Ae,Te=s("http://vocab.gtfs.org/terms#"),Re=Te,Oe=s("http://www.w3.org/2011/http#"),Pe=Oe,Le=s("http://www.w3.org/ns/hydra/core#"),Ne=Le,Ie=s("http://www.w3.org/2002/12/cal/icaltzd#"),je=Ie,De=s("https://linked.art/ns/terms/"),Be=De,ze=s("http://www.w3.org/ns/ldp#"),We=ze,Ue=s("http://www.w3.org/2000/10/swap/list#"),qe=Ue,Fe=s("http://www.w3.org/ns/locn#"),He=Fe,$e=s("http://www.w3.org/2000/10/swap/log#"),Ve=$e,Ke=s("http://lexvo.org/ontology#"),Ge=Ke,Ye=s("http://w3id.org/nfdi4ing/metadata4ing#"),Xe=Ye,Ze=s("http://www.w3.org/ns/ma-ont#"),Je=Ze,Qe=s("http://www.loc.gov/mads/rdf/v1#"),et=Qe,tt=s("http://www.w3.org/2000/10/swap/math#"),rt=tt,nt=s("http://www.w3.org/ns/oa#"),it=nt,ot=s("http://ogp.me/ns#"),st=ot,at=s("http://www.w3.org/ns/solid/oidc#"),lt=at,ut=s("http://www.w3.org/ns/org#"),ct=ut,ft=s("http://www.w3.org/2002/07/owl#"),dt=ft,ht=s("http://www.w3.org/ns/pim/space#"),pt=ht,bt=s("http://qudt.org/vocab/prefix/"),gt=bt,mt=s("http://www.w3.org/ns/prov#"),yt=mt,vt=s("http://purl.org/linked-data/cube#"),wt=vt,_t=s("http://qudt.org/vocab/dimensionvector/"),St=_t,Mt=s("http://qudt.org/vocab/quantitykind/"),xt=Mt,kt=s("http://qudt.org/schema/qudt/"),Et=kt,At=s("http://rdaregistry.info/Elements/u/"),Ct=At,Tt=s("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),Rt=Tt,Ot=s("http://www.w3.org/ns/rdfa#"),Pt=Ot,Lt=s("http://www.w3.org/2000/01/rdf-schema#"),Nt=Lt,It=s("http://purl.org/stuff/rev#"),jt=It,Dt=s("https://www.ica.org/standards/RiC/ontology#"),Bt=Dt,zt=s("http://www.w3.org/ns/r2rml#"),Wt=zt,Ut=s("http://purl.org/rss/1.0/"),qt=Ut,Ft=s("http://schema.org/"),Ht=Ft,$t=s("http://www.w3.org/ns/sparql-service-description#"),Vt=$t,Kt=s("http://purl.org/linked-data/sdmx#"),Gt=Kt,Yt=s("http://semanticweb.cs.vu.nl/2009/11/sem/"),Xt=Yt,Zt=s("http://www.w3.org/2000/10/swap/set#"),Jt=Zt,Qt=s("http://www.opengis.net/ont/sf#"),er=Qt,tr=s("http://www.w3.org/ns/shacl#"),rr=tr,nr=s("http://www.w3.org/ns/shex#"),ir=nr,or=s("https://www.w3.org/ns/shacl-shacl#"),sr=or,ar=s("http://rdfs.org/sioc/ns#"),lr=ar,ur=s("http://www.w3.org/2004/02/skos/core#"),cr=ur,fr=s("http://www.w3.org/2008/05/skos-xl#"),dr=fr,hr=s("http://www.w3.org/ns/solid/terms#"),pr=hr,br=s("http://www.w3.org/ns/sosa/"),gr=br,mr=s("http://qudt.org/vocab/sou/"),yr=mr,vr=s("http://www.w3.org/ns/ssn/"),wr=vr,_r=s("http://www.w3.org/ns/posix/stat#"),Sr=_r,Mr=s("http://www.w3.org/2000/10/swap/string#"),xr=Mr,kr=s("http://www.w3.org/2006/03/test-description#"),Er=kr,Ar=s("http://www.w3.org/2006/time#"),Cr=Ar,Tr=s("http://qudt.org/vocab/unit/"),Rr=Tr,Or=s("http://www.linkedmodel.org/schema/vaem#"),Pr=Or,Lr=s("http://purl.org/vocab/vann/"),Nr=Lr,Ir=s("http://www.w3.org/2006/vcard/ns#"),jr=Ir,Dr=s("http://rdfs.org/ns/void#"),Br=Dr,zr=s("http://www.w3.org/2003/06/sw-vocab-status/ns#"),Wr=zr,Ur=s("http://www.w3.org/2007/05/powder-s#"),qr=Ur,Fr=s("http://www.w3.org/2003/01/geo/wgs84_pos#"),Hr=Fr,$r=s("http://www.w3.org/1999/xhtml/vocab#"),Vr=$r,Kr=s("http://rdf-vocabulary.ddialliance.org/xkos#"),Gr=Kr,Yr=s("http://www.w3.org/2001/XMLSchema#"),Xr=Yr,Zr=s("http://www.w3.org/2007/rif#"),Jr=Zr,Qr=s("http://rdf.data-vocabulary.org/#"),en=Qr,tn=s("http://www.w3.org/2007/05/powder#"),rn=tn,nn=s("http://www.w3.org/XML/1998/namespace/"),on=nn;var sn=t.default=class{init(){this.ns=n}}},function(e,t,r){"use strict";const n=r(2),{kResistStopPropagation:i,SymbolDispose:o}=r(3),s=globalThis.AbortSignal||r(27).AbortSignal,a=globalThis.AbortController||r(27).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class d extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n}),resolve:e,reject:t}},promisify:e=>new Promise((t,r)=>{e((e,...n)=>e?r(e):t(...n))}),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();if("f"===r)return n.toFixed(6);if("j"===r)return JSON.stringify(n);if("s"===r&&"object"==typeof n){return((n.constructor!==Object?n.constructor.name:"")+" {}").trim()}return n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return String(e)+"n";case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(15).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE(t,"Function",e)})(t,"listener"),e.aborted?queueMicrotask(()=>t()):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach(e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})}),t.signal.addEventListener("abort",()=>{e.forEach(e=>e.removeEventListener("abort",r))},{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},function(e,t,r){"use strict";const{format:n,inspect:i,AggregateError:o}=r(7),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function d(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=e+" ":n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+="of type "+o[0];break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+="an instance of "+s[0];break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=""+a[0];break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=". Received "+r;else if("function"==typeof r&&r.name)n+=". Received function "+r.name;else if("object"==typeof r){var c;if(null!==(c=r.constructor)&&void 0!==c&&c.name)n+=". Received an instance of "+r.constructor.name;else{n+=". Received "+i(r,{depth:-1})}}else{let e=i(r,{colors:!1});e.length>25&&(e=e.slice(0,25)+"..."),n+=`. Received type ${typeof r} (${e})`}return n},TypeError),h("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let n=i(t);n.length>128&&(n=n.slice(0,128)+"...");return`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?"instance of "+r.constructor.name:"type "+typeof r}.`},TypeError),h("ERR_MISSING_ARGS",(...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return t+" must be specified"},TypeError),h("ERR_OUT_OF_RANGE",(e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=t,i=r(5),o=r(9),s=r(102);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-l:l,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+i&3,u=t.andln(3)+o&3;3===l&&(l=-1),3===u&&(u=-1),s=0==(1&l)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?l:-l,r[0].push(s),a=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==l?u:-u,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(9),i=r(0);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var l=0,u=t;return l+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,l,u){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,l,u){return t+n+o+a+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),f=o("nodejs.webstream.isClosedPromise"),d=o("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function y(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&(h(e)&&e.readable&&!_(e))}function M(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&(p(e)&&e.writable&&!w(e))}function x(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function k(e){return"boolean"==typeof e._sent100&&x(e)}e.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:S,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&x(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!!v(e)||(!1===(null==t?void 0:t.readable)||!S(e))&&(!1===(null==t?void 0:t.writable)||!M(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return g(e)||m(e)||y(e)},isWritable:M,isWritableNodeStream:p,isWritableStream:m,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:k,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&k(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:y}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){const n=r(4),{AbortError:i,codes:o}=r(8),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(7),{validateAbortSignal:c,validateFunction:f,validateObject:d,validateBoolean:h}=r(28),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3),{isClosed:m,isReadable:y,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:M,isWritableNodeStream:x,isWritableStream:k,isWritableFinished:E,isWritableErrored:A,isNodeStream:C,willEmitClose:T,kIsClosedPromise:R}=r(13);let O;function P(e){return e.setHeader&&"function"==typeof e.abort}const L=()=>{};function N(e,t,o){var h,p;if(2===arguments.length?(o=t,t=l):null==t?t=l:d(t,"options"),f(o,"callback"),c(t.signal,"options.signal"),o=u(o),w(e)||k(e))return I(e,t,o);if(!C(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const b=null!==(h=t.readable)&&void 0!==h?h:v(e),R=null!==(p=t.writable)&&void 0!==p?p:x(e),N=e._writableState,j=e._readableState,D=()=>{e.writable||W()};let B=T(e)&&v(e)===b&&x(e)===R,z=E(e,!1);const W=()=>{z=!0,e.destroyed&&(B=!1),(!B||e.readable&&!b)&&(b&&!U||o.call(e))};let U=_(e,!1);const q=()=>{U=!0,e.destroyed&&(B=!1),(!B||e.writable&&!R)&&(R&&!z||o.call(e))},F=t=>{o.call(e,t)};let H=m(e);const $=()=>{H=!0;const t=A(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):b&&!U&&v(e,!0)&&!_(e,!1)?o.call(e,new a):!R||z||E(e,!1)?void o.call(e):o.call(e,new a)},V=()=>{H=!0;const t=A(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},K=()=>{e.req.on("finish",W)};P(e)?(e.on("complete",W),B||e.on("abort",$),e.req?K():e.on("request",K)):R&&!N&&(e.on("end",D),e.on("close",D)),B||"boolean"!=typeof e.aborted||e.on("aborted",$),e.on("end",q),e.on("finish",W),!1!==t.error&&e.on("error",F),e.on("close",$),H?n.nextTick($):null!=N&&N.errorEmitted||null!=j&&j.errorEmitted?B||n.nextTick(V):(b||B&&!y(e)||!z&&!1!==M(e))&&(R||B&&!M(e)||!U&&!1!==y(e))?j&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const G=()=>{o=L,e.removeListener("aborted",$),e.removeListener("complete",W),e.removeListener("abort",$),e.removeListener("request",K),e.req&&e.req.removeListener("finish",W),e.removeListener("end",D),e.removeListener("close",D),e.removeListener("finish",W),e.removeListener("end",q),e.removeListener("error",F),e.removeListener("close",$)};if(t.signal&&!H){const s=()=>{const r=o;G(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{O=O||r(7).addAbortListener;const n=O(t.signal,s),i=o;o=u((...t)=>{n[g](),i.apply(e,t)})}}return G}function I(e,t,o){let s=!1,a=L;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{O=O||r(7).addAbortListener;const n=O(t.signal,a),i=o;o=u((...t)=>{n[g](),i.apply(e,t)})}const l=(...t)=>{s||n.nextTick(()=>o.apply(e,t))};return b(e[R].promise,l,l),L}e.exports=N,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p((r,i)=>{const o=N(e,t,e=>{n&&o(),e?i(e):r()})})}},function(e,t,r){var n=r(1).Buffer,i=r(26).Transform,o=r(18).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";var n=r(1).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";const n=r(4),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(8),{Symbol:a}=r(3),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(13),d=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){y(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function y(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(y,e,t):y(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(d,r):r?v(e,r,!0):n.nextTick(_,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function _(e){e.emit(h)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function M(e){e.emit("close")}function x(e,t){e.emit("error",t),n.nextTick(M,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(x,e,t):n.nextTick(M,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(d,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},function(e,t,r){"use strict";(function(t,n){var i=r(1).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(70),o=r(74);r(0)(u,i);for(var s=n(o.prototype),a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(96),o=r(100);r(0)(u,i);for(var s=n(o.prototype),a=0;ai}),e.exports.Stream=n.Stream,e.exports.default=e.exports},function(e,t,r){"use strict";const{AbortController:n,AbortSignal:i}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=n,e.exports.AbortSignal=i,e.exports.default=n},function(e,t,r){"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(8),{normalizeEncoding:M}=r(7),{isAsyncFunction:x,isArrayBufferView:k}=r(7).types,E={};const A=/^[0-7]+$/;const C=m((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)}),T=m((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)}),R=m((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0;if(e4294967295)throw new _(t,`>= ${n} && <= 4294967295`,e)});function O(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const P=m((e,t,r)=>{if(!i(r,e)){const n=o(s(r,e=>"string"==typeof e?`'${e}'`:p(e)),", ");throw new w(t,e,"must be one of: "+n)}});function L(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function N(e,t,r){return null!=e&&d(e,t)?e[t]:r}const I=m((e,t,r=null)=>{const i=N(r,"allowArray",!1),o=N(r,"allowFunction",!1);if(!N(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new v(t,"Object",e)}),j=m((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)}),D=m((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!k(e))throw new v(t,["Buffer","TypedArray","DataView"],e)});const z=m((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)}),W=m((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)}),U=m((e,t)=>{if("function"!=typeof e||x(e))throw new v(t,"Function",e)}),q=m((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)});const F=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!h(F,e))throw new w(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(A,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return R(e,t),e},validateArray:D,validateStringArray:function(e,t){D(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new _(t,`${null!=r?">= "+r:""}${null!=r&&null!=n?" && ":""}${null!=n?"<= "+n:""}`,e)},validateObject:I,validateOneOf:P,validatePlainFunction:U,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new y(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(O(e,t),void 0===E[e]){if(void 0!==E[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:O,validateUint32:R,validateUndefined:q,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${o(r,"|")}')`,e)},validateAbortSignal:z,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},function(e,t,r){"use strict";var n=r(0),i=r(47),o=r(49),s=r(50),a=r(17);function l(e){a.call(this,"digest"),this._hash=e}n(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new l(s(e))}},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{T=e});const R=r(120),O=r(19),{getHighWaterMark:P,getDefaultHighWaterMark:L}=r(37),{aggregateTwoErrors:N,codes:{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_OUT_OF_RANGE:D,ERR_STREAM_PUSH_AFTER_EOF:B,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:z},AbortError:W}=r(8),{validateObject:U}=r(28),q=S("kPaused"),{StringDecoder:F}=r(18),H=r(64);m(Y.prototype,x.prototype),m(Y,x);const $=()=>{},{errorOrDestroy:V}=O;function K(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function G(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(14)),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?P(this,e,"readableHighWaterMark",n):L(!1),this.buffer=new R,this.length=0,this.pipes=[],this.flowing=null,this[q]=null,e&&!1===e.emitClose&&(this.state&=-2049),e&&!1===e.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new F(e.encoding),this.encoding=e.encoding)}function Y(e){if(!(this instanceof Y))return new Y(e);const t=this instanceof r(14);this._readableState=new G(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&A(e.signal,this)),x.call(this,e),O.construct(this,()=>{this._readableState.needReadable&&te(this,this._readableState)})}function X(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let o;if(0==(1&i.state)&&("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=E.from(t,r).toString(i.encoding):(t=E.from(t,r),r=""))):t instanceof E?r="":x._isUint8Array(t)?(t=x._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new I("chunk",["string","Buffer","Uint8Array"],t))),o)V(e,o);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),t.ended)return;if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}(e,i);else if(0!=(1&i.state)||t&&t.length>0)if(n)if(0!=(4&i.state))V(e,new z);else{if(i.destroyed||i.errored)return!1;Z(e,i,t,!0)}else if(i.ended)V(e,new B);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?Z(e,i,t,!1):te(e,i)):Z(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!=(65536&t.state)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(64&t.state)&&Q(e)),te(e,t)}b(G.prototype,{objectMode:K(1),ended:K(2),endEmitted:K(4),reading:K(8),constructed:K(16),sync:K(32),needReadable:K(64),emittedReadable:K(128),readableListening:K(256),resumeScheduled:K(512),errorEmitted:K(1024),emitClose:K(2048),autoDestroy:K(4096),destroyed:K(8192),closed:K(16384),closeEmitted:K(32768),multiAwaitDrain:K(65536),readingMore:K(1<<17),dataEmitted:K(1<<18)}),Y.prototype.destroy=O.destroy,Y.prototype._undestroy=O.undestroy,Y.prototype._destroy=function(e,t){t(e)},Y.prototype[M.captureRejectionSymbol]=function(e){this.destroy(e)},Y.prototype[w]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new W,this.destroy(e)),new y((t,r)=>C(this,n=>n&&n!==e?r(n):t(null)))},Y.prototype.push=function(e,t){return X(this,e,t,!1)},Y.prototype.unshift=function(e,t){return X(this,e,t,!0)},Y.prototype.isPaused=function(){const e=this._readableState;return!0===e[q]||!1===e.flowing},Y.prototype.setEncoding=function(e){const t=new F(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this};function J(e,t){return e<=0||0===t.length&&t.ended?0:0!=(1&t.state)?1:h(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,c.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,c.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[q]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function oe(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=Y.wrap(e,{objectMode:!0}));const r=function(e,t){return le.apply(this,arguments)}(e,t);return r.stream=e,r}function le(){return(le=a((function*(e,t){let r,n=$;function i(t){this===e?(n(),n=$):n=t}e.on("readable",i);const o=C(e,{writable:!1},e=>{r=e?N(r,e):null,n(),n=$});try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;yield s(new y(i))}}}catch(e){throw r=N(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):O.destroyer(e,null)}}))).apply(this,arguments)}function ue(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ce(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,c.nextTick(fe,t,e))}function fe(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)c.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}Y.prototype.read=function(e){T("read",e),void 0===e?e=NaN:d(e)||(e=p(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new D("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ce(this):Q(this),null;if(0===(e=J(e,t))&&t.ended)return 0===t.length&&ce(this),null;let n,i=0!=(64&t.state);if(T("need readable",i),(0===t.length||t.length-e0?ue(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ce(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Y.prototype._read=function(e){throw new j("_read()")},Y.prototype.pipe=function(e,t){const r=this,n=this._readableState;1===n.pipes.length&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new v(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(e),T("pipe count=%d opts=%j",n.pipes.length,t);const i=(!t||!1!==t.end)&&e!==c.stdout&&e!==c.stderr?s:b;function o(t,i){T("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,function(){T("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a);e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),l=!0,a&&n.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a()}())}function s(){T("onend"),e.end()}let a;n.endEmitted?c.nextTick(i):r.once("end",i),e.on("unpipe",o);let l=!1;function u(){l||(1===n.pipes.length&&n.pipes[0]===e?(T("false write response, pause",0),n.awaitDrainWriters=e,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(e)&&(T("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function f(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),b(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?V(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),b()}function p(){T("onfinish"),e.removeListener("close",h),b()}function b(){T("unpipe"),r.unpipe(e)}return r.on("data",f),k(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():n.flowing||(T("pipe resume"),r.resume()),e},Y.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,T("on readable",n.length,n.reading),n.length?Q(this):n.reading||c.nextTick(ie,this))),r},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(e,t){const r=x.prototype.removeListener.call(this,e,t);return"readable"===e&&c.nextTick(ne,this),r},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(e){const t=x.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||c.nextTick(ne,this),t},Y.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,c.nextTick(oe,e,t))}(this,e)),e[q]=!1,this},Y.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[q]=!0,this},Y.prototype.wrap=function(e){let t=!1;e.on("data",r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())}),e.on("end",()=>{this.push(null)}),e.on("error",e=>{V(this,e)}),e.on("close",()=>{this.destroy()}),e.on("destroy",()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=g(e);for(let t=1;t{if("object"!=typeof e||!("aborted"in e))throw new c(t,"AbortSignal",e)})(t,"signal"),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{f=f||r(7).addAbortListener;const i=f(e,o);u(t,i[n])}return t}},function(e,t,r){"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3),{validateInteger:o}=r(28),{ERR_INVALID_ARG_VALUE:s}=r(8).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0){throw new s(o?"options."+r:"options.highWaterMark",a)}return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:a=t}}},function(e,t,r){var n=r(1).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^c[p>>>16&255]^f[b>>>8&255]^d[255&g]^t[m++],s=u[p>>>24]^c[b>>>16&255]^f[g>>>8&255]^d[255&h]^t[m++],a=u[b>>>24]^c[g>>>16&255]^f[h>>>8&255]^d[255&p]^t[m++],l=u[g>>>24]^c[h>>>16&255]^f[p>>>8&255]^d[255&b]^t[m++],h=o,p=s,b=a,g=l;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&g])^t[m++],s=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[g>>>8&255]<<8|n[255&h])^t[m++],a=(n[b>>>24]<<24|n[g>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[m++],l=(n[g>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var c=e[s],f=e[c],d=e[f],h=257*e[u]^16843008*u;i[0][s]=h<<24|h>>>8,i[1][s]=h<<16|h>>>16,i[2][s]=h<<8|h>>>24,i[3][s]=h,h=16843009*d^65537*f^257*c^16843008*s,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),i[o]=i[o-t]^s}for(var u=[],c=0;c>>24]]^l.INV_SUB_MIX[1][l.SBOX[d>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[d>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){var n=r(1).Buffer,i=r(47);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),l=n.alloc(o||0),u=n.alloc(0);s>0||o>0;){var c=new i;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var f=0;if(s>0){var d=a.length-s;f=Math.min(s,u.length),u.copy(a,d,0,f),s-=f}if(f0){var h=l.length-o,p=Math.min(o,u.length-f);u.copy(l,h,f,f+p),o-=p}}return u.fill(0),{key:a,iv:l}}},function(e,t,r){"use strict";var n=r(5),i=r(10),o=i.getNAF,s=i.getJSF,a=i.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=s;c--)l=(l<<1)+n[c];u.push(l)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s=0;u--){for(var c=0;u>=0&&0===s[u];u--)c++;if(u>=0&&c++,l=l.dblp(c),u<0)break;var f=s[u];a(0!==f),l="affine"===e.type?f>0?l.mixedAdd(i[f-1>>1]):l.mixedAdd(i[-f-1>>1].neg()):f>0?l.add(i[f-1>>1]):l.add(i[-f-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,n,i){var a,l,u,c=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a=1;a-=2){var b=a-1,g=a;if(1===c[b]&&1===c[g]){var m=[t[b],null,null,t[g]];0===t[b].y.cmp(t[g].y)?(m[1]=t[b].add(t[g]),m[2]=t[b].toJ().mixedAdd(t[g].neg())):0===t[b].y.cmp(t[g].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[g]),m[2]=t[b].add(t[g].neg())):(m[1]=t[b].toJ().mixedAdd(t[g]),m[2]=t[b].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),d[b]=new Array(h),d[g]=new Array(h),l=0;l=0;a--){for(var x=0;a>=0;){var k=!0;for(l=0;l=0&&x++,S=S.dblp(x),a<0)break;for(l=0;l0?u=f[l][E-1>>1]:E<0&&(u=f[l][-E-1>>1].neg()),S="affine"===u.type?S.mixedAdd(u):S.add(u))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i"{}|^`\\]|%(?![0-9A-F][0-9A-F]))/g,l=(e,t)=>{let r=t.codePointAt(0).toString(16)+"";return r.length>4?"\\U"+r.padStart(8,"0"):"\\u"+r.padStart(4,"0")},u=e=>e.replace(a,l),c=/^(?:[\u0000-@[-`{-\u00bf\u00d7\u00f7\u0300-\u306f\u037e\u2000-\u200b\u200e-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].+|(?:.+?[\u0000-,\/:-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].*)|.+\.)$/,f=/^(?:\\|[\u0000-\/;-@[-^`{-\u00bf\u00d7\u00f7\u0300-\u306f\u037e\u2000-\u200b\u200e-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].+|(?:.+?(?:\\|[\u0000-,\/;-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff]).+)|(?:.+?(?:\\|[\u0000-,.\/;-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff])))$/,d=/^([Tt](rue)?|TRUE)$/,h=/^([Ff](alse)?|FALSE)$/,p=/[xy]/g,b=()=>{let e=Date.now();return"undefined"!=typeof performance&&(e+=performance.now()),"xxxxxxxx_xxxx_4xxx_yxxx_xxxxxxxxxxxx".replace(p,t=>{let r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})},g=Symbol("prefix-cache"),m=/[$^*()+[\\{}|.?]/g;function y(e,t=!1){let r=[],n={};for(let i in e){let o=e[i];t&&c.test(i)||(n[o]=i,r.push(o.replace(m,"\\$&")))}return r.length?(e[g]={_r_iris:new RegExp(`^(${r.join("|")})((?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_:0-9]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%])(?:(?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_\\-0-9\\xb7\\u{0300}-\\u{036f}\\u{203f}-\\u{2040}.:]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%])*(?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_\\-0-9\\xb7\\u{0300}-\\u{036f}\\u{203f}-\\u{2040}:]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%]))?)$`,"u"),_h_inverse:n},Object.freeze(e)):e}const v=(e,t)=>{let r=t[g];if(r){let t=r._r_iris.exec(e);if(t)return r._h_inverse[t[1]]+":"+t[2]}else{let r="",n="",i=-1;for(let o in t){let s=t[o];if(0===e.indexOf(s)&&s.length>i&&!c.test(o)){let t=e.slice(s.length);f.test(t)||(n=t,r=o,i=s.length)}}if(-1!==i)return r+":"+n}return"<"+e+">"},w=(e,t={})=>{let r=t[g];if(r){let t=r._r_iris.exec(e);if(t)return r._h_inverse[t[1]]+":"+t[2]}else{let r="",n=-1;for(let i in t){let o=t[i];e.startsWith(o)&&o.length>n&&(r=i,n=o.length)}if(-1!==n)return r+":"+e.slice(n)}return">"+e},_=/^([^:]*):(.*)$/;class S{valueOf(){return this.concise()}toString(){return this.concise()}equals(e){return!!e&&(this===e||e.termType===this.termType&&e.value===this.value)}}Object.assign(S.prototype,{isGraphyTerm:!0});class M extends S{constructor(e){super(),this.value=e}concise(e={}){return w(this.value,e)}terse(e={},t=!1){return v(u(this.value),e)}verbose(){return"<"+u(this.value)+">"}isolate(){return{termType:"NamedNode",value:this.value}}}Object.assign(M.prototype,{termType:"NamedNode",isNamedNode:!0});const x=new M("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");x.isRdfTypeAlias=!0;const k=new M("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),E=k.isolate(),A=new M("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),C=new M("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),T=new M("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"),R=new M("http://www.w3.org/2001/XMLSchema#date"),O=new M("http://www.w3.org/2001/XMLSchema#dateTime"),P=new M("http://www.w3.org/2001/XMLSchema#string");class L extends S{equals(e){return!!e&&(this===e||"Literal"===e.termType&&e.value===this.value&&this.datatype.equals(e.datatype)&&e.language===this.language)}verbose(){return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+this.datatype.verbose())}concise(e){return this.language?"@"+this.language+'"'+this.value:"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+t)}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(L.prototype,{datatype:P,language:"",termType:"Literal",isLiteral:!0,isSimple:!1});class N extends L{constructor(e,t){super(),this.value=e,this.language=("@"===t[0]?t.slice(1):t).toLowerCase()}verbose(){return JSON.stringify(this.value)+"@"+this.language}concise(){return"@"+this.language+'"'+this.value}terse(){return JSON.stringify(this.value)+"@"+this.language}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:E}}}Object.assign(N.prototype,{datatype:k,isLanguaged:!0});class I extends L{verbose(){return JSON.stringify(this.value)+"^^"+this.datatype.verbose()}concise(e){return"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+"^^"+t}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(I.prototype,{isDatatyped:!0});class j extends I{constructor(e,t){super(),this.value=e,this.datatype=t}}class D extends S{constructor(e){super(),this.value=e}get isSimple(){return!this.language&&!this.datatype.equals(P)}get isLanguaged(){return!!this.language}get isDatatyped(){return P.equals(this.datatype)}equals(e){return!!e&&(this===e||"Literal"===e.termType&&e.value===this.value&&this.datatype.equals(e.datatype)&&e.language===this.language)}verbose(){return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+this.datatype.verbose())}concise(e){return this.language?"@"+this.language+'"'+this.value:"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+t)}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(D.prototype,{datatype:P,language:"",termType:"Literal",isLiteral:!0});class B extends L{constructor(e){super(),this.value=e}verbose(){return JSON.stringify(this.value)}concise(){return'"'+this.value}terse(){return JSON.stringify(this.value)}}Object.assign(B.prototype,{isSimple:!0});const z=new M("http://www.w3.org/2001/XMLSchema#integer");class W extends I{static from(e){let t=new W(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+z.concise(e)+'"'+this.value}terse(){return this.value.includes("e")?`"${this.value}"^^`:this.value}}Object.assign(W.prototype,{datatype:z,isNumeric:!0,isInteger:!0});const U=new M("http://www.w3.org/2001/XMLSchema#double");class q extends I{static from(e){let t=new q(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+U.concise(e)+'"'+this.value}terse(){return this.number.toExponential()}}Object.assign(q.prototype,{datatype:U,isNumeric:!0,isDouble:!0});const F=new M("http://www.w3.org/2001/XMLSchema#decimal");class H extends I{static from(e){let t=new H(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+F.concise(e)+'"'+this.value}terse(){return this.value.includes("e")?`"${this.value}"^^`:this.value+(this.value.includes(".")?"":".0")}}Object.assign(H.prototype,{datatype:F,isNumeric:!0,isDecimal:!0});const $=new M("http://www.w3.org/2001/XMLSchema#boolean");class V extends I{static from(e){let t=new V(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.boolean=e}concise(e={}){return"^"+$.concise(e)+'"'+this.value}terse(){return this.value+""}}Object.assign(V.prototype,{datatype:$,isBoolean:!0});class K extends q{constructor(){super(1/0),this.value="INF"}terse(e){return'"INF"^^'+U.terse(e)}}Object.assign(K.prototype,{isInfinite:!0});class G extends q{constructor(){super(-1/0),this.value="-INF"}terse(e){return'"-INF"^^'+U.terse(e)}}Object.assign(G.prototype,{isInfinite:!0});class Y extends q{constructor(){super(NaN),this.value="NaN"}terse(e){return'"NaN"^^'+U.terse(e)}}function X(e,t=!1){this.value=e,this.isAnonymous=t}function Z(){}Object.assign(Y.prototype,{isNaN:!0}),X.prototype=Object.assign(Object.create(S.prototype),{termType:"BlankNode",isBlankNode:!0,concise(){return"_:"+this.value},terse(){return"_:"+this.value},verbose(){return"_:"+this.value},isolate(){return{termType:"BlankNode",value:this.value}}}),Z.prototype=Object.assign(Object.create(X.prototype),{isAnonymous:!0,isEphemeral:!0,concise(){return"_:#"+this.value},terse:()=>"[]",verbose(){return"_:"+this.value},isolate(){return{termType:"BlankNode",value:this.value}},equals:()=>!1}),Object.defineProperty(Z.prototype,"value",{get:()=>"_"+b()});class J extends S{constructor(e){super(),this.value=e}concise(){return"?"+this.value}terse(){throw new Error("Cannot call .terse() on 'Variable' term type")}verbose(){throw new Error("Cannot call .verbose() on 'Variable' term type")}isolate(){return{termType:"Variable",value:this.value}}}function Q(){}Object.assign(J.prototype,{termType:"Variable",isVariable:!0}),Q.prototype=Object.assign(Object.create(S.prototype),{value:"",termType:"DefaultGraph",isDefaultGraph:!0,concise:()=>"*",terse:()=>"",verbose:()=>"",isolate:()=>({termType:"DefaultGraph",value:""})}),Object.assign(Object.create(S.prototype),{value:"",termType:"NoGraph",concise:()=>"",terse:()=>"",verbose:()=>"",isolate:()=>({termType:"NoGraph",value:""})});const ee=new Q;function te(e,t,r,n=ee){this.subject=e,this.predicate=t,this.object=r,this.graph=n}Object.assign(te.prototype,{isGraphyQuad:!0,equals(e){return!!e&&(this===e||this.object.equals(e.object)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.graph.equals(e.graph))},valueOf(){return this.verbose()},concise(e={}){return[this.subject.concise(e),this.predicate.concise(e),this.object.concise(e),this.graph.concise(e)]},terse(e){let t=this.graph.isDefaultGraph;return(t?"":this.graph.terse(e)+" { ")+this.subject.terse(e)+" "+this.predicate.terse(e)+" "+this.object.terse(e)+" ."+(t?"":" }")},verbose(){return this.subject.verbose()+" "+this.predicate.verbose()+" "+this.object.verbose()+" "+(this.graph.isDefaultGraph?"":this.graph.verbose()+" ")+"."},isolate(){return{subject:this.subject.isolate(),predicate:this.predicate.isolate(),object:this.object.isolate(),graph:this.graph.isolate()}}});let re={namedNode:e=>new M(e),blankNode:(e,t)=>new X(e,t),literal:e=>new D(e),defaultGraph:()=>new Q,quad:(e,t,r,n)=>new te(e,t,r,n||ee),integer:e=>W.from(e),double:e=>q.from(e),decimal:e=>H.from(e),boolean:e=>new V(e)};const ne=e.exports={concise:w,adopt(e){let t=Object.create(e),r=!1;if("function"!=typeof e.boolean){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#boolean");t.boolean=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.double){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#double");t.double=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.decimal){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#decimal");t.decimal=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.integer){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#integer");t.integer=t=>e.literal(t+"",n),r=!0}return"function"!=typeof e.simpleLiteral&&(t.simpleLiteral=t=>e.literal(t),r=!0),"function"!=typeof e.languagedLiteral&&(t.languagedLiteral=(t,r)=>e.literal(t,r),r=!0),"function"!=typeof e.datatypedLiteral&&(t.datatypedLiteral=(t,r)=>e.literal(t,r),r=!0),r?t:e},raw:re,unfiltered:i(i({},re),{},{literal:(e,t)=>!t||P.equals(t)?new B(e):"string"==typeof t?new N(e,t):P.equals(t)?new B(e):new j(e,t),simpleLiteral:e=>new B(e),languagedLiteral:(e,t)=>new N(e,t),datatypedLiteral:(e,t)=>P.equals(t)?new B(e):new j(e,t)}),number:e=>"number"!=typeof e||Number.isFinite(e)&&!Number.isNaN(e)?Number.isInteger(e)||"bigint"==typeof e?ne.integer(e):ne.decimal(e):ne.double(e),date:e=>ne.literal(e.toISOString().replace(/T.+$/,"Z"),R),dateTime:e=>ne.literal(e.toISOString(),O),namedNode:e=>new M(e),ephemeral:()=>new Z,anonymous:()=>new Z,blankNode(e){if(!e)return new X("_"+b(),!0);if("string"==typeof e)return new X(e);throw new TypeError("factory.blankNode(label) expects 'label' parameter to be falsy or a string; instead found: "+e)},literal:(e,t)=>!t||P.equals(t)?new B(e):"string"==typeof t?new N(e,t):new j(e,t),integer(e){let t=typeof e;if("number"===t){if(!Number.isFinite(e)){if(Number.isNaN(e))throw new Error("XSD integer cannot encode NaN. Try using double");throw new Error("XSD integer cannot encode +/-infinity. Try using double")}if(!Number.isInteger(e))throw new Error("Number is not an integer: "+e);return new W(e)}if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:integer");let t=+e;if(Number.isNaN(t)||!Number.isInteger(t))throw new Error("Invalid integer string: "+e);return new W(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:integer");if(null===e)throw new Error("Refusing to serialize null value as xsd:integer");throw new Error("XSD integer expects a number type or integer string")},double(e){let t=typeof e;if("number"===t)return Number.isFinite(e)?new q(e):Number.isNaN(e)?new Y:e>0?new K:new G;if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:double");let t=+e;if(Number.isNaN(t))throw new Error("Invalid decimal string: "+e);return new q(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:double");if(null===e)throw new Error("Refusing to serialize null value as xsd:double");throw new Error("XSD double expects a number type or double string")},decimal(e){let t=typeof e;if("number"===t){if(!Number.isFinite(e)){if(Number.isNaN(e))throw new Error("XSD decimal cannot encode NaN. Try using double");throw new Error("XSD decimal cannot encode +/-infinity. Try using double")}return new H(e)}if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:decimal");let t=+e;if(Number.isNaN(t))throw new Error("Invalid decimal string: "+e);return new H(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:decimal");if(null===e)throw new Error("Refusing to serialize null value as xsd:decimal");throw new Error("XSD decimal expects a number type or decimal string")},boolean(e){let t=typeof e;if("boolean"===t)return new V(e);if("number"===t){if(1===e)return new V(!0);if(0===e)return new V(!1);throw new Error("Boolean value 'w_value' must be either a '1' or '0' if using numbers")}if("string"===t){if(d.test(e))return new V(!0);if(h.test(e))return new V(!1);if(""===e)throw new Error("Refusing to serialize empty string as xsd:boolean");throw new Error("Invalid boolean string: "+e)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:boolean");if(null===e)throw new Error("Refusing to serialize null value as xsd:boolean");throw new Error("XSD boolean expects a boolean type or boolean string")},defaultGraph:()=>new Q,variable:e=>new J(e),triple(e,t,r){let n=new Error("It is strongly encouraged to use .quad() instead of .triple()");return console.warn(n.stack.replace(/^(\s*)Error:/,"$1Warning:")),new te(e,t,r)},quad:(e,t,r,n)=>new te(e,t,r,n||ee),term:(e,t)=>"string"==typeof e?ne.c1(e,t):ne.from.rdfjs_term(e),c1(e,t={}){switch(e[0]){case"^":{let r=e.indexOf('"');if(-1===r)throw new Error(`Invalid concise-term string, no content literal delimiter found: '${e}'`);let n=e.slice(1,r);return ne.literal(e.slice(r+1),ne.c1_node_explicit(n,t))}case"@":{let t=e.indexOf('"');if(-1===t)throw new Error(`Invalid concise-term string, no content literal delimiter found: '${e}'`);let r=e.slice(1,t);return ne.literal(e.slice(t+1),r)}case'"':return ne.literal(e.slice(1));default:return ne.c1_node(e,t)}},c1_node(e,t={}){if("a"===e)return x;if("*"===e)return ne.defaultGraph();if("_"===e[0]){if(":"!==e[1])throw new Error(`Invliad concise-term string, prefixes are not allowed to start with an underscore: '${e}'`);return"#"===e[2]||2===e.length?ne.ephemeral():ne.blankNode(e.slice(2))}return ne.c1_node_explicit(e,t)},c1_named_node:(e,t={})=>"a"===e?x:ne.c1_node_explicit(e,t),c1_node_explicit(e,t={}){switch(e[0]){case">":return ne.namedNode(e.slice(1));case"<":throw new Error(`Whoops! It looks like this concise-term string starts with a '<' character. Remember to use '>' if you are trying to make an absolute IRI reference.\nInvalid concise-term string '${e}'`);case"`":throw new Error(`The backtick character '\`' is reserved for concise-struct key directives and should not be used in the object position.\nInvalid concise-term string '${e}'`);default:return this.c1_prefixed_node(e,t)}},c1_prefixed_node(e,t={}){let r=e.indexOf(":");if(-1===r)throw new Error(`A relative or prefixed node must include a ':' character. \nInvalid concise-term string for node: '${e}'`);let n=e.slice(0,r),i=e.slice(r+1);if(n in t)return ne.namedNode(t[n]+i);throw new Error(`Prefix not defined: '${n}'`)},c1_to_nt:function e(t,r={},n=!1){switch(t[0]){case">":return"<"+t.slice(1)+">";case"_":return t.length<=2||"#"===t[2]?(new Z)[n?"verbose":"terse"]():t;case'"':return JSON.stringify(t.slice(1));case"@":{let e=t.indexOf('"');return JSON.stringify(t.slice(e+1))+t.slice(0,e)}case"^":{let i=t.indexOf('"');return JSON.stringify(t.slice(i+1))+"^^"+e(t.slice(1,i),r,n)}case"*":return"";case"<":case"`":return ne.c1(t).terse(r);default:{if("a"===t)return n?"":"a";let[,e,i]=_.exec(t);return n||f.test(i)||c.test(e)?"<"+r[e]+i+">":t}}},*quads(e,t={}){for(let r in e)yield*ne.triples(e[r],t,r)},*triples(e,t={},r="*"){let n=ne.c1(r,t);for(let r in e){let i=ne.c1(r,t),o=e[r];yield*ne.pairs(n,i,o,t)}},*pairs(e,t,r,n={}){for(let i in r){let o=ne.c1(i,n),s=r[i];yield*ne.objects(e,t,o,s,n)}},*collection(e,t,r,n={}){yield*ne.objects(e,t,A,r[0],n);let i=r.slice(1);if(i.length){let r=ne.blankNode();yield new te(t,C,r,e),yield*ne.collection(e,r,i,n)}else yield new te(t,C,T,e)},*objects(e,t,r,n,i,o=!1){switch(typeof n){case"string":yield new te(t,r,ne.c1(n,i),e);break;case"number":yield new te(t,r,ne.number(n),e);break;case"object":if(Array.isArray(n))if(o){let o=ne.blankNode();yield new te(t,r,o,e),yield*ne.collection(e,o,n,i)}else for(let o of n)yield*ne.objects(e,t,r,o,i,!0);else{let o=ne.blankNode();yield new te(t,r,o,e),yield*ne.pairs(e,o,n,i)}break;default:throw new Error("invalid object type: "+typeof n)}},from:{term:e=>null===e||e.isGraphyTerm?e:ne.from.rdfjs_term(e),quad(e){if(null===e)return e;if(e.isGraphyQuad)return e;let t=ne.from;return new te(t.rdfjs_term(e.subject),t.rdfjs_term(e.predicate),t.rdfjs_term(e.object),e.graph?t.rdfjs_term(e.graph):ee)},rdfjs_term(e){switch(e.termType){case"NamedNode":return new M(e.value);case"BlankNode":return new X(e.value);case"Literal":return ne.literal(e.value,e.language?e.language:e.datatype?new M(e.datatype.value):null);case"DefaultGraph":return new Q;default:throw new TypeError("invalid termType: "+e.termType)}},sparql_result(e){switch(e.type){case"uri":return new M(e.value);case"literal":case"typed-literal":return"xml:lang"in e?new N(e.value,e["xml:lang"]):"datatype"in e&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype?new j(e.value,new M(e.datatype)):new B(e.value);case"bnode":return new X(e.value);default:throw new Error("unexpected SPARQL Result JSON Format Term type: "+e.type)}}},to:{boolean:e=>V.from(e),integer:e=>W.from(e),decimal:e=>H.from(e),double:e=>q.from(e)},comment:(e={})=>`\`[${b()}]${JSON.stringify(i(i({},e),{},{type:"comment"}))}`,newlines:()=>`\`[${b()}]{"type":"newlines"}`,config(e){if("string"!=typeof e)throw new TypeError("Expected 'key' argument to be a string, instead found "+typeof e);return`\`[${b()}]{"type":"config","value":${JSON.stringify(e)}}`},hash(e){let t=ne.from.quad(e),r=s.createHash("sha256");return r.update(t.verbose()),r.digest("hex")},cache_prefixes:y,cachePrefixes:y,terse:v,clean_iri:u,cleanIri:u,$_PREFIX_CACHE:g};Object.assign(ne,{c3:ne.triples,c4:ne.quads,fromTerm:ne.from.term,fromQuad:ne.from.quad})},function(e,t,r){function n(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function n(t,r){try{var o=e[t](r),s=o.value,a=s instanceof l;Promise.resolve(a?s.v:s).then((function(r){if(a){var l="return"===t?"return":"next";if(!s.k||r.done)return n(l,r);r=e[l](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new s(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(s=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new s(e)}function a(e){var t={},r=!1;function n(t,n){return r=!0,{done:!1,value:new l(n=new Promise((function(r){r(e[t](n))})),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function l(e,t){this.v=e,this.k=t}i.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)};const u=r(4),{ArrayIsArray:c,Promise:f,SymbolAsyncIterator:d,SymbolDispose:h}=r(3),p=r(16),{once:b}=r(7),g=r(19),m=r(14),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:v,ERR_INVALID_RETURN_VALUE:w,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:S,ERR_STREAM_PREMATURE_CLOSE:M},AbortError:x}=r(8),{validateFunction:k,validateAbortSignal:E}=r(28),{isIterable:A,isReadable:C,isReadableNodeStream:T,isNodeStream:R,isTransformStream:O,isWebStream:P,isReadableStream:L,isReadableFinished:N}=r(13),I=globalThis.AbortController||r(27).AbortController;let j,D,B;function z(e,t,r){let n=!1;e.on("close",()=>{n=!0});return{destroy:t=>{n||(n=!0,g.destroyer(e,t||new S("pipe")))},cleanup:p(e,{readable:t,writable:r},e=>{n=!e})}}function W(e){if(A(e))return e;if(T(e))return function(e){return U.apply(this,arguments)}(e);throw new v("val",["Readable","Iterable","AsyncIterable"],e)}function U(){return(U=n((function*(e){D||(D=r(35)),yield*a(o(D.prototype[d].call(e)))}))).apply(this,arguments)}async function q(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},l=()=>new f((e,t)=>{i?t(i):s=()=>{i?t(i):e()}});t.on("drain",a);const u=p(t,{readable:!1},a);try{t.writableNeedDrain&&await l();var c,d=!0,h=!1;try{for(var b,g,m=o(e);d=(b=await m.next()).done,g=await b.value,!d;d=!0){const e=g;t.write(e)||await l()}}catch(e){h=!0,c=e}finally{try{d||null==m.return||await m.return()}finally{if(h)throw c}}n&&(t.end(),await l()),r()}catch(e){r(i!==e?y(i,e):e)}finally{u(),t.off("drain",a)}}async function F(e,t,r,{end:n}){O(t)&&(t=t.writable);const i=t.getWriter();try{var s,a=!0,l=!1;try{for(var u,c,f=o(e);a=(u=await f.next()).done,c=await u.value,!a;a=!0){const e=c;await i.ready,i.write(e).catch(()=>{})}}catch(e){l=!0,s=e}finally{try{a||null==f.return||await f.return()}finally{if(l)throw s}}await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function H(e,t,n){if(1===e.length&&c(e[0])&&(e=e[0]),e.length<2)throw new _("streams");const i=new I,o=i.signal,s=null==n?void 0:n.signal,a=[];function l(){M(new x)}let f,d,p;E(s,"options.signal"),B=B||r(7).addAbortListener,s&&(f=B(s,l));const b=[];let g,y=0;function S(e){M(e,0==--y)}function M(e,r){var n;if(!e||d&&"ERR_STREAM_PREMATURE_CLOSE"!==d.code||(d=e),d||r){for(;b.length;)b.shift()(d);null===(n=f)||void 0===n||n[h](),i.abort(),r&&(d||a.forEach(e=>e()),u.nextTick(t,d,p))}}for(let t=0;t0,c=s||!1!==(null==n?void 0:n.end),f=t===e.length-1;if(R(i)){if(c){const{destroy:e,cleanup:t}=z(i,s,l);b.push(e),C(i)&&f&&a.push(t)}function k(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&S(e)}i.on("error",k),C(i)&&f&&a.push(()=>{i.removeListener("error",k)})}if(0===t)if("function"==typeof i){if(g=i({signal:o}),!A(g))throw new w("Iterable, AsyncIterable or Stream","source",g)}else g=A(i)||T(i)||O(i)?i:m.from(i);else if("function"==typeof i){var N;if(O(g))g=W(null===(N=g)||void 0===N?void 0:N.readable);else g=W(g);if(g=i(g,{signal:o}),s){if(!A(g,!0))throw new w("AsyncIterable",`transform[${t-1}]`,g)}else{var D;j||(j=r(65));const e=new j({objectMode:!0}),t=null===(D=g)||void 0===D?void 0:D.then;if("function"==typeof t)y++,t.call(g,t=>{p=t,null!=t&&e.write(t),c&&e.end(),u.nextTick(S)},t=>{e.destroy(t),u.nextTick(S,t)});else if(A(g,!0))y++,q(g,e,S,{end:c});else{if(!L(g)&&!O(g))throw new w("AsyncIterable or Promise","destination",g);{const t=g.readable||g;y++,q(t,e,S,{end:c})}}g=e;const{destroy:n,cleanup:i}=z(g,!1,!0);b.push(n),f&&a.push(i)}}else if(R(i)){if(T(g)){y+=2;const e=$(g,i,S,{end:c});C(i)&&f&&a.push(e)}else if(O(g)||L(g)){const e=g.readable||g;y++,q(e,i,S,{end:c})}else{if(!A(g))throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);y++,q(g,i,S,{end:c})}g=i}else if(P(i)){if(T(g))y++,F(W(g),i,S,{end:c});else if(L(g)||A(g))y++,F(g,i,S,{end:c});else{if(!O(g))throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);y++,F(g.readable,i,S,{end:c})}g=i}else g=m.from(i)}return(null!=o&&o.aborted||null!=s&&s.aborted)&&u.nextTick(l),g}function $(e,t,r,{end:n}){let i=!1;if(t.on("close",()=>{i||r(new M)}),e.pipe(t,{end:!1}),n){function o(){i=!0,t.end()}N(e)?u.nextTick(o):e.once("end",o)}else r();return p(e,{readable:!0,writable:!1},t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)}),p(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:H,pipeline:function(...e){return H(e,b(function(e){return k(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},function(e,t,r){"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3),{EventEmitter:o}=r(15);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},function(e,t,r){const n=r(4),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:d}=r(3);e.exports=N,N.WritableState=P;const{EventEmitter:h}=r(15),p=r(45).Stream,{Buffer:b}=r(2),g=r(19),{addAbortSignal:m}=r(36),{getHighWaterMark:y,getDefaultHighWaterMark:v}=r(37),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:M,ERR_STREAM_DESTROYED:x,ERR_STREAM_ALREADY_FINISHED:k,ERR_STREAM_NULL_VALUES:E,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:C}=r(8).codes,{errorOrDestroy:T}=g;function R(){}u(N.prototype,p.prototype),u(N,p);const O=f("kOnFinished");function P(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(14)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?y(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=B.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,L(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[O]=[]}function L(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function N(e){const t=this instanceof r(14);if(!t&&!s(N,this))return new N(e);this._writableState=new P(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),p.call(this,e),g.construct(this,()=>{const e=this._writableState;e.writing||q(this,e),$(this,e)})}function I(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new C(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=R)}if(null===t)throw new E;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new A:o.destroyed&&(s=new x("write")),s?(n.nextTick(i,s),T(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&q(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(z,r.afterWriteTickInfo)):W(e,r,1,o))):T(e,new S)}function z({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,W(e,t,r,n)}function W(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&U(t),$(e,t)}function U(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?R:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function F(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)T(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[O].splice(0);for(let e=0;e{F(t)?V(e,t):t.pendingcb--},e,t)):F(t)&&(t.pendingcb++,V(e,t))))}function V(e,t){t.pendingcb--,t.finished=!0;const r=t[O].splice(0);for(let e=0;e>>32-t}function u(e,t,r,n,i,o,s){return l(e+(t&r|~t&n)+i+o|0,s)+t|0}function c(e,t,r,n,i,o,s){return l(e+(t&n|r&~n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return l(e+(t^r^n)+i+o|0,s)+t|0}function d(e,t,r,n,i,o,s){return l(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=f(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";var n=r(21).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i>>32-t}function b(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(h,o),h.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,M=0|this._d,x=0|this._e,k=0;k<80;k+=1){var E,A;k<16?(E=b(r,n,i,o,h,e[a[k]],f[0],u[k]),A=v(w,_,S,M,x,e[l[k]],d[0],c[k])):k<32?(E=g(r,n,i,o,h,e[a[k]],f[1],u[k]),A=y(w,_,S,M,x,e[l[k]],d[1],c[k])):k<48?(E=m(r,n,i,o,h,e[a[k]],f[2],u[k]),A=m(w,_,S,M,x,e[l[k]],d[2],c[k])):k<64?(E=y(r,n,i,o,h,e[a[k]],f[3],u[k]),A=g(w,_,S,M,x,e[l[k]],d[3],c[k])):(E=v(r,n,i,o,h,e[a[k]],f[4],u[k]),A=b(w,_,S,M,x,e[l[k]],d[4],c[k])),r=h,h=o,o=p(i,10),i=n,n=E,w=x,x=M,M=p(S,10),S=_,_=A}var C=this._b+i+M|0;this._b=this._c+o+x|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(137),t.sha1=r(138),t.sha224=r(139),t.sha256=r(76),t.sha384=r(140),t.sha512=r(77)},function(e,t,r){"use strict";var n=r(9);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=o,o.getr=s}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var n=t;n.version=r(174).version,n.utils=r(10),n.rand=r(54),n.curve=r(103),n.curves=r(58),n.ec=r(185),n.eddsa=r(189)},function(e,t,r){"use strict";var n,i=t,o=r(59),s=r(103),a=r(10).assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=l,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(184)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){var n=t;n.utils=r(11),n.common=r(31),n.sha=r(178),n.ripemd=r(182),n.hmac=r(183),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t,r){"use strict";const n=new(r(42).a);t.a=n},function(e,t,r){const{Buffer:n}=r(2),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3),{promisify:{custom:a}}=r(7),{streamReturningOperators:l,promiseReturningOperators:u}=r(119),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(8),f=r(63),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(37),{pipeline:p}=r(44),{destroyer:b}=r(19),g=r(16),m=r(67),y=r(13),v=e.exports=r(45).Stream;v.isDestroyed=y.isDestroyed,v.isDisturbed=y.isDisturbed,v.isErrored=y.isErrored,v.isReadable=y.isReadable,v.isWritable=y.isWritable,v.Readable=r(35);for(const e of o(l)){const t=l[e];function w(...e){if(new.target)throw c();return v.Readable.from(s(t,this,e))}i(w,"name",{__proto__:null,value:t.name}),i(w,"length",{__proto__:null,value:t.length}),i(v.Readable.prototype,e,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const e of o(u)){const t=u[e];function w(...e){if(new.target)throw c();return s(t,this,e)}i(w,"name",{__proto__:null,value:t.name}),i(w,"length",{__proto__:null,value:t.length}),i(v.Readable.prototype,e,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(46),v.Duplex=r(14),v.Transform=r(66),v.PassThrough=r(65),v.pipeline=p;const{addAbortSignal:_}=r(36);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=f,v.setDefaultHighWaterMark=d,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(p,a,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},function(e,t,r){"use strict";const{pipeline:n}=r(44),i=r(14),{destroyer:o}=r(19),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:d}=r(13),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(8),g=r(16);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,m,y,v,w;const _=e[0],S=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):x||M||w.destroy()})),M=!!(l(_)||f(_)||c(_)),x=!!(a(S)||d(S)||c(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:M,readable:x}),M){if(s(_))w._write=function(e,t,n){_.write(e,t)?n():r=n},w._final=function(e){_.end(),m=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(_)){const e=(c(_)?_.writable:_).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch(()=>{}),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch(()=>{}),m=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;g(e,()=>{if(m){const e=m;m=null,e()}})}if(x)if(s(S))S.on("readable",(function(){if(y){const e=y;y=null,e()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=S.read();if(null===e)return void(y=w._read);if(!w.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch(e){return}}}return w._destroy=function(e,t){e||null===v||(e=new h),y=null,r=null,m=null,null===v?t(e):(v=t,s(S)&&o(S,e))},w}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;ts.nextTick(t,e),r=>s.nextTick(t,r||e))},h}},function(e,t,r){"use strict";const{ObjectSetPrototypeOf:n}=r(3);e.exports=o;const i=r(66);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())})}function p(){this._final!==h&&h.call(this)}d.prototype._final=h,d.prototype._transform=function(e,t,r){throw new l("_transform()")},d.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,(e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,(e,n)=>{e?r(e):t(n)},{signal:i,end:u})})}}},function(e,t){e.exports=function(e){return"<"+e.value+">"}},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(129).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=k,k.ReadableState=x;r(15).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(71),a=r(2).Buffer,l=t.Uint8Array||function(){};var u,c=r(130);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,d,h,p=r(131),b=r(72),g=r(73).getHighWaterMark,m=r(21).codes,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(0)(k,s);var S=b.errorOrDestroy,M=["error","close","destroy","pause","resume"];function x(e,t,n){i=i||r(22),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(18).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r(22),!(this instanceof k))return new k(e);var t=this instanceof i;this._readableState=new x(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function E(e,t,r,n,i){u("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,s);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),o)S(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?S(e,new _):A(e,s,t,!0);else if(s.ended)S(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):O(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(R,e))}function R(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){u("readable nexttick read 0"),e.read(0)}function I(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(z,t,e))}function z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function W(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):T(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){S(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:g;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",g),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var f=!1;function d(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==W(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(N,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(L,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(L,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(I,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(21).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(22);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,p=0|this._f,b=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var y=0;y<64;++y){var v=g+d(l)+u(l,p,b)+s[y]+r[y]|0,w=f(n)+c(n,i,o)|0;g=b,b=p,p=l,l=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function l(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,l=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,M=0|this._dl,x=0|this._el,k=0|this._fl,E=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var T=t[C-30],R=t[C-30+1],O=h(T,R),P=p(R,T),L=b(T=t[C-4],R=t[C-4+1]),N=g(R,T),I=t[C-14],j=t[C-14+1],D=t[C-32],B=t[C-32+1],z=P+j|0,W=O+I+m(z,P)|0;W=(W=W+L+m(z=z+N|0,N)|0)+D+m(z=z+B|0,B)|0,t[C]=W,t[C+1]=z}for(var U=0;U<160;U+=2){W=t[U],z=t[U+1];var q=c(r,n,i),F=c(w,_,S),H=f(r,w),$=f(w,r),V=d(a,x),K=d(x,a),G=s[U],Y=s[U+1],X=u(a,l,y),Z=u(x,k,E),J=A+K|0,Q=v+V+m(J,A)|0;Q=(Q=(Q=Q+X+m(J=J+Z|0,Z)|0)+G+m(J=J+Y|0,Y)|0)+W+m(J=J+z|0,z)|0;var ee=$+F|0,te=H+q+m(ee,$)|0;v=y,A=E,y=l,E=k,l=a,k=x,a=o+Q+m(x=M+J|0,M)|0,o=i,M=S,i=n,S=_,n=r,_=w,r=Q+te+m(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+x|0,this._fl=this._fl+k|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+o+m(this._dl,M)|0,this._eh=this._eh+a+m(this._el,x)|0,this._fh=this._fh+l+m(this._fl,k)|0,this._gh=this._gh+y+m(this._gl,E)|0,this._hh=this._hh+v+m(this._hl,A)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},function(e,t,r){"use strict";var n=r(0),i=r(141),o=r(17),s=r(1).Buffer,a=r(79),l=r(49),u=r(50),c=s.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new l:u(e)).update(t).digest():t.lengthr||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){(function(t){var r;if(t.browser)r="utf-8";else if(t.version){r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,r(4))},function(e,t,r){var n=r(79),i=r(49),o=r(50),s=r(1).Buffer,a=r(82),l=r(83),u=r(85),c=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var a=function(e){function t(t){return o(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=a(t):t.length>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var o=0,s=0,a=n.length>>>1,l=0;l>>n[l]&1;for(l=a;l>>n[l]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,e.keys,s)}},l.prototype._update=function(e,t,r,n){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},l.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,s=d}o.rip(a,s,n,i)},l.prototype._decrypt=function(e,t,r,n,i){for(var s=r,a=t,l=e.keys.length-2;l>=0;l-=2){var u=e.keys[l],c=e.keys[l+1];o.expand(s,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var f=o.substitute(u,c),d=s;s=(a^o.permute(f))>>>0,a=d}o.rip(s,a,n,i)}},function(e,t,r){var n=r(30),i=r(1).Buffer,o=r(89);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;ae;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(l),t.cmp(l)){if(!t.cmp(u))for(;r.mod(c).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(g(p=r.shrn(1))&&g(r)&&m(p)&&m(r)&&s.test(p)&&s.test(r))return r}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(5),i=r(54);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),l=0;!a.testn(l);l++);for(var u=e.shrn(l),c=a.toRed(o);t>0;t--){var f=this._randrange(new n(2),a);r&&r(f);var d=f.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new n(2),s),f=e.gcd(c);if(0!==f.cmpn(1))return f;var d=c.toRed(i).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?S(e,new _):A(e,s,t,!0);else if(s.ended)S(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):O(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,O(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(R,e))}function R(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){u("readable nexttick read 0"),e.read(0)}function I(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(z,t,e))}function z(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function W(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):T(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){S(this,new w("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:g;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",g),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var f=!1;function d(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==W(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(N,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(L,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(L,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(I,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(24).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(25);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(40),n.short=r(175),n.mont=r(176),n.edwards=r(177)},function(e,t,r){"use strict";var n=r(11).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(11),i=r(31),o=r(104),s=r(9),a=n.sum32,l=n.sum32_4,u=n.sum32_5,c=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n=49&&u<=54?u-49+10:u>=17&&u<=22?u-17+10:u,s|=l}return n(!(240&s),"Invalid character in "+e),i}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s"}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c:o.prototype.inspect=c;var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?f[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],c=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(e);r=(p=p.idivn(c)).isZero()?b+r:f[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,f=67108863&l,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,x=S>>>13,k=0|s[5],E=8191&k,A=k>>>13,C=0|s[6],T=8191&C,R=C>>>13,O=0|s[7],P=8191&O,L=O>>>13,N=0|s[8],I=8191&N,j=N>>>13,D=0|s[9],B=8191&D,z=D>>>13,W=0|a[0],U=8191&W,q=W>>>13,F=0|a[1],H=8191&F,$=F>>>13,V=0|a[2],K=8191&V,G=V>>>13,Y=0|a[3],X=8191&Y,Z=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],fe=8191&ce,de=ce>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(d,U)|0))<<13)|0;u=((o=Math.imul(d,q))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,q))+Math.imul(b,U)|0,o=Math.imul(b,q);var me=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(d,H)|0))<<13)|0;u=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,q))+Math.imul(y,U)|0,o=Math.imul(y,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,$)|0;var ye=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,q))+Math.imul(_,U)|0,o=Math.imul(_,q),n=n+Math.imul(m,H)|0,i=(i=i+Math.imul(m,$)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,$)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0;var ve=(u+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,q))+Math.imul(x,U)|0,o=Math.imul(x,q),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0;var we=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,q))+Math.imul(A,U)|0,o=Math.imul(A,q),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,q))+Math.imul(R,U)|0,o=Math.imul(R,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,q))+Math.imul(L,U)|0,o=Math.imul(L,q),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var Me=(u+(n=n+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,q))+Math.imul(j,U)|0,o=Math.imul(j,q),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,$)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,G)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,q))+Math.imul(z,U)|0,o=Math.imul(z,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(j,H)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var ke=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,$))+Math.imul(z,H)|0,o=Math.imul(z,$),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var Ee=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,G))+Math.imul(z,K)|0,o=Math.imul(z,G),n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(z,X)|0,o=Math.imul(z,Z),n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,de)|0;var Ce=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(z,Q)|0,o=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,se)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Te=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(z,re)|0,o=Math.imul(z,ne),n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(L,le)|0,o=o+Math.imul(L,ue)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Re=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,se))+Math.imul(z,oe)|0,o=Math.imul(z,se),n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,ue)|0,n=n+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Oe=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(z,le)|0,o=Math.imul(z,ue),n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var Pe=(u+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(L,pe)|0))<<13)|0;u=((o=o+Math.imul(L,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(z,fe)|0,o=Math.imul(z,de);var Le=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863;var Ne=(u+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(z,pe)|0))<<13)|0;return u=((o=Math.imul(z,be))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=me,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=Se,l[7]=Me,l[8]=xe,l[9]=ke,l[10]=Ee,l[11]=Ae,l[12]=Ce,l[13]=Te,l[14]=Re,l[15]=Oe,l[16]=Pe,l[17]=Le,l[18]=Ne,0!==u&&(l[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(b=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?p(this,e,t):r<1024?g(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-o|f>>>o,c=f&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(f)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,k),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(94)(e))},function(e,t,r){var n=r(0),i=r(33).Reporter,o=r(2).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(198)},function(e,t,r){var n=r(0),i=r(32),o=i.base,s=i.bignum,a=i.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function c(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var l=1,u=n.length;u>=256;u>>=8)l++;(o=new i(2+l))[0]=s,o[1]=128|l;u=1+l;for(var c=n.length;c>0;u--,c>>=8)o[u]=255&c;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;s>>=7)o++}var a=new i(o),l=a.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(a[l--]=127&s;(s>>=7)>0;)a[l--]=128|127&s}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0?s-4:s;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<0;e[r+h]=255&s,h+=p,s/=256,u-=8);e[r+h-p]|=128*b}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function n(e){var t={},r=!1;function n(t,n){return r=!0,{done:!1,value:new u(n=new Promise((function(r){r(e[t](n))})),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function i(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(o=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function s(e){return new u(e,0)}function a(e){return function(){return new l(e.apply(this,arguments))}}function l(e){var t,r;function n(t,r){try{var o=e[t](r),s=o.value,a=s instanceof u;Promise.resolve(a?s.v:s).then((function(r){if(a){var l="return"===t?"return":"next";if(!s.k||r.done)return n(l,r);r=e[l](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function u(e,t){this.v=e,this.k=t}l.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},l.prototype.next=function(e){return this._invoke("next",e)},l.prototype.throw=function(e){return this._invoke("throw",e)},l.prototype.return=function(e){return this._invoke("return",e)};const c=globalThis.AbortController||r(27).AbortController,{codes:{ERR_INVALID_ARG_VALUE:f,ERR_INVALID_ARG_TYPE:d,ERR_MISSING_ARGS:h,ERR_OUT_OF_RANGE:p},AbortError:b}=r(8),{validateAbortSignal:g,validateInteger:m,validateObject:y}=r(28),v=r(3).Symbol("kWeak"),w=r(3).Symbol("kResistStopPropagation"),{finished:_}=r(16),S=r(63),{addAbortSignalNoValidate:M}=r(36),{isWritable:x,isNodeStream:k}=r(13),{deprecate:E}=r(7),{ArrayPrototypePush:A,Boolean:C,MathFloor:T,Number:R,NumberIsNaN:O,Promise:P,PromiseReject:L,PromiseResolve:N,PromisePrototypeThen:I,Symbol:j}=r(3),D=j("kEmpty"),B=j("kEof");function z(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let o=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(o=T(t.highWaterMark)),m(n,"options.concurrency",1),m(o,"options.highWaterMark",0),o+=n,function(){var l=a((function*(){const a=r(7).AbortSignalAny([null==t?void 0:t.signal].filter(C)),l=this,u=[],c={signal:a};let f,d,h=!1,p=0;function g(){h=!0,m()}function m(){p-=1,y()}function y(){d&&!h&&p=o||p>=n)&&await new P(e=>{d=e})}}catch(e){s=!0,t=e}finally{try{r||null==w.return||await w.return()}finally{if(s)throw t}}u.push(B)}catch(e){const t=L(e);I(t,m,g),u.push(t)}finally{h=!0,f&&(f(),f=null)}}();try{for(;;){for(;u.length>0;){const e=yield s(u[0]);if(e===B)return;if(a.aborted)throw new b;e!==D&&(yield e),u.shift(),y()}yield s(new P(e=>{f=e}))}}finally{h=!0,d&&(d(),d=null)}}));return function(){return l.apply(this,arguments)}}().call(this)}async function W(e,t){var r,n=!0,o=!1;try{for(var s,a=i(U.call(this,e,t));n=(s=await a.next()).done,await s.value,!n;n=!0){return!0}}catch(e){o=!0,r=e}finally{try{n||null==a.return||await a.return()}finally{if(o)throw r}}return!1}function U(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);return z.call(this,(async function(t,r){return await e(t,r)?t:D}),t)}class q extends h{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function F(e){if(e=R(e),O(e))return 0;if(e<0)throw new p("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:E((function(e){return null!=e&&y(e,"options"),null!=(null==e?void 0:e.signal)&&g(e.signal,"options.signal"),function(){var t=a((function*(){let t=0;var r,n=!0,o=!1;try{for(var a,l,u=i(this);n=(a=yield s(u.next())).done,l=yield s(a.value),!n;n=!0){const r=l;var c;if(null!=e&&null!==(c=e.signal)&&void 0!==c&&c.aborted)throw new b({cause:e.signal.reason});yield[t++,r]}}catch(e){o=!0,r=e}finally{try{n||null==u.return||(yield s(u.return()))}finally{if(o)throw r}}}));return function(){return t.apply(this,arguments)}}().call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t){return null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),e=F(e),function(){var r=a((function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new b;var n,o=!0,a=!1;try{for(var l,u,c=i(this);o=(l=yield s(c.next())).done,u=yield s(l.value),!o;o=!0){const r=u;var f;if(null!=t&&null!==(f=t.signal)&&void 0!==f&&f.aborted)throw new b;e--<=0&&(yield r)}}catch(e){a=!0,n=e}finally{try{o||null==c.return||(yield s(c.return()))}finally{if(a)throw n}}}));return function(){return r.apply(this,arguments)}}().call(this)},filter:U,flatMap:function(e,t){const r=z.call(this,e,t);return function(){var e=a((function*(){var e,t=!0,o=!1;try{for(var a,l,u=i(r);t=(a=yield s(u.next())).done,l=yield s(a.value),!t;t=!0){const e=l;yield*n(i(e))}}catch(t){o=!0,e=t}finally{try{t||null==u.return||(yield s(u.return()))}finally{if(o)throw e}}}));return function(){return e.apply(this,arguments)}}().call(this)},map:z,take:function(e,t){return null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),e=F(e),function(){var r=a((function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new b;var n,o=!0,a=!1;try{for(var l,u,c=i(this);o=(l=yield s(c.next())).done,u=yield s(l.value),!o;o=!0){const r=u;var f;if(null!=t&&null!==(f=t.signal)&&void 0!==f&&f.aborted)throw new b;if(e-- >0&&(yield r),e<=0)return}}catch(e){a=!0,n=e}finally{try{o||null==c.return||(yield s(c.return()))}finally{if(a)throw n}}}));return function(){return r.apply(this,arguments)}}().call(this)},compose:function(e,t){if(null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),k(e)&&!x(e))throw new f("stream",e,"must be writable");const r=S(this,e);return null!=t&&t.signal&&M(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);return!await W.call(this,async(...t)=>!await e(...t),t)},forEach:async function(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);var r,n=!0,o=!1;try{for(var s,a=i(z.call(this,(async function(t,r){return await e(t,r),D}),t));n=(s=await a.next()).done,await s.value,!n;n=!0){}}catch(e){o=!0,r=e}finally{try{n||null==a.return||await a.return()}finally{if(o)throw r}}},reduce:async function(e,t,r){var n;if("function"!=typeof e)throw new d("reducer",["Function","AsyncFunction"],e);null!=r&&y(r,"options"),null!=(null==r?void 0:r.signal)&&g(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(n=r.signal)&&void 0!==n&&n.aborted){const e=new b(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await _(this.destroy(e)),e}const s=new c,a=s.signal;if(null!=r&&r.signal){const e={once:!0,[v]:this,[w]:!0};r.signal.addEventListener("abort",()=>s.abort(),e)}let l=!1;try{var u,f=!0,h=!1;try{for(var p,m,S=i(this);f=(p=await S.next()).done,m=await p.value,!f;f=!0){const n=m;var M;if(l=!0,null!=r&&null!==(M=r.signal)&&void 0!==M&&M.aborted)throw new b;o?t=await e(t,n,{signal:a}):(t=n,o=!0)}}catch(e){h=!0,u=e}finally{try{f||null==S.return||await S.return()}finally{if(h)throw u}}if(!l&&!o)throw new q}finally{s.abort()}return t},toArray:async function(e){null!=e&&y(e,"options"),null!=(null==e?void 0:e.signal)&&g(e.signal,"options.signal");const t=[];var r,n=!0,o=!1;try{for(var s,a,l=i(this);n=(s=await l.next()).done,a=await s.value,!n;n=!0){const r=a;var u;if(null!=e&&null!==(u=e.signal)&&void 0!==u&&u.aborted)throw new b(void 0,{cause:e.signal.reason});A(t,r)}}catch(e){o=!0,r=e}finally{try{n||null==l.return||await l.return()}finally{if(o)throw r}}return t},some:W,find:async function(e,t){var r,n=!0,o=!1;try{for(var s,a,l=i(U.call(this,e,t));n=(s=await l.next()).done,a=await s.value,!n;n=!0){return a}}catch(e){o=!0,r=e}finally{try{n||null==l.return||await l.return()}finally{if(o)throw r}}}}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return c.alloc(0);const t=c.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)l(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ei.length)){e===i.length?(t+=i,++n,r.next?this.head=r.next:this.head=this.tail=null):(t+=s(i,0,e),this.head=r,r.data=s(i,e));break}t+=i,e-=i.length,++n}while(null!==(r=r.next));return this.length-=n,t}_getBuffer(e){const t=c.allocUnsafe(e),r=e;let n=this.head,i=0;do{const o=n.data;if(!(e>o.length)){e===o.length?(l(t,o,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(l(t,new u(o.buffer,o.byteOffset,e),r-e),this.head=n,n.data=o.slice(e));break}l(t,o,r-e),e-=o.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return f(this,i(i({},t),{},{depth:0,customInspect:!1}))}}},function(e,t,r){function n(e){return new s(e,0)}function i(e){return function(){return new o(e.apply(this,arguments))}}function o(e){var t,r;function n(t,r){try{var o=e[t](r),a=o.value,l=a instanceof s;Promise.resolve(l?a.v:a).then((function(r){if(l){var s="return"===t?"return":"next";if(!a.k||r.done)return n(s,r);r=e[s](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function s(e,t){this.v=e,this.k=t}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)};const a=r(4),l=r(2),{isReadable:u,isWritable:c,isIterable:f,isNodeStream:d,isReadableNodeStream:h,isWritableNodeStream:p,isDuplexNodeStream:b,isReadableStream:g,isWritableStream:m}=r(13),y=r(16),{AbortError:v,codes:{ERR_INVALID_ARG_TYPE:w,ERR_INVALID_RETURN_VALUE:_}}=r(8),{destroyer:S}=r(19),M=r(14),x=r(35),k=r(46),{createDeferredPromise:E}=r(7),A=r(64),C=globalThis.Blob||l.Blob,T=void 0!==C?function(e){return e instanceof C}:function(e){return!1},R=globalThis.AbortController||r(27).AbortController,{FunctionPrototypeCall:O}=r(3);class P extends M{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function L(e){const t=e.readable&&"function"!=typeof e.readable.read?x.wrap(e.readable):e.readable,r=e.writable;let n,i,o,s,a,l=!!u(t),f=!!c(r);function d(e){const t=s;s=null,t?t(e):e&&a.destroy(e)}return a=new P({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:f}),f&&(y(r,e=>{f=!1,e&&S(t,e),d(e)}),a._write=function(e,t,i){r.write(e,t)?i():n=i},a._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(y(t,e=>{l=!1,e&&S(t,e),d(e)}),t.on("readable",(function(){if(o){const e=o;o=null,e()}})),t.on("end",(function(){a.push(null)})),a._read=function(){for(;;){const e=t.read();if(null===e)return void(o=a._read);if(!a.push(e))return}}),a._destroy=function(e,a){e||null===s||(e=new v),o=null,n=null,i=null,null===s?a(e):(s=a,S(r,e),S(t,e))},a}e.exports=function e(t,r){if(b(t))return t;if(h(t))return L({readable:t});if(p(t))return L({writable:t});if(d(t))return L({writable:!1,readable:!1});if(g(t))return L({readable:x.fromWeb(t)});if(m(t))return L({writable:k.fromWeb(t)});if("function"==typeof t){const{value:e,write:o,final:s,destroy:l}=function(e){let{promise:t,resolve:r}=E();const o=new R,s=o.signal;return{value:e(i((function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:l}=yield n(e);if(a.nextTick(l),o)return;if(s.aborted)throw new v(void 0,{cause:s.reason});({promise:t,resolve:r}=E()),yield i}}))(),{signal:s}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){o.abort(),t(e)}}}(t);if(f(e))return A(P,e,{objectMode:!0,write:o,final:s,destroy:l});const u=null==e?void 0:e.then;if("function"==typeof u){let t;const r=O(u,e,e=>{if(null!=e)throw new _("nully","body",e)},e=>{S(t,e)});return t=new P({objectMode:!0,readable:!1,write:o,final(e){s(async()=>{try{await r,a.nextTick(e,null)}catch(t){a.nextTick(e,t)}})},destroy:l})}throw new _("Iterable, AsyncIterable or AsyncFunction",r,e)}if(T(t))return e(t.arrayBuffer());if(f(t))return A(P,t,{objectMode:!0,writable:!1});if(g(null==t?void 0:t.readable)&&m(null==t?void 0:t.writable))return P.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return L({readable:null!=t&&t.readable?h(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?p(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const o=null==t?void 0:t.then;if("function"==typeof o){let e;return O(o,t,t=>{null!=t&&e.push(t),e.push(null)},t=>{S(e,t)}),e=new P({objectMode:!0,writable:!1,read(){}})}throw new w(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},function(e,t){e.exports=function(e){return"_:"+e.value}},function(e,t){e.exports=function(e,t){return[...e].map(e=>t(e)).join("\n")+"\n"}},function(e,t){e.exports=function(){return""}},function(e,t,r){const n=r(68),i=/["\\\\\n\r]/,o=/["\\\\\n\r]/g,s={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function a(e){return s[e]}e.exports=function(e){const t=(r=e.value,i.test(r)?r.replace(o,a):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+n(e.datatype)}},function(e,t){e.exports=function(e,t){const r=t(e.subject),n=t(e.predicate),i=t(e.object),o=t(e.graph);return`${r} ${n} ${i} ${o?o+" ":""}.`}},function(e,t){e.exports=function(e){return"?"+e.value}},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(20),t.createHash=t.Hash=r(29),t.createHmac=t.Hmac=r(78);var n=r(142),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(81);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(144);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var l=r(159);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var u=r(164);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(207);var c=r(208);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var f=r(211);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){(t=e.exports=r(70)).Stream=t,t.Readable=t,t.Writable=r(74),t.Duplex=r(22),t.Transform=r(75),t.PassThrough=r(135),t.finished=r(48),t.pipeline=r(136)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&s.forEach(u),o||(s.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,a)+l+r[d]+s[h];l=a,a=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+f(p,i,o,a)+l+r[h]+s[p]|0;l=a,a=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,r){var n=r(0),i=r(76),o=r(23),s=r(1).Buffer,a=new Array(64);function l(){this.init(),this._w=a,o.call(this,64,56)}n(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},function(e,t,r){var n=r(0),i=r(77),o=r(23),s=r(1).Buffer,a=new Array(160);function l(){this.init(),this._w=a,o.call(this,128,112)}n(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},function(e,t,r){"use strict";var n=r(0),i=r(1).Buffer,o=r(17),s=i.alloc(128);function a(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,s],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),a=0;a<64;a++)r[a]=54^t[a],n[a]=92^t[a];this._hash=[r]}n(a,o),a.prototype._update=function(e){this._hash.push(e)},a.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=a},function(e,t,r){e.exports=r(80)},function(e,t,r){(function(t,n){var i,o=r(1).Buffer,s=r(82),a=r(83),l=r(84),u=r(85),c=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,p,b,g,m){"function"==typeof g&&(m=g,g=void 0);var y=f[(g=g||"sha1").toLowerCase()];if(!y||"function"!=typeof t.Promise)return n.nextTick((function(){var t;try{t=l(e,r,p,b,g)}catch(e){return m(e)}m(null,t)}));if(s(p,b),e=u(e,a,"Password"),r=u(r,a,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){n.nextTick((function(){t(null,e)}))}),(function(e){n.nextTick((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var r=h(i=i||o.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=r,r}(y).then((function(t){return t?h(e,r,p,b,y):l(e,r,p,b,g)})),m)}}).call(this,r(12),r(4))},function(e,t,r){var n=r(145),i=r(52),o=r(53),s=r(158),a=r(39);function l(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(e,t,r){var n=r(17),i=r(146),o=r(0),s=r(1).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=i.create({key:o,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,o(l,n),l.prototype._update=function(e){return s.from(this._des.update(e))},l.prototype._final=function(){return s.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(86),t.Cipher=r(51),t.DES=r(87),t.CBC=r(147),t.EDE=r(148)},function(e,t,r){"use strict";var n=r(9),i=r(0),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(91),i=r(1).Buffer,o=r(53),s=r(92),a=r(17),l=r(38),u=r(39);function c(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new c(a.module,t,r)}r(0)(c,a),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var n=r(93),i=r(162),o=r(163);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,a,l){return e.isBuffer(i)||void 0===s[i]?t(r,"binary",i,a):(i=i||"binary",l=l||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,l)),"number"==typeof r?new o(n(r,a),a,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,a,!0)))}}).call(this,r(2).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){(function(t){var n=r(5),i=new(r(95)),o=new n(24),s=new n(11),a=new n(10),l=new n(3),u=new n(7),c=r(93),f=r(20);function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=b;var p={};function b(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function g(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var f,d=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[n]=d,d;switch(i.test(e.shrn(1))||(d+=2),r){case"02":e.mod(o).cmp(s)&&(d+=8);break;case"05":(f=e.mod(a)).cmp(l)&&f.cmp(u)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&s.forEach(u),o||(s.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){var n=r(1).Buffer,i=r(78),o=r(56),s=r(57).ec,a=r(107),l=r(41),u=r(112);function c(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function d(e,t,r){var o,s;do{for(o=n.alloc(0);8*o.length","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t,r){"use strict";var n=r(10),i=r(5),o=r(0),s=r(40),a=n.assert;function l(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,s),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,l,u,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),m=new i(1),y=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),c=g.sub(v.mul(p));var w=m.sub(v.mul(b));if(!n&&u.cmp(f)<0)t=l.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++y)break;l=u,h=d,d=u,g=p,p=c,m=b,b=w}s=u.neg(),a=c;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),l=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),l.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=n.redMul(u),d=l.redSqr().redIAdd(c).redISub(f).redISub(f),h=l.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),c=r.redMul(l),f=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(f)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(f,d,h)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(5),i=r(0),o=r(40),s=r(10);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(l,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),l=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(10),i=r(5),o=r(0),s=r(40),a=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(l,s),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,s.BasePoint),l.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},l.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),l=i.redMul(s),u=o.redMul(a),c=i.redMul(a),f=s.redMul(o);return this.curve.point(l,u,f,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(a)).redAdd(l);this.zOne?(e=s.redSub(a).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(l)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=s.redSub(a).redISub(l).redMul(o),t=u.redMul(n.redSub(l)),r=u.redMul(o))}else n=a.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(l)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),l=r.redAdd(t),u=o.redMul(s),c=a.redMul(l),f=o.redMul(l),d=s.redMul(a);return this.curve.point(u,c,d,f)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),l=i.redSub(a),u=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),f=n.redMul(l).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=l.redMul(u)):(t=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(l).redMul(u)),this.curve.point(f,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(179),t.sha224=r(180),t.sha256=r(105),t.sha384=r(181),t.sha512=r(106)},function(e,t,r){"use strict";var n=r(11),i=r(31),o=r(104),s=n.rotl32,a=n.sum32,l=n.sum32_5,u=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),l=e.toArray("be",s),u=new i({hash:this.hash,entropy:a,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var m=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new c({r:g,s:m,recoveryParam:y})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new c(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,l=s.invm(this.n),u=l.mul(e).umod(this.n),f=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var o=this.n,s=new n(e),a=t.r,u=t.s,f=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var h=t.r.invm(o),p=o.sub(s).mul(h).umod(o),b=u.mul(h).umod(o);return this.g.mulAdd(p,a,b)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(59),i=r(102),o=r(9);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(5),i=r(10),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o>>=0;return!(i<=127)&&(t.place=s,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=l(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=l(e,r);if(!1===s)return!1;var u=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var c=l(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var f=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(u),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,e)}},function(e,t,r){"use strict";var n=r(59),i=r(58),o=r(10),s=o.assert,a=o.parseBytes,l=r(190),u=r(191);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),l=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:o})},c.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,c){var f=s(r);if("ec"===f.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,f)}if("dsa"===f.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,a=r.data.g,u=r.data.pub_key,c=s.signature.decode(e,"der"),f=c.s,d=c.r;l(f,o),l(d,o);var h=i.mont(n),p=f.invm(o);return 0===a.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([c,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-c-1,b=i(c),g=a(f.concat([u,h,f.alloc(1,1),t],p),s(b,p)),m=a(b,s(g,c));return new l(f.concat([f.alloc(1),m,g],r))}(p,t);else if(1===d)h=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=r?f.alloc(s-o-3,255):function(e){var t,r=f.allocUnsafe(e),n=0,o=i(2*e),s=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(h,p):u(h,p)}},function(e,t,r){var n=r(41),i=r(113),o=r(114),s=r(5),a=r(56),l=r(29),u=r(115),c=r(1).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new s(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?u(new s(t),h):a(t,h);var b=c.alloc(p-d.length);if(d=c.concat([b,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=l("sha1").update(c.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),u=t.slice(s+1),f=o(a,i(u,s)),d=o(u,i(f,r-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var s=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(1),s=r(20),a=o.Buffer,l=o.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return u.getRandomValues(a),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(r,t.length),d(n,r,t.length),h(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(r,t.length),void 0===n&&(n=t.length-r);return d(n,r,t.length),h(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(12),r(4))},function(e,t){window.CodeMirror.defineMode("javascript",(function(e,t){var r,n,i=e.indentUnit,o=t.statementIndent,s=t.jsonld,a=t.json||s,l=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,i){return r=e,n=i,t}function p(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(s&&"@"==e.peek()&&e.match(d))return t.tokenize=p,h("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=p),h("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==n&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return h(n);if("="==n&&e.eat(">"))return h("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):Ve(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==n)return t.tokenize=g,g(e,t);if("#"==n)return e.skipToEnd(),h("error","error");if("<"==n&&e.match("!--")||"-"==n&&e.match("->"))return e.skipToEnd(),h("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),h("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(i)){var o=c[i];return h(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",i)}return h("variable","variable",i)}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=p;break}n="*"==r}return h("comment","comment")}function g(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=p;break}n=!n&&"\\"==r}return h("quasi","string-2",e.current())}function m(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(l){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,s=r-1;s>=0;--s){var a=e.string.charAt(s),c="([{}])".indexOf(a);if(c>=0&&c<3){if(!i){++s;break}if(0==--i){"("==a&&(o=!0);break}}else if(c>=3&&c<6)++i;else if(u.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(e.string.charAt(s-1)==a&&"\\"!=e.string.charAt(s-2)){s--;break}}else if(o&&!i){++s;break}}o&&!i&&(t.fatArrowAt=s)}}var y={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function v(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var _={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)_.cc.push(arguments[e])}function M(){return S.apply(null,arguments),!0}function x(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function k(e){var r=_.state;if(_.marked="def",r.context)if("var"==r.lexical.info&&r.context&&r.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new A(n,r.vars,!0):null}return x(t,r.vars)?r:new A(r.prev,new C(t,r.vars),!1)}return null}(e,r.context);if(null!=n)return void(r.context=n)}else if(!x(e,r.localVars))return void(r.localVars=new C(e,r.localVars));t.globalVars&&!x(e,r.globalVars)&&(r.globalVars=new C(e,r.globalVars))}function E(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,r){this.prev=e,this.vars=t,this.block=r}function C(e,t){this.name=e,this.next=t}var T=new C("this",new C("arguments",null));function R(){_.state.context=new A(_.state.context,_.state.localVars,!1),_.state.localVars=T}function O(){_.state.context=new A(_.state.context,_.state.localVars,!0),_.state.localVars=null}function P(){_.state.localVars=_.state.context.vars,_.state.context=_.state.context.prev}function L(e,t){var r=function(){var r=_.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new v(n,_.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function N(){var e=_.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function I(e){return function t(r){return r==e?M():";"==e||"}"==r||")"==r||"]"==r?S():M(t)}}function j(e,t){return"var"==e?M(L("vardef",t),me,I(";"),N):"keyword a"==e?M(L("form"),W,j,N):"keyword b"==e?M(L("form"),j,N):"keyword d"==e?_.stream.match(/^\s*$/,!1)?M():M(L("stat"),q,I(";"),N):"debugger"==e?M(I(";")):"{"==e?M(L("}"),O,ie,N,P):";"==e?M():"if"==e?("else"==_.state.lexical.info&&_.state.cc[_.state.cc.length-1]==N&&_.state.cc.pop()(),M(L("form"),W,j,N,Me)):"function"==e?M(Ae):"for"==e?M(L("form"),xe,j,N):"class"==e||l&&"interface"==t?(_.marked="keyword",M(L("form","class"==e?e:t),Pe,N)):"variable"==e?l&&"declare"==t?(_.marked="keyword",M(j)):l&&("module"==t||"enum"==t||"type"==t)&&_.stream.match(/^\s*\w/,!1)?(_.marked="keyword","enum"==t?M(He):"type"==t?M(Te,I("operator"),ue,I(";")):M(L("form"),ye,I("{"),L("}"),ie,N,N)):l&&"namespace"==t?(_.marked="keyword",M(L("form"),B,j,N)):l&&"abstract"==t?(_.marked="keyword",M(j)):M(L("stat"),Z):"switch"==e?M(L("form"),W,I("{"),L("}","switch"),O,ie,N,N,P):"case"==e?M(B,I(":")):"default"==e?M(I(":")):"catch"==e?M(L("form"),R,D,j,N,P):"export"==e?M(L("stat"),je,N):"import"==e?M(L("stat"),Be,N):"async"==e?M(j):"@"==t?M(B,j):S(L("stat"),B,I(";"),N)}function D(e){if("("==e)return M(Re,I(")"))}function B(e,t){return U(e,t,!1)}function z(e,t){return U(e,t,!0)}function W(e){return"("!=e?S():M(L(")"),B,I(")"),N)}function U(e,t,r){if(_.state.fatArrowAt==_.stream.start){var n=r?G:K;if("("==e)return M(R,L(")"),re(Re,")"),N,I("=>"),n,P);if("variable"==e)return S(R,ye,I("=>"),n,P)}var i=r?H:F;return y.hasOwnProperty(e)?M(i):"function"==e?M(Ae,i):"class"==e||l&&"interface"==t?(_.marked="keyword",M(L("form"),Oe,N)):"keyword c"==e||"async"==e?M(r?z:B):"("==e?M(L(")"),q,I(")"),N,i):"operator"==e||"spread"==e?M(r?z:B):"["==e?M(L("]"),Fe,N,i):"{"==e?ne(Q,"}",null,i):"quasi"==e?S($,i):"new"==e?M(function(e){return function(t){return"."==t?M(e?X:Y):"variable"==t&&l?M(pe,e?H:F):S(e?z:B)}}(r)):"import"==e?M(B):M()}function q(e){return e.match(/[;\}\)\],]/)?S():S(B)}function F(e,t){return","==e?M(B):H(e,t,!1)}function H(e,t,r){var n=0==r?F:H,i=0==r?B:z;return"=>"==e?M(R,r?G:K,P):"operator"==e?/\+\+|--/.test(t)||l&&"!"==t?M(n):l&&"<"==t&&_.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?M(L(">"),re(ue,">"),N,n):"?"==t?M(B,I(":"),i):M(i):"quasi"==e?S($,n):";"!=e?"("==e?ne(z,")","call",n):"."==e?M(J,n):"["==e?M(L("]"),q,I("]"),N,n):l&&"as"==t?(_.marked="keyword",M(ue,n)):"regexp"==e?(_.state.lastType=_.marked="operator",_.stream.backUp(_.stream.pos-_.stream.start-1),M(i)):void 0:void 0}function $(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?M($):M(B,V)}function V(e){if("}"==e)return _.marked="string-2",_.state.tokenize=g,M($)}function K(e){return m(_.stream,_.state),S("{"==e?j:B)}function G(e){return m(_.stream,_.state),S("{"==e?j:z)}function Y(e,t){if("target"==t)return _.marked="keyword",M(F)}function X(e,t){if("target"==t)return _.marked="keyword",M(H)}function Z(e){return":"==e?M(N,j):S(F,I(";"),N)}function J(e){if("variable"==e)return _.marked="property",M()}function Q(e,t){return"async"==e?(_.marked="property",M(Q)):"variable"==e||"keyword"==_.style?(_.marked="property","get"==t||"set"==t?M(ee):(l&&_.state.fatArrowAt==_.stream.start&&(r=_.stream.match(/^\s*:\s*/,!1))&&(_.state.fatArrowAt=_.stream.pos+r[0].length),M(te))):"number"==e||"string"==e?(_.marked=s?"property":_.style+" property",M(te)):"jsonld-keyword"==e?M(te):l&&E(t)?(_.marked="keyword",M(Q)):"["==e?M(B,oe,I("]"),te):"spread"==e?M(z,te):"*"==t?(_.marked="keyword",M(Q)):":"==e?S(te):void 0;var r}function ee(e){return"variable"!=e?S(te):(_.marked="property",M(Ae))}function te(e){return":"==e?M(z):"("==e?S(Ae):void 0}function re(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var s=_.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),M((function(r,n){return r==t||n==t?S():S(e)}),n)}return i==t||o==t?M():r&&r.indexOf(";")>-1?S(e):M(I(t))}return function(r,i){return r==t||i==t?M():S(e,n)}}function ne(e,t,r){for(var n=3;n"),ue):void 0}function ce(e){if("=>"==e)return M(ue)}function fe(e,t){return"variable"==e||"keyword"==_.style?(_.marked="property",M(fe)):"?"==t||"number"==e||"string"==e?M(fe):":"==e?M(ue):"["==e?M(I("variable"),se,I("]"),fe):"("==e?S(Ce,fe):void 0}function de(e,t){return"variable"==e&&_.stream.match(/^\s*[?:]/,!1)||"?"==t?M(de):":"==e?M(ue):"spread"==e?M(de):S(ue)}function he(e,t){return"<"==t?M(L(">"),re(ue,">"),N,he):"|"==t||"."==e||"&"==t?M(ue):"["==e?M(ue,I("]"),he):"extends"==t||"implements"==t?(_.marked="keyword",M(ue)):"?"==t?M(ue,I(":"),ue):void 0}function pe(e,t){if("<"==t)return M(L(">"),re(ue,">"),N,he)}function be(){return S(ue,ge)}function ge(e,t){if("="==t)return M(ue)}function me(e,t){return"enum"==t?(_.marked="keyword",M(He)):S(ye,oe,_e,Se)}function ye(e,t){return l&&E(t)?(_.marked="keyword",M(ye)):"variable"==e?(k(t),M()):"spread"==e?M(ye):"["==e?ne(we,"]"):"{"==e?ne(ve,"}"):void 0}function ve(e,t){return"variable"!=e||_.stream.match(/^\s*:/,!1)?("variable"==e&&(_.marked="property"),"spread"==e?M(ye):"}"==e?S():"["==e?M(B,I("]"),I(":"),ve):M(I(":"),ye,_e)):(k(t),M(_e))}function we(){return S(ye,_e)}function _e(e,t){if("="==t)return M(z)}function Se(e){if(","==e)return M(me)}function Me(e,t){if("keyword b"==e&&"else"==t)return M(L("form","else"),j,N)}function xe(e,t){return"await"==t?M(xe):"("==e?M(L(")"),ke,N):void 0}function ke(e){return"var"==e?M(me,Ee):"variable"==e?M(Ee):S(Ee)}function Ee(e,t){return")"==e?M():";"==e?M(Ee):"in"==t||"of"==t?(_.marked="keyword",M(B,Ee)):S(B,Ee)}function Ae(e,t){return"*"==t?(_.marked="keyword",M(Ae)):"variable"==e?(k(t),M(Ae)):"("==e?M(R,L(")"),re(Re,")"),N,ae,j,P):l&&"<"==t?M(L(">"),re(be,">"),N,Ae):void 0}function Ce(e,t){return"*"==t?(_.marked="keyword",M(Ce)):"variable"==e?(k(t),M(Ce)):"("==e?M(R,L(")"),re(Re,")"),N,ae,P):l&&"<"==t?M(L(">"),re(be,">"),N,Ce):void 0}function Te(e,t){return"keyword"==e||"variable"==e?(_.marked="type",M(Te)):"<"==t?M(L(">"),re(be,">"),N):void 0}function Re(e,t){return"@"==t&&M(B,Re),"spread"==e?M(Re):l&&E(t)?(_.marked="keyword",M(Re)):l&&"this"==e?M(oe,_e):S(ye,oe,_e)}function Oe(e,t){return"variable"==e?Pe(e,t):Le(e,t)}function Pe(e,t){if("variable"==e)return k(t),M(Le)}function Le(e,t){return"<"==t?M(L(">"),re(be,">"),N,Le):"extends"==t||"implements"==t||l&&","==e?("implements"==t&&(_.marked="keyword"),M(l?ue:B,Le)):"{"==e?M(L("}"),Ne,N):void 0}function Ne(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||l&&E(t))&&_.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(_.marked="keyword",M(Ne)):"variable"==e||"keyword"==_.style?(_.marked="property",M(l?Ie:Ae,Ne)):"number"==e||"string"==e?M(l?Ie:Ae,Ne):"["==e?M(B,oe,I("]"),l?Ie:Ae,Ne):"*"==t?(_.marked="keyword",M(Ne)):l&&"("==e?S(Ce,Ne):";"==e||","==e?M(Ne):"}"==e?M():"@"==t?M(B,Ne):void 0}function Ie(e,t){if("?"==t)return M(Ie);if(":"==e)return M(ue,_e);if("="==t)return M(z);var r=_.state.lexical.prev;return S(r&&"interface"==r.info?Ce:Ae)}function je(e,t){return"*"==t?(_.marked="keyword",M(qe,I(";"))):"default"==t?(_.marked="keyword",M(B,I(";"))):"{"==e?M(re(De,"}"),qe,I(";")):S(j)}function De(e,t){return"as"==t?(_.marked="keyword",M(I("variable"))):"variable"==e?S(z,De):void 0}function Be(e){return"string"==e?M():"("==e?S(B):S(ze,We,qe)}function ze(e,t){return"{"==e?ne(ze,"}"):("variable"==e&&k(t),"*"==t&&(_.marked="keyword"),M(Ue))}function We(e){if(","==e)return M(ze,We)}function Ue(e,t){if("as"==t)return _.marked="keyword",M(ze)}function qe(e,t){if("from"==t)return _.marked="keyword",M(B)}function Fe(e){return"]"==e?M():S(re(z,"]"))}function He(){return S(L("form"),ye,I("{"),L("}"),re($e,"}"),N,N)}function $e(){return S(ye,_e)}function Ve(e,t,r){return t.tokenize==p&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return P.lex=!0,N.lex=!0,{startState:function(e){var r={tokenize:p,lastType:"sof",cc:[],lexical:new v((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&new A(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),m(e,t)),t.tokenize!=b&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==r?i:(t.lastType="operator"!=r||"++"!=n&&"--"!=n?r:"incdec",function(e,t,r,n,i){var o=e.cc;for(_.state=e,_.stream=i,_.marked=null,_.cc=o,_.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():a?B:j)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return _.marked?_.marked:"variable"==r&&w(e,n)?"variable-2":t}}}(t,i,r,n,e))},indent:function(e,r){if(e.tokenize==b)return CodeMirror.Pass;if(e.tokenize!=p)return 0;var n,s=r&&r.charAt(0),a=e.lexical;if(!/^\s*else\b/.test(r))for(var l=e.cc.length-1;l>=0;--l){var u=e.cc[l];if(u==N)a=a.prev;else if(u!=Me)break}for(;("stat"==a.type||"form"==a.type)&&("}"==s||(n=e.cc[e.cc.length-1])&&(n==F||n==H)&&!/^[,\.=+\-*:?[\(]/.test(r));)a=a.prev;o&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,d=s==c;return"vardef"==c?a.indented+("operator"==e.lastType||","==e.lastType?a.info.length+1:0):"form"==c&&"{"==s?a.indented:"form"==c?a.indented+i:"stat"==c?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(e,r)?o||i:0):"switch"!=a.info||d||0==t.doubleIndentSwitch?a.align?a.column+(d?0:1):a.indented+(d?0:i):a.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:s,jsonMode:a,expressionAllowed:Ve,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=z||e.cc.pop()}}})),CodeMirror.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/x-javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})},function(e,t){window.CodeMirror.defineMode("turtle",(function(e){var t,r=e.indentUnit;function n(e){return new RegExp("^(?:"+e.join("|")+")$","i")}n([]);var i=n(["@prefix","@base","a"]),o=/[*+\-<>=&|]/;function s(e,r){var n,a=e.next();if(t=null,"<"!=a||e.match(/^[\s\u00a0=]/,!1)){if('"'==a||"'"==a)return r.tokenize=(n=a,function(e,t){for(var r,i=!1;null!=(r=e.next());){if(r==n&&!i){t.tokenize=s;break}i=!i&&"\\"==r}return"string"}),r.tokenize(e,r);if(/[{}\(\),\.;\[\]]/.test(a))return t=a,null;if("#"==a)return e.skipToEnd(),"comment";if(o.test(a))return e.eatWhile(o),null;if(":"==a)return"operator";if(e.eatWhile(/[_\w\d]/),":"==e.peek())return"variable-3";var l=e.current();return i.test(l)?"meta":a>="A"&&a<="Z"?"comment":"keyword"}return e.match(/^[^\s\u00a0>]*>?/),"atom"}function a(e,t,r){e.context={prev:e.context,indent:e.indent,col:r,type:t}}function l(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:s,context:null,indent:0,col:0}},token:function(e,r){if(e.sol()&&(r.context&&null==r.context.align&&(r.context.align=!1),r.indent=e.indentation()),e.eatSpace())return null;var n=r.tokenize(e,r);if("comment"!=n&&r.context&&null==r.context.align&&"pattern"!=r.context.type&&(r.context.align=!0),"("==t)a(r,")",e.column());else if("["==t)a(r,"]",e.column());else if("{"==t)a(r,"}",e.column());else if(/[\]\}\)]/.test(t)){for(;r.context&&"pattern"==r.context.type;)l(r);r.context&&t==r.context.type&&l(r)}else"."==t&&r.context&&"pattern"==r.context.type?l(r):/atom|string|variable/.test(n)&&r.context&&(/[\}\]]/.test(r.context.type)?a(r,"pattern",e.column()):"pattern"!=r.context.type||r.context.align||(r.context.align=!0,r.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),i=e.context;if(/[\]\}]/.test(n))for(;i&&"pattern"==i.type;)i=i.prev;var o=i&&n==i.type;return i?"pattern"==i.type?i.col:i.align?i.col+(o?0:1):i.indent+(o?0:r):0},lineComment:"#"}})),CodeMirror.defineMIME("text/turtle","turtle"),CodeMirror.defineMIME("text/n3","turtle"),CodeMirror.defineMIME("application/trig","turtle")},function(e,t){window.CodeMirror.defineMode("ntriples",(function(){var e=0,t=1,r=2,n=3,i=4,o=5,s=6,a=7,l=8,u=9,c=10,f=11,d=12;function h(h,p){var b,g=h.location;b=g==e&&"<"==p?t:g==e&&"_"==p?r:g==n&&"<"==p?i:g==o&&"<"==p?s:g==o&&"_"==p?a:g==o&&'"'==p?l:g==t&&">"==p||g==r&&" "==p?n:g==i&&">"==p?o:g==s&&">"==p||g==a&&" "==p||g==l&&'"'==p||g==u&&" "==p||g==c&&">"==p?f:g==l&&"@"==p?u:g==l&&"^"==p?c:" "!=p||g!=e&&g!=n&&g!=o&&g!=f?g==f&&"."==p?e:d:g,h.location=b}return{startState:function(){return{location:e,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,t){var r=e.next();if("<"==r){h(t,r);var n="";return e.eatWhile((function(e){return"#"!=e&&">"!=e&&(n+=e,!0)})),t.uris.push(n),e.match("#",!1)?"variable":(e.next(),h(t,">"),"variable")}if("#"==r){var i="";return e.eatWhile((function(e){return">"!=e&&" "!=e&&(i+=e,!0)})),t.anchors.push(i),"variable-2"}if(">"==r)return h(t,">"),"variable";if("_"==r){h(t,r);var o="";return e.eatWhile((function(e){return" "!=e&&(o+=e,!0)})),t.bnodes.push(o),e.next(),h(t," "),"builtin"}if('"'==r)return h(t,r),e.eatWhile((function(e){return'"'!=e})),e.next(),"@"!=e.peek()&&"^"!=e.peek()&&h(t,'"'),"string";if("@"==r){h(t,"@");var s="";return e.eatWhile((function(e){return" "!=e&&(s+=e,!0)})),t.langs.push(s),e.next(),h(t," "),"string-2"}if("^"==r){e.next(),h(t,"^");var a="";return e.eatWhile((function(e){return">"!=e&&(a+=e,!0)})),t.types.push(a),e.next(),h(t,">"),"variable"}" "==r&&h(t,r),"."==r&&h(t,r)}}})),CodeMirror.defineMIME("application/n-triples","ntriples"),CodeMirror.defineMIME("application/n-quads","ntriples"),CodeMirror.defineMIME("text/n-triples","ntriples")},function(e,t){var r={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};window.CodeMirror.defineMode("xml",(function(e,t){var i,o,s=e.indentUnit,a={},l=t.htmlMode?r:n;for(var u in l)a[u]=l[u];for(var u in t)a[u]=t[u];function c(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(d("atom","]]>")):null:e.match("--")?r(d("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(function e(t){return function(r,n){for(var i;null!=(i=r.next());){if("<"==i)return n.tokenize=e(t+1),n.tokenize(r,n);if(">"==i){if(1==t){n.tokenize=c;break}return n.tokenize=e(t-1),n.tokenize(r,n)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var r,n,o=e.next();if(">"==o||"/"==o&&e.eat(">"))return t.tokenize=c,i=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return i="equals",null;if("<"==o){t.tokenize=c,t.state=g,t.tagName=t.tagStart=null;var s=t.tokenize(e,t);return s?s+" tag error":"tag error"}return/[\'\"]/.test(o)?(t.tokenize=(r=o,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=f;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=c;break}r.next()}return e}}function h(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function p(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!a.contextGrabbers.hasOwnProperty(r)||!a.contextGrabbers[r].hasOwnProperty(t))return;p(e)}}function g(e,t,r){return"openTag"==e?(r.tagStart=t.column(),m):"closeTag"==e?y:g}function m(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",_):a.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,t,r)):(o="error",m)}function y(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&a.implicitlyClosed.hasOwnProperty(r.context.tagName)&&p(r),r.context&&r.context.tagName==n||!1===a.matchClosing?(o="tag",v):(o="tag error",w)}return a.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",w)}function v(e,t,r){return"endTag"!=e?(o="error",v):(p(r),g)}function w(e,t,r){return o="error",v(e,0,r)}function _(e,t,r){if("word"==e)return o="attribute",S;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(n)?b(r,n):(b(r,n),r.context=new h(r,n,i==r.indented)),g}return o="error",_}function S(e,t,r){return"equals"==e?M:(a.allowMissing||(o="error"),_(e,0,r))}function M(e,t,r){return"string"==e?x:"word"==e&&a.allowUnquoted?(o="string",_):(o="error",_(e,0,r))}function x(e,t,r){return"string"==e?x:_(e,0,r)}return c.isInText=!0,{startState:function(e){var t={tokenize:c,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var r=t.tokenize(e,t);return(r||i)&&"comment"!=r&&(o=null,t.state=t.state(i||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(n&&n.noIndent)return CodeMirror.Pass;if(e.tokenize!=f&&e.tokenize!=c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==a.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==M&&(e.state=_)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)r.tagName&&t.push(r.tagName);return t.reverse()}}})),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0})},function(e,t,r){"use strict";r.r(t);const n=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new Map;class s{constructor(e,t){if(this._$cssResult$=!0,t!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=o.get(this.cssText);return n&&void 0===e&&(o.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const a=(e,...t)=>{const r=1===e.length?e[0]:t.reduce((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new s(r,i)},l=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new s("string"==typeof e?e:e+"",i))(t)})(e):e;var u;const c=window.trustedTypes,f=c?c.emptyScript:"",d=window.reactiveElementPolyfillSupport,h={toAttribute(e,t){switch(t){case Boolean:e=e?f:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},p=(e,t)=>t!==e&&(t==t||e==e),b={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:p};class g extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const n=this._$Eh(r,t);void 0!==n&&(this._$Eu.set(n,r),e.push(n))}),e}static createProperty(e,t=b){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||b}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Eh(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}addController(e){var t,r;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{n?e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(t=>{const r=document.createElement("style"),n=window.litNonce;void 0!==n&&r.setAttribute("nonce",n),r.textContent=t.cssText,e.appendChild(r)})})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ES(e,t,r=b){var n,i;const o=this.constructor._$Eh(e,r);if(void 0!==o&&!0===r.reflect){const s=(null!==(i=null===(n=r.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==i?i:h.toAttribute)(t,r.type);this._$Ei=e,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Ei=null}}_$AK(e,t){var r,n,i;const o=this.constructor,s=o._$Eu.get(e);if(void 0!==s&&this._$Ei!==s){const e=o.getPropertyOptions(s),a=e.converter,l=null!==(i=null!==(n=null===(r=a)||void 0===r?void 0:r.fromAttribute)&&void 0!==n?n:"function"==typeof a?a:null)&&void 0!==i?i:h.fromAttribute;this._$Ei=s,this[s]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||p)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((e,t)=>this[t]=e),this._$Et=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(r)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach((e,t)=>this._$ES(t,this[t],e)),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var m;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:g}),(null!==(u=globalThis.reactiveElementVersions)&&void 0!==u?u:globalThis.reactiveElementVersions=[]).push("1.0.2");const y=globalThis.trustedTypes,v=y?y.createPolicy("lit-html",{createHTML:e=>e}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,_="?"+w,S=`<${_}>`,M=document,x=(e="")=>M.createComment(e),k=e=>null===e||"object"!=typeof e&&"function"!=typeof e,E=Array.isArray,A=e=>{var t;return E(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,R=/>/g,O=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,P=/'/g,L=/"/g,N=/^(?:script|style|textarea)$/i,I=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),j=I(1),D=(I(2),Symbol.for("lit-noChange")),B=Symbol.for("lit-nothing"),z=new WeakMap,W=M.createTreeWalker(M,129,null,!1),U=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",s=C;for(let t=0;t"===l[0]?(s=null!=i?i:C,u=-1):void 0===l[1]?u=-2:(u=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?O:'"'===l[3]?L:P):s===L||s===P?s=O:s===T||s===R?s=C:(s=O,i=void 0);const f=s===O&&e[t+1].startsWith("/>")?" ":"";o+=s===C?r+S:u>=0?(n.push(a),r.slice(0,u)+"$lit$"+r.slice(u)+w+f):r+w+(-2===u?(n.push(void 0),t):f)}const a=o+(e[r]||"")+(2===t?"":"");return[void 0!==v?v.createHTML(a):a,n]};class q{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[l,u]=U(e,t);if(this.el=q.createElement(l,r),W.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=W.nextNode())&&a.length0){n.textContent=y?y.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=F(this,e,t,0),o=!k(e)||e!==this._$AH&&e!==D,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s{var n,i;const o=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:t;let s=o._$litPart$;if(void 0===s){const e=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new $(t.insertBefore(x(),e),e,void 0,null!=r?r:{})}return s._$AI(e),s})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Dt)||void 0===e||e.setConnected(!1)}render(){return D}}te.finalized=!0,te._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:te});const re=globalThis.litElementPolyfillSupport;null==re||re({LitElement:te});(null!==(ee=globalThis.litElementVersions)&&void 0!==ee?ee:globalThis.litElementVersions=[]).push("3.0.2");class ne{constructor(e,{bind:t=!1}={}){this._factories=e.slice();for(const e of this._factories){"function"==typeof e.prototype.init&&e.prototype.init.call(this);for(const r of e.exports||[])this[r]=t?e.prototype[r].bind(this):e.prototype[r]}}clone(){const e=new ne(this._factories);for(const t of e._factories)"function"==typeof t.prototype.clone&&t.prototype.clone.call(e,this);return e}}var ie=ne;class oe extends Map{import(e,t,r){const n=this.get(e);return n?n.import(t,r):null}}var se=oe;var ae=class{constructor({factory:e}){this.factory=e,this.parsers=new se,this.serializers=new se}import(e){if(e.parsers)for(const[t,r]of e.parsers)this.parsers.set(t,new r.constructor({factory:this.factory}));if(e.serializers)for(const[t,r]of e.serializers)this.serializers.set(t,new r.constructor({factory:this.factory}));return this}};var le=class{init(){this.formats=new ae({factory:this})}clone(e){this.formats.import(e.formats)}},ue=r(42);function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const i=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);!pe(i,o)&&n||Object.defineProperty(e,r,o)},pe=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},be=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ge=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),me=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function ye(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const n of Reflect.ownKeys(t))he(e,t,n,r);return((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,t),((e,t,r)=>{const n=""===r?"":`with ${r.trim()}() `,i=be.bind(null,n,t.toString());Object.defineProperty(i,"name",me),Object.defineProperty(e,"toString",fe(fe({},ge),{},{value:i}))})(e,t,n),e}const ve=new WeakMap,we=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const i=e.displayName||e.name||"",o=function o(...s){if(ve.set(o,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw new Error(`Function \`${i}\` can only be called once`);return r};return ye(o,e),ve.set(o,n),o};we.callCount=e=>{if(!ve.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ve.get(e)};var _e=we,Se=r(26),Me=r.n(Se);function xe(e){return class extends class{constructor(e,...t){this.load=_e(async()=>new(await e())(...t))}import(e,t){const r=new Se.PassThrough({objectMode:!0});return Promise.resolve().then(async()=>{const n=(await this.load()).import(e,t);n.on("prefix",(e,t)=>{r.emit("prefix",e,t)}),n.on("error",e=>{r.emit("error",e),r.emit("end")}),n.pipe(r)}),r}}{constructor(...t){super(e,...t)}}}const ke={parsers:new se,serializers:new se},Ee=xe(async()=>(await r.e(4).then(r.bind(null,382))).default),Ae=xe(async()=>(await r.e(7).then(r.bind(null,379))).default),Ce=xe(async()=>(await r.e(6).then(r.bind(null,372))).default),Te=xe(async()=>(await r.e(11).then(r.bind(null,383))).default),Re=xe(async()=>(await r.e(13).then(r.bind(null,380))).default);ke.parsers.set("application/ld+json",new Ee),ke.parsers.set("application/trig",new Ae),ke.parsers.set("application/n-quads",new Ae),ke.parsers.set("application/n-triples",new Ae),ke.parsers.set("text/n3",new Ae),ke.parsers.set("text/turtle",new Ae),ke.parsers.set("application/rdf+xml",new Ce),ke.serializers.set("application/ld+json",new Re),ke.serializers.set("application/n-quads",new Te),ke.serializers.set("application/n-triples",new Te),ke.serializers.set("text/n3",new Te),ke.serializers.set("text/turtle",new Te);var Oe=ke,Pe=r(6),Le=r(34),Ne=r.n(Le);class Ie{constructor(e){if(this.index=new Map,e)for(const[t,r]of e)this.set(t,r)}get size(){return this.index.size}clear(){this.index.clear()}delete(e){return this.index.delete(Ne()(e))}*entries(){for(const[,{term:e,value:t}]of this.index)yield[e,t]}forEach(e,t){for(const r of this.entries())e.call(t,r[1],r[0],this)}get(e){const t=this.index.get(Ne()(e));return t&&t.value}has(e){return this.index.has(Ne()(e))}*keys(){for(const[,{term:e}]of this.index)yield e}set(e,t){const r=Ne()(e);return this.index.set(r,{term:e,value:t}),this}*values(){for(const[,{value:e}]of this.index)yield e}[Symbol.iterator](){return this.entries()[Symbol.iterator]()}}var je=Ie,De=r(43),Be=r.n(De);function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;te+this.langOrDatatype(t),verbose:t=>e+this.langOrDatatype(t)}}langOrDatatype(e){if(this.term.language)return"@"+this.term.language;if(this.term.datatype.equals(Pe.xsd.string))return"";const t=function(e,t={}){const r=He(He({},qe),t),n=Array.from(Object.entries(r)).filter(([,t])=>e.startsWith(t));if(n.length){n.sort(([,e],[,t])=>t.length-e.length);const t=n[0];return e.replace(new RegExp("^"+t[1]),t[0]+":")}return""}(this.term.datatype.value,e);return t?"^^"+t:`^^<${this.term.datatype.value}>`}}const Ke=new Map([[Ve,e=>e.toTerm()]]);function Ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t{const n=this.toHashKey(t);let i=e[n]||{};return i=[...r].reduce(this.toConciseHash(t).bind(this),i),Ye(Ye({},e),{},{[n]:i})},{});this.push({type:this.strict?"c4r":"c4",value:e}),this.push(null)}toConciseHash(e){return(t,[r,{predicates:n}])=>{if(!this.strict&&1===this.blankNodes.get(r))return t;const i=this.toHashKey(r);return Ye(Ye({},t),{},{[i]:this.createPropertyMap(e,n)})}}createPropertyMap(e,t,r=0){const n=t=>{if(!this.strict&&1===this.blankNodes.get(t)){const n=this.graphs.get(e).get(t);if(n)return this.createPropertyMap(e,n.predicates,r+1)}return this.toHashKey(t)};if(!this.strict&&function(e){return e.has(Pe.rdf.first)&&e.has(Pe.rdf.rest)}(t)&&!this.preserveListNodeProperties){const[e]=t.get(Pe.rdf.first),[i]=t.get(Pe.rdf.rest);if(0===r){let t;if(i.equals(Pe.rdf.nil))t=this.toHashKey(Pe.rdf.nil);else{const e=n(i);t=Array.isArray(e)?[...e]:[e]}return{[this.toHashKey(Pe.rdf.first)]:[n(e)],[this.toHashKey(Pe.rdf.rest)]:[t]}}if(i.equals(Pe.rdf.nil))return[n(e)];const o=n(i);return[n(e),...o]}return[...t].reduce((e,[t,r])=>{const i=this.toHashKey(t),o=r.map(n.bind(this));return Ye(Ye({},e),{},{[i]:o})},{})}getGraph(e){const t=this.graphs.get(e)||new je;return this.graphs.set(e,t),t}literalHash(e){if(e.datatype&&!this.strict)switch(e.datatype.value){case Pe.xsd.integer.value:{const t=+e.value;if(Number.isInteger(t))return t;break}case Pe.xsd.decimal.value:{const t=+e.value;if(!Number.isNaN(t)&&!Number.isInteger(t))return t;break}case Pe.xsd.boolean.value:if("true"===e.value)return!0;if("false"===e.value)return!1}return e.value.includes("\n")?new Ve(e):Be.a.fromTerm(e).concise(this.prefixes)}toHashKey(e){return"Literal"===e.termType?this.literalHash(e):e.equals(Pe.rdf.type)?"a":Be.a.fromTerm(e).concise(this.prefixes)}}function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}async function rt(e,t={}){const r=(await e).default;return class{constructor(e={}){this.defaults=e}import(e,n={}){let{preserveListNodeProperties:i}=n,o=tt(n,["preserveListNodeProperties"]);const s=Qe(Qe({},this.defaults.prefixes||{}),o.prefixes||{}),a=r({prefixes:s,coercions:t.coercions});return e.pipe(new Ze({prefixes:s,strict:t.strict,preserveListNodeProperties:i})).pipe(a),a}}}const nt=xe(()=>rt(Promise.all([r.e(0),r.e(10),r.e(14)]).then(r.t.bind(null,373,7)),{coercions:Ke})),it=xe(()=>rt(Promise.all([r.e(0),r.e(8)]).then(r.t.bind(null,374,7)),{strict:!0})),ot=xe(()=>rt(Promise.all([r.e(0),r.e(9),r.e(15)]).then(r.t.bind(null,375,7)),{strict:!0,coercions:Ke}));async function st(e){const t=(await e).default;return class{import(e,r){return e.pipe(r?t(r):t())}}}const at=xe(()=>st(Promise.all([r.e(0),r.e(12),r.e(16)]).then(r.t.bind(null,376,7)))),lt=xe(()=>st(Promise.all([r.e(0),r.e(18),r.e(17)]).then(r.t.bind(null,377,7))));function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var ht=xe(async()=>{const e=(await Promise.all([r.e(5),r.e(19)]).then(r.bind(null,381))).default;return class extends e{constructor(e={}){let{prefixes:t={}}=e;super(ct({compact:!0,skipGraphProperty:!0,encoding:"string"},dt(e,["prefixes"]))),this.prefixes=t}import(e,{prefixes:t={}}={}){const r=ct(ct({},this.prefixes),t);return super.import(e,{context:r})}}});const pt=new ae({});pt.import(Oe);var bt=pt;const gt="application/ld+json",mt="application/n-triples",yt="application/n-quads",vt="text/n3",wt="application/rdf+xml",_t="application/trig",St="text/turtle";pt.serializers.set(gt,new ht),pt.serializers.set(vt,new nt),pt.serializers.set(St,new nt),pt.serializers.set(_t,new ot),pt.serializers.set(wt,new it),pt.parsers.set(vt,new at),pt.parsers.set(St,new at),pt.parsers.set(_t,new at),pt.parsers.set(mt,new lt),pt.parsers.set(yt,new lt);var Mt=navigator.userAgent,xt=navigator.platform,kt=/gecko\/\d/i.test(Mt),Et=/MSIE \d/.test(Mt),At=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Mt),Ct=/Edge\/(\d+)/.exec(Mt),Tt=Et||At||Ct,Rt=Tt&&(Et?document.documentMode||6:+(Ct||At)[1]),Ot=!Ct&&/WebKit\//.test(Mt),Pt=Ot&&/Qt\/\d+\.\d+/.test(Mt),Lt=!Ct&&/Chrome\//.test(Mt),Nt=/Opera\//.test(Mt),It=/Apple Computer/.test(navigator.vendor),jt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Mt),Dt=/PhantomJS/.test(Mt),Bt=It&&(/Mobile\/\w+/.test(Mt)||navigator.maxTouchPoints>2),zt=/Android/.test(Mt),Wt=Bt||zt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Mt),Ut=Bt||/Mac/.test(xt),qt=/\bCrOS\b/.test(Mt),Ft=/win/i.test(xt),Ht=Nt&&Mt.match(/Version\/(\d*\.\d*)/);Ht&&(Ht=Number(Ht[1])),Ht&&Ht>=15&&(Nt=!1,Ot=!0);var $t=Ut&&(Pt||Nt&&(null==Ht||Ht<12.11)),Vt=kt||Tt&&Rt>=9;function Kt(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Gt,Yt=function(e,t){let r=e.className,n=Kt(t).exec(r);if(n){let t=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(t?n[1]+t:"")}};function Xt(e){for(let t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Zt(e,t){return Xt(e).appendChild(t)}function Jt(e,t,r,n){let i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(let e=0;e=t)return s+(t-o);s+=n-o,s+=r-s%r,o=n+1}}Bt?ir=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Tt&&(ir=function(e){try{e.select()}catch(e){}});var lr=class{constructor(){this.id=null,this.f=null,this.time=0,this.handler=or(this.onTimeout,this)}onTimeout(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)}set(e,t){this.f=t;const r=+new Date+e;(!this.id||r=t)return n+Math.min(s,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var br=[""];function gr(e){for(;br.length<=e;)br.push(mr(br)+" ");return br[e]}function mr(e){return e[e.length-1]}function yr(e,t){let r=[];for(let n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||_r.test(e))}function Mr(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Sr(e))||t.test(e):Sr(e)}function xr(e){for(let t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var kr=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Er(e){return e.charCodeAt(0)>=768&&kr.test(e)}function Ar(e,t,r){for(;(r<0?t>0:tr?-1:1;for(;;){if(t==r)return t;let i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var Tr=null;function Rr(e,t,r){let n;Tr=null;for(let i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Tr=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Tr=i)}return null!=n?n:Tr}var Or=function(){let e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,i=/[1n]/;function o(e,t,r){this.level=e,this.from=t,this.to=r}return function(s,a){let l="ltr"==a?"L":"R";if(0==s.length||"ltr"==a&&!e.test(s))return!1;let u=s.length,c=[];for(let e=0;e-1&&(n[t]=i.slice(0,e).concat(i.slice(e+1)))}}}function Dr(e,t){let r=Ir(e,t);if(!r.length)return;let n=Array.prototype.slice.call(arguments,2);for(let e=0;e0}function Ur(e){e.prototype.on=function(e,t){Nr(this,e,t)},e.prototype.off=function(e,t){jr(this,e,t)}}function qr(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Hr(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function $r(e){qr(e),Fr(e)}function Vr(e){return e.target||e.srcElement}function Kr(e){let t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ut&&e.ctrlKey&&1==t&&(t=3),t}var Gr,Yr,Xr=function(){if(Tt&&Rt<9)return!1;let e=Jt("div");return"draggable"in e||"dragDrop"in e}();function Zr(e){if(null==Gr){let t=Jt("span","​");Zt(e,Jt("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Gr=t.offsetWidth<=1&&t.offsetHeight>2&&!(Tt&&Rt<8))}let t=Gr?Jt("span","​"):Jt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return t.setAttribute("cm-text",""),t}function Jr(e){if(null!=Yr)return Yr;let t=Zt(e,document.createTextNode("AخA")),r=Gt(t,0,1).getBoundingClientRect(),n=Gt(t,1,2).getBoundingClientRect();return Xt(e),!(!r||r.left==r.right)&&(Yr=n.right-r.right<3)}var Qr=3!="\n\nb".split(/\n/).length?e=>{let t=0,r=[],n=e.length;for(;t<=n;){let n=e.indexOf("\n",t);-1==n&&(n=e.length);let i=e.slice(t,"\r"==e.charAt(n-1)?n-1:n),o=i.indexOf("\r");-1!=o?(r.push(i.slice(0,o)),t+=o+1):(r.push(i),t=n+1)}return r}:e=>e.split(/\r\n?|\n/),en=window.getSelection?e=>{try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:e=>{let t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},tn=(()=>{let e=Jt("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)})(),rn=null;var nn={},on={};function sn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),nn[e]=t}function an(e){if("string"==typeof e&&on.hasOwnProperty(e))e=on[e];else if(e&&"string"==typeof e.name&&on.hasOwnProperty(e.name)){let t=on[e.name];"string"==typeof t&&(t={name:t}),(e=wr(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return an("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return an("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ln(e,t){t=an(t);let r=nn[t.name];if(!r)return ln(e,"text/plain");let n=r(e,t);if(un.hasOwnProperty(t.name)){let e=un[t.name];for(let t in e)e.hasOwnProperty(t)&&(n.hasOwnProperty(t)&&(n["_"+t]=n[t]),n[t]=e[t])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(let e in t.modeProps)n[e]=t.modeProps[e];return n}var un={};function cn(e,t){sr(t,un.hasOwnProperty(e)?un[e]:un[e]={})}function fn(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);let r={};for(let e in t){let n=t[e];n instanceof Array&&(n=n.concat([])),r[e]=n}return r}function dn(e,t){let r;for(;e.innerMode&&(r=e.innerMode(t),r&&r.mode!=e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function hn(e,t,r){return!e.startState||e.startState(t,r)}var pn=class{constructor(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r}eol(){return this.pos>=this.string.length}sol(){return this.pos==this.lineStart}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}{let n=e=>r?e.toLowerCase():e;if(n(this.string.substr(this.pos,e.length))==n(e))return!1!==t&&(this.pos+=e.length),!0}}current(){return this.string.slice(this.start,this.pos)}hideFirstChars(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}lookAhead(e){let t=this.lineOracle;return t&&t.lookAhead(e)}baseToken(){let e=this.lineOracle;return e&&e.baseToken(this.pos)}};function bn(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");let r=e;for(;!r.lines;)for(let e=0;;++e){let n=r.children[e],i=n.chunkSize();if(t{let o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function mn(e,t,r){let n=[];return e.iter(t,r,e=>{n.push(e.text)}),n}function yn(e,t){let r=t-e.height;if(r)for(let t=e;t;t=t.parent)t.height+=r}function vn(e){if(null==e.parent)return null;let t=e.parent,r=ur(t.lines,e);for(let e=t.parent;e;t=e,e=e.parent)for(let n=0;e.children[n]!=t;++n)r+=e.children[n].chunkSize();return r+t.first}function wn(e,t){let r=e.first;e:do{for(let n=0;n=e.first&&tr?Mn(r,bn(e,r).text.length):function(e,t){let r=e.ch;return null==r||r>t?Mn(e.line,t):r<0?Mn(e.line,0):e}(t,bn(e,t.line).text.length)}function On(e,t){let r=[];for(let n=0;nthis.maxLookAhead&&(this.maxLookAhead=e),t}baseToken(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;let t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}}nextLine(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--}static fromSaved(e,t,r){return t instanceof Pn?new Ln(e,fn(e.mode,t.state),r,t.lookAhead):new Ln(e,fn(e.mode,t),r)}save(e){let t=!1!==e?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pn(t,this.maxLookAhead):t}};function Nn(e,t,r,n){let i=[e.state.modeGen],o={};Fn(e,t.text,e.doc.mode,r,(e,t)=>i.push(e,t),o,n);let s=r.state;for(let n=0;n{let r=l;for(;ue&&i.splice(l,1,e,i[l+1],t),l+=2,u=Math.min(e,t)}if(t)if(a.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;re.options.maxHighlightLength&&fn(e.doc.mode,n.state),o=Nn(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function jn(e,t,r){let n=e.doc,i=e.display;if(!n.mode.startState)return new Ln(n,!0,t);let o=function(e,t,r){let n,i,o=e.doc,s=r?-1:t-(e.doc.mode.innerMode?1e3:100);for(let a=t;a>s;--a){if(a<=o.first)return o.first;let t=bn(o,a-1),s=t.stateAfter;if(s&&(!r||a+(s instanceof Pn?s.lookAhead:0)<=o.modeFrontier))return a;let l=ar(t.text,null,e.options.tabSize);(null==i||n>l)&&(i=a-1,n=l)}return i}(e,t,r),s=o>n.first&&bn(n,o-1).stateAfter,a=s?Ln.fromSaved(n,s,o):new Ln(n,hn(n.mode),o);return n.iter(o,t,r=>{Dn(e,r.text,a);let n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}var Wn=class{constructor(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r}};function Un(e,t,r,n){let i,o,s=e.doc,a=s.mode,l=bn(s,(t=Rn(s,t)).line),u=jn(e,t.line,r),c=new pn(l.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(a=!1,s&&Dn(e,t,n,f.pos),f.pos=t.length,l=null):l=qn(zn(r,f,n.state,d),o),d){let e=d[0].name;e&&(l="m-"+(l?e+" "+l:e))}if(!a||c!=l){for(;u=t:o.to>t);(n||(n=[])).push(new Vn(s,o.from,e?null:o.to))}}return n}(r,i,s),l=function(e,t,r){let n;if(e)for(let i=0;i=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!r||o.marker.insertLeft)){let e=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(let t=0;tt)&&(!r||ti(r,i.marker)<0)&&(r=i.marker)}return r}function si(e,t,r,n,i){let o=bn(e,t),s=$n&&o.markedSpans;if(s)for(let e=0;e=0&&l<=0||a<=0&&l>=0)&&(a<=0&&(t.marker.inclusiveRight&&i.inclusiveLeft?xn(o.to,r)>=0:xn(o.to,r)>0)||a>=0&&(t.marker.inclusiveRight&&i.inclusiveLeft?xn(o.from,n)<=0:xn(o.from,n)<0)))return!0}}function ai(e){let t;for(;t=ni(e);)e=t.find(-1,!0).line;return e}function li(e,t){let r=bn(e,t),n=ai(r);return r==n?t:vn(n)}function ui(e,t){if(t>e.lastLine())return t;let r,n=bn(e,t);if(!ci(e,n))return t;for(;r=ii(n);)n=r.find(1,!0).line;return vn(n)+1}function ci(e,t){let r=$n&&t.markedSpans;if(r)for(let n,i=0;i{let r=hi(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var bi=class{constructor(e,t,r){this.text=e,Jn(this,t),this.height=r?r(this):1}lineNo(){return vn(this)}};function gi(e){e.parent=null,Zn(e)}Ur(bi);var mi={},yi={};function vi(e,t){if(!e||/^\s*$/.test(e))return null;let r=t.addModeClass?yi:mi;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function wi(e,t){let r=Qt("span",null,null,Ot?"padding-right: .1px":null),n={pre:Qt("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(let r=0;r<=(t.rest?t.rest.length:0);r++){let i,o=r?t.rest[r-1]:t.line;n.pos=0,n.addToken=Si,Jr(e.display.measure)&&(i=Pr(o,e.doc.direction))&&(n.addToken=Mi(n.addToken,i)),n.map=[],ki(o,n,In(e,o,t!=e.display.externalMeasured&&vn(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=nr(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=nr(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Zr(e.display.measure))),0==r?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Ot){let e=n.content.lastChild;(/\bcm-tab\b/.test(e.className)||e.querySelector&&e.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return Dr(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=nr(n.pre.className,n.textClass||"")),n}function _i(e){let t=Jt("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Si(e,t,r,n,i,o,s){if(!t)return;let a,l=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;let r=t,n="";for(let t=0;t{i=i?i+" cm-force-border":"cm-force-border";let u=r.pos,c=u+n.length;for(;;){let f;for(let e=0;eu&&f.from<=u));e++);if(f.to>=c)return e(r,n,i,o,s,a,l);e(r,n.slice(0,f.to-u),i,o,null,a,l),o=null,n=n.slice(f.to-u),u=f.to}}}function xi(e,t,r,n){let i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ki(e,t,r){let n=e.markedSpans,i=e.text,o=0;if(!n){for(let e=1;ep||o.collapsed&&i.to==p&&i.from==p)){if(null!=i.to&&i.to!=p&&m>i.to&&(m=i.to,u=""),o.className&&(l+=" "+o.className),o.css&&(a=(a?a+";":"")+o.css),o.startStyle&&i.from==p&&(c+=" "+o.startStyle),o.endStyle&&i.to==m&&(e||(e=[])).push(o.endStyle,i.to),o.title&&((d||(d={})).title=o.title),o.attributes)for(let e in o.attributes)(d||(d={}))[e]=o.attributes[e];o.collapsed&&(!f||ti(f.marker,o)<0)&&(f=i)}else i.from>p&&m>i.from&&(m=i.from)}if(e)for(let t=0;t=h)break;let e=Math.min(h,m);for(;;){if(g){let r=p+g.length;if(!f){let n=r>e?g.slice(0,e-p):g;t.addToken(t,n,s?s+l:l,c,p+n.length==m?u:"",a,d)}if(r>=e){g=g.slice(e-p),p=e;break}p=r,c=""}g=i.slice(o,o=r[b++]),s=vi(r[b++],t.cm.options)}}}function Ei(e,t,r){this.line=t,this.rest=function(e){let t,r;for(;t=ii(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?vn(mr(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ci(e,t)}function Ai(e,t,r){let n,i=[];for(let o=t;or[e].apply(null,i))}function Oi(){let e=Ti;Ti=null;for(let t=0;tr)return{map:e.measure.maps[t],cache:e.measure.caches[t],before:!0}}function Ji(e,t,r,n){return to(e,eo(e,t),r,n)}function Qi(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&e.push((i.bottom+o.top)/2-r.top)}}e.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),o=function(e,t,r,n){let i,o=io(t.map,r,n),s=o.node,a=o.start,l=o.end,u=o.collapse;if(3==s.nodeType){for(let e=0;e<4;e++){for(;a&&Er(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l1}(e))return t;let r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{let t;a>0&&(u=n="right"),i=e.options.lineWrapping&&(t=s.getClientRects()).length>1?t["right"==n?t.length-1:0]:s.getBoundingClientRect()}if(Tt&&Rt<9&&!a&&(!i||!i.left&&!i.right)){let t=s.parentNode.getClientRects()[0];i=t?{left:t.left,right:t.left+Ao(e.display),top:t.top,bottom:t.bottom}:no}let c=i.top-t.rect.top,f=i.bottom-t.rect.top,d=(c+f)/2,h=t.view.measure.heights,p=0;for(;pt)&&(o=l-a,i=o-1,t>=l&&(s="right")),null!=i){if(n=e[u+2],a==l&&r==(n.insertLeft?"left":"right")&&(s=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],s="left";if("right"==r&&i==l-a)for(;u=0&&(r=e[t]).left==r.right;t--);return r}function so(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(let t=0;t=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!a)return s("before"==u?l-1:l,"before"==u);function c(e,t,r){return s(r?e-1:e,1==a[t].level!=r)}let f=Rr(a,l,u),d=Tr,h=c(l,f,"before"==u);return null!=d&&(h.other=c(l,d,"before"!=u)),h}function mo(e,t){let r=0;t=Rn(e.doc,t),e.options.lineWrapping||(r=Ao(e.display)*t.ch);let n=bn(e.doc,t.line),i=di(n)+$i(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function yo(e,t,r,n,i){let o=Mn(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function vo(e,t,r){let n=e.doc;if((r+=e.display.viewOffset)<0)return yo(n.first,0,null,-1,-1);let i=wn(n,r),o=n.first+n.size-1;if(i>o)return yo(n.first+n.size-1,bn(n,o).text.length,null,1,1);t<0&&(t=0);let s=bn(n,i);for(;;){let o=Mo(e,s,i,t,r),a=oi(s,o.ch+(o.xRel>0||o.outside>0?1:0));if(!a)return o;let l=a.find(1);if(l.line==i)return l;s=bn(n,i=l.line)}}function wo(e,t,r,n){n-=fo(t);let i=t.text.length,o=Cr(t=>to(e,r,t-1).bottom<=n,i,0);return i=Cr(t=>to(e,r,t).top>n,o,i),{begin:o,end:i}}function _o(e,t,r,n){return r||(r=eo(e,t)),wo(e,t,r,ho(e,t,to(e,r,n),"line").top)}function So(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Mo(e,t,r,n,i){i-=di(t);let o=eo(e,t),s=fo(t),a=0,l=t.text.length,u=!0,c=Pr(t,e.doc.direction);if(c){let s=(e.options.lineWrapping?ko:xo)(e,t,r,o,c,n,i);u=1!=s.level,a=u?s.from:s.to-1,l=u?s.to:s.from-1}let f,d,h=null,p=null,b=Cr(t=>{let r=to(e,o,t);return r.top+=s,r.bottom+=s,!!So(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(h=t,p=r),!0)},a,l),g=!1;if(p){let e=n-p.left=n.bottom?1:0}return b=Ar(t.text,b,1),yo(r,b,d,g,n-f)}function xo(e,t,r,n,i,o,s){let a=Cr(a=>{let l=i[a],u=1!=l.level;return So(go(e,Mn(r,u?l.to:l.from,u?"before":"after"),"line",t,n),o,s,!0)},0,i.length-1),l=i[a];if(a>0){let u=1!=l.level,c=go(e,Mn(r,u?l.from:l.to,u?"after":"before"),"line",t,n);So(c,o,s,!0)&&c.top>s&&(l=i[a-1])}return l}function ko(e,t,r,n,i,o,s){let{begin:a,end:l}=wo(e,t,n,s);/\s/.test(t.text.charAt(l-1))&&l--;let u=null,c=null;for(let t=0;t=l||r.to<=a)continue;let s=to(e,n,1!=r.level?Math.min(l,r.to)-1:Math.max(a,r.from)).right,f=sf)&&(u=r,c=f)}return u||(u=i[i.length-1]),u.froml&&(u={from:u.from,to:l,level:u.level}),u}function Eo(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ro){ro=Jt("pre",null,"CodeMirror-line-like");for(let e=0;e<49;++e)ro.appendChild(document.createTextNode("x")),ro.appendChild(Jt("br"));ro.appendChild(document.createTextNode("x"))}Zt(e.measure,ro);let t=ro.offsetHeight/50;return t>3&&(e.cachedTextHeight=t),Xt(e.measure),t||1}function Ao(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;let t=Jt("span","xxxxxxxxxx"),r=Jt("pre",[t],"CodeMirror-line-like");Zt(e.measure,r);let n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Co(e){let t=e.display,r={},n={},i=t.gutters.clientLeft;for(let o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){let t=e.display.gutterSpecs[s].className;r[t]=o.offsetLeft+o.clientLeft+i,n[t]=o.clientWidth}return{fixedPos:To(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function To(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ro(e){let t=Eo(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ao(e.display)-3);return i=>{if(ci(e.doc,i))return 0;let o=0;if(i.widgets)for(let e=0;e{let t=r(e);t!=e.height&&yn(e,t)})}function Po(e,t,r,n){let i=e.display;if(!r&&"true"==Vr(t).getAttribute("cm-not-content"))return null;let o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}let l,u=vo(e,o,s);if(n&&u.xRel>0&&(l=bn(e.doc,u.line).text).length==u.ch){let t=ar(l,l.length,e.options.tabSize)-l.length;u=Mn(u.line,Math.max(0,Math.round((o-Ki(e.display).left)/Ao(e.display))-t))}return u}function Lo(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;let r=e.display.view;for(let e=0;et)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$n&&li(e.doc,t)i.viewFrom?jo(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)jo(e);else if(t<=i.viewFrom){let t=Do(e,r,r+n,1);t?(i.view=i.view.slice(t.index),i.viewFrom=t.lineN,i.viewTo+=n):jo(e)}else if(r>=i.viewTo){let r=Do(e,t,t,-1);r?(i.view=i.view.slice(0,r.index),i.viewTo=r.lineN):jo(e)}else{let o=Do(e,t,t,-1),s=Do(e,r,r+n,1);o&&s?(i.view=i.view.slice(0,o.index).concat(Ai(e,o.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):jo(e)}let o=i.externalMeasured;o&&(r=i.lineN&&t=n.viewTo)return;let o=n.view[Lo(e,t)];if(null==o.node)return;let s=o.changes||(o.changes=[]);-1==ur(s,r)&&s.push(r)}function jo(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Do(e,t,r,n){let i,o=Lo(e,t),s=e.display.view;if(!$n||r==e.doc.first+e.doc.size)return{index:o,lineN:r};let a=e.display.viewFrom;for(let e=0;e0){if(o==s.length-1)return null;i=a+s[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;li(e.doc,r)!=r;){if(o==(n<0?0:s.length-1))return null;r+=n*s[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Bo(e){let t=e.display.view,r=0;for(let e=0;e=e.display.viewTo||s.to().linet||t==r&&s.to==t)&&(n(Math.max(s.from,t),Math.min(s.to,r),1==s.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(b,r||0,null==n?d:n,(e,t,i,f)=>{let g="ltr"==i,m=h(e,g?"left":"right"),y=h(t-1,g?"right":"left"),v=null==r&&0==e,w=null==n&&t==d,_=0==f,S=!b||f==b.length-1;if(y.top-m.top<=3){let e=(u?w:v)&&S,t=(u?v:w)&&_?a:(g?m:y).left,r=e?l:(g?y:m).right;c(t,m.top,r-t,m.bottom)}else{let r,n,o,s;g?(r=u&&v&&_?a:m.left,n=u?l:p(e,i,"before"),o=u?a:p(t,i,"after"),s=u&&w&&S?l:y.right):(r=u?p(e,i,"before"):a,n=!u&&v&&_?l:m.right,o=!u&&w&&S?a:y.left,s=u?p(t,i,"after"):l),c(r,m.top,n-r,m.bottom),m.bottom0?t.blinker=setInterval(()=>{e.hasFocus()||Go(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function $o(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ko(e))}function Vo(e){e.state.delayingBlurEvent=!0,setTimeout(()=>{e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Go(e))},100)}function Ko(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Dr(e,"focus",e,t),e.state.focused=!0,rr(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Ot&&setTimeout(()=>e.display.input.reset(!0),20)),e.display.input.receivedFocus()),Ho(e))}function Go(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Dr(e,"blur",e,t),e.state.focused=!1,Yt(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(()=>{e.state.focused||(e.display.shift=!1)},150))}function Yo(e){let t=e.display,r=t.lineDiv.offsetTop;for(let n=0;n.005||l<-.005)&&(yn(o.line,i),Xo(o.line),o.rest))for(let e=0;ee.display.sizerWidth){let t=Math.ceil(a/Ao(e.display));t>e.display.maxLineLength&&(e.display.maxLineLength=t,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}function Xo(e){if(e.widgets)for(let t=0;t=s&&(o=wn(t,di(bn(t,i))-e.wrapper.clientHeight),s=i)}return{from:o,to:Math.max(s,o+1)}}function Jo(e,t){let r=e.display,n=Eo(e.display);t.top<0&&(t.top=0);let i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Xi(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);let a=e.doc.height+Vi(r),l=t.topa-n;if(t.topi+o){let e=Math.min(t.top,(u?a:t.bottom)-o);e!=i&&(s.scrollTop=e)}let c=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-c,d=Yi(e)-r.gutters.offsetWidth,h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?s.scrollLeft=0:t.leftd+f-3&&(s.scrollLeft=t.right+(h?0:10)-d),s}function Qo(e,t){null!=t&&(rs(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function es(e){rs(e);let t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ts(e,t,r){null==t&&null==r||rs(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function rs(e){let t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null,ns(e,mo(e,t.from),mo(e,t.to),t.margin)}}function ns(e,t,r,n){let i=Jo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});ts(e,i.scrollLeft,i.scrollTop)}function is(e,t){Math.abs(e.doc.scrollTop-t)<2||(kt||Ts(e,{top:t}),os(e,t,!0),kt&&Ts(e),xs(e,100))}function os(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ss(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Ps(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function as(e){let t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Vi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Gi(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function ls(e,t){t||(t=as(e));let r=e.display.barWidth,n=e.display.barHeight;us(e,t);for(let t=0;t<4&&r!=e.display.barWidth||n!=e.display.barHeight;t++)r!=e.display.barWidth&&e.options.lineWrapping&&Yo(e),us(e,as(e)),r=e.display.barWidth,n=e.display.barHeight}function us(e,t){let r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var cs={native:class{constructor(e,t,r){this.cm=r;let n=this.vert=Jt("div",[Jt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Jt("div",[Jt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),Nr(n,"scroll",()=>{n.clientHeight&&t(n.scrollTop,"vertical")}),Nr(i,"scroll",()=>{i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Tt&&Rt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}update(e){let t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";let r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";let t=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+t)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}}setScrollLeft(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}setScrollTop(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}zeroWidthHack(){let e=Ut&&!jt?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new lr,this.disableVert=new lr}enableZeroWidthBar(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){let i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}))}clear(){let e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},null:class{update(){return{bottom:0,right:0}}setScrollLeft(){}setScrollTop(){}clear(){}}};function fs(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Yt(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new cs[e.options.scrollbarStyle](t=>{e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Nr(t,"mousedown",()=>{e.state.focused&&setTimeout(()=>e.display.input.focus(),0)}),t.setAttribute("cm-not-content","true")},(t,r)=>{"horizontal"==r?ss(e,t):is(e,t)},e),e.display.scrollbars.addClass&&rr(e.display.wrapper,e.display.scrollbars.addClass)}var ds=0;function hs(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ds},t=e.curOp,Ci?Ci.ops.push(t):t.ownsGroup=Ci={ops:[t],delayedCallbacks:[]}}function ps(e){let t=e.curOp;t&&function(e,t){let r=e.ownsGroup;if(r)try{!function(e){let t=e.delayedCallbacks,r=0;do{for(;r{for(let t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Es(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function gs(e){e.updatedDisplay=e.mustUpdate&&As(e.cm,e.update)}function ms(e){let t=e.cm,r=t.display;e.updatedDisplay&&Yo(t),e.barMeasure=as(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ji(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Gi(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Yi(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ys(e){let t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Dt){let n=Jt("div","​",null,`position: absolute;\n top: ${t.top-r.viewOffset-$i(e.display)}px;\n height: ${t.bottom-t.top+Gi(e)+r.barHeight}px;\n left: ${t.left}px; width: ${Math.max(2,t.right-t.left)}px;`);e.display.lineSpace.appendChild(n),n.scrollIntoView(i),e.display.lineSpace.removeChild(n)}}(t,function(e,t,r,n){let i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?Mn(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?Mn(t.line,t.ch+1,"before"):t);for(let o=0;o<5;o++){let o=!1,s=go(e,t),a=r&&r!=t?go(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};let l=Jo(e,i),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(is(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(ss(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return i}(t,Rn(n,e.scrollToPos.from),Rn(n,e.scrollToPos.to),e.scrollToPos.margin))}let i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(let e=0;e=e.display.viewTo)return;let r=+new Date+e.options.workTime,n=jn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),o=>{if(n.line>=e.display.viewFrom){let r=o.styles,s=o.text.length>e.options.maxHighlightLength?fn(t.mode,n.state):null,a=Nn(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;let l=o.styleClasses,u=a.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);let c=!r||r.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass);for(let e=0;!c&&er)return xs(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&ws(e,()=>{for(let t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Bo(e))return!1;Ls(e)&&(jo(e),t.dims=Co(e));let i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(i,r.viewTo)),$n&&(o=li(e.doc,o),s=ui(e.doc,s));let a=o!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){let n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Ai(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Ai(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Lo(e,r)))),n.viewTo=r}(e,o,s),r.viewOffset=di(bn(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";let l=Bo(e);if(!a&&0==l&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;let u=function(e){if(e.hasFocus())return null;let t=tr();if(!t||!er(e.display.lineDiv,t))return null;let r={activeElt:t};if(window.getSelection){let t=window.getSelection();t.anchorNode&&t.extend&&er(e.display.lineDiv,t.anchorNode)&&(r.anchorNode=t.anchorNode,r.anchorOffset=t.anchorOffset,r.focusNode=t.focusNode,r.focusOffset=t.focusOffset)}return r}(e);return l>4&&(r.lineDiv.style.display="none"),function(e,t,r){let n=e.display,i=e.options.lineNumbers,o=n.lineDiv,s=o.firstChild;function a(t){let r=t.nextSibling;return Ot&&Ut&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}let l=n.view,u=n.viewFrom;for(let n=0;n-1&&(n=!1),Pi(e,c,u,r)),n&&(Xt(c.lineNumber),c.lineNumber.appendChild(document.createTextNode(Sn(e.options,u)))),s=c.node.nextSibling}else{let t=zi(e,c,u,r);o.insertBefore(t,s)}u+=c.size}for(;s;)s=a(s)}(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=tr()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&er(document.body,e.anchorNode)&&er(document.body,e.focusNode))){let t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),Xt(r.cursorDiv),Xt(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,xs(e,400)),r.updateLineNumbers=null,!0}function Cs(e,t){let r=t.viewport;for(let n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Yi(e))n&&(t.visible=Zo(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Vi(e.display)-Xi(e),r.top)}),t.visible=Zo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!As(e,t))break;Yo(e);let i=as(e);zo(e),ls(e,i),Os(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ts(e,t){let r=new Es(e,t);if(As(e,r)){Yo(e),Cs(e,r);let t=as(e);zo(e),ls(e,t),Os(e,t),r.finish()}}function Rs(e){let t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Ri(e,"gutterChanged",e)}function Os(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Gi(e)+"px"}function Ps(e){let t=e.display,r=t.view;if(!(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter))return;let n=To(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px";for(let t=0;ts.clientWidth,l=s.scrollHeight>s.clientHeight;if(n&&a||i&&l){if(i&&Ut&&Ot)e:for(let r=t.target,n=o.view;r!=s;r=r.parentNode)for(let t=0;t{if(null==o.wheelStartX)return;let e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(zs=(zs*Bs+r)/(Bs+1),++Bs)},200)):(o.wheelDX+=n,o.wheelDY+=i))}}Tt?zs=-.53:kt?zs=15:Lt?zs=-.7:It&&(zs=-1/3);var Fs=class{constructor(e,t){this.ranges=e,this.primIndex=t}primary(){return this.ranges[this.primIndex]}equals(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(let t=0;t=0&&xn(e,n.to())<=0)return r}return-1}},Hs=class{constructor(e,t){this.anchor=e,this.head=t}from(){return Cn(this.anchor,this.head)}to(){return An(this.anchor,this.head)}empty(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function $s(e,t,r){let n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((e,t)=>xn(e.from(),t.from())),r=ur(t,i);for(let e=1;e0:s>=0){let n=Cn(o.from(),i.from()),s=An(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;e<=r&&--r,t.splice(--e,2,new Hs(a?s:n,a?n:s))}}return new Fs(t,r)}function Vs(e,t){return new Fs([new Hs(e,t||e)],0)}function Ks(e){return e.text?Mn(e.from.line+e.text.length-1,mr(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Gs(e,t){if(xn(e,t.from)<0)return e;if(xn(e,t.to)<=0)return Ks(t);let r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ks(t).ch-t.to.ch),Mn(r,n)}function Ys(e,t){let r=[];for(let n=0;n{e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,xs(e,100),e.state.modeGen++,e.curOp&&No(e)}function Qs(e,t){return 0==t.from.ch&&0==t.to.ch&&""==mr(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ea(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Zn(e),Jn(e,r);let i=n?n(e):1;i!=e.height&&yn(e,i)}(e,r,i,n),Ri(e,"change",e,t)}function s(e,t){let r=[];for(let o=e;o1&&e.remove(a.line+1,p-1),e.insert(a.line+1,t)}Ri(e,"change",e,t)}function ta(e,t,r){!function e(n,i,o){if(n.linked)for(let s=0;sca(e,r,t.from.line,t.to.line+1),!0),r}function sa(e){for(;e.length;){if(!mr(e).ranges)break;e.pop()}}function aa(e,t,r,n){let i=e.history;i.undone.length=0;let o,s,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(sa(e.done),mr(e.done)):e.done.length&&!mr(e.done).ranges?mr(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),mr(e.done)):void 0}(i,i.lastOp==n)))s=mr(o.changes),0==xn(t.from,t.to)&&0==xn(t.from,s.to)?s.to=Ks(t):o.changes.push(oa(e,t));else{let r=mr(i.done);for(r&&r.ranges||ua(e.sel,i.done),o={changes:[oa(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,s||Dr(e,"historyAdded")}function la(e,t,r,n){let i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){let i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,mr(i.done),t))?i.done[i.done.length-1]=t:ua(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&sa(i.undone)}function ua(e,t){let r=mr(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ca(e,t,r,n){let i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),r=>{r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function fa(e){if(!e)return null;let t;for(let r=0;r-1&&(mr(l)[i]=n[i],delete n[i])}}return n}function pa(e,t,r,n){if(n){let n=e.anchor;if(r){let e=xn(t,n)<0;e!=xn(r,n)<0?(n=t,t=r):e!=xn(t,r)<0&&(t=r)}return new Hs(n,t)}return new Hs(r||t,t)}function ba(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),wa(e,new Fs([pa(e.sel.primary(),t,r,i)],0),n)}function ga(e,t,r){let n=[],i=e.cm&&(e.cm.display.shift||e.extend);for(let r=0;r=t.ch:a.to>t.ch))){if(i&&(Dr(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(r){let s,a=l.find(n<0?1:-1);if((n<0?c:u)&&(a=Aa(e,a,-n,a&&a.line==t.line?o:null)),a&&a.line==t.line&&(s=xn(a,r))&&(n<0?s<0:s>0))return ka(e,a,t,n,i)}let a=l.find(n<0?-1:1);return(n<0?u:c)&&(a=Aa(e,a,n,a.line==t.line?o:null)),a?ka(e,a,t,n,i):null}}return t}function Ea(e,t,r,n,i){let o=n||1,s=ka(e,t,r,o,i)||!i&&ka(e,t,r,o,!0)||ka(e,t,r,-o,i)||!i&&ka(e,t,r,-o,!0);return s||(e.cantEdit=!0,Mn(e.first,0))}function Aa(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Rn(e,Mn(t.line-1)):null:r>0&&t.ch==(n||bn(e,t.line)).text.length?t.linen.canceled=!0};return r&&(n.update=(t,r,i,o)=>{t&&(n.from=Rn(e,t)),r&&(n.to=Rn(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Dr(e,"beforeChange",e,n),e.cm&&Dr(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ra(e,t,r){if(e.cm){if(!e.cm.curOp)return _s(e.cm,Ra)(e,t,r);if(e.cm.state.suppressEdits)return}if((Wr(e,"beforeChange")||e.cm&&Wr(e.cm,"beforeChange"))&&!(t=Ta(e,t,!0)))return;let n=Hn&&!r&&function(e,t,r){let n=null;if(e.iter(t.line,r.line+1,e=>{if(e.markedSpans)for(let t=0;t0)continue;let o=[e,1],s=xn(n.from,r.from),a=xn(n.to,r.to);(s<0||!t.inclusiveLeft&&!s)&&o.push({from:n.from,to:r.from}),(a>0||!t.inclusiveRight&&!a)&&o.push({from:r.to,to:n.to}),i.splice.apply(i,o),e+=o.length-3}}return i}(e,t.from,t.to);if(n)for(let r=n.length-1;r>=0;--r)Oa(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin});else Oa(e,t)}function Oa(e,t){if(1==t.text.length&&""==t.text[0]&&0==xn(t.from,t.to))return;let r=Ys(e,t);aa(e,t,r,e.cm?e.cm.curOp.id:NaN),Na(e,t,r,Yn(e,t));let n=[];ta(e,(e,r)=>{r||-1!=ur(n,e.history)||(Ba(e.history,t),n.push(e.history)),Na(e,t,null,Yn(e,t))})}function Pa(e,t,r){let n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;let i,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;for(;u=0;--r){let n=i.changes[r];if(n.origin=t,f&&!Ta(e,n,!1))return void(a.length=0);c.push(oa(e,n));let o=r?Ys(e,n):mr(a);Na(e,n,o,da(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:Ks(n)});let s=[];ta(e,(e,t)=>{t||-1!=ur(s,e.history)||(Ba(e.history,n),s.push(e.history)),Na(e,n,null,da(e,n))})}}function La(e,t){if(0!=t&&(e.first+=t,e.sel=new Fs(yr(e.sel.ranges,e=>new Hs(Mn(e.anchor.line+t,e.anchor.ch),Mn(e.head.line+t,e.head.ch))),e.sel.primIndex),e.cm)){No(e.cm,e.first,e.first-t,t);for(let t=e.cm.display,r=t.viewFrom;re.lastLine())return;if(t.from.linei&&(t={from:t.from,to:Mn(i,bn(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=gn(e,t.from,t.to),r||(r=Ys(e,t)),e.cm?function(e,t,r){let n=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=vn(ai(bn(n,o.line))),n.iter(l,s.line+1,e=>{if(e==i.maxLine)return a=!0,!0}));n.sel.contains(t.from,t.to)>-1&&zr(e);ea(n,t,r,Ro(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,e=>{let t=hi(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierr;n--){let i=bn(e,n).stateAfter;if(i&&(!(i instanceof Pn)||n+i.lookAhead1||!(this.children[0]instanceof Wa))){let e=[];this.collapse(e),this.children=[new Wa(e)],this.children[0].parent=this}},collapse(e){for(let t=0;t50){let e=i.lines.length%25+25;for(let t=e;t10);e.parent.maybeSpill()},iterN(e,t,r){for(let n=0;n{Fa(e,r,-i),Io(e,n,"widget")}),Ri(e,"lineWidgetCleared",e,this,n))}changed(){let e=this.height,t=this.doc.cm,r=this.line;this.height=null;let n=Fi(this)-e;n&&(ci(this.doc,r)||yn(r,r.height+n),t&&ws(t,()=>{t.curOp.forceUpdate=!0,Fa(t,r,n),Ri(t,"lineWidgetChanged",t,this,vn(r))}))}};function Fa(e,t,r){di(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Qo(e,r)}Ur(qa);var Ha=0,$a=class{constructor(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ha}clear(){if(this.explicitlyCleared)return;let e=this.doc.cm,t=e&&!e.curOp;if(t&&hs(e),Wr(this,"clear")){let e=this.find();e&&Ri(this,"clear",e.from,e.to)}let r=null,n=null;for(let t=0;te.display.maxLineLength&&(e.display.maxLine=r,e.display.maxLineLength=n,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&No(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ma(e.doc)),e&&Ri(e,"markerCleared",e,this,r,n),t&&ps(e),this.parent&&this.parent.clear()}find(e,t){let r,n;null==e&&"bookmark"==this.type&&(e=1);for(let i=0;i{let n=e.line,i=vn(e.line),o=Qi(r,i);if(o&&(so(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!ci(t.doc,n)&&null!=t.height){let e=t.height;t.height=null;let r=Fi(t)-e;r&&yn(n,n.height+r)}Ri(r,"markerChanged",r,this)})}attachLine(e){if(!this.lines.length&&this.doc.cm){let e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=ur(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)}detachLine(e){if(this.lines.splice(ur(this.lines,e),1),!this.lines.length&&this.doc.cm){let e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}}};function Va(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=sr(n)).shared=!1;let o=[Va(e,t,r,n,i)],s=o[0],a=n.widgetNode;return ta(e,e=>{a&&(n.widgetNode=a.cloneNode(!0)),o.push(Va(e,Rn(e,t),Rn(e,r),n,i));for(let t=0;t0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Qt("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(si(e,t.line,t,r,o)||t.line!=r.line&&si(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");$n=!0}o.addToHistory&&aa(e,{from:t,to:r,origin:"markText"},e.sel,NaN);let a,l=t.line,u=e.cm;if(e.iter(l,r.line+1,e=>{u&&o.collapsed&&!u.options.lineWrapping&&ai(e)==u.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&yn(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Vn(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,t=>{ci(e,t)&&yn(t,0)}),o.clearOnEnter&&Nr(o,"beforeCursorEnter",()=>o.clear()),o.readOnly&&(Hn=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Ha,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)No(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(let e=t.line;e<=r.line;e++)Io(u,e,"text");o.atomic&&Ma(u.doc),Ri(u,"markerAdded",u,o)}return o}Ur($a);var Ka=class{constructor(e,t){this.markers=e,this.primary=t;for(let t=0;te.parent)}function Ya(e){for(let t=0;tn.push(e));for(let e=0;e=0;e--)Ra(this,n[e]);o?va(this,o):this.cm&&es(this.cm)})),undo:Ms((function(){Pa(this,"undo")})),redo:Ms((function(){Pa(this,"redo")})),undoSelection:Ms((function(){Pa(this,"undo",!0)})),redoSelection:Ms((function(){Pa(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){let e=this.history,t=0,r=0;for(let r=0;re.history=this.history,!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ha(this.history.done),undone:ha(this.history.undone)}},setHistory:function(e){let t=this.history=new ia(this.history);t.done=ha(e.done.slice(0),null,!0),t.undone=ha(e.undone.slice(0),null,!0)},setGutterMarker:Ms((function(e,t,r){return za(this,e,"gutter",e=>{let n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&xr(n)&&(e.gutterMarkers=null),!0})})),clearGutter:Ms((function(e){this.iter(t=>{t.gutterMarkers&&t.gutterMarkers[e]&&za(this,t,"gutter",()=>(t.gutterMarkers[e]=null,xr(t.gutterMarkers)&&(t.gutterMarkers=null),!0))})})),lineInfo:function(e){let t;if("number"==typeof e){if(!_n(this,e))return null;if(t=e,!(e=bn(this,e)))return null}else if(t=vn(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ms((function(e,t,r){return za(this,e,"gutter"==t?"gutter":"class",e=>{let n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(Kt(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})})),removeLineClass:Ms((function(e,t,r){return za(this,e,"gutter"==t?"gutter":"class",e=>{let n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{let t=i.match(Kt(r));if(!t)return!1;let o=t.index+t[0].length;e[n]=i.slice(0,t.index)+(t.index&&o!=i.length?" ":"")+i.slice(o)||null}return!0})})),addLineWidget:Ms((function(e,t,r){return function(e,t,r,n){let i=new qa(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),za(e,t,"widget",t=>{let r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!ci(e,t)){let r=di(t)=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Rn(this,e),t=Rn(this,t);let n=[],i=e.line;return this.iter(e.line,t.line+1,o=>{let s=o.markedSpans;if(s)for(let o=0;o=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){let e=[];return this.iter(t=>{let r=t.markedSpans;if(r)for(let t=0;t{let o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Rn(this,Mn(r,t))},indexFromPos:function(e){let t=(e=Rn(this,e)).ch;if(e.line{t+=e.text.length+r}),t},copy:function(e){let t=new Za(mn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});let t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.tot.push(e.id),!0),e.history=new ia(null),e.history.done=ha(this.history.done,t),e.history.undone=ha(this.history.undone,t)}},iterLinkedDocs:function(e){ta(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Qr(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Ms((function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(e=>e.order=null),this.cm&&ws(t=this.cm,()=>{na(t),No(t)}))}))})).eachLine=Za.prototype.iter;var Ja=Za,Qa=0;function el(e){let t=this;if(tl(t),Br(t,e)||Hi(t.display,e))return;qr(e),Tt&&(Qa=+new Date);let r=Po(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File){let e=n.length,i=Array(e),o=0;const s=()=>{++o==e&&_s(t,()=>{r=Rn(t.doc,r);let e={from:r,to:r,text:t.doc.splitLines(i.filter(e=>null!=e).join(t.doc.lineSeparator())),origin:"paste"};Ra(t.doc,e),va(t.doc,Vs(Rn(t.doc,r),Rn(t.doc,Ks(e))))})()},a=(e,r)=>{if(t.options.allowDropFileTypes&&-1==ur(t.options.allowDropFileTypes,e.type))return void s();let n=new FileReader;n.onerror=()=>s(),n.onload=()=>{let e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[r]=e),s()},n.readAsText(e)};for(let e=0;e-1)return t.state.draggingText(e),void setTimeout(()=>t.display.input.focus(),20);try{let n=e.dataTransfer.getData("Text");if(n){let e;if(t.state.draggingText&&!t.state.draggingText.copy&&(e=t.listSelections()),_a(t.doc,Vs(r,r)),e)for(let r=0;r{for(let t=0;t{null==e&&(e=setTimeout(()=>{e=null,rl(ol)},100))}),Nr(window,"blur",()=>rl(Go))}(),nl=!0)}function ol(e){let t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}var sl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};for(let e=0;e<10;e++)sl[e+48]=sl[e+96]=String(e);for(let e=65;e<=90;e++)sl[e]=String.fromCharCode(e);for(let e=1;e<=12;e++)sl[e+111]=sl[e+63235]="F"+e;var al={};function ll(e){let t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(let e=0;e{for(let t=n.length-1;t>=0;t--)Ia(e.doc,"",n[t].from,n[t].to,"+delete");es(e)})}function gl(e,t,r){let n=Ar(e.text,t+r,r);return n<0||n>e.text.length?null:n}function ml(e,t,r){let n=gl(e,t.ch,r);return null==n?null:new Mn(t.line,n,r<0?"after":"before")}function yl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);let e=Pr(r,t.doc.direction);if(e){let o,s=i<0?mr(e):e[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){let e=eo(t,r);o=i<0?r.text.length-1:0;let n=to(t,e,o).top;o=Cr(r=>to(t,e,r).top==n,i<0==(1==s.level)?s.from:s.to-1,o),"before"==a&&(o=gl(r,o,1))}else o=i<0?s.to:s.from;return new Mn(n,o,a)}}return new Mn(n,i<0?r.text.length:0,i<0?"before":"after")}al.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},al.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},al.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},al.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},al.default=Ut?al.macDefault:al.pcDefault;var vl={selectAll:Ca,singleSelection:e=>e.setSelection(e.getCursor("anchor"),e.getCursor("head"),fr),killLine:e=>bl(e,t=>{if(t.empty()){let r=bn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.linebl(e,t=>({from:Mn(t.from().line,0),to:Rn(e.doc,Mn(t.to().line+1,0))})),delLineLeft:e=>bl(e,e=>({from:Mn(e.from().line,0),to:e.from()})),delWrappedLineLeft:e=>bl(e,t=>{let r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}),delWrappedLineRight:e=>bl(e,t=>{let r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}),undo:e=>e.undo(),redo:e=>e.redo(),undoSelection:e=>e.undoSelection(),redoSelection:e=>e.redoSelection(),goDocStart:e=>e.extendSelection(Mn(e.firstLine(),0)),goDocEnd:e=>e.extendSelection(Mn(e.lastLine())),goLineStart:e=>e.extendSelectionsBy(t=>wl(e,t.head.line),{origin:"+move",bias:1}),goLineStartSmart:e=>e.extendSelectionsBy(t=>_l(e,t.head),{origin:"+move",bias:1}),goLineEnd:e=>e.extendSelectionsBy(t=>function(e,t){let r=bn(e.doc,t),n=function(e){let t;for(;t=ii(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=vn(n));return yl(!0,e,r,t,-1)}(e,t.head.line),{origin:"+move",bias:-1}),goLineRight:e=>e.extendSelectionsBy(t=>{let r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},hr),goLineLeft:e=>e.extendSelectionsBy(t=>{let r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},hr),goLineLeftSmart:e=>e.extendSelectionsBy(t=>{let r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.che.moveV(-1,"line"),goLineDown:e=>e.moveV(1,"line"),goPageUp:e=>e.moveV(-1,"page"),goPageDown:e=>e.moveV(1,"page"),goCharLeft:e=>e.moveH(-1,"char"),goCharRight:e=>e.moveH(1,"char"),goColumnLeft:e=>e.moveH(-1,"column"),goColumnRight:e=>e.moveH(1,"column"),goWordLeft:e=>e.moveH(-1,"word"),goGroupRight:e=>e.moveH(1,"group"),goGroupLeft:e=>e.moveH(-1,"group"),goWordRight:e=>e.moveH(1,"word"),delCharBefore:e=>e.deleteH(-1,"codepoint"),delCharAfter:e=>e.deleteH(1,"char"),delWordBefore:e=>e.deleteH(-1,"word"),delWordAfter:e=>e.deleteH(1,"word"),delGroupBefore:e=>e.deleteH(-1,"group"),delGroupAfter:e=>e.deleteH(1,"group"),indentAuto:e=>e.indentSelection("smart"),indentMore:e=>e.indentSelection("add"),indentLess:e=>e.indentSelection("subtract"),insertTab:e=>e.replaceSelection("\t"),insertSoftTab:e=>{let t=[],r=e.listSelections(),n=e.options.tabSize;for(let i=0;i{e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:e=>ws(e,()=>{let t=e.listSelections(),r=[];for(let n=0;n0)i=new Mn(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Mn(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){let t=bn(e.doc,i.line-1).text;t&&(i=new Mn(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+t.charAt(t.length-1),Mn(i.line-1,t.length-1),i,"+transpose"))}r.push(new Hs(i,i))}e.setSelections(r)}),newlineAndIndent:e=>ws(e,()=>{let t=e.listSelections();for(let r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(let r=0;re.replaceSelection("\n","start"),toggleOverwrite:e=>e.toggleOverwrite()};function wl(e,t){let r=bn(e.doc,t),n=ai(r);return n!=r&&(t=vn(n)),yl(!0,e,n,t,1)}function _l(e,t){let r=wl(e,t.line),n=bn(e.doc,r.line),i=Pr(n,e.doc.direction);if(!i||0==i[0].level){let e=Math.max(r.ch,n.text.search(/\S/)),i=t.line==r.line&&t.ch<=e&&t.ch;return Mn(r.line,i?0:e,r.sticky)}return r}function Sl(e,t,r){if("string"==typeof t&&!(t=vl[t]))return!1;e.display.input.ensurePolled();let n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=cr}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var Ml=new lr;function xl(e,t,r,n){let i=e.state.keySeq;if(i){if(fl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ml.set(50,()=>{e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),kl(e,i+" "+t,r,n))return!0}return kl(e,t,r,n)}function kl(e,t,r,n){let i=function(e,t,r){for(let n=0;nSl(e,t,!0))||xl(e,r,t,t=>{if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Sl(e,t)}):xl(e,r,t,t=>Sl(e,t)))}var Al=null;function Cl(e){let t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=tr(),Br(t,e))return;Tt&&Rt<11&&27==e.keyCode&&(e.returnValue=!1);let r=e.keyCode;t.display.shift=16==r||e.shiftKey;let n=El(t,e);Nt&&(Al=n?r:null,n||88!=r||tn||!(Ut?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),kt&&!Ut&&!n&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){let t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(Yt(t,"CodeMirror-crosshair"),jr(document,"keyup",r),jr(document,"mouseover",r))}rr(t,"CodeMirror-crosshair"),Nr(document,"keyup",r),Nr(document,"mouseover",r)}(t)}function Tl(e){16==e.keyCode&&(this.doc.sel.shift=!1),Br(this,e)}function Rl(e){let t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Hi(t.display,e)||Br(t,e)||e.ctrlKey&&!e.altKey||Ut&&e.metaKey)return;let r=e.keyCode,n=e.charCode;if(Nt&&r==Al)return Al=null,void qr(e);if(Nt&&(!e.which||e.which<10)&&El(t,e))return;let i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return xl(e,"'"+r+"'",t,t=>Sl(e,t,!0))}(t,e,i)||t.display.input.onKeyPress(e))}var Ol,Pl,Ll=class{constructor(e,t,r){this.time=e,this.pos=t,this.button=r}compare(e,t,r){return this.time+400>e&&0==xn(t,this.pos)&&r==this.button}};function Nl(e){let t=this,r=t.display;if(Br(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Hi(r,e))return void(Ot||(r.scroller.draggable=!1,setTimeout(()=>r.scroller.draggable=!0,100)));if(Dl(t,e))return;let n=Po(t,e),i=Kr(e),o=n?function(e,t){let r=+new Date;return Pl&&Pl.compare(r,e,t)?(Ol=Pl=null,"triple"):Ol&&Ol.compare(r,e,t)?(Pl=new Ll(r,e,t),Ol=null,"double"):(Ol=new Ll(r,e,t),Pl=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){let o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return o=(1==t?"Left":2==t?"Middle":"Right")+o,xl(e,dl(o,i),i,t=>{if("string"==typeof t&&(t=vl[t]),!t)return!1;let n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=cr}finally{e.state.suppressEdits=!1}return n})}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){Tt?setTimeout(or($o,e),0):e.curOp.focus=tr();let i,o=function(e,t,r){let n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){let e=qt?r.shiftKey&&r.metaKey:r.altKey;i.unit=e?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=Ut?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(Ut?r.altKey:r.ctrlKey));return i}(e,r,n),s=e.doc.sel;e.options.dragDrop&&Xr&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(xn((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(xn(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){let i=e.display,o=!1,s=_s(e,t=>{Ot&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Vo(e)),jr(i.wrapper.ownerDocument,"mouseup",s),jr(i.wrapper.ownerDocument,"mousemove",a),jr(i.scroller,"dragstart",l),jr(i.scroller,"drop",s),o||(qr(t),n.addNew||ba(e.doc,r,null,null,n.extend),Ot&&!It||Tt&&9==Rt?setTimeout(()=>{i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},l=()=>o=!0;Ot&&(i.scroller.draggable=!0);e.state.draggingText=s,s.copy=!n.moveOnDrag,Nr(i.wrapper.ownerDocument,"mouseup",s),Nr(i.wrapper.ownerDocument,"mousemove",a),Nr(i.scroller,"dragstart",l),Nr(i.scroller,"drop",s),e.state.delayingBlurEvent=!0,setTimeout(()=>i.input.focus(),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,n,t,o):function(e,t,r,n){Tt&&Vo(e);let i=e.display,o=e.doc;qr(t);let s,a,l=o.sel,u=l.ranges;n.addNew&&!n.extend?(a=o.sel.contains(r),s=a>-1?u[a]:new Hs(r,r)):(s=o.sel.primary(),a=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(s=new Hs(r,r)),r=Po(e,t,!0,!0),a=-1;else{let t=Il(e,r,n.unit);s=n.extend?pa(s,t.anchor,t.head,n.extend):t}n.addNew?-1==a?(a=u.length,wa(o,$s(e,u.concat([s]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&"char"==n.unit&&!n.extend?(wa(o,$s(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):ma(o,a,s,dr):(a=0,wa(o,new Fs([s],0),dr),l=o.sel);let c=r;function f(t){if(0!=xn(c,t))if(c=t,"rectangle"==n.unit){let n=[],i=e.options.tabSize,s=ar(bn(o,r.line).text,r.ch,i),u=ar(bn(o,t.line).text,t.ch,i),c=Math.min(s,u),f=Math.max(s,u);for(let s=Math.min(r.line,t.line),a=Math.min(e.lastLine(),Math.max(r.line,t.line));s<=a;s++){let e=bn(o,s).text,t=pr(e,c,i);c==f?n.push(new Hs(Mn(s,t),Mn(s,t))):e.length>t&&n.push(new Hs(Mn(s,t),Mn(s,pr(e,f,i))))}n.length||n.push(new Hs(r,r)),wa(o,$s(e,l.ranges.slice(0,a).concat(n),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{let r,i=s,u=Il(e,t,n.unit),c=i.anchor;xn(u.anchor,c)>0?(r=u.head,c=Cn(i.from(),u.anchor)):(r=u.anchor,c=An(i.to(),u.head));let f=l.ranges.slice(0);f[a]=function(e,t){let{anchor:r,head:n}=t,i=bn(e.doc,r.line);if(0==xn(r,n)&&r.sticky==n.sticky)return t;let o=Pr(i);if(!o)return t;let s=Rr(o,r.ch,r.sticky),a=o[s];if(a.from!=r.ch&&a.to!=r.ch)return t;let l,u=s+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)l=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{let e=Rr(o,n.ch,n.sticky),t=e-s||(n.ch-r.ch)*(1==a.level?-1:1);l=e==u-1||e==u?t<0:t>0}let c=o[u+(l?-1:0)],f=l==(1==c.level),d=f?c.from:c.to,h=f?"after":"before";return r.ch==d&&r.sticky==h?t:new Hs(new Mn(r.line,d,h),n)}(e,new Hs(Rn(o,c),r)),wa(o,$s(e,f,a),dr)}}let d=i.wrapper.getBoundingClientRect(),h=0;function p(t){e.state.selectingText=!1,h=1/0,t&&(qr(t),i.input.focus()),jr(i.wrapper.ownerDocument,"mousemove",b),jr(i.wrapper.ownerDocument,"mouseup",g),o.history.lastSelOrigin=null}let b=_s(e,t=>{0!==t.buttons&&Kr(t)?function t(r){let s=++h,a=Po(e,r,!0,"rectangle"==n.unit);if(a)if(0!=xn(a,c)){e.curOp.focus=tr(),f(a);let n=Zo(i,o);(a.line>=n.to||a.line{h==s&&t(r)}),150)}else{let n=r.clientYd.bottom?20:0;n&&setTimeout(_s(e,()=>{h==s&&(i.scroller.scrollTop+=n,t(r))}),50)}}(t):p(t)}),g=_s(e,p);e.state.selectingText=g,Nr(i.wrapper.ownerDocument,"mousemove",b),Nr(i.wrapper.ownerDocument,"mouseup",g)}(e,n,t,o)}(t,n,o,e):Vr(e)==r.scroller&&qr(e):2==i?(n&&ba(t.doc,n),setTimeout(()=>r.input.focus(),20)):3==i&&(Vt?t.display.input.onContextMenu(e):Vo(t)))}function Il(e,t,r){if("char"==r)return new Hs(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Hs(Mn(t.line,0),Rn(e.doc,Mn(t.line+1,0)));let n=r(e,t);return new Hs(n.from,n.to)}function jl(e,t,r,n){let i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&qr(t);let s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Wr(e,r))return Hr(t);o-=a.top-s.viewOffset;for(let n=0;n=i){return Dr(e,r,e,wn(e.doc,o),e.display.gutterSpecs[n].className,t),Hr(t)}}}function Dl(e,t){return jl(e,t,"gutterClick",!0)}function Bl(e,t){Hi(e.display,t)||function(e,t){return!!Wr(e,"gutterContextMenu")&&jl(e,t,"gutterContextMenu",!1)}(e,t)||Br(e,t,"contextmenu")||Vt||e.display.input.onContextMenu(t)}function zl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),lo(e)}var Wl={toString:function(){return"CodeMirror.Init"}},Ul={},ql={};function Fl(e,t,r){if(!t!=!(r&&r!=Wl)){let r=e.display.dragFunctions,n=t?Nr:jr;n(e.display.scroller,"dragstart",r.start),n(e.display.scroller,"dragenter",r.enter),n(e.display.scroller,"dragover",r.over),n(e.display.scroller,"dragleave",r.leave),n(e.display.scroller,"drop",r.drop)}}function Hl(e){e.options.lineWrapping?(rr(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Yt(e.display.wrapper,"CodeMirror-wrap"),pi(e)),Oo(e),No(e),lo(e),setTimeout(()=>ls(e),100)}function $l(e,t){if(!(this instanceof $l))return new $l(e,t);this.options=t=t?sr(t):{},sr(Ul,t,!1);let r=t.value;"string"==typeof r?r=new Ja(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;let n=new $l.inputStyles[t.inputStyle](this),i=this.display=new Ds(e,r,n,t);i.wrapper.CodeMirror=this,zl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),fs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new lr,keySeq:null,specialChars:null},t.autofocus&&!Wt&&i.input.focus(),Tt&&Rt<11&&setTimeout(()=>this.display.input.reset(!0),20),function(e){let t=e.display;Nr(t.scroller,"mousedown",_s(e,Nl)),Nr(t.scroller,"dblclick",Tt&&Rt<11?_s(e,t=>{if(Br(e,t))return;let r=Po(e,t);if(!r||Dl(e,t)||Hi(e.display,t))return;qr(t);let n=e.findWordAt(r);ba(e.doc,n.anchor,n.head)}):t=>Br(e,t)||qr(t));Nr(t.scroller,"contextmenu",t=>Bl(e,t)),Nr(t.input.getField(),"contextmenu",r=>{t.scroller.contains(r.target)||Bl(e,r)});let r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(()=>t.activeTouch=null,1e3),n=t.activeTouch,n.end=+new Date)}function o(e,t){if(null==t.left)return!0;let r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}Nr(t.scroller,"touchstart",i=>{if(!Br(e,i)&&!function(e){if(1!=e.touches.length)return!1;let t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!Dl(e,i)){t.input.ensurePolled(),clearTimeout(r);let e=+new Date;t.activeTouch={start:e,moved:!1,prev:e-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),Nr(t.scroller,"touchmove",()=>{t.activeTouch&&(t.activeTouch.moved=!0)}),Nr(t.scroller,"touchend",r=>{let n=t.activeTouch;if(n&&!Hi(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){let i,s=e.coordsChar(t.activeTouch,"page");i=!n.prev||o(n,n.prev)?new Hs(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new Hs(Mn(s.line,0),Rn(e.doc,Mn(s.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),qr(r)}i()}),Nr(t.scroller,"touchcancel",i),Nr(t.scroller,"scroll",()=>{t.scroller.clientHeight&&(is(e,t.scroller.scrollTop),ss(e,t.scroller.scrollLeft,!0),Dr(e,"scroll",e))}),Nr(t.scroller,"mousewheel",t=>qs(e,t)),Nr(t.scroller,"DOMMouseScroll",t=>qs(e,t)),Nr(t.wrapper,"scroll",()=>t.wrapper.scrollTop=t.wrapper.scrollLeft=0),t.dragFunctions={enter:t=>{Br(e,t)||$r(t)},over:t=>{Br(e,t)||(!function(e,t){let r=Po(e,t);if(!r)return;let n=document.createDocumentFragment();Uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=Jt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Zt(e.display.dragCursor,n)}(e,t),$r(t))},start:t=>function(e,t){if(Tt&&(!e.state.draggingText||+new Date-Qa<100))$r(t);else if(!Br(e,t)&&!Hi(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!It)){let r=Jt("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Nt&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),Nt&&r.parentNode.removeChild(r)}}(e,t),drop:_s(e,el),leave:t=>{Br(e,t)||tl(e)}};let s=t.input.getField();Nr(s,"keyup",t=>Tl.call(e,t)),Nr(s,"keydown",_s(e,Cl)),Nr(s,"keypress",_s(e,Rl)),Nr(s,"focus",t=>Ko(e,t)),Nr(s,"blur",t=>Go(e,t))}(this),il(),hs(this),this.curOp.forceUpdate=!0,ra(this,r),t.autofocus&&!Wt||this.hasFocus()?setTimeout(()=>{this.hasFocus()&&!this.state.focused&&Ko(this)},20):Go(this);for(let e in ql)ql.hasOwnProperty(e)&&ql[e](this,t[e],Wl);Ls(this),t.finishInit&&t.finishInit(this);for(let e=0;e150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?ar(bn(o,t-1).text,null,s):0:"add"==r?u=l+e.options.indentUnit:"subtract"==r?u=l-e.options.indentUnit:"number"==typeof r&&(u=l+r),u=Math.max(0,u);let f="",d=0;if(e.options.indentWithTabs)for(let e=Math.floor(u/s);e;--e)d+=s,f+="\t";if(dKl.push(e);var Yl=null;function Xl(e){Yl=e}function Zl(e,t,r,n,i){let o=e.doc;e.display.shift=!1,n||(n=o.sel);let s=+new Date-200,a="paste"==i||e.state.pasteIncoming>s,l=Qr(t),u=null;if(a&&n.ranges.length>1)if(Yl&&Yl.text.join("\n")==t){if(n.ranges.length%Yl.text.length==0){u=[];for(let e=0;e[e]));let c=e.curOp.updateInput;for(let t=n.ranges.length-1;t>=0;t--){let c=n.ranges[t],f=c.from(),d=c.to();c.empty()&&(r&&r>0?f=Mn(f.line,f.ch-r):e.state.overwrite&&!a?d=Mn(d.line,Math.min(bn(o,d.line).text.length,d.ch+mr(l).length)):a&&Yl&&Yl.lineWise&&Yl.text.join("\n")==l.join("\n")&&(f=d=Mn(f.line,0)));let h={from:f,to:d,text:u?u[t%u.length]:l,origin:i||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};Ra(e.doc,h),Ri(e,"inputRead",e,h)}t&&!a&&Ql(e,t),es(e),e.curOp.updateInput<2&&(e.curOp.updateInput=c),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Jl(e,t){let r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||ws(t,()=>Zl(t,r,0,null,"paste")),!0}function Ql(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;let r=e.doc.sel;for(let n=r.ranges.length-1;n>=0;n--){let i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;let o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(let r=0;r-1){s=Gl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(bn(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Gl(e,i.head.line,"smart"));s&&Ri(e,"electricInput",e,i.head.line)}}function eu(e){let t=[],r=[];for(let n=0;n0?0:-1));if(isNaN(e))s=null;else{let n=r>0?e>=55296&&e<56320:e>=56320&&e<57343;s=new Mn(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(n?2:1))),-r)}}else s=i?function(e,t,r,n){let i=Pr(t,e.doc.direction);if(!i)return ml(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");let o=Rr(i,r.ch,r.sticky),s=i[o];if("ltr"==e.doc.direction&&s.level%2==0&&(n>0?s.to>r.ch:s.fromgl(t,e instanceof Mn?e.ch:e,r),u=r=>e.options.lineWrapping?(a=a||eo(e,t),_o(e,t,a,r)):{begin:0,end:t.text.length},c=u("before"==r.sticky?l(r,-1):r.ch);if("rtl"==e.doc.direction||1==s.level){let e=1==s.level==n<0,t=l(r,e?1:-1);if(null!=t&&(e?t<=s.to&&t<=c.end:t>=s.from&&t>=c.begin)){let n=e?"before":"after";return new Mn(r.line,t,n)}}let f=(e,t,n)=>{let o=(e,t)=>t?new Mn(r.line,l(e,1),"before"):new Mn(r.line,e,"after");for(;e>=0&&e0==(1!=r.level),a=s?n.begin:l(n.end,-1);if(r.from<=a&&a0?c.end:l(c.begin,-1);return null==h||n>0&&h==t.text.length||(d=f(n>0?0:i.length-1,n,u(h)),!d)?null:d}(e.cm,a,t,r):ml(a,t,r);if(null==s){if(o||!function(){let r=t.line+l;return!(r=e.first+e.size)&&(t=new Mn(r,t.ch,t.sticky),a=bn(e,r))}())return!1;t=yl(i,e.cm,a,t.line,l)}else t=s;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n){let i=null,o="group"==n,s=e.cm&&e.cm.getHelper(t,"wordChars");for(let e=!0;!(r<0)||u(!e);e=!1){let n=a.text.charAt(t.ch)||"\n",l=Mr(n,s)?"w":o&&"\n"==n?"n":!o||/\s/.test(n)?null:"p";if(!o||e||l||(l="s"),i&&i!=l){r<0&&(r=1,u(),t.sticky="after");break}if(l&&(i=l),r>0&&!u(!e))break}}let c=Ea(e,t,o,s,!0);return kn(o,c)&&(c.hitSide=!0),c}function iu(e,t,r,n){let i,o,s=e.doc,a=t.left;if("page"==n){let n=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),o=Math.max(n-.5*Eo(e.display),3);i=(r>0?t.bottom:t.top)+r*o}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;o=vo(e,a,i),o.outside;){if(r<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*r}return o}var ou=class{constructor(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new lr,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}init(e){let t=this,r=t.cm,n=t.div=e.lineDiv;function i(e){for(let t=e.target;t;t=t.parentNode){if(t==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function o(e){if(!i(e)||Br(r,e))return;if(r.somethingSelected())Xl({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;{let t=eu(r);Xl({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation(()=>{r.setSelections(t.ranges,0,fr),r.replaceSelection("",null,"cut")})}}if(e.clipboardData){e.clipboardData.clearData();let t=Yl.text.join("\n");if(e.clipboardData.setData("Text",t),e.clipboardData.getData("Text")==t)return void e.preventDefault()}let o=ru(),s=o.firstChild;r.display.lineSpace.insertBefore(o,r.display.lineSpace.firstChild),s.value=Yl.text.join("\n");let a=tr();ir(s),setTimeout(()=>{r.display.lineSpace.removeChild(o),a.focus(),a==n&&t.showPrimarySelection()},50)}n.contentEditable=!0,tu(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),Nr(n,"paste",e=>{!i(e)||Br(r,e)||Jl(e,r)||Rt<=11&&setTimeout(_s(r,()=>this.updateFromDOM()),20)}),Nr(n,"compositionstart",e=>{this.composing={data:e.data,done:!1}}),Nr(n,"compositionupdate",e=>{this.composing||(this.composing={data:e.data,done:!1})}),Nr(n,"compositionend",e=>{this.composing&&(e.data!=this.composing.data&&this.readFromDOMSoon(),this.composing.done=!0)}),Nr(n,"touchstart",()=>t.forceCompositionEnd()),Nr(n,"input",()=>{this.composing||this.readFromDOMSoon()}),Nr(n,"copy",o),Nr(n,"cut",o)}screenReaderLabelChanged(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")}prepareSelection(){let e=Wo(this.cm,!1);return e.focus=tr()==this.div,e}showSelection(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))}getSelection(){return this.cm.display.wrapper.ownerDocument.getSelection()}showPrimarySelection(){let e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line=t.display.viewFrom&&au(t,n)||{node:a[0].measure.map[2],offset:0},u=i.line{this.gracePeriod=!1,this.selectionChanged()&&this.cm.operation(()=>this.cm.curOp.selectionChanged=!0)},20)}showMultipleSelections(e){Zt(this.cm.display.cursorDiv,e.cursors),Zt(this.cm.display.selectionDiv,e.selection)}rememberSelection(){let e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset}selectionInEditor(){let e=this.getSelection();if(!e.rangeCount)return!1;let t=e.getRangeAt(0).commonAncestorContainer;return er(this.div,t)}focus(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&tr()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())}blur(){this.div.blur()}getField(){return this.div}supportsTouch(){return!0}receivedFocus(){let e=this;this.selectionInEditor()?this.pollSelection():ws(this.cm,()=>e.cm.curOp.selectionChanged=!0),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))}selectionChanged(){let e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset}pollSelection(){if(null!=this.readDOMTimeout||this.gracePeriod||!this.selectionChanged())return;let e=this.getSelection(),t=this.cm;if(zt&&Lt&&this.cm.display.gutterSpecs.length&&function(e){for(let t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(this.composing)return;this.rememberSelection();let r=uu(t,e.anchorNode,e.anchorOffset),n=uu(t,e.focusNode,e.focusOffset);r&&n&&ws(t,()=>{wa(t.doc,Vs(r,n),fr),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}pollContent(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);let e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>n.firstLine()&&(s=Mn(s.line-1,bn(n.doc,s.line-1).length)),a.ch==bn(n.doc,a.line).text.length&&a.linei.viewTo-1)return!1;s.line==i.viewFrom||0==(e=Lo(n,s.line))?(t=vn(i.view[0].line),r=i.view[0].node):(t=vn(i.view[e].line),r=i.view[e-1].node.nextSibling);let l,u,c=Lo(n,a.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=vn(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;let f=n.doc.splitLines(function(e,t,r,n,i){let o="",s=!1,a=e.doc.lineSeparator(),l=!1;function u(){s&&(o+=a,l&&(o+=a),s=l=!1)}function c(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){let o=t.getAttribute("cm-text");if(o)return void c(o);let d,h=t.getAttribute("cm-marker");if(h){let t=e.findMarks(Mn(n,0),Mn(i+1,0),(r=+h,e=>e.id==r));return void(t.length&&(d=t[0].find(0))&&c(gn(e.doc,d.from,d.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;let p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(let e=0;e1&&d.length>1;)if(mr(f)==mr(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}let h=0,p=0,b=f[0],g=d[0],m=Math.min(b.length,g.length);for(;hs.ch&&y.charCodeAt(y.length-p-1)==v.charCodeAt(v.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");let _=Mn(t,h),S=Mn(l,d.length?mr(d).length-p:0);return f.length>1||f[0]||xn(_,S)?(Ia(n.doc,f,_,S,"+input"),!0):void 0}ensurePolled(){this.forceCompositionEnd()}reset(){this.forceCompositionEnd()}forceCompositionEnd(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())}readFromDOMSoon(){null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(()=>{if(this.readDOMTimeout=null,this.composing){if(!this.composing.done)return;this.composing=null}this.updateFromDOM()},80))}updateFromDOM(){!this.cm.isReadOnly()&&this.pollContent()||ws(this.cm,()=>No(this.cm))}setUneditable(e){e.contentEditable="false"}onKeyPress(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||_s(this.cm,Zl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))}readOnlyChanged(e){this.div.contentEditable=String("nocursor"!=e)}onContextMenu(){}resetPosition(){}},su=ou;function au(e,t){let r=Qi(e,t.line);if(!r||r.hidden)return null;let n=bn(e.doc,t.line),i=Zi(r,n,t.line),o=Pr(n,e.doc.direction),s="left";if(o){s=Rr(o,t.ch)%2?"right":"left"}let a=io(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function lu(e,t){return t&&(e.bad=!0),e}function uu(e,t,r){let n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return lu(e.clipPos(Mn(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(let i=0;i{Tt&&Rt>=9&&this.hasSelection&&(this.hasSelection=null),t.poll()}),Nr(n,"paste",e=>{Br(r,e)||Jl(e,r)||(r.state.pasteIncoming=+new Date,t.fastPoll())}),Nr(n,"cut",i),Nr(n,"copy",i),Nr(e.scroller,"paste",i=>{if(Hi(e,i)||Br(r,i))return;if(!n.dispatchEvent)return r.state.pasteIncoming=+new Date,void t.focus();const o=new Event("paste");o.clipboardData=i.clipboardData,n.dispatchEvent(o)}),Nr(e.lineSpace,"selectstart",t=>{Hi(e,t)||qr(t)}),Nr(n,"compositionstart",()=>{let e=r.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Nr(n,"compositionend",()=>{t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)})}createField(e){this.wrapper=ru(),this.textarea=this.wrapper.firstChild}screenReaderLabelChanged(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")}prepareSelection(){let e=this.cm,t=e.display,r=e.doc,n=Wo(e);if(e.options.moveInputWithCursor){let i=go(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return n}showSelection(e){let t=this.cm.display;Zt(t.cursorDiv,e.cursors),Zt(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")}reset(e){if(this.contextMenuPending||this.composing)return;let t=this.cm;if(t.somethingSelected()){this.prevInput="";let e=t.getSelection();this.textarea.value=e,t.state.focused&&ir(this.textarea),Tt&&Rt>=9&&(this.hasSelection=e)}else e||(this.prevInput=this.textarea.value="",Tt&&Rt>=9&&(this.hasSelection=null))}getField(){return this.textarea}supportsTouch(){return!1}focus(){if("nocursor"!=this.cm.options.readOnly&&(!Wt||tr()!=this.textarea))try{this.textarea.focus()}catch(e){}}blur(){this.textarea.blur()}resetPosition(){this.wrapper.style.top=this.wrapper.style.left=0}receivedFocus(){this.slowPoll()}slowPoll(){this.pollingFast||this.polling.set(this.cm.options.pollInterval,()=>{this.poll(),this.cm.state.focused&&this.slowPoll()})}fastPoll(){let e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))}poll(){let e=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||en(t)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;let n=t.value;if(n==r&&!e.somethingSelected())return!1;if(Tt&&Rt>=9&&this.hasSelection===n||Ut&&/[\uf700-\uf7ff]/.test(n))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){let e=n.charCodeAt(0);if(8203!=e||r||(r="​"),8666==e)return this.reset(),this.cm.execCommand("undo")}let i=0,o=Math.min(r.length,n.length);for(;i{Zl(e,n.slice(i),r.length-i,null,this.composing?"*compose":null),n.length>1e3||n.indexOf("\n")>-1?t.value=this.prevInput="":this.prevInput=n,this.composing&&(this.composing.range.clear(),this.composing.range=e.markText(this.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0}ensurePolled(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)}onKeyPress(){Tt&&Rt>=9&&(this.hasSelection=null),this.fastPoll()}onContextMenu(e){let t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();let o=Po(r,e),s=n.scroller.scrollTop;if(!o||Nt)return;r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&_s(r,wa)(r.doc,Vs(o),fr);let a,l=i.style.cssText,u=t.wrapper.style.cssText,c=t.wrapper.offsetParent.getBoundingClientRect();function f(){if(null!=i.selectionStart){let e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function d(){if(t.contextMenuPending==d&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=l,Tt&&Rt<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=s),null!=i.selectionStart)){(!Tt||Tt&&Rt<9)&&f();let e=0,o=()=>{n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?_s(r,Ca)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}if(t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;\n top: ${e.clientY-c.top-5}px; left: ${e.clientX-c.left-5}px;\n z-index: 1000; background: ${Tt?"rgba(255, 255, 255, .05)":"transparent"};\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`,Ot&&(a=window.scrollY),n.input.focus(),Ot&&window.scrollTo(null,a),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=d,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),Tt&&Rt>=9&&f(),Vt){$r(e);let t=()=>{jr(window,"mouseup",t),setTimeout(d,20)};Nr(window,"mouseup",t)}else setTimeout(d,50)}readOnlyChanged(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e}setUneditable(){}},du=fu;fu.prototype.needsContentAttribute=!1,function(e){let t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?(e,t,r)=>{r!=Wl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Wl,r("value","",(e,t)=>e.setValue(t),!0),r("mode",null,(e,t)=>{e.doc.modeOption=t,Zs(e)},!0),r("indentUnit",2,Zs,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,e=>{Js(e),lo(e),No(e)},!0),r("lineSeparator",null,(e,t)=>{if(e.doc.lineSep=t,!t)return;let r=[],n=e.doc.first;e.doc.iter(e=>{for(let i=0;;){let o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(Mn(n,o))}n++});for(let n=r.length-1;n>=0;n--)Ia(e.doc,t,r[n],Mn(r[n].line,r[n].ch+t.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(e,t,r)=>{e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Wl&&e.refresh()}),r("specialCharPlaceholder",_i,e=>e.refresh(),!0),r("electricChars",!0),r("inputStyle",Wt?"contenteditable":"textarea",()=>{throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,(e,t)=>e.getInputField().spellcheck=t,!0),r("autocorrect",!1,(e,t)=>e.getInputField().autocorrect=t,!0),r("autocapitalize",!1,(e,t)=>e.getInputField().autocapitalize=t,!0),r("rtlMoveVisually",!Ft),r("wholeLineUpdateBefore",!0),r("theme","default",e=>{zl(e),js(e)},!0),r("keyMap","default",(e,t,r)=>{let n=pl(t),i=r!=Wl&&pl(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Hl,!0),r("gutters",[],(e,t)=>{e.display.gutterSpecs=Ns(t,e.options.lineNumbers),js(e)},!0),r("fixedGutter",!0,(e,t)=>{e.display.gutters.style.left=t?To(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,e=>ls(e),!0),r("scrollbarStyle","native",e=>{fs(e),ls(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,(e,t)=>{e.display.gutterSpecs=Ns(e.options.gutters,t),js(e)},!0),r("firstLineNumber",1,js,!0),r("lineNumberFormatter",e=>e,js,!0),r("showCursorWhenSelecting",!1,zo,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(e,t)=>{"nocursor"==t&&(Go(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("screenReaderLabel",null,(e,t)=>{t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),r("disableInput",!1,(e,t)=>{t||e.display.input.reset()},!0),r("dragDrop",!0,Fl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,zo,!0),r("singleCursorHeightPerLine",!0,zo,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Js,!0),r("addModeClass",!1,Js,!0),r("pollInterval",100),r("undoDepth",200,(e,t)=>e.doc.history.undoDepth=t),r("historyEventDelay",1250),r("viewportMargin",10,e=>e.refresh(),!0),r("maxHighlightLength",1e4,Js,!0),r("moveInputWithCursor",!0,(e,t)=>{t||e.display.input.resetPosition()}),r("tabindex",null,(e,t)=>e.display.input.getField().tabIndex=t||""),r("autofocus",null),r("direction","ltr",(e,t)=>e.doc.setDirection(t),!0),r("phrases",null)}($l),function(e){let t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){let n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&_s(this,t[e])(this,r,i),Dr(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](pl(e))},removeKeyMap:function(e){let t=this.state.keyMaps;for(let r=0;re.priority),this.state.modeGen++,No(this)})),removeOverlay:Ss((function(e){let t=this.state.overlays;for(let r=0;rr&&(Gl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&es(this));else{let o=i.from(),s=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(let t=a;t0&&ma(this.doc,n,new Hs(o,l[n].to()),fr)}}})),getTokenAt:function(e,t){return Un(this,e,t)},getLineTokens:function(e,t){return Un(this,Mn(e),t,!0)},getTokenTypeAt:function(e){e=Rn(this.doc,e);let t,r=In(this,bn(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){let e=n+i>>1;if((e?r[2*e-1]:0)>=o)i=e;else{if(!(r[2*e+1]t&&(e=t,i=!0),n=bn(this.doc,e)}else n=e;return ho(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-di(n):0)},defaultTextHeight:function(){return Eo(this.display)},defaultCharWidth:function(){return Ao(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){let o=this.display,s=(e=go(this,Rn(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)s=e.top;else if("above"==n||"near"==n){let r=Math.max(o.wrapper.clientHeight,this.doc.height),i=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>r)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=r&&(s=e.bottom),a+t.offsetWidth>i&&(a=i-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&function(e,t){let r=Jo(e,t);null!=r.scrollTop&&is(e,r.scrollTop),null!=r.scrollLeft&&ss(e,r.scrollLeft)}(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Ss(Cl),triggerOnKeyPress:Ss(Rl),triggerOnKeyUp:Tl,triggerOnMouseDown:Ss(Nl),execCommand:function(e){if(vl.hasOwnProperty(e))return vl[e].call(null,this)},triggerElectric:Ss((function(e){Ql(this,e)})),findPosH:function(e,t,r,n){let i=1;t<0&&(i=-1,t=-t);let o=Rn(this.doc,e);for(let e=0;ethis.display.shift||this.doc.extend||r.empty()?nu(this.doc,r.head,e,t,this.options.rtlMoveVisually):e<0?r.from():r.to(),hr)})),deleteH:Ss((function(e,t){let r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):bl(this,r=>{let i=nu(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})})),findPosV:function(e,t,r,n){let i=1,o=n;t<0&&(i=-1,t=-t);let s=Rn(this.doc,e);for(let e=0;e{if(i)return e<0?o.from():o.to();let s=go(this,o.head,"div");null!=o.goalColumn&&(s.left=o.goalColumn),n.push(s.left);let a=iu(this,s,e,t);return"page"==t&&o==r.sel.primary()&&Qo(this,bo(this,a,"div").top-s.top),a},hr),n.length)for(let e=0;eMr(e,i):/\s/.test(o)?e=>/\s/.test(e):e=>!/\s/.test(e)&&!Mr(e);for(;r>0&&s(t.charAt(r-1));)--r;for(;n"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e;null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&ao(this);let n=this.display.viewFrom;this.doc.iter(n,this.display.viewTo,e=>{if(e.widgets)for(let t=0;t.5||this.options.lineWrapping)&&Oo(this),Dr(this,"refresh",this)})),swapDoc:Ss((function(e){let t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ra(this,e),lo(this),this.display.input.reset(),ts(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ri(this,"swapDoc",this,t),t})),phrase:function(e){let t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ur(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}($l);var hu,pu="iter insert remove copy getEditor constructor".split(" ");for(let e in Ja.prototype)Ja.prototype.hasOwnProperty(e)&&ur(pu,e)<0&&($l.prototype[e]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ja.prototype[e]));Ur(Ja),$l.inputStyles={textarea:du,contenteditable:su},$l.defineMode=function(e){$l.defaults.mode||"null"==e||($l.defaults.mode=e),sn.apply(this,arguments)},$l.defineMIME=function(e,t){on[e]=t},$l.defineMode("null",()=>({token:e=>e.skipToEnd()})),$l.defineMIME("text/plain","null"),$l.defineExtension=(e,t)=>{$l.prototype[e]=t},$l.defineDocExtension=(e,t)=>{Ja.prototype[e]=t},$l.fromTextArea=function(e,t){if((t=t?sr(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){let r=tr();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function r(){e.value=i.getValue()}let n;if(e.form&&(Nr(e.form,"submit",r),!t.leaveSubmitMethodAlone)){let t=e.form;n=t.submit;try{let e=t.submit=()=>{r(),t.submit=n,t.submit(),t.submit=e}}catch(e){}}t.finishInit=i=>{i.save=r,i.getTextArea=()=>e,i.toTextArea=()=>{i.toTextArea=isNaN,r(),e.parentNode.removeChild(i.getWrapperElement()),e.style.display="",e.form&&(jr(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=n))}},e.style.display="none";let i=$l(t=>e.parentNode.insertBefore(t,e.nextSibling),t);return i},(hu=$l).off=jr,hu.on=Nr,hu.wheelEventPixels=Us,hu.Doc=Ja,hu.splitLines=Qr,hu.countColumn=ar,hu.findColumn=pr,hu.isWordChar=Sr,hu.Pass=cr,hu.signal=Dr,hu.Line=bi,hu.changeEnd=Ks,hu.scrollbarModel=cs,hu.Pos=Mn,hu.cmpPos=xn,hu.modes=nn,hu.mimeModes=on,hu.resolveMode=an,hu.getMode=ln,hu.modeExtensions=un,hu.extendMode=cn,hu.copyState=fn,hu.startState=hn,hu.innerMode=dn,hu.commands=vl,hu.keyMap=al,hu.keyName=hl,hu.isModifierKey=fl,hu.lookupKey=cl,hu.normalizeKeyMap=ul,hu.StringStream=pn,hu.SharedTextMarker=Ka,hu.TextMarker=$a,hu.LineWidget=qa,hu.e_preventDefault=qr,hu.e_stopPropagation=Fr,hu.e_stop=$r,hu.addClass=rr,hu.contains=er,hu.rmClass=Yt,hu.keyNames=sl,$l.version="5.61.0";var bu=$l;document.body.insertAdjacentHTML("beforeend","\n\n"),self.CodeMirror=bu;var gu=class extends HTMLElement{static get observedAttributes(){return["src","readonly","mode","theme"]}attributeChangedCallback(e,t,r){this.__initialized&&t!==r&&(this[e]="readonly"===e?null!==r:r)}get readonly(){return this.editor.getOption("readOnly")}set readonly(e){this.editor.setOption("readOnly",e)}get mode(){return this.editor.getOption("mode")}set mode(e){this.editor.setOption("mode",e)}get theme(){return this.editor.getOption("theme")}set theme(e){this.editor.setOption("theme",e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e),this.setSrc()}get value(){return this.editor.getValue()}set value(e){this.setValue(e)}constructor(){super();const e=document.createElement("template");e.innerHTML=gu.template(),this.appendChild(e.content.cloneNode(!0)),this.__initialized=!1,this.__element=null,this.editor=null}async connectedCallback(){this.style.display="block",this.__element=this.querySelector("textarea");const e=this.hasAttribute("mode")?this.getAttribute("mode"):"null",t=this.hasAttribute("theme")?this.getAttribute("theme"):"default";let r=this.getAttribute("readonly");""===r?r=!0:"nocursor"!==r&&(r=!1);let n="";const i=this.querySelector("script");i&&"wc-content"===i.getAttribute("type")&&(n=gu.dedentText(i.innerHTML),n=n.replace(/<(\/?script)(.*?)>/g,"<$1$2>"));let o=bu.defaults.viewportMargin;if(this.hasAttribute("viewport-margin")){const e=this.getAttribute("viewport-margin").toLowerCase();o="infinity"===e?1/0:parseInt(e)}this.editor=bu.fromTextArea(this.__element,{lineNumbers:!0,readOnly:r,mode:e,theme:t,viewportMargin:o}),this.hasAttribute("src")?this.setSrc(this.getAttribute("src")):(await new Promise(e=>setTimeout(e,50)),this.value=n),this.__initialized=!0}disconnectedCallback(){this.editor&&this.editor.toTextArea(),this.editor=null,this.__initialized=!1}async setSrc(){const e=this.getAttribute("src"),t=await this.fetchSrc(e);this.value=t}async setValue(e){this.editor.swapDoc(bu.Doc(e,this.getAttribute("mode"))),this.editor.refresh()}async fetchSrc(e){return(await fetch(e)).text()}static template(){return'\n \n '}static dedentText(e){const t=e.split("\n");""===t[0]&&t.splice(0,1);const r=t[0];let n=0;const i="\t"===r[0]?"\t":" ";for(;r[n]===i;)n+=1;const o=[];for(const e of t){let t=e;for(let e=0;ee?h():!0!==t&&(i=setTimeout(n?p:h,void 0===n?e-d:e)))}return"boolean"!=typeof t&&(n=r,r=t,t=void 0),l.cancel=function(){a(),o=!0},l}function yu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vu(e){for(var t=1;t{this.__style.onload=e});super.connectedCallback(),this.ready=Promise.resolve().then(async()=>{await e,await this.requestUpdate(),await function(e){let t=0;return new Promise((r,n)=>{const i=setInterval(()=>{e()&&(clearInterval(i),r()),t+=1,100===t&&(clearInterval(i),n(new Error("Value did not become truthy in time")))},10)})}(()=>this.codeMirror&&this.codeMirror.editor&&this.codeMirror.__initialized),await this._initializeCodeMirror(),[...this.renderRoot.querySelectorAll("[class^=CodeMirror]")].forEach(e=>{e.classList.forEach(t=>{t.match(/^CodeMirror/)&&e.setAttribute("part",t)})}),this.setAttribute("ready",""),this.codeMirror.editor.refresh(),this[_u]&&this.codeMirror.editor.setValue(this[_u])})}get _prefixes(){return async()=>{const e=await Promise.resolve().then(r.bind(null,6));return(this.prefixes||"").split(",").map(e=>e.trim()).reduce((t,r)=>r in e?vu(vu({},t),{},{[r]:e[r]().value}):t,{})}}get codeMirror(){return this.renderRoot.querySelector("wc-codemirror")}get value(){return this.hasAttribute("ready")?this.codeMirror.editor.getValue():this[_u]||""}set value(e){"string"==typeof e&&(this.hasAttribute("ready")?this.value!==e&&(this.codeMirror.editor.setValue(e),this[Mu]()):this[_u]=e)}async firstUpdated(e){super.firstUpdated(e),this[_u]&&(await this.ready,this.codeMirror.editor.setValue(this[_u]),this[Mu](),this[_u]=void 0)}updated(e){super.updated(e),(e.has("autoParse")||e.has("parseDelay"))&&this.__setParseHandler()}render(){return j`${this.__style} +
+ + +
`}async parse(){if(!this.isParsing){this.__errorMarker&&this.__errorMarker.clear(),this.isParsing=!0;try{await this._parse()}catch(e){"function"==typeof this._errorLine&&await this.__highlightError(this._errorLine(e)),this.dispatchEvent(new CustomEvent("parsing-failed",{detail:{error:e}}))}finally{this.isParsing=!1}}}async _initializeCodeMirror(){this.codeMirror.editor.setSize("100%","100%"),this.__setParseHandler(),this.codeMirror.editor.on("change",()=>{this[Su]=!0})}__setParseHandler(){var e,t,r;this.codeMirror.editor&&(this[Mu]&&(this.codeMirror.editor.off("blur",this[Mu]),this.codeMirror.editor.off("change",this[Mu])),this.autoParse?(this[Mu]=(e=this.parseDelay,t=this.__beginParse.bind(this),void 0===r?mu(e,t,!1):mu(e,r,!1!==t)),this.codeMirror.editor.on("change",this[Mu])):(this[Mu]=this.__beginParse.bind(this),this.codeMirror.editor.on("blur",this[Mu])))}async __beginParse(){this[Su]&&await this.parse(),this[Su]=!1}async __highlightError(e){if(!this.ready)return;let t={line:0,ch:0},r={line:0,ch:Number.MAX_SAFE_INTEGER};e&&e.from&&(t=e.from,this.codeMirror.editor.scrollIntoView(t)),e&&e.to&&(r=e.to);const n=e?e.message:"";await this.ready,this.__errorMarker=this.codeMirror.editor.getDoc().markText(t,r,{attributes:{part:"error",title:n}})}async _combinePrefixes(){return Object.entries(this.customPrefixes).reduce((e,[t,r])=>r&&t&&"string"==typeof r&&"string"==typeof t?vu(vu({},e),{},{[t]:r}):e,await this._prefixes())}}r(212),r(213),r(214),r(215);function ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Eu(e){for(var t=1;t0;e.has("format")&&(t=n&&!this.noReserialize,r=!t),e.has("quads")&&(t=!0),(e.has("prefixes")||e.has("customPrefixes"))&&(t=n),r?this.parse():t&&this.__serialize()}async _parse(){const{toStream:e}=await Promise.all([r.e(1),r.e(2)]).then(r.bind(null,378)),t=e(this.value),n=[],i={},o=this.$rdf.formats.parsers.import(this.format,t);if(o){o.on("prefix",(e,t)=>{i[e]=t});var s,a=!0,l=!1;try{for(var u,c,f=Cu(o);a=(u=await f.next()).done,c=await u.value,!a;a=!0){const e=c;n.push(e)}}catch(e){l=!0,s=e}finally{try{a||null==f.return||await f.return()}finally{if(l)throw s}}this[Ru]=n,this.dispatchEvent(new CustomEvent("quads-changed",{detail:{value:n}})),this.__notifyParsedPrefixes(i)}else this.dispatchEvent(new CustomEvent("parsing-failed",{detail:{notFound:!0}}))}async __serialize(){if(!this.format)return;await this.ready;const{Readable:e}=await Promise.all([r.e(1),r.e(2)]).then(r.bind(null,378)),t=[...this.quads||[]],n=new e({objectMode:!0,read(){0!==t.length?this.push(t.shift()):this.push(null)}}),i=this.$rdf.formats.serializers.import(this.format,n,{prefixes:await this._combinePrefixes()});if(!i)return void(this.value="No serializer found for media type "+this.format);let o="";var s,a=!0,l=!1;try{for(var u,c,f=Cu(i);a=(u=await f.next()).done,c=await u.value,!a;a=!0){o+=c}}catch(e){l=!0,s=e}finally{try{a||null==f.return||await f.return()}finally{if(l)throw s}}this.format===gt&&(o=JSON.stringify(JSON.parse(o),null,2)),this.value=o,this.dispatchEvent(new CustomEvent("serialized",{detail:{value:o}}))}_errorLine(e){const t={message:e.message};return e.context&&e.context.line&&(t.from={line:e.context.line-1,ch:0},t.to={line:e.context.line-1,ch:Number.MAX_SAFE_INTEGER}),t}__notifyParsedPrefixes(e){const t={},r=Eu({},e);for(const[n,i]of Object.entries(e))n in Pe&&(t[n]=i,delete r[n]);this.dispatchEvent(new CustomEvent("prefixes-parsed",{detail:{prefixes:Eu(Eu({},t),r)}}))}}const Pu=new ie([le,ue.a]);Pu.formats.import(bt),window.customElements.define("rdf-editor",class extends(function(e,t){return class extends e{constructor(){super(),this.$rdf=t}}}(Ou,Pu)){});customElements.define("rdfjs-elements-demos",class extends te{static get properties(){return{input:{type:String},output:{type:Array}}}static get styles(){return a` + :host { + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + } + + button { + width: 50px; + height: 50px; + } + + .editor { + flex: 1; + display: flex; + flex-direction: column; + text-align: center; + height: 100vh; + } + + rdf-editor { + height: 100%; + padding: 20px; + } + `}constructor(){super(),this.input='{\n "@context": {\n "@vocab": "http://schema.org/"\n },\n "name": "John Doe"\n}'}render(){return j` +
+

Input

+ +
+ +
+

Output

+ +
+ `}async _translate(){this.output=this.renderRoot.querySelector("#input").quads}})}]); +//# sourceMappingURL=20fc87c45c11772f288e.js.map \ No newline at end of file diff --git a/converter/20fc87c45c11772f288e.js.LICENSE.txt b/converter/20fc87c45c11772f288e.js.LICENSE.txt new file mode 100644 index 00000000..8fd88e27 --- /dev/null +++ b/converter/20fc87c45c11772f288e.js.LICENSE.txt @@ -0,0 +1,22 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ diff --git a/converter/20fc87c45c11772f288e.js.map b/converter/20fc87c45c11772f288e.js.map new file mode 100644 index 00000000..2adb3fab --- /dev/null +++ b/converter/20fc87c45c11772f288e.js.map @@ -0,0 +1 @@ +{"version":3,"file":"20fc87c45c11772f288e.js","sources":["webpack:///20fc87c45c11772f288e.js"],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;AA2t7CA;;AA6HA;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;AA8aA;;;;;;AAgBA;;;AAGA;;;;;;AAMA;;;AAKA","sourceRoot":""} \ No newline at end of file diff --git a/converter/2ba55068bb44300b652d.js b/converter/2ba55068bb44300b652d.js new file mode 100644 index 00000000..f3d98c1a --- /dev/null +++ b/converter/2ba55068bb44300b652d.js @@ -0,0 +1,3 @@ +/*! For license information please see 2ba55068bb44300b652d.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{226:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NamedNode=void 0;e.NamedNode=class{constructor(t){this.termType="NamedNode",this.value=t}equals(t){return!!t&&"NamedNode"===t.termType&&t.value===this.value}}},235:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}(i(250))},237:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlankNode=void 0;e.BlankNode=class{constructor(t){this.termType="BlankNode",this.value=t}equals(t){return!!t&&"BlankNode"===t.termType&&t.value===this.value}}},238:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultGraph=void 0;class s{constructor(){this.termType="DefaultGraph",this.value=""}equals(t){return!!t&&"DefaultGraph"===t.termType}}e.DefaultGraph=s,s.INSTANCE=new s},239:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Literal=void 0;const s=i(226);class a{constructor(t,e){this.termType="Literal",this.value=t,"string"==typeof e?(this.language=e,this.datatype=a.RDF_LANGUAGE_STRING):e?(this.language="",this.datatype=e):(this.language="",this.datatype=a.XSD_STRING)}equals(t){return!!t&&"Literal"===t.termType&&t.value===this.value&&t.language===this.language&&t.datatype.equals(this.datatype)}}e.Literal=a,a.RDF_LANGUAGE_STRING=new s.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),a.XSD_STRING=new s.NamedNode("http://www.w3.org/2001/XMLSchema#string")},240:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Quad=void 0;e.Quad=class{constructor(t,e,i,s){this.termType="Quad",this.value="",this.subject=t,this.predicate=e,this.object=i,this.graph=s}equals(t){return!!t&&("Quad"===t.termType||!t.termType)&&this.subject.equals(t.subject)&&this.predicate.equals(t.predicate)&&this.object.equals(t.object)&&this.graph.equals(t.graph)}}},241:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;e.Variable=class{constructor(t){this.termType="Variable",this.value=t}equals(t){return!!t&&"Variable"===t.termType&&t.value===this.value}}},250:function(t,e,i){"use strict";function s(t){const e=[];let i=0;for(;it.join("")).join("/")}function a(t,e){let i=e+1;e>=0?"/"===t[e+1]&&"/"===t[e+2]&&(i=e+3):"/"===t[0]&&"/"===t[1]&&(i=2);const a=t.indexOf("/",i);if(a<0)return t;return t.substr(0,a)+s(t.substr(a))}function r(t){return!t||"#"===t||"?"===t||"/"===t}Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=function(t,e){const i=(e=e||"").indexOf("#");if(i>0&&(e=e.substr(0,i)),!t.length){if(e.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);return e}if(t.startsWith("?")){const i=e.indexOf("?");return i>0&&(e=e.substr(0,i)),e+t}if(t.startsWith("#"))return e+t;if(!e.length){const e=t.indexOf(":");if(e<0)throw new Error(`Found invalid relative IRI '${t}' for a missing baseIRI`);return a(t,e)}const r=t.indexOf(":");if(r>=0)return a(t,r);const n=e.indexOf(":");if(n<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);const o=e.substr(0,n+1);if(0===t.indexOf("//"))return o+a(t,r);let h;if(e.indexOf("//",n)===n+1){if(h=e.indexOf("/",n+3),h<0)return e.length>n+3?e+"/"+a(t,r):o+a(t,r)}else if(h=e.indexOf("/",n+1),h<0)return o+a(t,r);if(0===t.indexOf("/"))return e.substr(0,h)+s(t);let l=e.substr(h);const c=l.lastIndexOf("/");return c>=0&&ci.emit("error",t)),t.on("data",t=>e.push(t)),t.on("end",()=>e.push(null));const i=e.pipe(new l(this.options));return i}_transform(t,e,i){try{this.saxParser.write(t)}catch(t){return i(t)}i()}newParseError(t){return new n.ParseError(this,t)}valueToUri(t,e){return this.uriToNamedNode((0,s.resolve)(t,e.baseIRI))}uriToNamedNode(t){const e=(0,h.validateIri)(t,this.iriValidationStrategy);if(e instanceof Error)throw this.newParseError(e.message);return this.dataFactory.namedNode(t)}validateNcname(t){if(!l.NCNAME_MATCHER.test(t))throw this.newParseError("Not a valid NCName: "+t)}attachSaxListeners(){this.saxParser.on("error",t=>this.emit("error",t)),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(t){const e=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let i=c.RESOURCE;if(e&&(e.hadChildren=!0,i=e.childrenParseType),e&&e.childrenStringTags){const i=t.name;let s="";for(const e in t.attributes)s+=` ${e}="${t.attributes[e].value}"`;const a=`<${`${i}${s}`}>`;e.childrenStringTags.push(a);const r={childrenStringTags:e.childrenStringTags};return r.childrenStringEmitClosingTag=``,void this.activeTagStack.push(r)}const s={};e?(s.language=e.language,s.baseIRI=e.baseIRI):s.baseIRI=this.baseIRI,this.activeTagStack.push(s),i===c.RESOURCE?this.onTagResource(t,s,e,!e):this.onTagProperty(t,s,e)}onTagResource(t,e,i,a){e.childrenParseType=c.PROPERTY;let r=!0;if(t.uri===l.RDF){if(!a&&l.FORBIDDEN_NODE_ELEMENTS.indexOf(t.local)>=0)throw this.newParseError("Illegal node element name: "+t.local);switch(t.local){case"RDF":e.childrenParseType=c.RESOURCE;case"Description":r=!1}}const n=[],o=[];let h=null,d=!1,u=!1,p=null;for(const a in t.attributes){const r=t.attributes[a];if(i&&r.uri===l.RDF)switch(r.local){case"about":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);h=r.value;continue;case"ID":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);this.validateNcname(r.value),h="#"+r.value,d=!0;continue;case"nodeID":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);this.validateNcname(r.value),h=r.value,u=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":p=r.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(r.uri===l.XML){if("lang"===r.local){e.language=""===r.value?null:r.value.toLowerCase();continue}if("base"===r.local){e.baseIRI=(0,s.resolve)(r.value,e.baseIRI);continue}}"xml"===r.prefix||"xmlns"===r.prefix||""===r.prefix&&"xmlns"===r.local||!r.uri||(n.push(this.uriToNamedNode(r.uri+r.local)),o.push(r.value))}if(null!==h&&(e.subject=u?this.dataFactory.blankNode(h):this.valueToUri(h,e),d&&this.claimNodeId(e.subject)),e.subject||(e.subject=this.dataFactory.blankNode()),r){const s=this.uriToNamedNode(t.uri+t.local);this.emitTriple(e.subject,this.dataFactory.namedNode(l.RDF+"type"),s,i?i.reifiedStatementId:null)}if(i){if(i.predicate)if(i.childrenCollectionSubject){const t=this.dataFactory.blankNode();this.emitTriple(i.childrenCollectionSubject,i.childrenCollectionPredicate,t,i.reifiedStatementId),this.emitTriple(t,this.dataFactory.namedNode(l.RDF+"first"),e.subject,e.reifiedStatementId),i.childrenCollectionSubject=t,i.childrenCollectionPredicate=this.dataFactory.namedNode(l.RDF+"rest")}else{this.emitTriple(i.subject,i.predicate,e.subject,i.reifiedStatementId);for(let t=0;t=0)throw this.newParseError("Illegal property element name: "+t.local);e.predicateSubPredicates=[],e.predicateSubObjects=[];let s=!1,a=!1,r=null,n=!0;const o=[],h=[];for(const i in t.attributes){const d=t.attributes[i];if(d.uri===l.RDF)switch(d.local){case"resource":if(r)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${r}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);e.hadChildren=!0,r=d.value,n=!1;continue;case"datatype":if(a)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);e.datatype=this.valueToUri(d.value,e);continue;case"nodeID":if(a)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(e.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),e.hadChildren=!0,r=d.value,n=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(a)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(e.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${e.datatype.value})`);if(r)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${r})`);if("Resource"===d.value){s=!0,e.childrenParseType=c.PROPERTY;const t=this.dataFactory.blankNode();this.emitTriple(e.subject,e.predicate,t,e.reifiedStatementId),e.subject=t,e.predicate=null}else"Collection"===d.value?(s=!0,e.hadChildren=!0,e.childrenCollectionSubject=e.subject,e.childrenCollectionPredicate=e.predicate,n=!1):"Literal"===d.value&&(s=!0,e.childrenTagsToString=!0,e.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),e.reifiedStatementId=this.valueToUri("#"+d.value,e),this.claimNodeId(e.reifiedStatementId);continue}else if(d.uri===l.XML&&"lang"===d.local){e.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(s||e.datatype)throw this.newParseError("Found illegal rdf:* properties on property element with attribute: "+d.value);e.hadChildren=!0,a=!0,o.push(this.uriToNamedNode(d.uri+d.local)),h.push(this.dataFactory.literal(d.value,e.datatype||e.language))}}if(null!==r){const t=e.subject;e.subject=n?this.dataFactory.blankNode(r):this.valueToUri(r,e),this.emitTriple(t,e.predicate,e.subject,e.reifiedStatementId);for(let t=0;t/g,(t,e,i)=>(this.saxParser.ENTITIES[e]=i,""))}}var c;e.RdfXmlParser=l,l.MIME_TYPE="application/rdf+xml",l.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",l.XML="http://www.w3.org/XML/1998/namespace",l.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],l.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],l.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(t){t[t.RESOURCE=0]="RESOURCE",t[t.PROPERTY=1]="PROPERTY"}(c||(e.ParseType=c={}))},321:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaxesParser=e.EVENTS=void 0;const s=i(322),a=i(323),r=i(324);var n=s.isS,o=s.isChar,h=s.isNameStartChar,l=s.isNameChar,c=s.S_LIST,d=s.NAME_RE,u=a.isChar,p=r.isNCNameStartChar,f=r.isNCNameChar,m=r.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",v={__proto__:null,xml:g,xmlns:b},x={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},T=t=>34===t||39===t,w=[34,39],C=[...w,91,62],N=[...w,60,93],y=[61,63,...c],E=[...c,62,38,60];function S(t,e,i){switch(e){case"xml":i!==g&&t.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":i!==b&&t.fail(`xmlns prefix must be bound to ${b}.`)}switch(i){case b:t.fail(""===e?`the default namespace may not be set to ${i}.`:`may not assign a prefix (even "xmlns") to the URI ${b}.`);break;case g:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${i}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}}}const R=t=>m.test(t),P=t=>d.test(t);e.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const D={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};e.SaxesParser=class{get closed(){return this._closed}constructor(t){this.opt=null!=t?t:{},this.fragmentOpt=!!this.opt.fragment;const e=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){this.nameStartCheck=p,this.nameCheck=f,this.isName=R,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},v);const t=this.opt.additionalNamespaces;null!=t&&(!function(t,e){for(const i of Object.keys(e))S(t,i,e[i])}(this,t),Object.assign(this.ns,t))}else this.nameStartCheck=h,this.nameCheck=l,this.isName=P,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var t;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:e}=this;this.state=e?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:i}=this.opt;if(void 0===i){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");i="1.0"}this.setXMLVersion(i),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(x),null===(t=this.readyHandler)||void 0===t||t.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,e){this[D[t]]=e}off(t){this[D[t]]=void 0}makeError(t){var e;let i=null!==(e=this.fileName)&&void 0!==e?e:"";return this.trackPosition&&(i.length>0&&(i+=":"),i+=`${this.line}:${this.column}`),i.length>0&&(i+=": "),new Error(i+t)}fail(t){const e=this.makeError(t),i=this.errorHandler;if(void 0===i)throw e;return i(e),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let e=!1;null===t?(e=!0,t=""):"object"==typeof t&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let i=t.length;const s=t.charCodeAt(i-1);!e&&(13===s||s>=55296&&s<=56319)&&(this.carriedFromPrevious=t[i-1],i--,t=t.slice(0,i));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i=t.length)return-1;const i=t.charCodeAt(e);if(this.column++,i<55296){if(i>=32||9===i)return i;switch(i){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return 10===t.charCodeAt(e+1)&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;const s=65536+1024*(i-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,s>1114111&&this.fail("disallowed character."),s}getCode11(){const{chunk:t,i:e}=this;if(this.prevI=e,this.i=e+1,e>=t.length)return-1;const i=t.charCodeAt(e);if(this.column++,i<55296){if(i>31&&i<127||i>159&&8232!==i||9===i)return i;switch(i){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const i=t.charCodeAt(e+1);10!==i&&133!==i||(this.i=e+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;const s=65536+1024*(i-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,s>1114111&&this.fail("disallowed character."),s}getCodeNorm(){const t=this.getCode();return-2===t?10:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:e}=this;const{chunk:i}=this;for(;;){const s=this.getCode(),a=-2===s,r=a?10:s;if(-1===r||t.includes(r))return this.text+=i.slice(e,this.prevI),r;a&&(this.text+=i.slice(e,this.prevI)+"\n",e=this.i)}}captureToChar(t){let{i:e}=this;const{chunk:i}=this;for(;;){let s=this.getCode();switch(s){case-2:this.text+=i.slice(e,this.prevI)+"\n",e=this.i,s=10;break;case-1:return this.text+=i.slice(e),!1}if(s===t)return this.text+=i.slice(e,this.prevI),!0}}captureNameChars(){const{chunk:t,i:e}=this;for(;;){const i=this.getCode();if(-1===i)return this.name+=t.slice(e),-1;if(!l(i))return this.name+=t.slice(e,this.prevI),-2===i?10:i}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(-1===t||!n(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=o,this.getCode=this.getCode10):(this.isChar=u,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case 60:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var t;const e=this.captureTo(C);switch(e){case 62:null===(t=this.doctypeHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(e),91===e?this.state=4:T(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(N);-1!==t&&(this.text+=String.fromCodePoint(t),93===t?this.state=2:60===t?this.state=6:T(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:e}=this;t:for(;;)switch(this.getCode()){case-2:this.entity+=e.slice(t,this.prevI)+"\n",t=this.i;break;case 59:{const{entityReturnState:i}=this,s=this.entity+e.slice(t,this.prevI);let a;this.state=i,""===s?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(s),this.entity=""),13===i&&void 0===this.textHandler||(this.text+=a);break t}case-1:this.entity+=e.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(h(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var t;const e=this.getCodeNorm();45===e?(this.state=19,null===(t=this.commentHandler)||void 0===t||t.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(e),this.state=17)}sCommentEnded(){const t=this.getCodeNorm();62!==t?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(t),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();93===t?this.state=22:(this.text+="]"+String.fromCodePoint(t),this.state=20)}sCDataEnding2(){var t;const e=this.getCodeNorm();switch(e){case 62:null===(t=this.cdataHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(e),this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):63===t||n(t)?(this.fail("processing instruction without a target."),this.state=63===t?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:e}=this;for(;;){const i=this.getCodeNorm();if(-1===i)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(i)){this.piTarget+=t.slice(e,this.prevI);const s=63===i;s||n(i)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=s?33:27):this.state=s?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(i));break}}}sPIBody(){if(0===this.text.length){const t=this.getCodeNorm();63===t?this.state=26:n(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var t;const e=this.getCodeNorm();if(62===e){const{piTarget:e}=this;"xml"===e.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(t=this.piHandler)||void 0===t||t.call(this,{target:e,body:this.text}),this.piTarget=this.text="",this.state=13}else 63===e?this.text+="?":(this.text+="?"+String.fromCodePoint(e),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();63!==t?-1!==t&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=33}sXMLDeclName(){const t=this.captureTo(y);if(63===t)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(n(t)||61===t){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=61===t?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(63===t)return this.state=33,void this.fail("XML declaration is incomplete.");n(t)||(61!==t&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(63===t)return this.state=33,void this.fail("XML declaration is incomplete.");n(t)||(T(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,63]);if(63===t)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(-1===t)return;const e=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const t=e;this.xmlDecl.version=t,/^1\.[0-9]+$/.test(t)?this.opt.forceXMLVersion||this.setXMLVersion(t):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();63!==t?(n(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var t;62===this.getCodeNorm()?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(t=this.xmldeclHandler)||void 0===t||t.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var t;const e=this.captureNameChars();if(-1===e)return;const i=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=i.ns=Object.create(null)),null===(t=this.openTagStartHandler)||void 0===t||t.call(this,i),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),e){case 62:this.openTag();break;case 47:this.state=35;break;default:n(e)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){62===this.getCode()?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();-1!==t&&(h(t)?(this.unget(),this.state=37):62===t?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();61===t?this.state=39:n(t)?this.state=38:62===t?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):-1!==t&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",62===t?this.openTag():h(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();T(t)?(this.q=t,this.state=40):n(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:e}=this;let{i:i}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(i,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(i,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=e.slice(i,this.prevI)+" ",i=this.i;break;case 60:return this.text+=e.slice(i,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=e.slice(i))}}sAttribValueClosed(){const t=this.getCodeNorm();n(t)?this.state=36:62===t?this.openTag():47===t?this.state=35:h(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(E);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",62===t?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();62===t?this.closeTag():n(t)?this.state=44:-1!==t&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:e}=this;const{chunk:i,textHandler:s}=this;t:for(;;)switch(this.getCode()){case 60:if(this.state=15,void 0!==s){const{text:e}=this,a=i.slice(t,this.prevI);0!==e.length?(s(e+a),this.text=""):0!==a.length&&s(a)}e=0;break t;case 38:this.state=14,this.entityReturnState=13,void 0!==s&&(this.text+=i.slice(t,this.prevI)),e=0;break t;case 93:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case-2:void 0!==s&&(this.text+=i.slice(t,this.prevI)+"\n"),t=this.i,e=0;break;case-1:void 0!==s&&(this.text+=i.slice(t));break t;default:e=0}this.forbiddenState=e}handleTextOutsideRoot(){let{i:t}=this;const{chunk:e,textHandler:i}=this;let s=!1;t:for(;;){const a=this.getCode();switch(a){case 60:if(this.state=15,void 0!==i){const{text:s}=this,a=e.slice(t,this.prevI);0!==s.length?(i(s+a),this.text=""):0!==a.length&&i(a)}break t;case 38:this.state=14,this.entityReturnState=13,void 0!==i&&(this.text+=e.slice(t,this.prevI)),s=!0;break t;case-2:void 0!==i&&(this.text+=e.slice(t,this.prevI)+"\n"),t=this.i;break;case-1:void 0!==i&&(this.text+=e.slice(t));break t;default:n(a)||(s=!0)}}s&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,e){var i;const{prefix:s,local:a}=this.qname(t),r={name:t,prefix:s,local:a,value:e};if(this.attribList.push(r),null===(i=this.attributeHandler)||void 0===i||i.call(this,r),"xmlns"===s){const t=e.trim();"1.0"===this.currentXMLVersion&&""===t&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[a]=t,S(this,a,t)}else if("xmlns"===t){const t=e.trim();this.topNS[""]=t,S(this,"",t)}}pushAttribPlain(t,e){var i;const s={name:t,value:e};this.attribList.push(s),null===(i=this.attributeHandler)||void 0===i||i.call(this,s)}end(){var t,e;this.sawRoot||this.fail("document must contain a root element.");const{tags:i}=this;for(;i.length>0;){const t=i.pop();this.fail("unclosed tag: "+t.name)}0!==this.state&&13!==this.state&&this.fail("unexpected end.");const{text:s}=this;return 0!==s.length&&(null===(t=this.textHandler)||void 0===t||t.call(this,s),this.text=""),this._closed=!0,null===(e=this.endHandler)||void 0===e||e.call(this),this._init(),this}resolve(t){var e,i;let s=this.topNS[t];if(void 0!==s)return s;const{tags:a}=this;for(let e=a.length-1;e>=0;e--)if(s=a[e].ns[t],void 0!==s)return s;return s=this.ns[t],void 0!==s?s:null===(i=(e=this.opt).resolvePrefix)||void 0===i?void 0:i.call(e,t)}qname(t){const e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};const i=t.slice(e+1),s=t.slice(0,e);return(""===s||""===i||i.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:s,local:i}}processAttribsNS(){var t;const{attribList:e}=this,i=this.tag;{const{prefix:e,local:s}=this.qname(i.name);i.prefix=e,i.local=s;const a=i.uri=null!==(t=this.resolve(e))&&void 0!==t?t:"";""!==e&&("xmlns"===e&&this.fail('tags may not have "xmlns" as prefix.'),""===a&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),i.uri=e))}if(0===e.length)return;const{attributes:s}=i,a=new Set;for(const t of e){const{name:e,prefix:i,local:r}=t;let n,o;""===i?(n="xmlns"===e?b:"",o=e):(n=this.resolve(i),void 0===n&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),n=i),o=`{${n}}${r}`),a.has(o)&&this.fail(`duplicate attribute: ${o}.`),a.add(o),t.uri=n,s[e]=t}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,e=this.tag.attributes;for(const{name:i,value:s}of t)void 0!==e[i]&&this.fail(`duplicate attribute: ${i}.`),e[i]=s;this.attribList=[]}openTag(){var t;this.processAttribs();const{tags:e}=this,i=this.tag;i.isSelfClosing=!1,null===(t=this.openTagHandler)||void 0===t||t.call(this,i),e.push(i),this.state=13,this.name=""}openSelfClosingTag(){var t,e,i;this.processAttribs();const{tags:s}=this,a=this.tag;a.isSelfClosing=!0,null===(t=this.openTagHandler)||void 0===t||t.call(this,a),null===(e=this.closeTagHandler)||void 0===e||e.call(this,a);null===(this.tag=null!==(i=s[s.length-1])&&void 0!==i?i:null)&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:t,name:e}=this;if(this.state=13,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="");const i=this.closeTagHandler;let s=t.length;for(;s-- >0;){const s=this.tag=t.pop();if(this.topNS=s.ns,null==i||i(s),s.name===e)break;this.fail("unexpected close tag.")}0===s?this.closedRoot=!0:s<0&&(this.fail(`unmatched closing tag: ${e}.`),this.text+=``)}parseEntity(t){if("#"!==t[0]){const e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let e=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?e=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(e=parseInt(t.slice(1),10)),this.isChar(e)?String.fromCodePoint(e):(this.fail("malformed character entity."),`&${t};`)}}},322:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR="\t\n\r -퟿-�𐀀-􏿿",e.S=" \t\r\n",e.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NAME_CHAR="-"+e.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.CHAR_RE=new RegExp("^["+e.CHAR+"]$","u"),e.S_RE=new RegExp("^["+e.S+"]+$","u"),e.NAME_START_CHAR_RE=new RegExp("^["+e.NAME_START_CHAR+"]$","u"),e.NAME_CHAR_RE=new RegExp("^["+e.NAME_CHAR+"]$","u"),e.NAME_RE=new RegExp("^["+e.NAME_START_CHAR+"]["+e.NAME_CHAR+"]*$","u"),e.NMTOKEN_RE=new RegExp("^["+e.NAME_CHAR+"]+$","u");function s(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}e.S_LIST=[32,10,13,9],e.isChar=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isS=function(t){return 32===t||10===t||13===t||9===t},e.isNameStartChar=s,e.isNameChar=function(t){return s(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},323:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR="-퟿-�𐀀-􏿿",e.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",e.S=" \t\r\n",e.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NAME_CHAR="-"+e.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.CHAR_RE=new RegExp("^["+e.CHAR+"]$","u"),e.RESTRICTED_CHAR_RE=new RegExp("^["+e.RESTRICTED_CHAR+"]$","u"),e.S_RE=new RegExp("^["+e.S+"]+$","u"),e.NAME_START_CHAR_RE=new RegExp("^["+e.NAME_START_CHAR+"]$","u"),e.NAME_CHAR_RE=new RegExp("^["+e.NAME_CHAR+"]$","u"),e.NAME_RE=new RegExp("^["+e.NAME_START_CHAR+"]["+e.NAME_CHAR+"]*$","u"),e.NMTOKEN_RE=new RegExp("^["+e.NAME_CHAR+"]+$","u");function s(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}e.S_LIST=[32,10,13,9],e.isChar=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isRestrictedChar=function(t){return t>=1&&t<=8||11===t||12===t||t>=14&&t<=31||t>=127&&t<=132||t>=134&&t<=159},e.isCharAndNotRestricted=function(t){return 9===t||10===t||13===t||t>31&&t<127||133===t||t>159&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isS=function(t){return 32===t||10===t||13===t||9===t},e.isNameStartChar=s,e.isNameChar=function(t){return s(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},324:function(t,e,i){"use strict";function s(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}Object.defineProperty(e,"__esModule",{value:!0}),e.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NC_NAME_CHAR="-"+e.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.NC_NAME_START_CHAR_RE=new RegExp("^["+e.NC_NAME_START_CHAR+"]$","u"),e.NC_NAME_CHAR_RE=new RegExp("^["+e.NC_NAME_CHAR+"]$","u"),e.NC_NAME_RE=new RegExp("^["+e.NC_NAME_START_CHAR+"]["+e.NC_NAME_CHAR+"]*$","u"),e.isNCNameStartChar=s,e.isNCNameChar=function(t){return s(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},325:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParseError=void 0;class s extends Error{constructor(t,e){const i=t.saxParser;super(t.trackPosition?`Line ${i.line} column ${i.column+1}: ${e}`:e)}}e.ParseError=s},326:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var a=Object.getOwnPropertyDescriptor(e,i);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,a)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),a=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(i(327),e)},327:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateIri=e.IriValidationStrategy=void 0;const s=function(){const t="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",e=`${t}\\.${t}\\.${t}\\.${t}`,i="[a-fA-F0-9]{1,4}",s=`(${i}:${i}|${e})`,a="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",r=`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=]|[:@])*`,n=`(${r})+`,o=`(${r})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:${`(\\/\\/${`(${`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=]|:)*`}@)?${`(${`\\[(${`((${i}:){6}${s}|::(${i}:){5}${s}|(${i})?::(${i}:){4}${s}|((${i}:){0,1}${i})?::(${i}:){3}${s}|((${i}:){0,2}${i})?::(${i}:){2}${s}|((${i}:){0,3}${i})?::${i}:${s}|((${i}:){0,4}${i})?::${s}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)`}|v[a-fA-F0-9]+\\.([!$&'()*+,;=]|[!$&'()*+,;=]|":)+)\\]`}|${e}|${`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=])*`})`}(:[0-9]*)?`}${`(\\/${o})*`}|${`\\/(${n}(\\/${o})*)?`}|${`${n}(\\/${o})*`}|)`}(\\?${`(${r}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*`})?(#${`(${r}|[\\/?])*`})?$`,"u")}(),a=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var r;!function(t){t.Strict="strict",t.Pragmatic="pragmatic",t.None="none"}(r=e.IriValidationStrategy||(e.IriValidationStrategy={})),e.validateIri=function(t,e=r.Strict){switch(e){case r.Strict:return s.test(t)?void 0:new Error(`Invalid IRI according to RFC 3987: '${t}'`);case r.Pragmatic:return a.test(t)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${t}'`);case r.None:return;default:return new Error(`Not supported validation strategy "${e}"`)}}},372:function(t,e,i){"use strict";i.r(e);var s=i(319);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function r(t){for(var e=1;e=0||(a[i]=t[i]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(a[i]=t[i])}return a}class h extends s.RdfXmlParser{constructor(t={}){let{factory:e}=t;super(r(r({},o(t,["factory"])),{},{dataFactory:e}))}}e.default=h}}]); +//# sourceMappingURL=2ba55068bb44300b652d.js.map \ No newline at end of file diff --git a/converter/2ba55068bb44300b652d.js.LICENSE.txt b/converter/2ba55068bb44300b652d.js.LICENSE.txt new file mode 100644 index 00000000..d30b9865 --- /dev/null +++ b/converter/2ba55068bb44300b652d.js.LICENSE.txt @@ -0,0 +1,23 @@ +/** + * Character class utilities for XML NS 1.0 edition 3. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ + +/** + * Character classes and associated utilities for the 2nd edition of XML 1.1. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ + +/** + * Character classes and associated utilities for the 5th edition of XML 1.0. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ diff --git a/converter/2ba55068bb44300b652d.js.map b/converter/2ba55068bb44300b652d.js.map new file mode 100644 index 00000000..204dbf14 --- /dev/null +++ b/converter/2ba55068bb44300b652d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2ba55068bb44300b652d.js","sources":["webpack:///2ba55068bb44300b652d.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/360cff4bf6981215a1d6.js b/converter/360cff4bf6981215a1d6.js new file mode 100644 index 00000000..08869d63 --- /dev/null +++ b/converter/360cff4bf6981215a1d6.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17,14,15,16],{244:function(n,o){},245:function(n,o){}}]); +//# sourceMappingURL=360cff4bf6981215a1d6.js.map \ No newline at end of file diff --git a/converter/360cff4bf6981215a1d6.js.map b/converter/360cff4bf6981215a1d6.js.map new file mode 100644 index 00000000..6516b450 --- /dev/null +++ b/converter/360cff4bf6981215a1d6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"360cff4bf6981215a1d6.js","sources":["webpack:///360cff4bf6981215a1d6.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/3d46d0acd2ee8f92cdfa.js b/converter/3d46d0acd2ee8f92cdfa.js new file mode 100644 index 00000000..334610e3 --- /dev/null +++ b/converter/3d46d0acd2ee8f92cdfa.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{228:function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},229:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(270),o=n(274);n(0)(u,i);for(var a=r(o.prototype),s=0;s{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}}class u extends s.Writable{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}import(e){return e.on("data",e=>this.write(e)).on("end",()=>this.end()).on("error",e=>this.emit("error",e)),this}}class d extends s.Duplex{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}}class f extends s.Transform{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}import(e){return e.on("data",e=>this.write(e)).on("end",()=>this.end()).on("error",e=>this.emit("error",e)),this}demolish(e){if(this.push=e=>{if(null!==e)throw new Error("[ERR_STREAM_DESTROYED]: Cannot push after stream was destroyed")},this.emit=function(e,...t){"end"!==e&&Object.getPrototypeOf(this).emit.apply(this,[e,...t])},e)return s.Transform.prototype.destroy.call(this,e)}}const c=new Function("try {return this===global;}catch(e){return false;}")(),[h,p]=void 0===r?[!0,!1]:r.browser?[!0,!0]:"undefined"===r.versions||"undefined"===r.versions.node?[!0,!1]:[!1,!1];(p||c&&+/^v(\d+)/.exec(r.version)[1]<10)&&(f.prototype.destroy=d.prototype.destroy=function(e,t){this._readableState.destroyed=!0,this._writableState.destroyed=!0;let n=()=>{this._writableState.emitClose&&this._readableState.emitClose&&this.emit("close")};return this._destroy(e||null,e=>{!t&&e?(r.nextTick(()=>{this.emit("error",e),n()}),this._writableState.errorEmitted=!0):(r.nextTick(n),t&&t(e))}),this},f.prototype._destroy=d.prototype._destroy=(e,t)=>t(e));class b extends f{constructor(e={}){super(o(o({},e),{},{writableObjectMode:!0,readableObjectMode:!0})),this._as_inputs=new Set,this.on("pipe",e=>{this._as_inputs.add(e),e.on("prefix",(...e)=>{this.emit("prefix",...e)}).on("comment",(...e)=>{this.emit("comment",...e)})}),this.on("unpipe",e=>{this._as_inputs.delete(e)})}_destroy(){for(let e of this._as_inputs)e.destroy()}}class g extends b{_transform(e,t,n){n(null,JSON.stringify(e.isolate())+"\n")}}class y extends b{_transform(e,t,n){n(null,{type:"quad",value:e})}}f.QuadsToOther=b,e.exports=o(o({},s),{},{Readable:l,Writable:u,Duplex:d,Transform:f,QuadsToOther:b,quads_to_json:()=>new g,quads_to_writable:()=>new y,source:(e,n=null)=>(n||"string"!=typeof e||(n="utf8"),new l({objectMode:!n&&"string"!=typeof e&&!t.isBuffer(e),read(){this.push(e,n),this.push(null)}}))})}).call(this,n(2).Buffer,n(4))},256:function(e,t,n){"use strict";var r=n(228).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?S(e,new v):M(e,a,t,!0);else if(a.ended)S(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?M(e,a,t,!1):x(e,a)):M(e,a,t,!1)}else r||(a.reading=!1,x(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(P,e))}function P(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,W(e)}function x(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function A(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),W(e),t.flowing&&!t.reading&&e.read(0)}function W(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(q,t,e))}function q(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function B(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):j(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new m("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,W(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?j(this):i.reading||r.nextTick(A,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(D,this),n},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(D,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},275:function(e,t,n){"use strict";e.exports=d;var r=n(228).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(229);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&a.forEach(u),o||(a.forEach(u),i(r))}))}));return t.reduce(d)}}}]); +//# sourceMappingURL=3d46d0acd2ee8f92cdfa.js.map \ No newline at end of file diff --git a/converter/3d46d0acd2ee8f92cdfa.js.map b/converter/3d46d0acd2ee8f92cdfa.js.map new file mode 100644 index 00000000..4fe96067 --- /dev/null +++ b/converter/3d46d0acd2ee8f92cdfa.js.map @@ -0,0 +1 @@ +{"version":3,"file":"3d46d0acd2ee8f92cdfa.js","sources":["webpack:///3d46d0acd2ee8f92cdfa.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/413f167fa27c82813743.js b/converter/413f167fa27c82813743.js new file mode 100644 index 00000000..ebc05e57 --- /dev/null +++ b/converter/413f167fa27c82813743.js @@ -0,0 +1,3 @@ +/*! For license information please see 413f167fa27c82813743.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{218:function(e,t,n){"use strict";const r={};e.exports=r,r.isArray=Array.isArray,r.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),r.isDouble=e=>r.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),r.isEmptyObject=e=>r.isObject(e)&&0===Object.keys(e).length,r.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),r.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),r.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),r.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),r.isUndefined=e=>void 0===e},219:function(e,t,n){"use strict";const r=n(222),o=n(218),i=n(257).IdentifierIssuer,a=n(220),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,u={accept:"application/ld+json, application/json"},d={};e.exports=d,d.IdentifierIssuer=i,d.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,d.REGEX_KEYWORD=/^@[a-zA-Z]+$/,d.clone=function(e){if(e&&"object"==typeof e){let t;if(o.isArray(e)){t=[];for(let n=0;n{if(Object.keys(e).some(e=>"accept"===e.toLowerCase()))throw new RangeError('Accept header may not be specified; only "'+u.accept+'" is supported.');return Object.assign({Accept:u.accept},e)},d.parseLinkHeader=e=>{const t={},n=e.match(s);for(let e=0;e{if(!(o.isString(e)||o.isArray(e)&&e.every(e=>o.isString(e)))){if(t&&o.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&d.asArray(e["@default"]).every(e=>o.isString(e)))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},d.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const n=e[t];return!o.isArray(n)||n.length>0}return!1},d.hasValue=(e,t,n)=>{if(d.hasProperty(e,t)){let i=e[t];const a=r.isList(i);if(o.isArray(i)||a){a&&(i=i["@list"]);for(let e=0;e{if("propertyIsArray"in(r=r||{})||(r.propertyIsArray=!1),"valueIsArray"in r||(r.valueIsArray=!1),"allowDuplicate"in r||(r.allowDuplicate=!0),"prependValue"in r||(r.prependValue=!1),r.valueIsArray)e[t]=n;else if(o.isArray(n)){0===n.length&&r.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),r.prependValue&&(n=n.concat(e[t]),e[t]=[]);for(let o=0;o[].concat(e[t]||[]),d.removeProperty=(e,t)=>{delete e[t]},d.removeValue=(e,t,n,r)=>{"propertyIsArray"in(r=r||{})||(r.propertyIsArray=!1);const o=d.getValues(e,t).filter(e=>!d.compareValues(e,n));0===o.length?d.removeProperty(e,t):1!==o.length||r.propertyIsArray?e[t]=o:e[t]=o[0]},d.relabelBlankNodes=(e,t)=>function e(t,n){if(o.isArray(n))for(let r=0;re===t||(!(!r.isValue(e)||!r.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(o.isObject(e)&&"@id"in e&&o.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"]),d.compareShortestLeast=(e,t)=>e.length{n.readable||n.emit("end")}),e.on("error",e=>{n.emit("error",e)}),n}}},222:function(e,t,n){"use strict";const r=n(218),o={};e.exports=o,o.isSubject=e=>{if(r.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){return Object.keys(e).length>1||!("@id"in e)}return!1},o.isSubjectReference=e=>r.isObject(e)&&1===Object.keys(e).length&&"@id"in e,o.isValue=e=>r.isObject(e)&&"@value"in e,o.isList=e=>r.isObject(e)&&"@list"in e,o.isGraph=e=>r.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter(e=>"@id"!==e&&"@index"!==e).length,o.isSimpleGraph=e=>o.isGraph(e)&&!("@id"in e),o.isBlankNode=e=>{if(r.isObject(e)){if("@id"in e){const t=e["@id"];return!r.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},224:function(e,t,n){"use strict";const r=n(218),o={};e.exports=o,o.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},o.parse=(e,t)=>{const n={},r=o.parsers[t||"full"],i=r.regex.exec(e);let a=r.keys.length;for(;a--;)n[r.keys[a]]=void 0===i[a]?null:i[a];return("https"===n.scheme&&"443"===n.port||"http"===n.scheme&&"80"===n.port)&&(n.href=n.href.replace(":"+n.port,""),n.authority=n.authority.replace(":"+n.port,""),n.port=null),n.normalizedPath=o.removeDotSegments(n.path),n},o.prependBase=(e,t)=>{if(null===e)return t;if(o.isAbsolute(t))return t;e&&!r.isString(e)||(e=o.parse(e||""));const n=o.parse(t),i={protocol:e.protocol||""};if(null!==n.authority)i.authority=n.authority,i.path=n.path,i.query=n.query;else if(i.authority=e.authority,""===n.path)i.path=e.path,null!==n.query?i.query=n.query:i.query=e.query;else{if(0===n.path.indexOf("/"))i.path=n.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=n.path,i.path=t}i.query=n.query}""!==n.path&&(i.path=o.removeDotSegments(i.path));let a=i.protocol;return null!==i.authority&&(a+="//"+i.authority),a+=i.path,null!==i.query&&(a+="?"+i.query),null!==n.fragment&&(a+="#"+n.fragment),""===a&&(a="./"),a},o.removeBase=(e,t)=>{if(null===e)return t;e&&!r.isString(e)||(e=o.parse(e||""));let n="";if(""!==e.href?n+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(n+="//"),0!==t.indexOf(n))return t;const i=o.parse(t.substr(n.length)),a=e.normalizedPath.split("/"),s=i.normalizedPath.split("/"),l=i.fragment||i.query?0:1;for(;a.length>0&&s.length>l&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e{if(0===e.length)return"";const t=e.split("/"),n=[];for(;t.length>0;){const e=t.shift(),r=0===t.length;"."!==e?".."!==e?n.push(e):(n.pop(),r&&n.push("")):r&&n.push("")}return"/"===e[0]&&n.length>0&&""!==n[0]&&n.unshift(""),1===n.length&&""===n[0]?"/":n.join("/")};const i=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;o.isAbsolute=e=>r.isString(e)&&i.test(e),o.isRelative=e=>r.isString(e)},227:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t0){const n=t.substr(0,a),s=t.substr(a+1);if("_"===n||0===s.indexOf("//"))return t;r&&r.hasOwnProperty(n)&&w.createTermDefinition({activeCtx:e,localCtx:r,term:n,defined:o,options:i});const l=e.mappings.get(n);if(l&&l._prefix)return l["@id"]+s;if(p(t))return t}if(n.vocab&&"@vocab"in e){t=e["@vocab"]+t}else if(n.base){let n,r;"@base"in e?e["@base"]?(r=h(i.base,e["@base"]),n=h(r,t)):(r=e["@base"],n=t):(r=i.base,n=h(i.base,t)),t=n}return t}e.exports=w,w.process=async({activeCtx:e,localCtx:t,options:n,propagate:r=!0,overrideProtected:i=!1,cycles:a=new Set})=>{c(t)&&"@context"in t&&l(t["@context"])&&(t=t["@context"]);if(0===m(t).length)return e;const d=[],y=[({event:e,next:t})=>{d.push(e),t()}];n.eventHandler&&y.push(n.eventHandler);const b=n;n=o(o({},n),{},{eventHandler:y});const x=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});c(x[0].document)&&"boolean"==typeof x[0].document["@propagate"]&&(r=x[0].document["@propagate"]);let O=e;r||O.previousContext||(O=O.clone(),O.previousContext=e);for(const r of x){let{document:o}=r;if(e=O,null===o){if(!i&&0!==Object.keys(e.protected).length)throw new s("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});O=e=w.getInitialContext(n).clone();continue}const l=r.getProcessed(e);if(l){if(b.eventHandler)for(const e of l.events)v({event:e,options:b});O=e=l.context;continue}if(c(o)&&"@context"in o&&(o=o["@context"]),!c(o))throw new s("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});O=O.clone();const y=new Map;if("@version"in o){if(1.1!==o["@version"])throw new s("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new s("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});O.processingMode="json-ld-1.1",O["@version"]=o["@version"],y.set("@version",!0)}if(O.processingMode=O.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||p(e));else{if(!f(e))throw new s('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=h(O["@base"],e)}O["@base"]=e,y.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete O["@vocab"];else{if(!u(e))throw new s('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!p(e)&&w.processingMode(O,1))throw new s('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=j(O,e,{vocab:!0,base:!0},void 0,void 0,n);p(t)||n.eventHandler&&v({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n}),O["@vocab"]=t}}y.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete O["@language"];else{if(!u(e))throw new s('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(g)||n.eventHandler&&v({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n}),O["@language"]=e.toLowerCase()}y.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete O["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new s('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});O["@direction"]=t}y.set("@direction",!0)}if("@propagate"in o){const n=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof n)throw new s("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});y.set("@propagate",!0)}if("@import"in o){const r=o["@import"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!u(r))throw new s("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const i=await n.contextResolver.resolve({activeCtx:e,context:r,documentLoader:n.documentLoader,base:n.base});if(1!==i.length)throw new s("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const a=i[0].getProcessed(e);if(a)o=a;else{const n=i[0].document;if("@import"in n)throw new s("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in n)o.hasOwnProperty(e)||(o[e]=n[e]);i[0].setProcessed(e,o)}y.set("@import",!0)}y.set("@protected",o["@protected"]||!1);for(const e in o)if(w.createTermDefinition({activeCtx:O,localCtx:o,term:e,defined:y,options:n,overrideProtected:i}),c(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let r=!0;if(u(t)){const e=h(n.base,t);a.has(e)?r=!1:a.add(e)}if(r)try{await w.process({activeCtx:O.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:n,cycles:a})}catch(t){throw new s("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}r.setProcessed(e,{context:O,events:d})}return O},w.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:r,options:o,overrideProtected:i=!1})=>{if(r.has(n)){if(r.get(n))return;throw new s("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}let a;if(r.set(n,!1),t.hasOwnProperty(n)&&(a=t[n]),"@type"===n&&c(a)&&"@set"===(a["@container"]||"@set")&&w.processingMode(e,1.1)){const e=["@container","@id","@protected"],r=Object.keys(a);if(0===r.length||r.some(t=>!e.includes(t)))throw new s("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else{if(w.isKeyword(n))throw new s("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n});if(n.match(y))return void(o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:o}));if(""===n)throw new s("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const d=e.mappings.get(n);e.mappings.has(n)&&e.mappings.delete(n);let f=!1;if((u(a)||null===a)&&(f=!0,a={"@id":a}),!c(a))throw new s("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const h={};e.mappings.set(n,h),h.reverse=!1;const g=["@container","@id","@language","@reverse","@type"];w.processingMode(e,1.1)&&g.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in a)if(!g.includes(e))throw new s("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const m=n.indexOf(":");if(h._termHasColon=m>0,"@reverse"in a){if("@id"in a)throw new s("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in a)throw new s("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const i=a["@reverse"];if(!u(i))throw new s("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(i.match(y))return o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));const l=j(e,i,{vocab:!0,base:!1},t,r,o);if(!p(l))throw new s("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});h["@id"]=l,h.reverse=!0}else if("@id"in a){let i=a["@id"];if(i&&!u(i))throw new s("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===i)h["@id"]=null;else{if(!w.isKeyword(i)&&i.match(y))return o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));if(i!==n){if(i=j(e,i,{vocab:!0,base:!1},t,r,o),!p(i)&&!w.isKeyword(i))throw new s("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(n.match(/(?::[^:])|\//)){if(j(e,n,{vocab:!0,base:!1},t,new Map(r).set(n,!0),o)!==i)throw new s("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}h["@id"]=i,h._prefix=f&&!h._termHasColon&&i.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in h))if(h._termHasColon){const i=n.substr(0,m);if(t.hasOwnProperty(i)&&w.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:r,options:o}),e.mappings.has(i)){const t=n.substr(m+1);h["@id"]=e.mappings.get(i)["@id"]+t}else h["@id"]=n}else if("@type"===n)h["@id"]=n;else{if(!("@vocab"in e))throw new s("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n});h["@id"]=e["@vocab"]+n}if((!0===a["@protected"]||!0===r.get("@protected")&&!1!==a["@protected"])&&(e.protected[n]=!0,h.protected=!0),r.set(n,!0),"@type"in a){let n=a["@type"];if(!u(n))throw new s("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===n||"@none"===n){if(w.processingMode(e,1))throw new s(`Invalid JSON-LD syntax; an @context @type value must not be "${n}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==n&&"@vocab"!==n){if(n=j(e,n,{vocab:!0,base:!1},t,r,o),!p(n))throw new s("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===n.indexOf("_:"))throw new s("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}h["@type"]=n}if("@container"in a){const n=u(a["@container"])?[a["@container"]]:a["@container"]||[],r=["@list","@set","@index","@language"];let o=!0;const i=n.includes("@set");if(w.processingMode(e,1.1)){if(r.push("@graph","@id","@type"),n.includes("@list")){if(1!==n.length)throw new s("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(n.includes("@graph")){if(n.some(e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e))throw new s("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else o&=n.length<=(i?2:1);if(n.includes("@type")&&(h["@type"]=h["@type"]||"@id",!["@id","@vocab"].includes(h["@type"])))throw new s("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else o&=!l(a["@container"]),o&=n.length<=1;if(o&=n.every(e=>r.includes(e)),o&=!(i&&n.includes("@list")),!o)throw new s("Invalid JSON-LD syntax; @context @container value must be one of the following: "+r.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(h.reverse&&!n.every(e=>["@index","@set"].includes(e)))throw new s("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});h["@container"]=n}if("@index"in a){if(!("@container"in a)||!h["@container"].includes("@index"))throw new s(`Invalid JSON-LD syntax; @index without @index in @container: "${a["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!u(a["@index"])||0===a["@index"].indexOf("@"))throw new s(`Invalid JSON-LD syntax; @index must expand to an IRI: "${a["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});h["@index"]=a["@index"]}if("@context"in a&&(h["@context"]=a["@context"]),"@language"in a&&!("@type"in a)){let e=a["@language"];if(null!==e&&!u(e))throw new s("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),h["@language"]=e}if("@prefix"in a){if(n.match(/:|\//))throw new s("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(w.isKeyword(h["@id"]))throw new s("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof a["@prefix"])throw new s("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});h._prefix=!0===a["@prefix"]}if("@direction"in a){const e=a["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new s('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});h["@direction"]=e}if("@nest"in a){const e=a["@nest"];if(!u(e)||"@nest"!==e&&0===e.indexOf("@"))throw new s("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});h["@nest"]=e}const b=h["@id"];if("@context"===b||"@preserve"===b)throw new s("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(d&&d.protected&&!i&&(e.protected[n]=!0,h.protected=!0,!function e(t,n){if(!t||"object"!=typeof t||!n||"object"!=typeof n)return t===n;const r=Array.isArray(t);if(r!==Array.isArray(n))return!1;if(r){if(t.length!==n.length)return!1;for(let r=0;rj(e,t,n,void 0,void 0,r),w.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),n=x.get(t);if(n)return n;const r={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},n=e.fastCurieMap={},r={},a=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,c=[...l.keys()].sort(b);for(const e of c){const o=l.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const u=m(o["@id"]);for(const l of u){let u=t[l];const d=w.isKeyword(l);if(u)d||o._termHasColon||r[l].push(e);else if(t[l]=u={},!d&&!o._termHasColon){r[l]=[e];const t={iri:l,terms:r[l]};l[0]in n?n[l[0]].push(t):n[l[0]]=[t]}if(u[c]||(u[c]={"@language":{},"@type":{},"@any":{}}),u=u[c],i(e,u["@any"],"@none"),o.reverse)i(e,u["@type"],"@reverse");else if("@none"===o["@type"])i(e,u["@any"],"@none"),i(e,u["@language"],"@none"),i(e,u["@type"],"@none");else if("@type"in o)i(e,u["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],n=o["@direction"];i(e,u["@language"],t&&n?`${t}_${n}`.toLowerCase():t?t.toLowerCase():n?"_"+n:"@null")}else"@language"in o?i(e,u["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?i(e,u["@language"],"_"+o["@direction"]):i(e,u["@language"],"@none"):s?(i(e,u["@language"],"_"+s),i(e,u["@language"],"@none"),i(e,u["@type"],"@none")):(i(e,u["@language"],a),i(e,u["@language"],"@none"),i(e,u["@type"],"@none"))}}for(const e in n)o(n,e,1);return t},clone:function(){const e={};e.mappings=a.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=a.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone());e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]);"@language"in this&&(e["@language"]=this["@language"]);"@vocab"in this&&(e["@vocab"]=this["@vocab"]);return e},revertToPreviousContext:function(){if(!this.previousContext)return this;return this.previousContext.clone()},protected:{}};return 1e4===x.size&&x.clear(),x.set(t,r),r;function o(e,t,n){const r=e[t],i=e[t]={};let a,s;for(const e of r)a=e.iri,s=n>=a.length?"":a[n],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,n+1)}function i(e,t,n){t.hasOwnProperty(n)||(t[n]=e)}},w.getContextValue=(e,t,n)=>{if(null===t){if("@context"===n)return;return null}if(e.mappings.has(t)){const r=e.mappings.get(t);if(d(n))return r;if(r.hasOwnProperty(n))return r[n]}return"@language"===n&&n in e||"@direction"===n&&n in e?e[n]:"@context"!==n?null:void 0},w.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,w.isKeyword=e=>{if(!u(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},246:function(e,t,n){"use strict";const r=n(220),{isArray:o}=n(218),{asArray:i}=n(219),a={};e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?i(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{!function e({event:t,handlers:n}){let i=!0;for(let a=0;i&&a{i=!0}});else{if("object"!=typeof s)throw new r("Invalid event handler.","jsonld.InvalidEventHandler",{event:t});t.code in s?s[t.code]({event:t,next:()=>{i=!0}}):i=!0}}return i}({event:e,handlers:t.eventHandler})};const s=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&s.has(e.code))throw new r("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log("EVENT: "+e.message,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn("WARNING: "+e.message,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new r("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?i(e):null}},247:function(e,t,n){"use strict";e.exports=function(e){return function e(t){if(null===t||"object"!=typeof t||null!=t.toJSON)return JSON.stringify(t);if(Array.isArray(t)&&0===t.length)return"[]";if(Array.isArray(t)&&1===t.length)return"["+e(t[0])+"]";if(Array.isArray(t))return"["+t.reduce((t,n,r)=>(t=1===r?e(t):t)+","+e(n))+"]";const n=Object.keys(t);if(0===n.length)return"{}";if(1===n.length)return"{"+e(n[0])+":"+e(t[n[0]])+"}";return"{"+n.sort().reduce((n,r,o)=>(n=1===o?e(n)+":"+e(t[n]):n)+","+e(r)+":"+e(t[r]))+"}"}(e)}},249:function(e,t,n){"use strict";const{isKeyword:r}=n(227),o=n(222),i=n(218),a=n(219),s=n(220),l={};e.exports=l,l.createMergedNodeMap=(e,t)=>{const n=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),r={"@default":{}};return l.createNodeMap(e,r,"@default",n),l.mergeNodeMaps(r)},l.createNodeMap=(e,t,n,c,u,d)=>{if(i.isArray(e)){for(const r of e)l.createNodeMap(r,t,n,c,void 0,d);return}if(!i.isObject(e))return void(d&&d.push(e));if(o.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(d&&d.push(e))}if(d&&o.isList(e)){const r=[];return l.createNodeMap(e["@list"],t,n,c,u,r),void d.push({"@list":r})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}i.isUndefined(u)&&(u=o.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),d&&d.push({"@id":u});const p=t[n],f=p[u]=p[u]||{};f["@id"]=u;const h=Object.keys(e).sort();for(let i of h){if("@id"===i)continue;if("@reverse"===i){const r={"@id":u},i=e["@reverse"];for(const e in i){const s=i[e];for(const i of s){let s=i["@id"];o.isBlankNode(i)&&(s=c.getId(s)),l.createNodeMap(i,t,n,c,s),a.addValue(p[s],e,r,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===i){u in t||(t[u]={}),l.createNodeMap(e[i],t,u,c);continue}if("@included"===i){l.createNodeMap(e[i],t,n,c);continue}if("@type"!==i&&r(i)){if("@index"===i&&i in f&&(e[i]!==f[i]||e[i]["@id"]!==f[i]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:f});f[i]=e[i];continue}const d=e[i];if(0===i.indexOf("_:")&&(i=c.getId(i)),0!==d.length)for(let e of d)if("@type"===i&&(e=0===e.indexOf("_:")?c.getId(e):e),o.isSubject(e)||o.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const r=o.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(f,i,{"@id":r},{propertyIsArray:!0,allowDuplicate:!1}),l.createNodeMap(e,t,n,c,r)}else if(o.isValue(e))a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1});else if(o.isList(e)){const r=[];l.createNodeMap(e["@list"],t,n,c,u,r),e={"@list":r},a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1})}else l.createNodeMap(e,t,n,c,u),a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(f,i,[],{propertyIsArray:!0})}},l.mergeNodeMapGraphs=e=>{const t={};for(const n of Object.keys(e).sort())for(const o of Object.keys(e[n]).sort()){const i=e[n][o];o in t||(t[o]={"@id":o});const s=t[o];for(const e of Object.keys(i).sort())if(r(e)&&"@type"!==e)s[e]=a.clone(i[e]);else for(const t of i[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},l.mergeNodeMaps=e=>{const t=e["@default"],n=Object.keys(e).sort();for(const r of n){if("@default"===r)continue;const n=e[r];let i=t[r];i?"@graph"in i||(i["@graph"]=[]):t[r]=i={"@id":r,"@graph":[]};const a=i["@graph"];for(const e of Object.keys(n).sort()){const t=n[e];o.isSubjectReference(t)||a.push(t)}}return t}},257:function(e,t,n){e.exports=n(336)},258:function(e,t,n){"use strict";e.exports=class e{constructor(e,t=new Map,n=0){this.prefix=e,this._existing=t,this.counter=n}clone(){const{prefix:t,_existing:n,counter:r}=this;return new e(t,new Map(n),r)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const n=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,n),n}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},259:function(e,t,n){"use strict";const r="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",o="http://www.w3.org/2001/XMLSchema#string",i={};function a(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&("Literal"!==e.object.termType||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value))}i.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,i.empty=new RegExp("^[ \\t]*$"),i.quad=new RegExp('^[ \\t]*(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?)|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]*\\.))[ \\t]*$'),e.exports=class e{static parse(e){const t=[],n={},s=e.split(i.eoln);let c=0;for(const e of s){if(c++,i.empty.test(e))continue;const s=e.match(i.quad);if(null===s)throw new Error("N-Quads parse error on line "+c+".");const u={subject:null,predicate:null,object:null,graph:null};if(void 0!==s[1]?u.subject={termType:"NamedNode",value:s[1]}:u.subject={termType:"BlankNode",value:s[2]},u.predicate={termType:"NamedNode",value:s[3]},void 0!==s[4]?u.object={termType:"NamedNode",value:s[4]}:void 0!==s[5]?u.object={termType:"BlankNode",value:s[5]}:(u.object={termType:"Literal",value:void 0,datatype:{termType:"NamedNode"}},void 0!==s[7]?u.object.datatype.value=s[7]:void 0!==s[8]?(u.object.datatype.value=r,u.object.language=s[8]):u.object.datatype.value=o,u.object.value=s[6].replace(l,(function(e,t,n,r){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(n)return String.fromCharCode(parseInt(n,16));if(r)throw new Error("Unsupported U escape")}))),void 0!==s[9]?u.graph={termType:"NamedNode",value:s[9]}:void 0!==s[10]?u.graph={termType:"BlankNode",value:s[10]}:u.graph={termType:"DefaultGraph",value:""},u.graph.value in n){let e=!0;const r=n[u.graph.value];for(const t of r)if(a(t,u)){e=!1;break}e&&(r.push(u),t.push(u))}else n[u.graph.value]=[u],t.push(u)}return t}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const n=[];for(const r of t)n.push(e.serializeQuad(r));return n.sort().join("")}static serializeQuad(e){const t=e.subject,n=e.predicate,i=e.object,a=e.graph;let l="";return"NamedNode"===t.termType?l+=`<${t.value}>`:l+=""+t.value,l+=` <${n.value}> `,"NamedNode"===i.termType?l+=`<${i.value}>`:"BlankNode"===i.termType?l+=i.value:(l+=`"${function(e){return e.replace(s,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(i.value)}"`,i.datatype.value===r?i.language&&(l+="@"+i.language):i.datatype.value!==o&&(l+=`^^<${i.datatype.value}>`)),"NamedNode"===a.termType?l+=` <${a.value}>`:"BlankNode"===a.termType&&(l+=" "+a.value),l+=" .\n",l}static legacyDatasetToQuads(e){const t=[],n={"blank node":"BlankNode",IRI:"NamedNode",literal:"Literal"};for(const i in e){e[i].forEach(e=>{const a={};for(const t in e){const i=e[t],s={termType:n[i.type],value:i.value};"Literal"===s.termType&&(s.datatype={termType:"NamedNode"},"datatype"in i&&(s.datatype.value=i.datatype),"language"in i?("datatype"in i||(s.datatype.value=r),s.language=i.language):"datatype"in i||(s.datatype.value=o)),a[t]=s}a.graph="@default"===i?{termType:"DefaultGraph",value:""}:{termType:i.startsWith("_:")?"BlankNode":"NamedNode",value:i},t.push(a)})}return t}};const s=/["\\\n\r]/g;const l=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},260:function(e,t,n){"use strict";const r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:r,RDF_LIST:r+"List",RDF_FIRST:r+"first",RDF_REST:r+"rest",RDF_NIL:r+"nil",RDF_TYPE:r+"type",RDF_PLAIN_LITERAL:r+"PlainLiteral",RDF_XML_LITERAL:r+"XMLLiteral",RDF_JSON_LITERAL:r+"JSON",RDF_OBJECT:r+"object",RDF_LANGSTRING:r+"langString",XSD:o,XSD_BOOLEAN:o+"boolean",XSD_DOUBLE:o+"double",XSD_INTEGER:o+"integer",XSD_STRING:o+"string"}},276:function(e,t,n){"use strict";(function(t){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;tt.hash?1:0}e.exports=class{constructor(){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new a("_:c14n"),this.hashAlgorithm="sha256",this.quads=null}async main(e){this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];let r=0;for(const e of n)++r%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),s=[];for(const e of i){const n=t.get(e);if(n.length>1){s.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of s){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new a("_:b");e.getId(n);const r=await this.hashNDegreeQuads(n,e);t.push(r)}t.sort(u);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const l=[];for(const e of this.quads){const t=o({},e);t.subject=this._useCanonicalId({component:t.subject}),t.object=this._useCanonicalId({component:t.object}),t.graph=this._useCanonicalId({component:t.graph}),l.push(c.serializeQuad(t))}return l.sort(),l.join("")}async hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),r.object=this.modifyFirstDegreeComponent(e,n.object,"object"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(c.serializeQuad(r))}t.sort();const o=new s(this.hashAlgorithm);for(const e of t)o.update(e);return n.hash=await o.digest(),n.hash}async hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=new s(this.hashAlgorithm);return i.update(r),"g"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}async hashNDegreeQuads(e,t){const n=new s(this.hashAlgorithm),r=await this.createHashToRelated(e,t),o=[...r.keys()].sort();for(const e of o){n.update(e);let o,i="";const a=new l(r.get(e));let s=0;for(;a.hasNext();){const e=a.next();++s%3==0&&await this._yield();let n=t.clone(),r="";const l=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?r+=this.canonicalIssuer.getId(t):(n.hasId(t)||l.push(t),r+=n.getId(t)),0!==i.length&&r>i){c=!0;break}if(!c){for(const e of l){const t=await this.hashNDegreeQuads(e,n);if(r+=n.getId(e),r+=`<${t.hash}>`,n=t.issuer,0!==i.length&&r>i){c=!0;break}}c||(0===i.length||r`}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r)++o%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:n})]);return n}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=await this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if("BlankNode"!==t.termType||t.value===r)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,o,n),l=i.get(s);l?l.push(a):i.set(s,[a])}_useCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise(e=>t(e))}}}).call(this,n(337).setImmediate)},277:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nr)&&(s&&n>0&&a>e[n-1]||!s&&ne[n+1])&&(r=a,o=n)}if(null===r)this.done=!0;else{const n=t.get(r)?o-1:o+1;e[o]=e[n],e[n]=r;for(const n of e)n>r&&t.set(n,!t.get(n))}return n}}},280:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;tt.hash?1:0}e.exports=class{constructor(){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new a("_:c14n"),this.hashAlgorithm="sha256",this.quads=null}main(e){this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];for(const e of n)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const r=[...t.keys()].sort(),i=[];for(const e of r){const n=t.get(e);if(n.length>1){i.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of i){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new a("_:b");e.getId(n);const r=this.hashNDegreeQuads(n,e);t.push(r)}t.sort(u);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const s=[];for(const e of this.quads){const t=o({},e);t.subject=this._useCanonicalId({component:t.subject}),t.object=this._useCanonicalId({component:t.object}),t.graph=this._useCanonicalId({component:t.graph}),s.push(c.serializeQuad(t))}return s.sort(),s.join("")}hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),r.object=this.modifyFirstDegreeComponent(e,n.object,"object"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(c.serializeQuad(r))}t.sort();const o=new s(this.hashAlgorithm);for(const e of t)o.update(e);return n.hash=o.digest(),n.hash}hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=new s(this.hashAlgorithm);return i.update(r),"g"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}hashNDegreeQuads(e,t){const n=new s(this.hashAlgorithm),r=this.createHashToRelated(e,t),o=[...r.keys()].sort();for(const e of o){n.update(e);let o,i="";const a=new l(r.get(e));for(;a.hasNext();){const e=a.next();let n=t.clone(),r="";const s=[];let l=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?r+=this.canonicalIssuer.getId(t):(n.hasId(t)||s.push(t),r+=n.getId(t)),0!==i.length&&r>i){l=!0;break}if(!l){for(const e of s){const t=this.hashNDegreeQuads(e,n);if(r+=n.getId(e),r+=`<${t.hash}>`,n=t.issuer,0!==i.length&&r>i){l=!0;break}}l||(0===i.length||r`}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r)this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:n});return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if("BlankNode"!==t.termType||t.value===r)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,o,n),l=i.get(s);l?l.push(a):i.set(s,[a])}_useCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},281:function(e,t,n){"use strict";e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},282:function(e,t,n){"use strict";const r=n(345),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),f=Symbol("updateAgeOnGet"),h=()=>1;const v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[f]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},y=e=>{if(e[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[d].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const x=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[i]+=e.length})),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;x(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;x(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach(e=>this[c](e.key,e.value)),this[p]=new Map,this[d]=new r,this[i]=0}dump(){return this[d].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[o])return m(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[c]&&(this[u]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const f=new b(e,t,s,r,n);return f.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=f.length,this[d].unshift(f),this[p].set(e,this[d].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[d].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach((e,t)=>v(this,t,!1))}}},335:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0)&&n.push(f[e]);const h=n.length>0;if(1===n.length&&(n=n[0]),w(l)){const e=C({activeCtx:s,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},h&&(l["@context"]=n),l[e]=t}else if(j(l)&&h){const e=l;l={"@context":n};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,n){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const r={},i=[];if("expandContext"in(n=a(n,{keepFreeFloatingNodes:!1,contextResolver:new u({sharedCache:o})}))){const e=c.clone(n.expandContext);j(e)&&"@context"in e?r.expandContext=e:r.expandContext={"@context":e},i.push(r.expandContext)}let s;if(O(t)){const o=await e.get(t,n);s=o.documentUrl,r.input=o.document,o.contextUrl&&(r.remoteContext={"@context":o.contextUrl},i.push(r.remoteContext))}else r.input=c.clone(t);"base"in n||(n.base=s||"");let l=N(n);for(const e of i)l=await E({activeCtx:l,localCtx:e,options:n});let d=await v({activeCtx:l,element:r.input,options:n});return j(d)&&"@graph"in d&&1===Object.keys(d).length?d=d["@graph"]:null===d&&(d=[]),w(d)||(d=[d]),d},e.flatten=async function(t,n,r){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");n="function"==typeof n?null:n||null,r=a(r,{base:O(t)?t:"",contextResolver:new u({sharedCache:o})});const i=await e.expand(t,r),s=g(i);if(null===n)return s;r.graph=!0,r.skipExpansion=!0;const l=await e.compact(s,n,r);return l},e.frame=async function(t,n,r){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(r=a(r,{base:O(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new u({sharedCache:o})}),O(n)){const t=await e.get(n,r);if(n=t.document,t.contextUrl){let e=n["@context"];e?w(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,n["@context"]=e}}const s=n&&n["@context"]||{},l=await e.processContext(N(r),s,r);r.hasOwnProperty("omitGraph")||(r.omitGraph=k(l,1.1)),r.hasOwnProperty("pruneBlankNodeIdentifiers")||(r.pruneBlankNodeIdentifiers=k(l,1.1));const c=await e.expand(t,r),d=i({},r);d.isFrame=!0,d.keepFreeFloatingNodes=!0;const p=await e.expand(n,d),f=Object.keys(n).map(e=>S(l,e,{vocab:!0}));d.merged=!f.includes("@graph"),d.is11=k(l,1.1);const h=b(c,p,d);d.graph=!r.omitGraph,d.skipExpansion=!0,d.link={},d.framing=!0;let v=await e.compact(h,s,d);return d.link={},v=x(v,d),v},e.link=async function(t,n,r){const o={};return n&&(o["@context"]=n),o["@embed"]="@link",e.frame(t,o,r)},e.normalize=e.canonize=async function(t,n){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(n=a(n,{base:O(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new u({sharedCache:o})}))){if("application/n-quads"!==n.inputFormat&&"application/nquads"!==n.inputFormat)throw new p("Unknown canonicalization input format.","jsonld.CanonizeError");const e=h.parse(t);return s.canonize(e,n)}const r=i({},n);delete r.format,r.produceGeneralizedRdf=!1;const l=await e.toRDF(t,r);return s.canonize(l,n)},e.fromRDF=async function(e,n){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");n=a(n,{format:O(e)?"application/n-quads":void 0});const{format:r}=n;let{rdfParser:o}=n;if(r){if(o=o||t[r],!o)throw new p("Unknown input format.","jsonld.UnknownFormat",{format:r})}else o=()=>e;const i=await o(e);return y(i,n)},e.toRDF=async function(t,n){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let r;r=(n=a(n,{base:O(t)?t:"",skipExpansion:!1,contextResolver:new u({sharedCache:o})})).skipExpansion?t:await e.expand(t,n);const i=m(r,n);if(n.format){if("application/n-quads"===n.format||"application/nquads"===n.format)return h.serialize(i);throw new p("Unknown output format.","jsonld.UnknownFormat",{format:n.format})}return i},e.createNodeMap=async function(t,n){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");n=a(n,{base:O(t)?t:"",contextResolver:new u({sharedCache:o})});const r=await e.expand(t,n);return T(r,n)},e.merge=async function(t,n,r){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!w(t))throw new TypeError('Could not merge, "docs" must be an array.');n="function"==typeof n?null:n||null,r=a(r,{contextResolver:new u({sharedCache:o})});const s=await Promise.all(t.map(t=>{const n=i({},r);return e.expand(t,n)}));let l=!0;"mergeNodes"in r&&(l=r.mergeNodes);const p=r.issuer||new d("_:b"),f={"@default":{}};for(let e=0;ee._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new p("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,n){let r;r="function"==typeof n.documentLoader?n.documentLoader:e.documentLoader;const o=await r(t);try{if(!o.document)throw new p("No remote document found at the given URL.","jsonld.NullRemoteDocument");O(o.document)&&(o.document=JSON.parse(o.document))}catch(e){throw new p("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:o})}return o},e.processContext=async function(e,t,n){return n=a(n,{base:"",contextResolver:new u({sharedCache:o})}),null===t?N(n):(t=c.clone(t),j(t)&&"@context"in t||(t={"@context":t}),E({activeCtx:e,localCtx:t,options:n}))},e.getContextValue=n(227).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new p('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,n){t[e]=n},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",h.parse),e.registerRDFParser("application/nquads",h.parse),e.url=n(224),e.logEventHandler=R,e.logWarningEventHandler=P,e.safeEventHandler=_,e.setDefaultEventHandler=J,e.strictEventHandler=B,e.unhandledEventHandler=H,e.util=c,Object.assign(e,c),e.promises=e,e.RequestQueue=n(281),e.JsonLdProcessor=n(354)(e),l.setupGlobals(e),l.setupDocumentLoaders(e),e},q=function e(){return F((function(){return e()}))};F(q),e.exports=q},336:function(e,t,n){"use strict";const r=n(276),o=n(338),i=n(280),a=n(339);let s;try{s=n(340)}catch(e){}const l={};e.exports=l,l.NQuads=n(259),l.IdentifierIssuer=n(258),l._rdfCanonizeNative=function(e){return e&&(s=e),s},l.canonize=async function(e,t){if(Array.isArray(e)||(e=l.NQuads.legacyDatasetToQuads(e)),t.useNative){if(!s)throw new Error("rdf-canonize-native not available");return new Promise((n,r)=>s.canonize(e,t,(e,t)=>e?r(e):n(t)))}if("URDNA2015"===t.algorithm)return new r(t).main(e);if("URGNA2012"===t.algorithm)return new o(t).main(e);if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},l._canonizeSync=function(e,t){if(Array.isArray(e)||(e=l.NQuads.legacyDatasetToQuads(e)),t.useNative){if(s)return s.canonizeSync(e,t);throw new Error("rdf-canonize-native not available")}if("URDNA2015"===t.algorithm)return new i(t).main(e);if("URGNA2012"===t.algorithm)return new a(t).main(e);if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},337:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(277),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},338:function(e,t,n){"use strict";const r=n(276);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.hashAlgorithm="sha1"}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r){let r,a;if("BlankNode"===i.subject.termType&&i.subject.value!==e)a=i.subject.value,r="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;a=i.object.value,r="r"}++o%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,i,t,r),l=n.get(s);l?l.push(a):n.set(s,[a])}return n}}},339:function(e,t,n){"use strict";const r=n(280);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.hashAlgorithm="sha1"}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r){let r,i;if("BlankNode"===o.subject.termType&&o.subject.value!==e)i=o.subject.value,r="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;i=o.object.value,r="r"}const a=this.hashRelatedBlankNode(i,o,t,r),s=n.get(a);s?s.push(i):n.set(a,[i])}return n}}},341:function(e,t,n){"use strict";const r=n(342),o={};e.exports=o,o.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=r,e.useDocumentLoader("xhr"))},o.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},342:function(e,t,n){"use strict";const{parseLinkHeader:r,buildHeaders:o}=n(219),{LINK_HEADER_CONTEXT:i}=n(260),a=n(220),s=n(281),{prependBase:l}=n(224),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:n}={headers:{}})=>{t=o(t);return(new s).wrapLoader((async function o(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let u;try{u=await function(e,t,n){const r=new(e=e||XMLHttpRequest);return new Promise((e,o)=>{r.onload=()=>e(r),r.onerror=e=>o(e),r.open("GET",t,!0);for(const e in n)r.setRequestHeader(e,n[e]);r.send()})}(n,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(u.status>=400)throw new a("URL could not be dereferenced: "+u.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:u.status});let d={contextUrl:null,documentUrl:s,document:u.response},p=null;const f=u.getResponseHeader("Content-Type");let h;c.test(u.getAllResponseHeaders())&&(h=u.getResponseHeader("Link"));if(h&&"application/ld+json"!==f){const e=r(h),t=e[i];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(d.contextUrl=t.target),p=e.alternate,p&&"application/ld+json"==p.type&&!(f||"").match(/^application\/(\w*\+)?json$/)&&(d=await o(l(s,p.target)))}return d}))}},343:function(e,t,n){"use strict";const{isArray:r,isObject:o,isString:i}=n(218),{asArray:a}=n(219),{prependBase:s}=n(224),l=n(220),c=n(344);function u(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:n,base:s,cycles:l=new Set}){t&&o(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const d=[];for(const a of t){if(i(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:n,base:s,cycles:l})),r(t)?d.push(...t):d.push(t);continue}if(null===a){d.push(new c({document:null}));continue}o(a)||u(t);const p=JSON.stringify(a);let f=this._get(p);f||(f=new c({document:a}),this._cacheResolvedContext({key:p,resolved:f,tag:"static"})),d.push(f)}return d}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);n&&(t=n.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){if(this.perOpCache.set(e,t),void 0!==n){let r=this.sharedCache.get(e);r||(r=new Map,this.sharedCache.set(e,r)),r.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:a,cycles:l}){t=s(a,t);const{context:c,remoteDoc:u}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:l});(function e({context:t,base:n}){if(!t)return;const a=t["@context"];if(i(a))return void(t["@context"]=s(n,a));if(r(a)){for(let t=0;t10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await n(t),s=c.document||null,i(s)&&(s=JSON.parse(s))}catch(e){throw new l("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!o(s))throw new l("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(r(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},344:function(e,t,n){"use strict";const r=n(282);e.exports=class{constructor({document:e}){this.document=e,this.cache=new r({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},345:function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r{if(null==n)return null;if("@default"===t&&(r=Object.assign({},r,{isFrame:!1})),!s(n)&&!l(n))return i||null!==t&&"@graph"!==g(e,t,{vocab:!0},r)?C({activeCtx:e,activeProperty:t,value:n,options:r}):(r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:n}},options:r}),null);if(s(n)){let o=[];const a=y(e,t,"@container")||[];i=i||a.includes("@list");for(let a=0;a1?o.slice().sort():o:[o];for(const t of i){const n=y(O,t,"@context");d(n)||(e=await b({activeCtx:e,localCtx:n,options:r,propagate:!1}))}}}let M={};await async function e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:i,expandedParent:h,options:O={},insideList:N,typeKey:C,typeScopedContext:A}){const R=Object.keys(i).sort(),P=[];let _;const J=i[C]&&"@json"===g(t,s(i[C])?i[C][0]:i[C],{vocab:!0},o(o({},O),{},{typeExpansion:!0}));for(const e of R){let N,C=i[e];if("@context"===e)continue;const R=g(t,e,{vocab:!0},O);if(null===R||!w(R)&&!m(R)){O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:e,expandedProperty:R}},options:O});continue}if(m(R)){if("@reverse"===r)throw new a("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:C});if(R in h&&"@included"!==R&&"@type"!==R)throw new a("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:R})}if("@id"===R){if(!u(C)){if(!O.isFrame)throw new a('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(l(C)){if(!c(C))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}else{if(!s(C))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(!C.every(e=>u(e)))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}}I(h,"@id",S(C).map(e=>{if(u(e)){const n=g(t,e,{base:!0},O);return O.eventHandler&&(null===n?k(null===e?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:e}},options:O}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:e}},options:O}):w(n)||k({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:e,expandedId:n}},options:O})),n}return e}),{propertyIsArray:O.isFrame});continue}if("@type"===R){l(C)&&(C=Object.fromEntries(Object.entries(C).map(([e,t])=>[g(A,e,{vocab:!0}),S(t).map(e=>g(A,e,{base:!0,vocab:!0},o(o({},O),{},{typeExpansion:!0})))]))),E(C,O.isFrame),I(h,"@type",S(C).map(e=>{if(u(e)){const t=g(A,e,{base:!0,vocab:!0},o(o({},O),{},{typeExpansion:!0}));return"@json"===t||w(t)||O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:O}),t}return e}),{propertyIsArray:O.isFrame});continue}if("@included"===R&&x(t,1.1)){const e=S(await D.expand({activeCtx:t,activeProperty:n,element:C,options:O}));if(!e.every(e=>v(e)))throw new a("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:C});I(h,"@included",e,{propertyIsArray:!0});continue}if("@graph"===R&&!l(C)&&!s(C))throw new a('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:C});if("@value"===R){_=C,J&&x(t,1.1)?h["@value"]=C:I(h,"@value",C,{propertyIsArray:O.isFrame});continue}if("@language"===R){if(null===C)continue;if(!u(C)&&!O.isFrame)throw new a('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:C});C=S(C).map(e=>u(e)?e.toLowerCase():e);for(const e of C)u(e)&&!e.match(j)&&O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:O});I(h,"@language",C,{propertyIsArray:O.isFrame});continue}if("@direction"===R){if(!u(C)&&!O.isFrame)throw new a('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:C});C=S(C);for(const e of C)if(u(e)&&"ltr"!==e&&"rtl"!==e)throw new a('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:C});I(h,"@direction",C,{propertyIsArray:O.isFrame});continue}if("@index"===R){if(!u(C))throw new a('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:C});I(h,"@index",C);continue}if("@reverse"===R){if(!l(C))throw new a('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:C});if(N=await D.expand({activeCtx:t,activeProperty:"@reverse",element:C,options:O}),"@reverse"in N)for(const e in N["@reverse"])I(h,e,N["@reverse"][e],{propertyIsArray:!0});let e=h["@reverse"]||null;for(const t in N){if("@reverse"===t)continue;null===e&&(e=h["@reverse"]={}),I(e,t,[],{propertyIsArray:!0});const n=N[t];for(let r=0;r"@id"===e||"@index"===e)&&(N=S(N).map(e=>({"@graph":S(e)}))),M.mappings.has(e)&&M.mappings.get(e).reverse){const e=h["@reverse"]=h["@reverse"]||{};N=S(N);for(let t=0;t"@value"===g(t,e,{vocab:!0},O)))throw new a("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:o});await e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:o,expandedParent:h,options:O,insideList:N,typeScopedContext:A,typeKey:C})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:A,element:n,expandedParent:M,options:r,insideList:i,typeKey:J,typeScopedContext:O}),P=Object.keys(M);let B=P.length;if("@value"in M){if("@type"in M&&("@language"in M||"@direction"in M))throw new a('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});let t=B-1;if("@type"in M&&(t-=1),"@index"in M&&(t-=1),"@language"in M&&(t-=1),"@direction"in M&&(t-=1),0!==t)throw new a('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});const n=null===M["@value"]?[]:S(M["@value"]),o=N(M,"@type");if(x(e,1.1)&&o.includes("@json")&&1===o.length);else if(0===n.length)r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:M}},options:r}),M=null;else{if(!n.every(e=>u(e)||c(e))&&"@language"in M)throw new a("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:M});if(!o.every(e=>w(e)&&!(u(e)&&0===e.indexOf("_:"))||c(e)))throw new a('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:M})}}else if("@type"in M&&!s(M["@type"]))M["@type"]=[M["@type"]];else if("@set"in M||"@list"in M){if(B>1&&(2!==B||!("@index"in M)))throw new a('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:M});"@set"in M&&(M=M["@set"],P=Object.keys(M),B=P.length)}else 1===B&&"@language"in M&&(r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:M}},options:r}),M=null);if(l(M)&&!r.keepFreeFloatingNodes&&!i&&(null===t||"@graph"===A)&&(0===B||"@value"in M||"@list"in M||1===B&&"@id"in M)){if(r.eventHandler){let e,t;0===B?(e="empty object",t="Dropping empty object."):"@value"in M?(e="object with only @value",t="Dropping object with only @value."):"@list"in M?(e="object with only @list",t="Dropping object with only @list."):1===B&&"@id"in M&&(e="object with only @id",t="Dropping object with only @id."),k({event:{type:["JsonLdEvent"],code:e,level:"warning",message:t,details:{value:M}},options:r})}M=null}return M}},349:function(e,t,n){"use strict";const{isSubjectReference:r}=n(222),{createMergedNodeMap:o}=n(249),i={};e.exports=i,i.flatten=e=>{const t=o(e),n=[],i=Object.keys(t).sort();for(let e=0;e0&&(s["@language"]=e,e.match(a)||o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:o})),s["@direction"]=t}else c!==m&&(s["@type"]=c)}return s}e.exports=b,b.fromRDF=async(e,t)=>{const n={},r={"@default":n},a={},{useRdfType:l=!1,useNativeTypes:h=!1,rdfDirection:v=null}=t;for(const o of e){const e="DefaultGraph"===o.graph.termType?"@default":o.graph.value;e in r||(r[e]={}),"@default"===e||e in n||(n[e]={"@id":e});const i=r[e],c=o.subject.value,u=o.predicate.value,d=o.object;c in i||(i[c]={"@id":c});const g=i[c],y=d.termType.endsWith("Node");if(y&&!(d.value in i)&&(i[d.value]={"@id":d.value}),u===f&&!l&&y){s(g,"@type",d.value,{propertyIsArray:!0});continue}const m=x(d,h,v,t);if(s(g,u,m,{propertyIsArray:!0}),y)if(d.value===p){const e=i[d.value];"usages"in e||(e.usages=[]),e.usages.push({node:g,property:u,value:m})}else d.value in a?a[d.value]=!1:a[d.value]={node:g,property:u,value:m}}for(const e in r){const t=r[e];if(!(p in t))continue;const n=t[p];if(n.usages){for(let e of n.usages){let n=e.node,r=e.property,s=e.value;const l=[],p=[];let f=Object.keys(n).length;for(;r===d&&i.isObject(a[n["@id"]])&&i.isArray(n[u])&&1===n[u].length&&i.isArray(n[d])&&1===n[d].length&&(3===f||4===f&&i.isArray(n["@type"])&&1===n["@type"].length&&n["@type"][0]===c)&&(l.push(n[u][0]),p.push(n["@id"]),e=a[n["@id"]],n=e.node,r=e.property,s=e.value,f=Object.keys(n).length,o.isBlankNode(n)););delete s["@id"],s["@list"]=l.reverse();for(const e of p)delete t[e]}delete n.usages}}const g=[],y=Object.keys(n).sort();for(const e of y){const t=n[e];if(e in r){const n=t["@graph"]=[],i=r[e],a=Object.keys(i).sort();for(const e of a){const t=i[e];o.isSubjectReference(t)||n.push(t)}}o.isSubjectReference(t)||g.push(t)}return g}},351:function(e,t,n){"use strict";const{createNodeMap:r}=n(249),{isKeyword:o}=n(227),i=n(222),a=n(247),s=n(218),l=n(219),{handleEvent:c}=n(246),{RDF_FIRST:u,RDF_REST:d,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:h,RDF_LANGSTRING:v,XSD_BOOLEAN:g,XSD_DOUBLE:y,XSD_INTEGER:m,XSD_STRING:b}=n(260),{isAbsolute:x}=n(224),w={};function j(e,t,n,r,i){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=f;else if(o(t))continue;for(const o of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!x(s)){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:i});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!x(t)){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:i});continue}if("BlankNode"===l.termType&&!i.produceGeneralizedRdf){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:r.getOldIds().find(e=>r.getId(e)===t)}},options:i});continue}const u=O(o,r,e,n,i.rdfDirection,i);u&&e.push({subject:a,predicate:l,object:u,graph:n})}}}}function O(e,t,n,r,o,l){const f={};if(i.isValue(e)){f.termType="Literal",f.value=void 0,f.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if("@json"===n)f.value=a(t),f.datatype.value=h;else if(s.isBoolean(t))f.value=t.toString(),f.datatype.value=n||g;else if(s.isDouble(t)||n===y)s.isDouble(t)||(t=parseFloat(t)),f.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),f.datatype.value=n||y;else if(s.isNumber(t))f.value=t.toFixed(0),f.datatype.value=n||m;else if("i18n-datatype"===o&&"@direction"in e){const n="https://www.w3.org/ns/i18n#"+(e["@language"]||"")+"_"+e["@direction"];f.datatype.value=n,f.value=t}else"@language"in e?(f.value=t,f.datatype.value=n||v,f.language=e["@language"]):(f.value=t,f.datatype.value=n||b)}else if(i.isList(e)){const i=function(e,t,n,r,o,i){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:d},l={termType:"NamedNode",value:p},c=e.pop(),f=c?{termType:"BlankNode",value:t.getId()}:l;let h=f;for(const l of e){const e=O(l,t,n,r,o,i),c={termType:"BlankNode",value:t.getId()};n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:c,graph:r}),h=c}if(c){const e=O(c,t,n,r,o,i);n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:l,graph:r})}return f}(e["@list"],t,n,r,o,l);f.termType=i.termType,f.value=i.value}else{const t=s.isObject(e)?e["@id"]:e;f.termType=t.startsWith("_:")?"BlankNode":"NamedNode",f.value=t}return"NamedNode"!==f.termType||x(f.value)?f:(l.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:f.value}},options:l}),null)}e.exports=w,w.toRDF=(e,t)=>{const n=new l.IdentifierIssuer("_:b"),o={"@default":{}};r(e,o,"@default",n);const i=[],a=Object.keys(o).sort();for(const e of a){let r;if("@default"===e)r={termType:"DefaultGraph",value:""};else{if(!x(e)){t.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}r=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},r.value=e}j(i,o[e],r,n,t)}return i}},352:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0;--r){const o=n[r];if(o.graph===t&&o.subject["@id"]===e["@id"])return!0}return!1}function y(e,t,n){const r="@"+n;let o=r in e?e[r][0]:t[n];if("embed"===n)if(!0===o)o="@once";else if(!1===o)o="@never";else if("@always"!==o&&"@never"!==o&&"@link"!==o&&"@first"!==o&&"@last"!==o&&"@once"!==o)throw new d("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return o}function m(e){if(!l.isArray(e)||1!==e.length||!l.isObject(e[0]))throw new d("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of c.asArray(e[0]["@id"]))if(!l.isObject(t)&&!u.isAbsolute(t)||l.isString(t)&&0===t.indexOf("_:"))throw new d("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of c.asArray(e[0]["@type"]))if(!l.isObject(t)&&!u.isAbsolute(t)||l.isString(t)&&0===t.indexOf("_:"))throw new d("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function b(e,t,n,r){let o=!0,i=!1;for(const u in n){let d=!1;const p=c.getValues(t,u),f=0===c.getValues(n,u).length;if("@id"===u){if(l.isEmptyObject(n["@id"][0]||{})?d=!0:n["@id"].length>=0&&(d=n["@id"].includes(p[0])),!r.requireAll)return d}else if("@type"===u){if(o=!1,f){if(p.length>0)return!1;d=!0}else if(1===n["@type"].length&&l.isEmptyObject(n["@type"][0]))d=p.length>0;else for(const e of n["@type"])d=!(!l.isObject(e)||!("@default"in e))||(d||p.some(t=>t===e));if(!r.requireAll)return d}else{if(a(u))continue;{const t=c.getValues(n,u)[0];let i=!1;if(t&&(m([t]),i="@default"in t),o=!1,0===p.length&&i)continue;if(p.length>0&&f)return!1;if(void 0===t){if(p.length>0)return!1;d=!0}else if(s.isList(t)){const n=t["@list"][0];if(s.isList(p[0])){const t=p[0]["@list"];s.isValue(n)?d=t.some(e=>O(n,e)):(s.isSubject(n)||s.isSubjectReference(n))&&(d=t.some(t=>j(e,n,t,r)))}}else d=s.isValue(t)?p.some(e=>O(t,e)):s.isSubjectReference(t)?p.some(n=>j(e,t,n,r)):!!l.isObject(t)&&p.length>0}}if(!d&&r.requireAll)return!1;i=i||d}return o||i}function x(e,t){const n=e.uniqueEmbeds[e.graph],r=n[t],o=r.parent,i=r.property,a={"@id":t};if(l.isArray(o)){for(let e=0;e{const t=Object.keys(n);for(const r of t)r in n&&l.isObject(n[r].parent)&&n[r].parent["@id"]===e&&(delete n[r],s(r))};s(t)}function w(e,t,n){l.isObject(e)?c.addValue(e,t,n,{propertyIsArray:!0}):e.push(n)}function j(e,t,n,r){if(!("@id"in n))return!1;const o=e.subjects[n["@id"]];return o&&b(e,o,t,r)}function O(e,t){const n=t["@value"],r=t["@type"],o=t["@language"],i=e["@value"]?l.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],a=e["@type"]?l.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],s=e["@language"]?l.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===i.length&&0===a.length&&0===s.length||!(!i.includes(n)&&!l.isEmptyObject(i[0]))&&(!!(!r&&0===a.length||a.includes(r)||r&&l.isEmptyObject(a[0]))&&!!(!o&&0===s.length||s.includes(o)||o&&l.isEmptyObject(s[0])))}e.exports=h,h.frameMergedOrDefault=(e,t,n)=>{const r={options:n,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},o=new c.IdentifierIssuer("_:b");p(e,r.graphMap,"@default",o),n.merged&&(r.graphMap["@merged"]=f(r.graphMap),r.graph="@merged"),r.subjects=r.graphMap[r.graph];const i=[];return h.frame(r,Object.keys(r.subjects).sort(),t,i),n.pruneBlankNodeIdentifiers&&(n.bnodesToClear=Object.keys(r.bnodeMap).filter(e=>1===r.bnodeMap[e].length)),n.link={},function e(t,n){if(l.isArray(t))return t.map(t=>e(t,n));if(l.isObject(t)){if("@preserve"in t)return t["@preserve"][0];if(s.isValue(t))return t;if(s.isList(t))return t["@list"]=e(t["@list"],n),t;if("@id"in t){const e=t["@id"];if(n.link.hasOwnProperty(e)){const r=n.link[e].indexOf(t);if(-1!==r)return n.link[e][r];n.link[e].push(t)}else n.link[e]=[t]}for(const r in t)"@id"===r&&n.bnodesToClear.includes(t[r])?delete t["@id"]:t[r]=e(t[r],n)}return t}(i,n)},h.frame=(e,t,n,r,i=null)=>{m(n),n=n[0];const u=e.options,p={embed:y(n,u,"embed"),explicit:y(n,u,"explicit"),requireAll:y(n,u,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const f=e.link[e.graph],j=function(e,t,n,r){const o={};for(const i of t){const t=e.graphMap[e.graph][i];b(e,t,n,r)&&(o[i]=t)}return o}(e,t,n,p),I=Object.keys(j).sort();for(const m of I){const b=j[m];if(null===i?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===p.embed&&m in f){w(r,i,f[m]);continue}const I={"@id":m};if(0===m.indexOf("_:")&&c.addValue(e.bnodeMap,m,I,{propertyIsArray:!0}),f[m]=I,("@first"===p.embed||"@last"===p.embed)&&e.is11)throw new d("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:n});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(m))if(!e.embedded||"@never"!==p.embed&&!g(b,e.graph,e.subjectStack))if(!e.embedded||"@first"!=p.embed&&"@once"!=p.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(m)){if("@last"===p.embed&&m in e.uniqueEmbeds[e.graph]&&x(e,m),e.uniqueEmbeds[e.graph][m]={parent:r,property:i},e.subjectStack.push({subject:b,graph:e.graph}),m in e.graphMap){let t=!1,r=null;"@graph"in n?(r=n["@graph"][0],t=!("@merged"===m||"@default"===m),l.isObject(r)||(r={})):(t="@merged"!==e.graph,r={}),t&&h.frame(o(o({},e),{},{graph:m,embedded:!1}),Object.keys(e.graphMap[m]).sort(),[r],I,"@graph")}"@included"in n&&h.frame(o(o({},e),{},{embedded:!1}),t,n["@included"],I,"@included");for(const t of Object.keys(b).sort())if(a(t)){if(I[t]=c.clone(b[t]),"@type"===t)for(const t of b["@type"])0===t.indexOf("_:")&&c.addValue(e.bnodeMap,t,I,{propertyIsArray:!0})}else if(!p.explicit||t in n)for(const r of b[t]){const i=t in n?n[t]:v(p);if(s.isList(r)){const i=n[t]&&n[t][0]&&n[t][0]["@list"]?n[t][0]["@list"]:v(p),a={"@list":[]};w(I,t,a);const l=r["@list"];for(const t of l)s.isSubjectReference(t)?h.frame(o(o({},e),{},{embedded:!0}),[t["@id"]],i,a,"@list"):w(a,"@list",c.clone(t))}else s.isSubjectReference(r)?h.frame(o(o({},e),{},{embedded:!0}),[r["@id"]],i,I,t):O(i[0],r)&&w(I,t,c.clone(r))}for(const e of Object.keys(n).sort()){if("@type"===e){if(!l.isObject(n[e][0])||!("@default"in n[e][0]))continue}else if(a(e))continue;const t=n[e][0]||{};if(!y(t,u,"omitDefault")&&!(e in I)){let n="@null";"@default"in t&&(n=c.clone(t["@default"])),l.isArray(n)||(n=[n]),I[e]=[{"@preserve":n}]}}for(const t of Object.keys(n["@reverse"]||{}).sort()){const r=n["@reverse"][t];for(const n of Object.keys(e.subjects)){c.getValues(e.subjects[n],t).some(e=>e["@id"]===m)&&(I["@reverse"]=I["@reverse"]||{},c.addValue(I["@reverse"],t,[],{propertyIsArray:!0}),h.frame(o(o({},e),{},{embedded:!0}),[n],r,I["@reverse"][t],i))}}w(r,i,I),e.subjectStack.pop()}else w(r,i,I);else w(r,i,I)}},h.cleanupNull=(e,t)=>{if(l.isArray(e)){return e.map(e=>h.cleanupNull(e,t)).filter(e=>e)}if("@null"===e)return null;if(l.isObject(e)){if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const r=t.link[n].indexOf(e);if(-1!==r)return t.link[n][r];t.link[n].push(e)}else t.link[n]=[e]}for(const n in e)e[n]=h.cleanupNull(e[n],t)}return e}},353:function(e,t,n){"use strict";const r=n(220),{isArray:o,isObject:i,isString:a,isUndefined:s}=n(218),{isList:l,isValue:c,isGraph:u,isSimpleGraph:d,isSubjectReference:p}=n(222),{expandIri:f,getContextValue:h,isKeyword:v,process:g,processingMode:y}=n(227),{removeBase:m,prependBase:b}=n(224),{REGEX_KEYWORD:x,addValue:w,asArray:j,compareShortestLeast:O}=n(219),I={};function S(e,t,n){if("@nest"!==f(e,t,{vocab:!0},n))throw new r("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=I,I.compact=async({activeCtx:e,activeProperty:t=null,element:n,options:f={}})=>{if(o(n)){let r=[];for(let o=0;o1&&(N=Array.from(N).sort());const E=e;for(const t of N){const n=I.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),r=h(x,n,"@context");s(r)||(e=await g({activeCtx:e,localCtx:r,options:f,propagate:!1}))}const k=Object.keys(n).sort();for(const s of k){const p=n[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,t,p)}else{if(!o(p))throw new r("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===p.length){const t=I.compactIri({activeCtx:e,iri:s,value:p,relativeTo:{vocab:!0},reverse:m}),n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let r=b;n&&(S(e,n,f),i(b[n])||(b[n]={}),r=b[n]),w(r,t,p,{propertyIsArray:!0})}for(const t of p){const n=I.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:m}),r=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let p=b;r&&(S(e,r,f),i(b[r])||(b[r]={}),p=b[r]);const v=h(e,n,"@container")||[],g=u(t),y=l(t);let x;y?x=t["@list"]:g&&(x=t["@graph"]);let O=await I.compact({activeCtx:e,activeProperty:n,element:y||g?x:t,options:f});if(y){if(o(O)||(O=[O]),v.includes("@list")){w(p,n,O,{valueIsArray:!0,allowDuplicate:!0});continue}O={[I.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:O},"@index"in t&&(O[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&d(t))){let r;p.hasOwnProperty(n)?r=p[n]:p[n]=r={};const o=(v.includes("@id")?t["@id"]:t["@index"])||I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(r,o,O,{propertyIsArray:!f.compactArrays||v.includes("@set")})}else v.includes("@graph")&&d(t)?(o(O)&&O.length>1&&(O={"@included":O}),w(p,n,O,{propertyIsArray:!f.compactArrays||v.includes("@set")})):(o(O)&&1===O.length&&f.compactArrays&&(O=O[0]),O={[I.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:O},"@id"in t&&(O[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(O[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(p,n,O,{propertyIsArray:!f.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let r,o;if(p.hasOwnProperty(n)?r=p[n]:p[n]=r={},v.includes("@language"))c(O)&&(O=O["@value"]),o=t["@language"];else if(v.includes("@index")){const r=h(e,n,"@index")||"@index",i=I.compactIri({activeCtx:e,iri:r,relativeTo:{vocab:!0}});if("@index"===r)o=t["@index"],delete O[i];else{let e;if([o,...e]=j(O[r]||[]),a(o))switch(e.length){case 0:delete O[r];break;case 1:O[r]=e[0];break;default:O[r]=e}else o=null}}else if(v.includes("@id")){const t=I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});o=O[t],delete O[t]}else if(v.includes("@type")){const r=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let i;switch([o,...i]=j(O[r]||[]),i.length){case 0:delete O[r];break;case 1:O[r]=i[0];break;default:O[r]=i}1===Object.keys(O).length&&"@id"in t&&(O=await I.compact({activeCtx:e,activeProperty:n,element:{"@id":t["@id"]},options:f}))}o||(o=I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(r,o,O,{propertyIsArray:v.includes("@set")})}else{const e=!f.compactArrays||v.includes("@set")||v.includes("@list")||o(O)&&0===O.length||"@list"===s||"@graph"===s;w(p,n,O,{propertyIsArray:e})}}}else{if((h(e,t,"@container")||[]).includes("@index"))continue;const n=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,n,p)}else{const n=await I.compact({activeCtx:e,activeProperty:t,element:p,options:f});o(n)&&0===n.length||w(b,s,n)}else{const t=await I.compact({activeCtx:e,activeProperty:"@reverse",element:p,options:f});for(const n in t)if(e.mappings.has(n)&&e.mappings.get(n).reverse){const r=t[n],o=(h(e,n,"@container")||[]).includes("@set")||!f.compactArrays;w(b,n,r,{propertyIsArray:o}),delete t[n]}if(Object.keys(t).length>0){const n=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,n,t)}}else{let t=j(p).map(e=>I.compactIri({activeCtx:x,iri:e,relativeTo:{vocab:!0}}));1===t.length&&(t=t[0]);const n=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),r=(h(e,n,"@container")||[]).includes("@set")&&y(e,1.1)||o(t)&&0===p.length;w(b,n,t,{propertyIsArray:r})}else{let t=j(p).map(t=>I.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:f.base}));1===t.length&&(t=t[0]);b[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return b}return n},I.compactIri=({activeCtx:e,iri:t,value:n=null,relativeTo:o={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const d=e.getInverse();if(v(t)&&t in d&&"@none"in d[t]&&"@type"in d[t]["@none"]&&"@none"in d[t]["@none"]["@type"])return d[t]["@none"]["@type"]["@none"];if(o.vocab&&t in d){const r=e["@language"]||"@none",o=[];i(n)&&"@index"in n&&!("@graph"in n)&&o.push("@index","@index@set"),i(n)&&"@preserve"in n&&(n=n["@preserve"][0]),u(n)?("@index"in n&&o.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n&&o.push("@graph@id","@graph@id@set"),o.push("@graph","@graph@set","@set"),"@index"in n||o.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n||o.push("@graph@id","@graph@id@set")):i(n)&&!c(n)&&o.push("@id","@id@set","@type","@set@type");let s="@language",d="@null";if(a)s="@type",d="@reverse",o.push("@set");else if(l(n)){"@index"in n||o.push("@list");const e=n["@list"];if(0===e.length)s="@any",d="@none";else{let t=0===e.length?r:null,n=null;for(let r=0;re.includes("_"));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const l=e.inverse[t];for(const e of r){if(!(e in l))continue;const t=l[e][o];for(const e of s)if(e in t)return t[e]}return null}(e,t,n,o,s,d);if(null!==p)return p}if(o.vocab&&"@vocab"in e){const n=e["@vocab"];if(0===t.indexOf(n)&&t!==n){const r=t.substr(n.length);if(!e.mappings.has(r))return r}}let p=null;const f=[];let h=e.fastCurieMap;const g=t.length-1;for(let e=0;e=0;--r){const o=f[r],i=o.terms;for(const r of i){const i=r+":"+t.substr(o.iri.length);e.mappings.get(r)._prefix&&(!e.mappings.has(i)||null===n&&e.mappings.get(i)["@id"]===t)&&(null===p||O(i,p)<0)&&(p=i)}}if(null!==p)return p;for(const[n,o]of e.mappings)if(o&&o._prefix&&t.startsWith(n+":"))throw new r(`Absolute IRI "${t}" confused with prefix "${n}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!o.vocab){if("@base"in e){if(e["@base"]){const n=m(b(s,e["@base"]),t);return x.test(n)?"./"+n:n}return t}return m(s,t)}return t},I.compactValue=({activeCtx:e,activeProperty:t,value:n,options:r})=>{if(c(n)){const r=h(e,t,"@type"),o=h(e,t,"@language"),i=h(e,t,"@direction"),s=h(e,t,"@container")||[],l="@index"in n&&!s.includes("@index");if(!l&&"@none"!==r){if(n["@type"]===r)return n["@value"];if("@language"in n&&n["@language"]===o&&"@direction"in n&&n["@direction"]===i)return n["@value"];if("@language"in n&&n["@language"]===o)return n["@value"];if("@direction"in n&&n["@direction"]===i)return n["@value"]}const c=Object.keys(n).length,u=1===c||2===c&&"@index"in n&&!l,d="@language"in e,p=a(n["@value"]),f=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(u&&"@none"!==r&&(!d||!p||f))return n["@value"];const v={};return l&&(v[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=n["@index"]),"@type"in n?v[I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=I.compactIri({activeCtx:e,iri:n["@type"],relativeTo:{vocab:!0}}):"@language"in n&&(v[I.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=n["@language"]),"@direction"in n&&(v[I.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=n["@direction"]),v[I.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=n["@value"],v}const o=f(e,t,{vocab:!0},r),i=h(e,t,"@type"),s=I.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:"@vocab"===i},base:r.base});return"@id"===i||"@vocab"===i||"@graph"===o?s:{[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},354:function(e,t,n){"use strict";e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,n){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,n)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},381:function(e,t,n){"use strict";n.r(t);var r=n(221),o=n(335),i=n.n(o),a=n(26);function s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(s=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new s(e)}var l=async function(e){const t=[];var n,r=!0,o=!1;try{for(var i,a,l=function(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new s(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}(e);r=(i=await l.next()).done,a=await i.value,!r;r=!0){const e=a;t.push(e)}}catch(e){o=!0,n=e}finally{try{r||null==l.return||await l.return()}finally{if(o)throw n}}return t};class c extends a.Readable{constructor(e,{baseIRI:t,compact:n,context:r={},encoding:o="object",flatten:i,frame:a,prettyPrint:s,skipContext:l}={}){super({objectMode:!0,read:()=>{}}),this.compact=n,this.context=r,this.encoding=o,this.flatten=i,this.frame=a,this.prettyPrint=s,this.skipContext=l,t&&(this.context["@base"]=t.value||t.toString()),e.on("prefix",(e,t)=>{this.context[e]||(this.context[e]=t.value)}),this.handleData(e)}async handleData(e){try{const t=(await l(e)).map(c.toJsonldQuad),n=await i.a.fromRDF(t),r=await this.transform(n,this.options);this.push(r),this.push(null)}catch(e){this.emit("error",e)}}async transform(e){return this.compact&&(e=await i.a.compact(e,this.context)),this.flatten&&(e=await i.a.flatten(e,this.context)),this.frame&&(e=await i.a.frame(e,this.context)),this.skipContext&&e["@context"]&&delete e["@context"],"string"===this.encoding?this.prettyPrint?JSON.stringify(e,null,2):JSON.stringify(e):e}static toJsonldQuad(e){return{subject:c.toJsonldTerm(e.subject),predicate:c.toJsonldTerm(e.predicate),object:c.toJsonldTerm(e.object),graph:c.toJsonldTerm(e.graph)}}static toJsonldTerm(e){return"BlankNode"===e.termType?{termType:"BlankNode",value:"_:"+e.value}:e}}var u=c;class d extends r.a{constructor(e){super(u,e)}}t.default=d}}]); +//# sourceMappingURL=413f167fa27c82813743.js.map \ No newline at end of file diff --git a/converter/413f167fa27c82813743.js.LICENSE.txt b/converter/413f167fa27c82813743.js.LICENSE.txt new file mode 100644 index 00000000..3f6ab57b --- /dev/null +++ b/converter/413f167fa27c82813743.js.LICENSE.txt @@ -0,0 +1,50 @@ +/** + * A JavaScript implementation of the JSON-LD API. + * + * @author Dave Longley + * + * @license BSD 3-Clause License + * Copyright (c) 2011-2022 Digital Bazaar, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the Digital Bazaar, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Removes the @preserve keywords from expanded result of framing. + * + * @param input the framed, framed output. + * @param options the framing options used. + * + * @return the resulting output. + */ + +// disallow aliasing @context and @preserve + +// remove @preserve + +// remove @preserve from results diff --git a/converter/413f167fa27c82813743.js.map b/converter/413f167fa27c82813743.js.map new file mode 100644 index 00000000..9d72a4a4 --- /dev/null +++ b/converter/413f167fa27c82813743.js.map @@ -0,0 +1 @@ +{"version":3,"file":"413f167fa27c82813743.js","sources":["webpack:///413f167fa27c82813743.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/47b7fc5dc91d1aadb739.js b/converter/47b7fc5dc91d1aadb739.js new file mode 100644 index 00000000..ab85865a --- /dev/null +++ b/converter/47b7fc5dc91d1aadb739.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8,14,15,16,17],{242:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;te.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const u=r(43),o=r(243);class a extends o.Transform{static _flush_buffer(e){e._s_push&&(e.push(e._s_push),e._s_push="")}constructor(e={}){super({writableObjectMode:!0,readableObjectMode:!1});let{prefixes:t={}}=e;this._s_push="",this._n_max_buffer=e.max_buffer||e.maxBuffer||32768,this._h_prefixes=u.cache_prefixes(t||{}),this.on("pipe",e=>{e.on("prefix",(e,t)=>{this.write({type:"prefixes",value:{[e]:t}})}),e.on("comment",e=>{this.write({type:"comment",value:e})})}),e.close&&this.once("close",e.close),e.drain&&this.on("drain",e.drain),e.error&&this.on("error",e.error),e.finish&&this.once("finish",e.finish),e.data&&this.on("data",e.data),e.end&&this.once("end",e.end),e.warning&&this.on("warning",e.warning)}_serialize_hash_comment(e){return"# "+e.replace(/\n/g,"\n# ")+"\n"}_serialize_newlines(e=1){return"\n".repeat(e)}_serialize_c4r(e){let t=this._h_prefixes,r=[],i="";for(let t in e)"*"!==t&&r.push(t),i+=this._serialize_c3r(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>u.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return i}_serialize_c3(){throw new Error("Write event type 'c3' not supported by "+this.constructor.name)}_serialize_c4(){throw new Error("Write event type 'c4' not supported by "+this.constructor.name)}_serialize_c3r(){throw new Error("Write event type 'c3r' should have been implemented by subclass "+this.constructor.name)}_serialize_quad(){throw new Error("Write event type 'quad' should have been implemented by subclass "+this.constructor.name)}_serialize_comment(){}_update_prefixes(e,t=!1){let r=s(s({},this._h_prefixes),e);this._h_prefixes=u.cachePrefixes(r||{},t)}_transform(e,t,r){let i;try{i=this.serialize(e)}catch(e){return r(e),e}if(i)a._flush_buffer(this),this.push(i);else{let e=this._s_push.length;e>this._n_max_buffer?a._flush_buffer(this):e&&queueMicrotask(()=>a._flush_buffer(this))}r()}_queue(e){this._s_push+=e,this._s_push.length>this._n_max_buffer?a._flush_buffer(this):queueMicrotask(()=>a._flush_buffer(this))}serialize(e){switch(e.type){case void 0:return this._serialize_quad(e);case"c3r":return this._serialize_c3r(e.value);case"c4r":return this._serialize_c4r(e.value);case"array":{let t="";for(let r of e.value){let e=this.serialize(r);e?t+=e:this._s_push&&(t+=this._s_push,this._s_push="")}return t}case"quad":return this._serialize_quad(e.value);case"c3":return this._serialize_c3(e.value);case"c4":return this._serialize_c4(e.value);case"prefixes":return this._serialize_prefixes(e.value);case"comment":return this._serialize_comment(e.value);case"newline":case"newlines":return this._serialize_newlines(e.value);default:throw new Error(`no such writable data event type for RDF stream: '${e.type}'`)}}rinse(){this._reset(),a._flush_buffer(this)}_flush(){a._flush_buffer(this),this.push(null)}}Object.assign(a.prototype,{isGraphyWritable:!0,_serialize_prefixes:a.prototype._update_prefixes}),e.exports=a},244:function(e,t){},245:function(e,t){},374:function(e,t,r){const i=r(43),s=r(242),{c1:n,namedNode:u,$_PREFIX_CACHE:o}=i,a=/[&"<>']/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},_=/^xml/i,f=e=>e.replace(a,e=>l[e]),h=/([A-Za-z_][A-Za-z_.0-9-]*)$/,p=/([A-Za-z_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}][A-Za-z_.0-9\-\u00b7\u203f-\u2040\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*$)/u;function c(e,t,r,i){if(i.isNamedNode)r+=' rdf:resource="'+f(i.value)+'"/>';else if(i.isLiteral)i.isLanguaged?r+=' xml:lang="'+i.language+'"':i.isDatatyped&&(r+=' rdf:datatype="'+f(i.datatype.value)+'"'),r+=">"+f(i.value)+"";else{if(!i.isBlankNode)throw new Error(`Not allowed to serialize term type '${i.termType}' as object in XML serializer.`);r+=' rdf:nodeID="'+f(i.value)+'"/>'}return r}function d(e,t){let r,i,s,n,u=e._h_prefixes,a=t.value;{let e=h.exec(a);if(e)r=a.slice(0,e.index),i=e[1];else{if(e=p.exec(a),!e)throw new Error(`Cannot serialize predicate <${a}> into an XML qname`);r=a.slice(0,e.index),i=e[1]}}e:for(;;){t:for(;;){if(u[o]){let e=u[o]._h_inverse;if(r in e){let t=e[r];s=(t?t+":":"")+i,n="<"+s;break e}break}for(let e in u){if(u[e]===r){s=(e?e+":":"")+i,n="<"+s;break t}}break}let t="__g"+e._c_prefixes_tmp++;s=t+":"+i,n="<"+s+" xmlns:"+t+'="'+r+'"';break}return[s,n]}class b extends s{constructor(e={}){let t=e.prefixes;delete e.prefixes,super(e),this._b_prefixes_open=!0,this._c_prefixes_tmp=0,this._kt_subject=null;let r='\n to <${e[s]}>`)}else{if(_.test(s))throw new Error(`Cannot serialize prefix '${s}' since it is reserved under the blanket XML namespace.`);i+=`\n\txmlns${s?":"+s:""}="${u(e[s]).value}"`}return i&&this._update_prefixes(e,!0),i}_serialize_c3r(e){let t="";this._b_prefixes_open&&(t+=">",this._b_prefixes_open=!1);let r=this._h_prefixes;null!==this._kt_subject&&(t+="\n\t",this._kt_subject=null);for(let i in e){let s="",u=n(i,r);if(!u.termType)continue;if(!u.isNamedNode&&!u.isBlankNode)throw new Error(`Cannot use ${u.termType} term type in subject position`);if(u.isNamedNode)s+='\n\n\t';else{if(!u.isBlankNode)throw new Error(`Not allowed to serialize term type '${u.termType}' as subject in XML serializer.`);s+='\n\n\t'}let o=!1,a=e[i];for(let e in a){let t=n(e,r);if(!t.termType)continue;if(!t.isNamedNode)throw new Error(`Cannot use ${t.termType} term type in subject position`);let[i,u]=d(this,t),l="";for(let t of a[e]){let e=n(t,r);e.termType&&(l+="\n\t\t"+c(0,i,u,e))}l&&(s+=l,o=!0)}o&&(t+=s+"\n\t")}return t}_serialize_quad(e){let t=i.from.quad(e);this._b_prefixes_open&&(this._s_push+=">",this._b_prefixes_open=!1);let{subject:r,predicate:s,object:n}=t,[u,o]=d(this,s),a="\n\t\t"+c(0,u,o,n);if(r.equals(this._kt_subject))this._s_push+=a;else{if(!r.isNamedNode&&!r.isBlankNode)throw new Error(`Cannot use ${r.termType} term type in subject position`);let e;if(r.isNamedNode)e='\n\n\t'+a;else{if(!r.isBlankNode)throw new Error(`Not allowed to serialize term type '${r.termType}' as subject in XML serializer.`);e='\n\n\t'+a}this._kt_subject?this._s_push+="\n\t"+e:this._s_push+=e,this._kt_subject=r}}_flush(){b._flush_buffer(this),this._b_prefixes_open&&(this.push(">"),this._b_prefixes_open=!1),this._kt_subject?this.push("\n\t\n\n"):this.push("\n\n"),this.push(null)}}Object.assign(b,{_serialize_comment:s.prototype._serialize_hash_comment}),e.exports=function(e){return new b(e)}}}]); +//# sourceMappingURL=47b7fc5dc91d1aadb739.js.map \ No newline at end of file diff --git a/converter/47b7fc5dc91d1aadb739.js.map b/converter/47b7fc5dc91d1aadb739.js.map new file mode 100644 index 00000000..e417afef --- /dev/null +++ b/converter/47b7fc5dc91d1aadb739.js.map @@ -0,0 +1 @@ +{"version":3,"file":"47b7fc5dc91d1aadb739.js","sources":["webpack:///47b7fc5dc91d1aadb739.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/74a0d36eb8170ad36fd0.js b/converter/74a0d36eb8170ad36fd0.js new file mode 100644 index 00000000..364b8a2b --- /dev/null +++ b/converter/74a0d36eb8170ad36fd0.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{230:function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},231:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(283),a=n(287);n(0)(u,i);for(var o=r(a.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},233:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(290),a=n(294);n(0)(u,i);for(var o=r(a.prototype),s=0;s0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?S(e,new m):M(e,o,t,!0);else if(o.ended)S(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?M(e,o,t,!1):j(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,j(e,o));return!o.ended&&(o.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(x,e))}function x(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function q(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):L(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new v("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==q(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===a(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},288:function(e,t,n){"use strict";e.exports=d;var r=n(230).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(231);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?S(e,new m):M(e,o,t,!0);else if(o.ended)S(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?M(e,o,t,!1):j(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,j(e,o));return!o.ended&&(o.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(x,e))}function x(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function q(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):L(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new v("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==q(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===a(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},295:function(e,t,n){"use strict";e.exports=d;var r=n(232).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(233);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{this.push(r.from(this._str,this._encoding)),this.push(null)}),this.ended=!0)}}}).call(this,n(4),n(2).Buffer)},356:function(e,t,n){(t=e.exports=n(283)).Stream=t,t.Readable=t,t.Writable=n(287),t.Duplex=n(231),t.Transform=n(288),t.PassThrough=n(362),t.finished=n(261),t.pipeline=n(363)},358:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&o.forEach(u),a||(o.forEach(u),i(r))}))}));return t.reduce(d)}},365:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&o.forEach(u),a||(o.forEach(u),i(r))}))}));return t.reduce(d)}}}]); +//# sourceMappingURL=74a0d36eb8170ad36fd0.js.map \ No newline at end of file diff --git a/converter/74a0d36eb8170ad36fd0.js.map b/converter/74a0d36eb8170ad36fd0.js.map new file mode 100644 index 00000000..71395950 --- /dev/null +++ b/converter/74a0d36eb8170ad36fd0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"74a0d36eb8170ad36fd0.js","sources":["webpack:///74a0d36eb8170ad36fd0.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/78333c9878ed6ee78e1b.js b/converter/78333c9878ed6ee78e1b.js new file mode 100644 index 00000000..1dc64516 --- /dev/null +++ b/converter/78333c9878ed6ee78e1b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{340:function(n,w){}}]); +//# sourceMappingURL=78333c9878ed6ee78e1b.js.map \ No newline at end of file diff --git a/converter/78333c9878ed6ee78e1b.js.map b/converter/78333c9878ed6ee78e1b.js.map new file mode 100644 index 00000000..4127b522 --- /dev/null +++ b/converter/78333c9878ed6ee78e1b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"78333c9878ed6ee78e1b.js","sources":["webpack:///78333c9878ed6ee78e1b.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/98a0f39ba08a3e1a741b.js b/converter/98a0f39ba08a3e1a741b.js new file mode 100644 index 00000000..ab1c8d29 --- /dev/null +++ b/converter/98a0f39ba08a3e1a741b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15,14,16,17],{244:function(n,o){},245:function(n,o){}}]); +//# sourceMappingURL=98a0f39ba08a3e1a741b.js.map \ No newline at end of file diff --git a/converter/98a0f39ba08a3e1a741b.js.map b/converter/98a0f39ba08a3e1a741b.js.map new file mode 100644 index 00000000..8ec9dcbb --- /dev/null +++ b/converter/98a0f39ba08a3e1a741b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"98a0f39ba08a3e1a741b.js","sources":["webpack:///98a0f39ba08a3e1a741b.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/a9fc8bb7b651bd49fb44.js b/converter/a9fc8bb7b651bd49fb44.js new file mode 100644 index 00000000..40cd51ea --- /dev/null +++ b/converter/a9fc8bb7b651bd49fb44.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{221:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t{r.readable||r.emit("end")}),e.on("error",e=>{r.emit("error",e)}),r}}},380:function(e,t,r){"use strict";r.r(t);var n=r(221),o=r(26);var i=class{constructor(e){this.stream=e,this.array=[]}push(e){this.array.push(e)}end(){this.stream.push(this.array),this.stream.push(null)}};var s=class{constructor(e){this.stream=e,this.first=!0,this.stream.push("[")}push(e){this.first?this.first=!1:this.stream.push(","),this.stream.push(JSON.stringify(e))}end(){this.stream.push("]"),this.stream.push(null)}};class a extends o.Readable{constructor(e,{encoding:t="object"}={}){if(super({objectMode:!0,read:()=>{}}),"object"===t&&(this.encoder=new i(this)),"string"===t&&(this.encoder=new s(this)),!this.encoder)throw new Error("unknown encoding: "+t);e.on("data",e=>{const t={};let r=t;"DefaultGraph"!==e.graph.termType&&(t["@id"]=e.graph.value,t["@graph"]={},r=t["@graph"]),r["@id"]=a.subjectValue(e.subject),"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===e.predicate.value?r["@type"]=a.subjectValue(e.object):r[e.predicate.value]=a.objectValue(e.object),this.encoder.push(t)}),e.on("end",()=>this.encoder.end()),e.on("error",e=>this.emit("error",e))}static subjectValue(e){return"BlankNode"===e.termType?"_:"+e.value:e.value}static objectValue(e){return"NamedNode"===e.termType?{"@id":e.value}:"BlankNode"===e.termType?{"@id":"_:"+e.value}:e.language?{"@language":e.language,"@value":e.value}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{"@type":e.datatype.value,"@value":e.value}:e.value}}var u=a;class c extends n.a{constructor(e){super(u,e)}}var p=c;function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;te.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const o=r(43),c=r(243);class a extends c.Transform{static _flush_buffer(e){e._s_push&&(e.push(e._s_push),e._s_push="")}constructor(e={}){super({writableObjectMode:!0,readableObjectMode:!1});let{prefixes:t={}}=e;this._s_push="",this._n_max_buffer=e.max_buffer||e.maxBuffer||32768,this._h_prefixes=o.cache_prefixes(t||{}),this.on("pipe",e=>{e.on("prefix",(e,t)=>{this.write({type:"prefixes",value:{[e]:t}})}),e.on("comment",e=>{this.write({type:"comment",value:e})})}),e.close&&this.once("close",e.close),e.drain&&this.on("drain",e.drain),e.error&&this.on("error",e.error),e.finish&&this.once("finish",e.finish),e.data&&this.on("data",e.data),e.end&&this.once("end",e.end),e.warning&&this.on("warning",e.warning)}_serialize_hash_comment(e){return"# "+e.replace(/\n/g,"\n# ")+"\n"}_serialize_newlines(e=1){return"\n".repeat(e)}_serialize_c4r(e){let t=this._h_prefixes,r=[],i="";for(let t in e)"*"!==t&&r.push(t),i+=this._serialize_c3r(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>o.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return i}_serialize_c3(){throw new Error("Write event type 'c3' not supported by "+this.constructor.name)}_serialize_c4(){throw new Error("Write event type 'c4' not supported by "+this.constructor.name)}_serialize_c3r(){throw new Error("Write event type 'c3r' should have been implemented by subclass "+this.constructor.name)}_serialize_quad(){throw new Error("Write event type 'quad' should have been implemented by subclass "+this.constructor.name)}_serialize_comment(){}_update_prefixes(e,t=!1){let r=s(s({},this._h_prefixes),e);this._h_prefixes=o.cachePrefixes(r||{},t)}_transform(e,t,r){let i;try{i=this.serialize(e)}catch(e){return r(e),e}if(i)a._flush_buffer(this),this.push(i);else{let e=this._s_push.length;e>this._n_max_buffer?a._flush_buffer(this):e&&queueMicrotask(()=>a._flush_buffer(this))}r()}_queue(e){this._s_push+=e,this._s_push.length>this._n_max_buffer?a._flush_buffer(this):queueMicrotask(()=>a._flush_buffer(this))}serialize(e){switch(e.type){case void 0:return this._serialize_quad(e);case"c3r":return this._serialize_c3r(e.value);case"c4r":return this._serialize_c4r(e.value);case"array":{let t="";for(let r of e.value){let e=this.serialize(r);e?t+=e:this._s_push&&(t+=this._s_push,this._s_push="")}return t}case"quad":return this._serialize_quad(e.value);case"c3":return this._serialize_c3(e.value);case"c4":return this._serialize_c4(e.value);case"prefixes":return this._serialize_prefixes(e.value);case"comment":return this._serialize_comment(e.value);case"newline":case"newlines":return this._serialize_newlines(e.value);default:throw new Error(`no such writable data event type for RDF stream: '${e.type}'`)}}rinse(){this._reset(),a._flush_buffer(this)}_flush(){a._flush_buffer(this),this.push(null)}}Object.assign(a.prototype,{isGraphyWritable:!0,_serialize_prefixes:a.prototype._update_prefixes}),e.exports=a},255:function(e,t,r){const i=r(43),s=r(242),n=/^`\[[^\]]+\](.*)$/,o=new Map([[Date,e=>i.dateTime(e)],[Number,e=>i.number(e)]]);e.exports=class extends s{constructor(e={}){super(e);let{lists:t=null}=e,r=o;if(e.coercions){r=new Map(r);for(let[t,i]of e.coercions)r.set(t,i)}let i={first:">http://www.w3.org/1999/02/22-rdf-syntax-ns#first",rest:">http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",nil:">http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};if(t){let{first:e=null,rest:r=null,nil:s=null}=t;e&&(i.first=e),r&&(i.rest=r),s&&(i.nil=s)}Object.assign(this,{_xc_state:0,_hm_coercions:r,_g_lists:i})}_serialize_comment(e,t){let r="";if(2!==this._xc_state&&(r+="\n",this._xc_state=2),t&&t.width){let r=t.width,i=[];for(;e.length>r;){let t=e.slice(0,r+1),s=/^(.*[^\s])\s+/.exec(t);if(s){let t=s[1];i.push(t),e=e.slice(t.length).replace(/^\s+/,"")}else i.push(e.slice(0,r)),e=e.slice(r)}e=i.join("\n")}return r+(super._serialize_comment(e)||"")}_transcode_list(e,t=this._g_lists){if(e.length){let r=e[0],i=r;return Array.isArray(r)&&(i=this._transcode_list(r,t)),{[t.first]:i,[t.rest]:1===e.length?t.nil:this._transcode_list(e.slice(1),t)}}return t.nil}_apply_directive(e,t){let r,i=n.exec(e);if(!i)throw new Error(`Invalid writable data event directive string: "${e}"`);try{r=JSON.parse(i[1])}catch(e){throw new Error(`Unable to parse JSON in writable data event directive: "${i[1]}"`)}let s=r.type;switch(s){case"comment":if(this._serialize_comment)return{write:this._serialize_comment(t+"",r)};break;case"newlines":if(this._serialize_newlines)return{write:this._serialize_newlines(t)};break;case"config":switch(r.value){case"lists":{let e=this._a_list_serializers;e.push(this._serialize_list_object);let r=this._g_lists,i={first:t.first||r.first,rest:t.rest||r.rest,nil:t.nil||r.nil};return this._serialize_list_object=function(e,t){let r=this._transcode_list(e,i);return this._encode_objects(r,t)},{exit:()=>{this._serialize_list_object=e.pop()}}}default:throw new Error(`No such config key '${r.value}'`)}default:throw new Error(`Invalid writable data event directive type: '${s}'`)}return{}}_serialize_c4(e){let t=this._h_prefixes,r=[],s="";for(let t in e)"*"!==t&&r.push(t),s+=this._serialize_c3(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>i.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return s}}},373:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}if("function"!=typeof queueMicrotask){let e=Promise.resolve();try{queueMicrotask=t=>e.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const n=r(43),o=r(255),c=/^([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}]([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.]*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?)?$/u;class a extends o{constructor(e={}){super(e);let{prefixes:t={},lists:r=null,debug:i=!1,style:s=null}=e;if(Object.assign(this,{_b_debug:i,_s_indent:"\t",_b_simplify_default_graph:!1,_xc_directives:0,_s_token_prefix:"@prefix"}),s){s.indent&&(this._s_indent=s.indent.replace(/[^\s]/g,""));let e=s.directives||s.directives;if(e)switch(e){case"sparql":this._xc_directives=1,this._s_token_prefix="prefix";break;case"Sparql":this._xc_directives=3,this._s_token_prefix="Prefix";break;case"SPARQL":this._xc_directives=5,this._s_token_prefix="PREFIX";break;case"turtle":break;case"Turtle":this._xc_directives=2,this._s_token_prefix="@Prefix";break;case"TURTLE":this._xc_directives=4,this._s_token_prefix="@PREFIX";break;default:throw new Error("Value not understood for 'directives' option: "+e)}}r&&(this._serialize_list_object=function(e,t){let r=this._transcode_list(e);return this._encode_objects(r,t)});let o=this._s_token_prefix,a=1&this._xc_directives?"\n":" .\n",u="";try{for(let e in t){if(!c.test(e))throw new Error(`Invlalid prefix id for text/turtle RDF serialization format: '${e}'`);u+=`${o} ${e}: ${n.namedNode(t[e]).verbose()}${a}`}}catch(e){queueMicrotask(()=>{this.emit("error",e)})}u&&this.push(u)}_serialize_prefixes(e){let t=2===this._xc_state?"\n\n":"";this._xc_state=0,this._h_prefixes=function(e){for(var t=1;t{r.readable||r.emit("end")}),t.on("error",t=>{r.emit("error",t)}),r}}},234:function(t,e,r){"use strict";const n=new Set(["_write","_writableState","writable"]);e.a=function(t){return new Proxy(t,{has(t,e){return!n.has(e)&&Reflect.has(...arguments)},get(t,e){if(n.has(e))return;const r=Reflect.get(...arguments);return r&&"function"==typeof r.bind?r.bind(t):r},set(t,e,r){if(!n.has(e))return Reflect.set(...arguments)}})}},383:function(t,e,r){"use strict";r.r(e);var n=r(221),o=r(34),i=r.n(o),c=r(234),s=r(26);var u=class{constructor(t){const e=new s.Transform({objectMode:!0,transform:(t,e,r)=>{r(null,i()(t)+"\n")}});return t.pipe(e),Object(c.a)(e)}};class a extends n.a{constructor(){super(u)}}e.default=a}}]); +//# sourceMappingURL=d201d166f422ad178128.js.map \ No newline at end of file diff --git a/converter/d201d166f422ad178128.js.map b/converter/d201d166f422ad178128.js.map new file mode 100644 index 00000000..6f04143d --- /dev/null +++ b/converter/d201d166f422ad178128.js.map @@ -0,0 +1 @@ +{"version":3,"file":"d201d166f422ad178128.js","sources":["webpack:///d201d166f422ad178128.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/de4dda2facc175d66bb6.js b/converter/de4dda2facc175d66bb6.js new file mode 100644 index 00000000..401051a3 --- /dev/null +++ b/converter/de4dda2facc175d66bb6.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{357:function(n,t){},359:function(n,t){},364:function(n,t){},366:function(n,t){},378:function(n,t,o){"use strict";o.r(t),o.d(t,"toStream",(function(){return i}));var c=o(355),u=o.n(c),e=o(289);o.d(t,"Readable",(function(){return e.Readable}));const i=u.a}}]); +//# sourceMappingURL=de4dda2facc175d66bb6.js.map \ No newline at end of file diff --git a/converter/de4dda2facc175d66bb6.js.map b/converter/de4dda2facc175d66bb6.js.map new file mode 100644 index 00000000..aabf8d45 --- /dev/null +++ b/converter/de4dda2facc175d66bb6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"de4dda2facc175d66bb6.js","sources":["webpack:///de4dda2facc175d66bb6.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/e37acd904efbb43aa96a.js b/converter/e37acd904efbb43aa96a.js new file mode 100644 index 00000000..8f35b20c --- /dev/null +++ b/converter/e37acd904efbb43aa96a.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{242:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;te.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const o=r(43),a=r(243);class l extends a.Transform{static _flush_buffer(e){e._s_push&&(e.push(e._s_push),e._s_push="")}constructor(e={}){super({writableObjectMode:!0,readableObjectMode:!1});let{prefixes:t={}}=e;this._s_push="",this._n_max_buffer=e.max_buffer||e.maxBuffer||32768,this._h_prefixes=o.cache_prefixes(t||{}),this.on("pipe",e=>{e.on("prefix",(e,t)=>{this.write({type:"prefixes",value:{[e]:t}})}),e.on("comment",e=>{this.write({type:"comment",value:e})})}),e.close&&this.once("close",e.close),e.drain&&this.on("drain",e.drain),e.error&&this.on("error",e.error),e.finish&&this.once("finish",e.finish),e.data&&this.on("data",e.data),e.end&&this.once("end",e.end),e.warning&&this.on("warning",e.warning)}_serialize_hash_comment(e){return"# "+e.replace(/\n/g,"\n# ")+"\n"}_serialize_newlines(e=1){return"\n".repeat(e)}_serialize_c4r(e){let t=this._h_prefixes,r=[],i="";for(let t in e)"*"!==t&&r.push(t),i+=this._serialize_c3r(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>o.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return i}_serialize_c3(){throw new Error("Write event type 'c3' not supported by "+this.constructor.name)}_serialize_c4(){throw new Error("Write event type 'c4' not supported by "+this.constructor.name)}_serialize_c3r(){throw new Error("Write event type 'c3r' should have been implemented by subclass "+this.constructor.name)}_serialize_quad(){throw new Error("Write event type 'quad' should have been implemented by subclass "+this.constructor.name)}_serialize_comment(){}_update_prefixes(e,t=!1){let r=s(s({},this._h_prefixes),e);this._h_prefixes=o.cachePrefixes(r||{},t)}_transform(e,t,r){let i;try{i=this.serialize(e)}catch(e){return r(e),e}if(i)l._flush_buffer(this),this.push(i);else{let e=this._s_push.length;e>this._n_max_buffer?l._flush_buffer(this):e&&queueMicrotask(()=>l._flush_buffer(this))}r()}_queue(e){this._s_push+=e,this._s_push.length>this._n_max_buffer?l._flush_buffer(this):queueMicrotask(()=>l._flush_buffer(this))}serialize(e){switch(e.type){case void 0:return this._serialize_quad(e);case"c3r":return this._serialize_c3r(e.value);case"c4r":return this._serialize_c4r(e.value);case"array":{let t="";for(let r of e.value){let e=this.serialize(r);e?t+=e:this._s_push&&(t+=this._s_push,this._s_push="")}return t}case"quad":return this._serialize_quad(e.value);case"c3":return this._serialize_c3(e.value);case"c4":return this._serialize_c4(e.value);case"prefixes":return this._serialize_prefixes(e.value);case"comment":return this._serialize_comment(e.value);case"newline":case"newlines":return this._serialize_newlines(e.value);default:throw new Error(`no such writable data event type for RDF stream: '${e.type}'`)}}rinse(){this._reset(),l._flush_buffer(this)}_flush(){l._flush_buffer(this),this.push(null)}}Object.assign(l.prototype,{isGraphyWritable:!0,_serialize_prefixes:l.prototype._update_prefixes}),e.exports=l},255:function(e,t,r){const i=r(43),s=r(242),n=/^`\[[^\]]+\](.*)$/,o=new Map([[Date,e=>i.dateTime(e)],[Number,e=>i.number(e)]]);e.exports=class extends s{constructor(e={}){super(e);let{lists:t=null}=e,r=o;if(e.coercions){r=new Map(r);for(let[t,i]of e.coercions)r.set(t,i)}let i={first:">http://www.w3.org/1999/02/22-rdf-syntax-ns#first",rest:">http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",nil:">http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};if(t){let{first:e=null,rest:r=null,nil:s=null}=t;e&&(i.first=e),r&&(i.rest=r),s&&(i.nil=s)}Object.assign(this,{_xc_state:0,_hm_coercions:r,_g_lists:i})}_serialize_comment(e,t){let r="";if(2!==this._xc_state&&(r+="\n",this._xc_state=2),t&&t.width){let r=t.width,i=[];for(;e.length>r;){let t=e.slice(0,r+1),s=/^(.*[^\s])\s+/.exec(t);if(s){let t=s[1];i.push(t),e=e.slice(t.length).replace(/^\s+/,"")}else i.push(e.slice(0,r)),e=e.slice(r)}e=i.join("\n")}return r+(super._serialize_comment(e)||"")}_transcode_list(e,t=this._g_lists){if(e.length){let r=e[0],i=r;return Array.isArray(r)&&(i=this._transcode_list(r,t)),{[t.first]:i,[t.rest]:1===e.length?t.nil:this._transcode_list(e.slice(1),t)}}return t.nil}_apply_directive(e,t){let r,i=n.exec(e);if(!i)throw new Error(`Invalid writable data event directive string: "${e}"`);try{r=JSON.parse(i[1])}catch(e){throw new Error(`Unable to parse JSON in writable data event directive: "${i[1]}"`)}let s=r.type;switch(s){case"comment":if(this._serialize_comment)return{write:this._serialize_comment(t+"",r)};break;case"newlines":if(this._serialize_newlines)return{write:this._serialize_newlines(t)};break;case"config":switch(r.value){case"lists":{let e=this._a_list_serializers;e.push(this._serialize_list_object);let r=this._g_lists,i={first:t.first||r.first,rest:t.rest||r.rest,nil:t.nil||r.nil};return this._serialize_list_object=function(e,t){let r=this._transcode_list(e,i);return this._encode_objects(r,t)},{exit:()=>{this._serialize_list_object=e.pop()}}}default:throw new Error(`No such config key '${r.value}'`)}default:throw new Error(`Invalid writable data event directive type: '${s}'`)}return{}}_serialize_c4(e){let t=this._h_prefixes,r=[],s="";for(let t in e)"*"!==t&&r.push(t),s+=this._serialize_c3(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>i.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return s}}},375:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}if("function"!=typeof queueMicrotask){let e=Promise.resolve();try{queueMicrotask=t=>e.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const n=r(43),o=r(255),a=/^([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}]([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.]*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?)?$/u;class l extends o{constructor(e={}){super(e);let{prefixes:t={},lists:r=null,debug:i=!1,style:s=null}=e;Object.assign(this,{_b_debug:i,_s_indent:"\t",_b_simplify_default_graph:!1,_xc_directives:0,_s_token_prefix:"@prefix"});let o="";if(s){let e=s.graph_keyword||s.graphKeyword||s["graph-keyword"];if(e)if(!0===e)o="GRAPH ";else{if("string"!=typeof e)throw new TypeError("Invalid argument type given for 'graph' token: "+e);if(!/^graph$/i.test(e))throw new Error(`Graph token must equal case-insensitive "GRAPH"; found: "${e}"`);o=e+" "}let t=s.simplify_default_graph||s.simplifyDefaultGraph||s["simplify-default-graph"];t&&(this._b_simplify_default_graph=!!t),s.indent&&(this._s_indent=s.indent.replace(/[^\s]/g,""));let r=s.directives||s.directives;if(r)switch(r){case"sparql":this._xc_directives=1,this._s_token_prefix="prefix";break;case"Sparql":this._xc_directives=3,this._s_token_prefix="Prefix";break;case"SPARQL":this._xc_directives=5,this._s_token_prefix="PREFIX";break;case"turtle":break;case"Turtle":this._xc_directives=2,this._s_token_prefix="@Prefix";break;case"TURTLE":this._xc_directives=4,this._s_token_prefix="@PREFIX";break;default:throw new Error("Value not understood for 'directives' option: "+r)}}this._s_graph_keyword=o,r&&(this._serialize_list_object=function(e,t){let r=this._transcode_list(e);return this._encode_objects(r,t)});let l=this._s_token_prefix,c=1&this._xc_directives?"\n":" .\n",_="";try{for(let e in t){if(!a.test(e))throw new Error(`Invlalid prefix id for application/trig RDF serialization format: '${e}'`);_+=`${l} ${e}: ${n.namedNode(t[e]).verbose()}${c}`}}catch(e){queueMicrotask(()=>{this.emit("error",e)})}_&&this.push(_)}_serialize_prefixes(e){let t=2===this._xc_state?"\n\n":"";this._xc_state=0,this._h_prefixes=function(e){for(var t=1;t1){e[0]=e[0].slice(0,-1);for(var i=e.length-1,r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function x(t){throw new RangeError(f[t])}function b(t,e){var s=t.split("@"),i="";s.length>1&&(i=s[0]+"@",t=s[1]);var r=function(t,e){for(var s=[],i=t.length;i--;)s[i]=e(t[i]);return s}((t=t.replace(u,".")).split("."),e).join(".");return i+r}function m(t){for(var e=[],s=0,i=t.length;s=55296&&r<=56319&&s>1,t+=d(t/e);t>455;i+=36)t=d(t/35);return d(i+36*t/(t+38))},I=function(t){var e,s=[],i=t.length,r=0,n=128,a=72,_=t.lastIndexOf("-");_<0&&(_=0);for(var h=0;h<_;++h)t.charCodeAt(h)>=128&&x("not-basic"),s.push(t.charCodeAt(h));for(var o=_>0?_+1:0;o=i&&x("invalid-input");var p=(e=t.charCodeAt(o++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36;(p>=36||p>d((l-r)/u))&&x("overflow"),r+=p*u;var b=f<=a?1:f>=a+26?26:f-a;if(pd(l/m)&&x("overflow"),u*=m}var g=s.length+1;a=k(r-c,g,0==c),d(r/g)>l-n&&x("overflow"),n+=d(r/g),r%=g,s.splice(r++,0,n)}return String.fromCodePoint.apply(String,s)},y=function(t){var e=[],s=(t=m(t)).length,i=128,r=0,n=72,a=!0,_=!1,h=void 0;try{for(var o,c=t[Symbol.iterator]();!(a=(o=c.next()).done);a=!0){var u=o.value;u<128&&e.push(p(u))}}catch(t){_=!0,h=t}finally{try{!a&&c.return&&c.return()}finally{if(_)throw h}}var f=e.length,b=f;for(f&&e.push("-");b=i&&Ad((l-r)/C)&&x("overflow"),r+=(I-i)*C,i=I;var S=!0,$=!1,F=void 0;try{for(var O,R=t[Symbol.iterator]();!(S=(O=R.next()).done);S=!0){var D=O.value;if(Dl&&x("overflow"),D==i){for(var N=r,T=36;;T+=36){var U=T<=n?1:T>=n+26?26:T-n;if(N>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function A(t){for(var e="",s=0,i=t.length;s=194&&r<224){if(i-s>=6){var n=parseInt(t.substr(s+4,2),16);e+=String.fromCharCode((31&r)<<6|63&n)}else e+=t.substr(s,6);s+=6}else if(r>=224){if(i-s>=9){var a=parseInt(t.substr(s+4,2),16),_=parseInt(t.substr(s+7,2),16);e+=String.fromCharCode((15&r)<<12|(63&a)<<6|63&_)}else e+=t.substr(s,9);s+=9}else e+=t.substr(s,3),s+=3}return e}function C(t,e){function s(t){var s=A(t);return s.match(e.UNRESERVED)?s:t}return t.scheme&&(t.scheme=String(t.scheme).replace(e.PCT_ENCODED,s).toLowerCase().replace(e.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(e.PCT_ENCODED,s).replace(e.NOT_USERINFO,E).replace(e.PCT_ENCODED,r)),void 0!==t.host&&(t.host=String(t.host).replace(e.PCT_ENCODED,s).toLowerCase().replace(e.NOT_HOST,E).replace(e.PCT_ENCODED,r)),void 0!==t.path&&(t.path=String(t.path).replace(e.PCT_ENCODED,s).replace(t.scheme?e.NOT_PATH:e.NOT_PATH_NOSCHEME,E).replace(e.PCT_ENCODED,r)),void 0!==t.query&&(t.query=String(t.query).replace(e.PCT_ENCODED,s).replace(e.NOT_QUERY,E).replace(e.PCT_ENCODED,r)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(e.PCT_ENCODED,s).replace(e.NOT_FRAGMENT,E).replace(e.PCT_ENCODED,r)),t}function S(t){return t.replace(/^0*(.*)/,"$1")||"0"}function $(t,e){var s=t.match(e.IPV4ADDRESS)||[],i=h(s,2)[1];return i?i.split(".").map(S).join("."):t}function F(t,e){var s=t.match(e.IPV6ADDRESS)||[],i=h(s,3),r=i[1],n=i[2];if(r){for(var a=r.toLowerCase().split("::").reverse(),_=h(a,2),l=_[0],o=_[1],c=o?o.split(":").map(S):[],u=l.split(":").map(S),f=e.IPV4ADDRESS.test(u[u.length-1]),d=f?7:8,p=u.length-d,x=Array(d),b=0;b1){var k=x.slice(0,m.index),I=x.slice(m.index+m.length);g=k.join(":")+"::"+I.join(":")}else g=x.join(":");return n&&(g+="%"+n),g}return t}var O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,R=void 0==="".match(/(){0}/)[1];function D(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s={},i=!1!==e.iri?_:a;"suffix"===e.reference&&(t=(e.scheme?e.scheme+":":"")+"//"+t);var r=t.match(O);if(r){R?(s.scheme=r[1],s.userinfo=r[3],s.host=r[4],s.port=parseInt(r[5],10),s.path=r[6]||"",s.query=r[7],s.fragment=r[8],isNaN(s.port)&&(s.port=r[5])):(s.scheme=r[1]||void 0,s.userinfo=-1!==t.indexOf("@")?r[3]:void 0,s.host=-1!==t.indexOf("//")?r[4]:void 0,s.port=parseInt(r[5],10),s.path=r[6]||"",s.query=-1!==t.indexOf("?")?r[7]:void 0,s.fragment=-1!==t.indexOf("#")?r[8]:void 0,isNaN(s.port)&&(s.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),s.host&&(s.host=F($(s.host,i),i)),void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||s.path||void 0!==s.query?void 0===s.scheme?s.reference="relative":void 0===s.fragment?s.reference="absolute":s.reference="uri":s.reference="same-document",e.reference&&"suffix"!==e.reference&&e.reference!==s.reference&&(s.error=s.error||"URI is not a "+e.reference+" reference.");var n=w[(e.scheme||s.scheme||"").toLowerCase()];if(e.unicodeSupport||n&&n.unicodeSupport)C(s,i);else{if(s.host&&(e.domainHost||n&&n.domainHost))try{s.host=v(s.host.replace(i.PCT_ENCODED,A).toLowerCase())}catch(t){s.error=s.error||"Host's domain name can not be converted to ASCII via punycode: "+t}C(s,a)}n&&n.parse&&n.parse(s,e)}else s.error=s.error||"URI can not be parsed.";return s}function N(t,e){var s=!1!==e.iri?_:a,i=[];return void 0!==t.userinfo&&(i.push(t.userinfo),i.push("@")),void 0!==t.host&&i.push(F($(String(t.host),s),s).replace(s.IPV6ADDRESS,(function(t,e,s){return"["+e+(s?"%25"+s:"")+"]"}))),"number"!=typeof t.port&&"string"!=typeof t.port||(i.push(":"),i.push(String(t.port))),i.length?i.join(""):void 0}var T=/^\.\.?\//,U=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,P=/^\/?(?:.|\n)*?(?=\/|$)/;function z(t){for(var e=[];t.length;)if(t.match(T))t=t.replace(T,"");else if(t.match(U))t=t.replace(U,"/");else if(t.match(q))t=t.replace(q,"/"),e.pop();else if("."===t||".."===t)t="";else{var s=t.match(P);if(!s)throw new Error("Unexpected dot segment condition");var i=s[0];t=t.slice(i.length),e.push(i)}return e.join("")}function H(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.iri?_:a,i=[],r=w[(e.scheme||t.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(t,e),t.host)if(s.IPV6ADDRESS.test(t.host));else if(e.domainHost||r&&r.domainHost)try{t.host=e.iri?j(t.host):v(t.host.replace(s.PCT_ENCODED,A).toLowerCase())}catch(s){t.error=t.error||"Host's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+s}C(t,s),"suffix"!==e.reference&&t.scheme&&(i.push(t.scheme),i.push(":"));var n=N(t,e);if(void 0!==n&&("suffix"!==e.reference&&i.push("//"),i.push(n),t.path&&"/"!==t.path.charAt(0)&&i.push("/")),void 0!==t.path){var h=t.path;e.absolutePath||r&&r.absolutePath||(h=z(h)),void 0===n&&(h=h.replace(/^\/\//,"/%2F")),i.push(h)}return void 0!==t.query&&(i.push("?"),i.push(t.query)),void 0!==t.fragment&&(i.push("#"),i.push(t.fragment)),i.join("")}function L(t,e){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],r={};return i||(t=D(H(t,s),s),e=D(H(e,s),s)),!(s=s||{}).tolerant&&e.scheme?(r.scheme=e.scheme,r.userinfo=e.userinfo,r.host=e.host,r.port=e.port,r.path=z(e.path||""),r.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(r.userinfo=e.userinfo,r.host=e.host,r.port=e.port,r.path=z(e.path||""),r.query=e.query):(e.path?("/"===e.path.charAt(0)?r.path=z(e.path):(void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?r.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:r.path=e.path:r.path="/"+e.path,r.path=z(r.path)),r.query=e.query):(r.path=t.path,void 0!==e.query?r.query=e.query:r.query=t.query),r.userinfo=t.userinfo,r.host=t.host,r.port=t.port),r.scheme=t.scheme),r.fragment=e.fragment,r}function Z(t,e){return t&&t.toString().replace(e&&e.iri?_.PCT_ENCODED:a.PCT_ENCODED,A)}var M={scheme:"http",domainHost:!0,parse:function(t,e){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function(t,e){var s="https"===String(t.scheme).toLowerCase();return t.port!==(s?443:80)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},V={scheme:"https",domainHost:M.domainHost,parse:M.parse,serialize:M.serialize};function J(t){return"boolean"==typeof t.secure?t.secure:"wss"===String(t.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(t,e){var s=t;return s.secure=J(s),s.resourceName=(s.path||"/")+(s.query?"?"+s.query:""),s.path=void 0,s.query=void 0,s},serialize:function(t,e){if(t.port!==(J(t)?443:80)&&""!==t.port||(t.port=void 0),"boolean"==typeof t.secure&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){var s=t.resourceName.split("?"),i=h(s,2),r=i[0],n=i[1];t.path=r&&"/"!==r?r:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}},W={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},B={},Q="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Y="[0-9A-Fa-f]",X=s(s("%[EFef]"+Y+"%"+Y+Y+"%"+Y+Y)+"|"+s("%[89A-Fa-f]"+Y+"%"+Y+Y)+"|"+s("%"+Y+Y)),K=e("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),tt=new RegExp(Q,"g"),et=new RegExp(X,"g"),st=new RegExp(e("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',K),"g"),it=new RegExp(e("[^]",Q,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),rt=it;function nt(t){var e=A(t);return e.match(tt)?e:t}var at={scheme:"mailto",parse:function(t,e){var s=t,i=s.to=s.path?s.path.split(","):[];if(s.path=void 0,s.query){for(var r=!1,n={},a=s.query.split("&"),_=0,h=a.length;_t.then(e).catch(t=>setTimeout(()=>{throw t},0))}catch(t){}}const i=s(334),r=s(18),n=s(243),a=s(43),_=/^([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}]([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.]*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?)?$/u,h=/^([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_:0-9]|%[A-Fa-f0-9]{2}|\\[_~.\-!$&'()*+,;=/?#@%])(([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.:]|%[A-Fa-f0-9]{2}|\\[_~.\-!$&'()*+,;=/?#@%])*([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}:]|%[A-Fa-f0-9]{2}|\\[_~.\-!$&'()*+,;=/?#@%]))?$/u,l=/^[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_0-9]([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.]*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?$/u,o=/^([^\0-\x20<>"{}|^`\\]|\\u[A-Fa-f0-9]{4}|\\U[A-Fa-f0-9]{8})*$/,c=/^([^\0-\x20<>"{}|^`])*$/,u=/\\u([0-9A-Fa-f]{4})|\\U([0-9A-Fa-f]{8})/g,f=(t,e,s)=>String.fromCodePoint(parseInt(e||s,16)),d=Object.prototype.hasOwnProperty,p=/([A-Za-z][A-Za-z0-9_-]*)?:([A-Za-z_0-9:][A-Za-z0-9_:-]*)(?:\s+|(?=\.?[<[("';,)\]#{}]|\.[\s\0]))/y,x=/([^\s#@<[("':_{}][^\s#@<[("':{}]*)?:((?:[^\s#@<[("'.;,{})\]\\](?:[^\s#@<[("';,{})\]\\]*[^\s#@<[("'.;,{})\]\\])?)?)(?:\s+|(?=\.?[<[("';,)\]#{}]|\.[\s\0]))/y,b=/([^\s#@<[("':_{}][^\s#@<[("':{}]*)?:((?:(?:[^\s#@<[("'.;,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"]))(?:(?:[^\s#@<[("';,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"]))*(?:[^\s#@<[("'.;,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"])))?)?)(?:\s+|(?=\.?[<[("';,)\]#{}]|\.[\s\0]))/y,m=/\\(.)/g,g=/_:(.(?:[^\s:<;,)\]#}]*[^\s:<.;,)\]#}])?)(?:\s+|(?=[<:{,;\])#]))/y,k=/_:(.(?:[^\s:<;,)\]#}]*[^\s:<.;,)\]#}])?)(?:\s+|(?=\.?[<:{,;\])#])|(?=\.[\s@#<({[}]))/y,I=/<([^\\>]*)>\s*/y,y=/<([^>]*)>\s*/y,v=/([+-]?(?:[0-9]+(\.[0-9]+)?|(\.[0-9]+))(\.?[eE][+-]?[0-9]+)?)(?:\s+|(?=\.[^eE0-9]|[;,)\]]))/y,j=/(?:(true|TRUE)|false|FALSE)\s*/y,w=/a(?:\s+|(?=[[("'<#]))/y,E=/\^\^/y,A=/\s*/y,C=/@([A-Za-z]+(?:-[A-Za-z0-9-]+)*)(?:\s+|(?=[.},;\])#]))/y,S=/(?:(@prefix)|[pP][rR][eE][fF][iI][xX])\s*/y,$=/([^#:]*):\s*/iy,F=/(?:(@base)|[bB][aA][sS][eE])\s*/y,O=/(?:graph)?\s*<([^\\>]*)>\s*\{\s*/iy,R=/(?:graph)?\s*([^\s#@<[("':_{}][^\s#@<[("':{}]*)?:((?:(?:[^\s#@<[("'.;,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"]))(?:(?:[^\s#@<[("';,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"]))*(?:[^\s#@<[("'.;,{})\]\\]|\\(?:%[0-9A-Fa-f][0-9A-Fa-f]|[^\s"])))?)?)\s*\{\s*/iy,D=/(?:graph)?\s*_:(.(?:[^\s:<;,)\]#}]*[^\s:<.;,)\]#}])?)\s*\{\s*/iy,N=/(?:graph)?\s*\[\s*\]\s*\{\s*/iy,T=/(?:graph)?\s*<([^>]*)>\s*\{\s*/iy,U=/graph(?:\s+|(?=[#<[{]))/iy,q=/(#[^\n]*\n\s*)+/y,P=/^[A-Za-z][A-Za-z0-9.\-+]*:/,z=/^((([A-Za-z0-9.\-+]*:\/)?\/[^/>]*)?(\/(?:[^/>]*\/)*)?[^>]*)$/,H=/\[\s*\]\s*/y,L=/\[(?:\s+|(?=[^\]]))/y,Z=/\(\s*/y,M=/\]\s*/y,V=/\{\s*/y,J=/\}\s*/y,G=/\.\s*/y,W=/[\\"\r\n]/g,B=/[\\'\r\n]/g,Q=/"{1,2}$/g,Y=/'{1,2}$/g,X=/(\\|""")/g,K=/(\\|''')/g,tt=(t,e,s,i,r,n)=>{if(e)switch(e){case"t":return"\t";case"n":return"\n";case"r":return"\r";case"f":return"\f";case"b":return"\b";default:console.assert(`bad regex escape char mapping: '${e}'`)}else{if(s)return s;if(i)return String.fromCodePoint(parseInt(i,16));if(r)return String.fromCodePoint(parseInt(r,16));if(n)throw"\\"===n[0]?new Error(`expected string_literal but invalid escape sequence within contents: '${n}'. failed to parse a valid token`):new Error(`expected string_literal but invalid whitespace character within contents: ${JSON.stringify(n)}. failed to parse a valid token`);console.assert("unexpected no match branch in escape sequence replace callback")}},et=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\.))/g,st=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\[^uU]|\\u[^]{4}|\\U[^]{8}))/g,it=t=>t.replace(et,tt),rt=t=>{let e=lt.exec(t);if(e){let s=e.index;return[t.slice(0,s).replace(st,tt),t.slice(s)]}return[t.replace(st,tt),""]},nt=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|(\\.))/g,at=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|(\\[^uU]|\\u[^]{4}|\\U[^]{8}))/g,_t=t=>t.replace(nt,tt),ht=t=>{let e=lt.exec(t);if(e){let s=e.index;return[t.slice(0,s).replace(at,tt),t.slice(s)]}return[t.replace(at,tt),""]},[lt,ot,ct,ut,ft]=(()=>{function t(t){let e=RegExp.prototype.exec.call(this,t);if(e){let t=e[0].length-e[1].length;e.index+=t,e[0]=e[0].slice(t)}return e}let e=(()=>{try{new RegExp("(?(e.exec=s,e)}return t=>t()})();return[e(()=>new RegExp("(?new RegExp('(?new RegExp("(?new RegExp('(?new RegExp("(?(x.lastIndex=e,[x.exec(t),x.lastIndex]),pt=(t,e)=>(b.lastIndex=e,[b.exec(t),b.lastIndex]);function xt(t,e,s,i){let r=Math.min(e,Math.abs(e-15)),n=t.s;return t.error(`\n\`${n.substr(r,r+90).replace(/[\n\t]/g," ")}\`\n ${" ".repeat(e-r)}^\nexpected ${s} ${i||""}. failed to parse a valid token starting at ${n[e]?'"'+n[e]+'"':"<>"}`)}class bt extends n.Transform{constructor(t){super({decodeStrings:!1,writableObjectMode:!1,readableObjectMode:!0,flush:t.flush,transform:t.transform})}pipe(t){let e=t;return e._writableState.objectMode?t.isGraphyWritable&&(t=n.quads_to_writable()):t=n.quads_to_json(),t!==e?(super.pipe(t),t.pipe(e)):super.pipe(e)}}class mt{constructor(t={}){let{input:s=null,state:i={}}=t,{blank_node_index:n=0,prefixes:_={},labels:u={}}=i,f=a.adopt(t.dataFactory||t.data_factory||a.unfiltered),d=f.defaultGraph();f!==a.unfiltered&&(d=Object.create(d));let x=f.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),b=f.blankNode,m=f.namedNode;if(this.emit_data=a.unfiltered===f?function(){var t;k.push((t=this,a.quad(t._kt_subject,t._kt_predicate,t._kt_object,t._kt_graph)))}:function(){let t=f.quad(this._kt_subject,this._kt_predicate,this._kt_object,this._kt_graph);k.push(t)},Object.assign(this,{i:0,s:"",n:0,pre:t.prepend||"",_b_debug:t.debug||!1,_b_relax:t.relax||!1,_dc_factory:f,_f_state:this.block,_h_prefixes:_,_b_destroyed:!1,_s_base_url:"",_s_base_url_scheme:"",_s_base_url_root:"",_s_base_url_path:"",_kt_subject:null,_kt_predicate:x,_kt_object:null,_kt_graph:d,_s_literal:"",_kt_rdf_type:f.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),_kt_rdf_first:x,_kt_rdf_rest:f.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),_kt_rdf_nil:f.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"),_kt_default_graph:d,_a_nested:[],_h_labels:u,event:this.emit,data:this.emit_data,restore_data:this.emit_data,_a_queue_event:[],_b_expecting_full_stop:!1,_s_temp_prefix_id:null,_b_trim_start:!0,anonymous_blank_node:t=>b(t,!0),next_label(){let t="";do{t="g"+n++}while(this._h_labels[t]);return this._h_labels[t]=2,t},eos:null,after_end_of_statement:this.post_object,_n_max_token_length:t.max_token_length||t.maxTokenLength||2048,_n_max_string_length:t.max_string_length||t.maxStringLength||1/0,_b_byte_tracking:t.byte_tracking||t.byteTracking||!1,_nb_seen:0,_nb_last:0,_nb_curr:0}),t.relaxed&&console.warn(new Error("no such option 'relaxed'; did you mean 'relax' ?").stack.replace(/^Error:/,"Warning:")),"validate"in t&&console.warn(new Error("option 'validate' has been deprecated. Validation is now enabled by default. Use the 'relax' option if you wish to disable validation.").stack.replace(/^Error:/,"Warning:")),Object.assign(this,t.relax?{blank_node(t){let e=this._h_labels[t];return e?1===e||(t=2===e?this._h_labels[t]=this.next_label():this._h_labels[t]):this._h_labels[t]=1,b(t)},check_named_node:m,check_named_node_escapeless:m,match_prefixed_name_escapeless:dt,match_prefixed_name:pt}:{blank_node(t){if(!l.test(t))return this.error(`invalid blank node label: "${t}"`);let e=this._h_labels[t];return e?1===e||(t=2===e?this._h_labels[t]=this.next_label():this._h_labels[t]):this._h_labels[t]=1,b(t)},check_named_node(t){return o.test(t)?m(t):this.error(`invalid IRI: "${t}"`)},check_named_node_escapeless(t){return c.test(t)?m(t):this.error(`invalid IRI: "${t}"`)},match_prefixed_name_quick:(t,e)=>(p.lastIndex=e,[p.exec(t),p.lastIndex]),match_prefixed_name_escapeless(t,e){let[s,i]=dt(t,e);if(!s||h.test(s[2])||!s[2])return[s,i];this.error(`invalid prefixed name local name: "${s[2]}:"`)},match_prefixed_name(t,e){let[s,i]=pt(t,e);if(!s||h.test(s[2]))return[s,i];this.error(`invalid prefixed name local name: "${s[2]}:"`)}}),this.named_node=m,this.prefixed_name=function(t,e){return m(_[t]+e)},"string"==typeof t.base)throw new TypeError(`invalid type 'string' was given for 'base' event listener: '${t.base}'\ndid you mean to use the 'base_uri' key instead?`);let g=t.base_uri||t.baseUri||t.baseURI||t.base_iri||t.baseIri||t.baseIRI;if(g){let t=z.exec(g);this._s_base_url=t[1],this._s_base_url_root=t[2]||"",this._s_base_url_scheme=t[3]||"",this._s_base_url_path=t[4]||""}else if(t.base_url||t.baseUrl||t.baseURL)throw new Error(`invalid option: .base${t.base_url?"_url":t.baseUrl?"Url":t.baseURL?"URL":""}; use the '.base_uri' key instead`);let k=this.transform=new bt({transform:(t,e,s)=>{let i=this.s=this.pre+t;this.n=i.length,this._b_trim_start?(A.lastIndex=0,A.exec(i),this.i=A.lastIndex):this.i=0,this.safe_parse(!0)&&(k.emit("progress",t.length),s())},flush:t=>{try{this.eof(1)}catch(t){return void this.destroy(t)}t()}});if(k.on("pipe",t=>{this._ds_input=t;let s=this._b_byte_tracking;if(s||"function"!=typeof t.setEncoding){let t=k.write,i=new r.StringDecoder("utf8"),n=(s,i,r)=>{let n=e.from(s,"utf8").length;return this._nb_seen+=n,this._nb_last=n,t.call(k,s,i,r)},a=(e,s,r)=>{let n=this._nb_last=e.length;return this._nb_seen+=n,t.call(k,i.write(e),s,r)},_=(e,s,r)=>t.call(k,i.write(e),s,r);k.write=function(e,i,r){return null!==e?(k.write="string"==typeof e?s?n:t:s?a:_,k.write(e,i,r)):t.call(k,e,i,r)},s&&(this.emit_data=this.data=this.restore_data=function(){let t=this._dc_factory.quad(this._kt_subject,this._kt_predicate,this._kt_object,this._kt_graph),s=e.from(this.s.slice(this.i)).length,i=this._nb_seen-s;t.byteRange=[this._nb_curr,i],this._nb_curr=i,this.transform.push(t)})}else t.setEncoding("utf8")}),k.on("newListener",t=>{"comment"===t&&(this.emit_comments=t=>{let e=t.slice(1).replace(/\n\s+$/,"").split(/\n+\s*#/g);for(let t of e)k.emit("comment",t)})}),k._destroy=(...t)=>{this.destroy(...t)},this.bind(t),s)if(s.stream){let t=s.stream;queueMicrotask(()=>{t.pipe(k)})}else{if("string"!=typeof s.string)throw new TypeError("Invalid argument for input parameter: "+("object"==typeof s?JSON.stringify(s):s));{let t=s.string;queueMicrotask(()=>{k.end(t,"utf8")})}}}safe_parse(){try{let t=this._f_state();for(;"function"==typeof t;)t=t.apply(this)}catch(t){return this.destroy(t),!1}return!0}emit(t,...e){this.transform.emit(t,...e)}queue(t,...e){this._a_queue_event.push({event:t,args:e})}error(t){throw new Error(t)}parse_error(t,e=!1){let s=this.i,i=Math.min(s,Math.abs(s-15)),r=this.s;return this.error(`\n\`${r.substr(i,i+90).replace(/[\n\t]/g," ")}\`\n ${" ".repeat(s-i)}^\nexpected ${t} ${e?"but encountered <>":""}. failed to parse a valid token starting at ${r[s]?'"'+r[s]+'"':"<>"}`)}info_error(t){let e=this.i,s=Math.min(e,Math.abs(e-15)),i=this.s;this.error(`\n\`${i.substr(s,s+90).replace(/[\n\t]/g," ")}\`\n ${" ".repeat(e-s)}^\n`+t)}eof(){if(this._a_queue_event.length){let t=this._a_queue_event;for(;t.length;){let e=t.shift();this[e.event](e.data)}}if(this.block!==this._f_state&&(this.s+="\0",this.n=this.s.length,this.safe_parse())){if(null===this.s)return;if(this.block!==this._f_state)return this.parse_error(this._f_state.name,!0)}if(this.ie&&(this.i=e=q.lastIndex,this.emit_comments&&this.emit_comments(s[0])),ethis.max_token_length)return this.parse_error("statement");this._f_state=this.statement,this.pre=t.slice(s),this.eos&&this.eos()}block(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("block");this._f_state=this.block,this.pre=t.slice(s),this.eos&&this.eos()}graph_or_subject(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("graph_or_subject");this._f_state=this.graph_or_subject,this.pre=t.slice(s),this.eos&&this.eos()}graph_or_subject_property_list(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("graph_or_subject_property_list");this._f_state=this.graph_or_subject_property_list,this.pre=t.slice(s),this.eos&&this.eos()}graph_or_subject_anon(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("graph_or_subject_anon");this._f_state=this.graph_or_subject_anon,this.pre=t.slice(s),this.eos&&this.eos()}graph_keyword(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("graph_keyword");this._f_state=this.graph_keyword,this.pre=t.slice(s),this.eos&&this.eos()}graph_post_name(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("graph_post_name");this._f_state=this.graph_post_name,this.pre=t.slice(s),this.eos&&this.eos()}pairs(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("pairs");this._f_state=this.pairs,this.pre=t.slice(s),this.eos&&this.eos()}object_list(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("object_list");this._f_state=this.object_list,this.pre=t.slice(s),this.eos&&this.eos()}string_literal_short_double(){let{s:t,n:e,i:s}=this;t:for(;sthis.max_token_length)return this.parse_error("string_literal_short_double");this._f_state=this.string_literal_short_double,this.pre=t.slice(s),this.eos&&this.eos()}string_literal_short_single(){let{s:t,n:e,i:s}=this;t:for(;sthis.max_token_length)return this.parse_error("string_literal_short_single");this._f_state=this.string_literal_short_single,this.pre=t.slice(s),this.eos&&this.eos()}string_literal_long_double(){let{s:t,n:e,i:s}=this;t:for(;sthis.max_token_length)return this.parse_error("string_literal_long_double");this._f_state=this.string_literal_long_double,this.pre=t.slice(s),this.eos&&this.eos()}string_literal_long_single(){let{s:t,n:e,i:s}=this;t:for(;sthis.max_token_length)return this.parse_error("string_literal_long_single");this._f_state=this.string_literal_long_single,this.pre=t.slice(s),this.eos&&this.eos()}string_literal(){let{s:t,n:e,i:s}=this;for(;sthis.max_string_length)return this.parse_error("string_literal");this._f_state=this.string_literal,this.pre=t.slice(s),this.eos&&this.eos()}datatype_or_langtag(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("datatype_or_langtag");this._f_state=this.datatype_or_langtag,this.pre=t.slice(s),this.eos&&this.eos()}datatype(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("datatype");this._f_state=this.datatype,this.pre=t.slice(s),this.eos&&this.eos()}post_object(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("post_object");this._f_state=this.post_object,this.pre=t.slice(s),this.eos&&this.eos()}base_iri(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("base_iri");this._f_state=this.base_iri,this.pre=t.slice(s),this.eos&&this.eos()}prefix_id(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("prefix_id");this._f_state=this.prefix_id,this.pre=t.slice(s),this.eos&&this.eos()}prefix_iri(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("prefix_iri");this._f_state=this.prefix_iri,this.pre=t.slice(s),this.eos&&this.eos()}full_stop(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("full_stop");this._f_state=this.full_stop,this.pre=t.slice(s),this.eos&&this.eos()}collection_subject(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("collection_subject");this._f_state=this.collection_subject,this.pre=t.slice(s),this.eos&&this.eos()}collection_object(){let{s:t,n:e,i:s}=this;for(;sthis.max_token_length)return this.parse_error("collection_object");this._f_state=this.collection_object,this.pre=t.slice(s),this.eos&&this.eos()}destroy(t){this.post_blank_subject=()=>{},this.statement=()=>{},this.block=()=>{},this.graph_or_subject=()=>{},this.graph_or_subject_property_list=()=>{},this.graph_or_subject_anon=()=>{},this.graph_keyword=()=>{},this.graph_post_name=()=>{},this.pairs=()=>{},this.object_list=()=>{},this.string_literal_short_double=()=>{},this.string_literal_short_single=()=>{},this.string_literal_long_double=()=>{},this.string_literal_long_single=()=>{},this.string_literal=()=>{},this.datatype_or_langtag=()=>{},this.datatype=()=>{},this.post_object=()=>{},this.base_iri=()=>{},this.prefix_id=()=>{},this.prefix_iri=()=>{},this.full_stop=()=>{},this.collection_subject=()=>{},this.collection_object=()=>{},this.eof=()=>{this.s=null},this._b_destroyed=!0,!t&&this._ds_input&&this._ds_input.destroy(t),this.transform.demolish(t)}}t.exports=function(...t){let e={};if(t.length){let s=t[0];if(s&&s.input&&void 0===s.input.string&&!s.input.stream&&(s=s.input),"string"==typeof s)e.input={string:s};else if(null===s)e.input=null;else if("function"==typeof s.setEncoding)e.input={stream:s};else{if("function"==typeof s.pipeTo)throw new TypeError("Sorry, WHATWG streams are currently not supported :(");if(!s||"object"!=typeof s||"[object Object]"!==Object.prototype.toString.call(s))throw new TypeError("unexpected input type: "+s);if(e=s,t.length>1)throw new TypeError("unexpected argument(s) after config struct: "+t.slice(1))}if(t.length>1&&(Object.assign(e,t[1]),t.length>2))throw new TypeError("unexpected argument(s) after input and config struct: "+t.slice(2))}return new mt(e).transform}}).call(this,s(2).Buffer)}}]); +//# sourceMappingURL=edc5e3b80eb8cc706b60.js.map \ No newline at end of file diff --git a/converter/edc5e3b80eb8cc706b60.js.LICENSE.txt b/converter/edc5e3b80eb8cc706b60.js.LICENSE.txt new file mode 100644 index 00000000..0d6b48de --- /dev/null +++ b/converter/edc5e3b80eb8cc706b60.js.LICENSE.txt @@ -0,0 +1 @@ +/** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ diff --git a/converter/edc5e3b80eb8cc706b60.js.map b/converter/edc5e3b80eb8cc706b60.js.map new file mode 100644 index 00000000..cdb5404c --- /dev/null +++ b/converter/edc5e3b80eb8cc706b60.js.map @@ -0,0 +1 @@ +{"version":3,"file":"edc5e3b80eb8cc706b60.js","sources":["webpack:///edc5e3b80eb8cc706b60.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/ede0d9c570d71b59984d.js b/converter/ede0d9c570d71b59984d.js new file mode 100644 index 00000000..1635d338 --- /dev/null +++ b/converter/ede0d9c570d71b59984d.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{217:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(264),e),i(r(236),e),i(r(266),e),i(r(298),e),i(r(299),e),i(r(268),e),i(r(251),e)},221:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e{r.readable||r.emit("end")}),t.on("error",t=>{r.emit("error",t)}),r}}},223:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeyword=void 0;e.EntryHandlerKeyword=class{constructor(t){this.keyword=t}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(t,e,r,n,i){return!1}async test(t,e,r,n,i){return r===this.keyword}}},225:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Util=void 0;const n=r(217),i=r(252),a=r(269),o=r(247);class s{constructor(t){this.parsingContext=t.parsingContext,this.dataFactory=t.dataFactory||new i.DataFactory,this.rdfFirst=this.dataFactory.namedNode(s.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(s.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(s.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(s.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(s.RDF+"JSON")}static getContextValue(t,e,r,n){const i=t.getContextRaw()[r];if(!i)return n;const a=i[e];return void 0===a?n:a}static getContextValueContainer(t,e){return s.getContextValue(t,"@container",e,{"@set":!0})}static getContextValueType(t,e){const r=s.getContextValue(t,"@type",e,null);return"@none"===r?null:r}static getContextValueLanguage(t,e){return s.getContextValue(t,"@language",e,t.getContextRaw()["@language"]||null)}static getContextValueDirection(t,e){return s.getContextValue(t,"@direction",e,t.getContextRaw()["@direction"]||null)}static isContextValueReverse(t,e){return!!s.getContextValue(t,"@reverse",e,null)}static getContextValueIndex(t,e){return s.getContextValue(t,"@index",e,t.getContextRaw()["@index"]||null)}static isPropertyReverse(t,e,r){return"@reverse"===r!==s.isContextValueReverse(t,e)}static isPropertyInEmbeddedNode(t){return"@id"===t}static isPropertyInAnnotationObject(t){return"@annotation"===t}static isValidIri(t){return null!==t&&n.Util.isValidIri(t)}static isPrefixArray(t,e){if(t.length>e.length)return!1;for(let r=0;r1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${e}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}if("@list"in r){if(Object.keys(r).length>1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${e}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const t=r["@list"];return Array.isArray(t)?0===t.length?[this.rdfNil]:this.parsingContext.idStack[i+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(a),e,t,i-1,a.slice(0,-1))}if("@reverse"in r&&"boolean"==typeof r["@reverse"])return[];if("@graph"in s.getContextValueContainer(await this.parsingContext.getContext(a),e)){const t=this.parsingContext.graphContainerTermStack[i+1];return t?Object.values(t):[this.dataFactory.blankNode()]}if("@id"in r){if(Object.keys(r).length>1&&(t=await this.parsingContext.getContext(a,0)),"@context"in r&&(t=await this.parsingContext.parseContext(r["@context"],t.getContextRaw())),"@vocab"===r["@type"])return this.nullableTermToArray(this.createVocabOrBaseTerm(t,r["@id"]));{const e=r["@id"];let a;if("object"==typeof e){if(!this.parsingContext.rdfstar)throw new n.ErrorCoded(`Found illegal @id '${r}'`,n.ERROR_CODES.INVALID_ID_VALUE);a=this.parsingContext.idStack[i+1][0]}else a=this.resourceToTerm(t,e);return this.nullableTermToArray(a)}}return this.parsingContext.emittedStack[i+1]||r&&"object"==typeof r&&0===Object.keys(r).length?this.parsingContext.idStack[i+1]||(this.parsingContext.idStack[i+1]=[this.dataFactory.blankNode()]):[];case"string":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(t,e),e,r,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(t,e),e,Boolean(r).toString(),this.dataFactory.namedNode(s.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(t,e),e,r,this.dataFactory.namedNode(r%1==0&&r<1e21?s.XSD_INTEGER:s.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error("Could not determine the RDF type of a "+o)),[]}}async getContextSelfOrPropertyScoped(t,e){const r=t.getContextRaw()[e];return r&&"object"==typeof r&&"@context"in r&&(t=await this.parsingContext.parseContext(r,t.getContextRaw(),!0)),t}nullableTermToArray(t){return t?[t]:[]}predicateToTerm(t,e){const r=t.expandTerm(e,!0,this.parsingContext.getExpandOptions());return r?"_"===r[0]&&":"===r[1]?this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(r.substr(2)):null:s.isValidIri(r)?this.dataFactory.namedNode(r):r&&this.parsingContext.strictValues?(this.parsingContext.emitError(new n.ErrorCoded("Invalid predicate IRI: "+r,n.ERROR_CODES.INVALID_IRI_MAPPING)),null):null:null}resourceToTerm(t,e){if(e.startsWith("_:"))return this.dataFactory.blankNode(e.substr(2));const r=t.expandTerm(e,!1,this.parsingContext.getExpandOptions());if(!s.isValidIri(r)){if(!r||!this.parsingContext.strictValues)return null;this.parsingContext.emitError(new Error("Invalid resource IRI: "+r))}return this.dataFactory.namedNode(r)}createVocabOrBaseTerm(t,e){if(e.startsWith("_:"))return this.dataFactory.blankNode(e.substr(2));const r=this.parsingContext.getExpandOptions();let n=t.expandTerm(e,!0,r);if(n===e&&(n=t.expandTerm(e,!1,r)),!s.isValidIri(n)){if(!n||!this.parsingContext.strictValues||n.startsWith("@"))return null;this.parsingContext.emitError(new Error("Invalid term IRI: "+n))}return this.dataFactory.namedNode(n)}intToString(t,e){if("number"==typeof t){if(Number.isFinite(t)){return!(t%1==0)||e&&e.value===s.XSD_DOUBLE?t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):Number(t).toString()}return t>0?"INF":"-INF"}return t}stringValueToTerm(t,e,r,n,i){const a=s.getContextValueType(e,r);if(a)if("@id"===a){if(!i)return this.resourceToTerm(e,this.intToString(n,i))}else if("@vocab"===a){if(!i)return this.createVocabOrBaseTerm(e,this.intToString(n,i))}else i=this.dataFactory.namedNode(a);if(!i){const a=s.getContextValueLanguage(e,r),o=s.getContextValueDirection(e,r);return o&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(t,this.intToString(n,i),a,o):this.dataFactory.literal(this.intToString(n,i),a)}return this.dataFactory.literal(this.intToString(n,i),i)}createLanguageDirectionLiteral(t,e,r,n){if("i18n-datatype"===this.parsingContext.rdfDirection)return r||(r=""),this.dataFactory.literal(e,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${r}_${n}`));{const i=this.dataFactory.blankNode(),a=this.getDefaultGraph();return this.parsingContext.emitQuad(t,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"value"),this.dataFactory.literal(e),a)),r&&this.parsingContext.emitQuad(t,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"language"),this.dataFactory.literal(r),a)),this.parsingContext.emitQuad(t,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"direction"),this.dataFactory.literal(n),a)),i}}valueToJsonString(t){return o(t)}async unaliasKeyword(t,e,r,i,a){if(Number.isInteger(t))return t;if(!i){const t=this.parsingContext.unaliasedKeywordCacheStack[r];if(t)return t}if(!n.Util.isPotentialKeyword(t)){let r=(a=a||await this.parsingContext.getContext(e)).getContextRaw()[t];r&&"object"==typeof r&&(r=r["@id"]),n.Util.isValidKeyword(r)&&(t=r)}return i?t:this.parsingContext.unaliasedKeywordCacheStack[r]=t}async unaliasKeywordParent(t,e){return await this.unaliasKeyword(e>0&&t[e-1],t,e-1)}async unaliasKeywords(t,e,r,n){const i={};for(const a in t)i[await this.unaliasKeyword(a,e,r+1,!0,n)]=t[a];return i}async isLiteral(t,e){for(let r=e;r>=0;r--){if("@annotation"===await this.unaliasKeyword(t[r],t,r))return!1;if(this.parsingContext.literalStack[r]||this.parsingContext.jsonLiteralStack[r])return!0}return!1}async getDepthOffsetGraph(t,e){for(let r=t-1;r>0;r--)if("@graph"===await this.unaliasKeyword(e[r],e,r)){const n=(await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,e,r)).containers;return a.EntryHandlerContainer.isComplexGraphContainer(n)?-1:t-r-1}return-1}validateReverseSubject(t){if("Literal"===t.termType)throw new n.ErrorCoded("Found illegal literal in subject position: "+t.value,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(t,e){let r=this.getDefaultGraph();const{containers:n,depth:i}=await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,t,e);if("@graph"in n){const e=a.EntryHandlerContainer.getContainerGraphIndex(n,i,t),o=this.parsingContext.graphContainerTermStack[i];if(r=o?o[e]:null,!r){let a=null;if("@id"in n){const e=await this.getContainerKey(t[i],t,i);null!==e&&(a=await this.resourceToTerm(await this.parsingContext.getContext(t),e))}a||(a=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[i]||(this.parsingContext.graphContainerTermStack[i]={}),r=this.parsingContext.graphContainerTermStack[i][e]=a}}return r}async getPropertiesDepth(t,e){let r=e;for(let n=e-1;n>0;n--)if("number"!=typeof t[n]){const e=await this.unaliasKeyword(t[n],t,n);if("@reverse"===e)return n;if("@nest"!==e)return r;r=n}return r}async getContainerKey(t,e,r){const n=await this.unaliasKeyword(t,e,r);return"@none"===n?null:n}validateReverseInEmbeddedNode(t,e,r){if(r&&e&&!this.parsingContext.rdfstarReverseInEmbedded)throw new n.ErrorCoded("Illegal reverse property in embedded node in "+t,n.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(t,e,r,i,a,o,s){let l;if(o?(this.validateReverseSubject(i),l=this.dataFactory.quad(i,r,e,a)):l=this.dataFactory.quad(e,r,i,a),s){if("DefaultGraph"!==l.graph.termType&&(l=this.dataFactory.quad(l.subject,l.predicate,l.object)),this.parsingContext.idStack[t-1])throw new n.ErrorCoded("Illegal multiple properties in an embedded node",n.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[t-1]=[l]}else this.parsingContext.emitQuad(t,l);const d=this.parsingContext.annotationsBuffer[t];if(d){for(const e of d)this.emitAnnotation(t,l,e);delete this.parsingContext.annotationsBuffer[t]}}emitAnnotation(t,e,r){let n;r.reverse?(this.validateReverseSubject(r.object),n=this.dataFactory.quad(r.object,r.predicate,e)):n=this.dataFactory.quad(e,r.predicate,r.object),this.parsingContext.emitQuad(t,n);for(const e of r.nestedAnnotations)this.emitAnnotation(t,n,e)}}e.Util=s,s.XSD="http://www.w3.org/2001/XMLSchema#",s.XSD_BOOLEAN=s.XSD+"boolean",s.XSD_INTEGER=s.XSD+"integer",s.XSD_DOUBLE=s.XSD+"double",s.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"},226:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NamedNode=void 0;e.NamedNode=class{constructor(t){this.termType="NamedNode",this.value=t}equals(t){return!!t&&"NamedNode"===t.termType&&t.value===this.value}}},234:function(t,e,r){"use strict";const n=new Set(["_write","_writableState","writable"]);e.a=function(t){return new Proxy(t,{has(t,e){return!n.has(e)&&Reflect.has(...arguments)},get(t,e){if(n.has(e))return;const r=Reflect.get(...arguments);return r&&"function"==typeof r.bind?r.bind(t):r},set(t,e,r){if(!n.has(e))return Reflect.set(...arguments)}})}},235:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(250))},236:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_CODES=e.ErrorCoded=void 0;class n extends Error{constructor(t,e){super(t),this.code=e}}e.ErrorCoded=n,function(t){t.COLLIDING_KEYWORDS="colliding keywords",t.CONFLICTING_INDEXES="conflicting indexes",t.CYCLIC_IRI_MAPPING="cyclic IRI mapping",t.INVALID_ID_VALUE="invalid @id value",t.INVALID_INDEX_VALUE="invalid @index value",t.INVALID_NEST_VALUE="invalid @nest value",t.INVALID_PREFIX_VALUE="invalid @prefix value",t.INVALID_PROPAGATE_VALUE="invalid @propagate value",t.INVALID_REVERSE_VALUE="invalid @reverse value",t.INVALID_IMPORT_VALUE="invalid @import value",t.INVALID_VERSION_VALUE="invalid @version value",t.INVALID_BASE_IRI="invalid base IRI",t.INVALID_CONTAINER_MAPPING="invalid container mapping",t.INVALID_CONTEXT_ENTRY="invalid context entry",t.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",t.INVALID_DEFAULT_LANGUAGE="invalid default language",t.INVALID_INCLUDED_VALUE="invalid @included value",t.INVALID_IRI_MAPPING="invalid IRI mapping",t.INVALID_JSON_LITERAL="invalid JSON literal",t.INVALID_KEYWORD_ALIAS="invalid keyword alias",t.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",t.INVALID_LANGUAGE_MAPPING="invalid language mapping",t.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",t.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",t.INVALID_LOCAL_CONTEXT="invalid local context",t.INVALID_REMOTE_CONTEXT="invalid remote context",t.INVALID_REVERSE_PROPERTY="invalid reverse property",t.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",t.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",t.INVALID_SCOPED_CONTEXT="invalid scoped context",t.INVALID_SCRIPT_ELEMENT="invalid script element",t.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",t.INVALID_TERM_DEFINITION="invalid term definition",t.INVALID_TYPE_MAPPING="invalid type mapping",t.INVALID_TYPE_VALUE="invalid type value",t.INVALID_TYPED_VALUE="invalid typed value",t.INVALID_VALUE_OBJECT="invalid value object",t.INVALID_VALUE_OBJECT_VALUE="invalid value object value",t.INVALID_VOCAB_MAPPING="invalid vocab mapping",t.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",t.KEYWORD_REDEFINITION="keyword redefinition",t.LOADING_DOCUMENT_FAILED="loading document failed",t.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",t.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",t.PROCESSING_MODE_CONFLICT="processing mode conflict",t.PROTECTED_TERM_REDEFINITION="protected term redefinition",t.CONTEXT_OVERFLOW="context overflow",t.INVALID_BASE_DIRECTION="invalid base direction",t.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",t.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",t.INVALID_EMBEDDED_NODE="invalid embedded node",t.INVALID_ANNOTATION="invalid annotation"}(e.ERROR_CODES||(e.ERROR_CODES={}))},237:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlankNode=void 0;e.BlankNode=class{constructor(t){this.termType="BlankNode",this.value=t}equals(t){return!!t&&"BlankNode"===t.termType&&t.value===this.value}}},238:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultGraph=void 0;class n{constructor(){this.termType="DefaultGraph",this.value=""}equals(t){return!!t&&"DefaultGraph"===t.termType}}e.DefaultGraph=n,n.INSTANCE=new n},239:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Literal=void 0;const n=r(226);class i{constructor(t,e){this.termType="Literal",this.value=t,"string"==typeof e?(this.language=e,this.datatype=i.RDF_LANGUAGE_STRING):e?(this.language="",this.datatype=e):(this.language="",this.datatype=i.XSD_STRING)}equals(t){return!!t&&"Literal"===t.termType&&t.value===this.value&&t.language===this.language&&t.datatype.equals(this.datatype)}}e.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},240:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Quad=void 0;e.Quad=class{constructor(t,e,r,n){this.termType="Quad",this.value="",this.subject=t,this.predicate=e,this.object=r,this.graph=n}equals(t){return!!t&&("Quad"===t.termType||!t.termType)&&this.subject.equals(t.subject)&&this.predicate.equals(t.predicate)&&this.object.equals(t.object)&&this.graph.equals(t.graph)}}},241:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;e.Variable=class{constructor(t){this.termType="Variable",this.value=t}equals(t){return!!t&&"Variable"===t.termType&&t.value===this.value}}},247:function(t,e,r){"use strict";t.exports=function(t){return function t(e){if(null===e||"object"!=typeof e||null!=e.toJSON)return JSON.stringify(e);if(Array.isArray(e)&&0===e.length)return"[]";if(Array.isArray(e)&&1===e.length)return"["+t(e[0])+"]";if(Array.isArray(e))return"["+e.reduce((e,r,n)=>(e=1===n?t(e):e)+","+t(r))+"]";const r=Object.keys(e);if(0===r.length)return"{}";if(1===r.length)return"{"+t(r[0])+":"+t(e[r[0]])+"}";return"{"+r.sort().reduce((r,n,i)=>(r=1===i?t(r)+":"+t(e[r]):r)+","+t(n)+":"+t(e[n]))+"}"}(t)}},248:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerPredicate=void 0;const n=r(217),i=r(225);class a{static async handlePredicateObject(t,e,r,i,a,o,s,l,d){const c=await e.getPropertiesDepth(r,i),u=await e.getDepthOffsetGraph(i,r),h=i-u,f=t.idStack[c];if(f&&!d)for(const n of f){if(u>=0){const r=t.idStack[h-1];if(r)for(const t of r)e.emitQuadChecked(i,n,a,o,t,s,l);else s?(e.validateReverseSubject(o),t.getUnidentifiedGraphBufferSafe(h-1).push({subject:o,predicate:a,object:n,isEmbedded:l})):t.getUnidentifiedGraphBufferSafe(h-1).push({subject:n,predicate:a,object:o,isEmbedded:l})}else{const t=await e.getGraphContainerValue(r,c);e.emitQuadChecked(i,n,a,o,t,s,l)}}else if(s&&e.validateReverseSubject(o),d){if(t.rdfstar){t.idStack[i]&&t.emitError(new n.ErrorCoded("Found an illegal @id inside an annotation: "+t.idStack[i][0].value,n.ERROR_CODES.INVALID_ANNOTATION));for(let a=0;a=0;t--){const e=l[t];e.depth>c&&(d.nestedAnnotations.push(e),l.splice(t,1))}}}else t.getUnidentifiedValueBufferSafe(c).push({predicate:a,object:o,reverse:s,isEmbedded:l})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(t,e,r,n,a){const o=r[n];if(o){const a=await t.getContext(r);if(!t.jsonLiteralStack[n]&&await e.predicateToTerm(a,r[n]))return"@json"===i.Util.getContextValueType(a,o)&&(t.jsonLiteralStack[n+1]=!0),!0}return!1}async test(t,e,r,n,i){return n[i]}async handle(t,e,r,o,s,l,d){const c=o[l],u=await t.getContext(o),h=await e.predicateToTerm(u,r);if(h){const d=await e.valueToTerm(u,r,s,l,o);if(d.length)for(let f of d){let d=await e.unaliasKeywordParent(o,l);const p=i.Util.isPropertyReverse(u,c,d);let g=0;for(;"@reverse"===d||"number"==typeof d;)"number"==typeof d?g++:l--,d=await e.unaliasKeywordParent(o,l-g);const y=i.Util.isPropertyInEmbeddedNode(d);e.validateReverseInEmbeddedNode(r,p,y);const E=i.Util.isPropertyInAnnotationObject(d);if(s){const a="@list"in i.Util.getContextValueContainer(u,r);if(a||s["@list"]){if((a&&!Array.isArray(s)&&!s["@list"]||s["@list"]&&!Array.isArray(s["@list"]))&&f!==e.rdfNil){const r=e.dataFactory.blankNode();t.emitQuad(l,e.dataFactory.quad(r,e.rdfRest,e.rdfNil,e.getDefaultGraph())),t.emitQuad(l,e.dataFactory.quad(r,e.rdfFirst,f,e.getDefaultGraph())),f=r}if(p&&!t.allowSubjectList)throw new n.ErrorCoded("Found illegal list value in subject position at "+r,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await a.handlePredicateObject(t,e,o,l,h,f,p,y,E)}}}}e.EntryHandlerPredicate=a},250:function(t,e,r){"use strict";function n(t){const e=[];let r=0;for(;rt.join("")).join("/")}function i(t,e){let r=e+1;e>=0?"/"===t[e+1]&&"/"===t[e+2]&&(r=e+3):"/"===t[0]&&"/"===t[1]&&(r=2);const i=t.indexOf("/",r);if(i<0)return t;return t.substr(0,i)+n(t.substr(i))}function a(t){return!t||"#"===t||"?"===t||"/"===t}Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=function(t,e){const r=(e=e||"").indexOf("#");if(r>0&&(e=e.substr(0,r)),!t.length){if(e.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);return e}if(t.startsWith("?")){const r=e.indexOf("?");return r>0&&(e=e.substr(0,r)),e+t}if(t.startsWith("#"))return e+t;if(!e.length){const e=t.indexOf(":");if(e<0)throw new Error(`Found invalid relative IRI '${t}' for a missing baseIRI`);return i(t,e)}const a=t.indexOf(":");if(a>=0)return i(t,a);const o=e.indexOf(":");if(o<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);const s=e.substr(0,o+1);if(0===t.indexOf("//"))return s+i(t,a);let l;if(e.indexOf("//",o)===o+1){if(l=e.indexOf("/",o+3),l<0)return e.length>o+3?e+"/"+i(t,a):s+i(t,a)}else if(l=e.indexOf("/",o+1),l<0)return s+i(t,a);if(0===t.indexOf("/"))return e.substr(0,l)+n(t);let d=e.substr(l);const c=d.lastIndexOf("/");return c>=0&&c0&&!(t&&"#"===t[0])}static getPrefix(t,e){if(t&&"#"===t[0])return null;const r=t.indexOf(":");if(r>=0){if(t.length>r+1&&"/"===t.charAt(r+1)&&"/"===t.charAt(r+2))return null;const n=t.substr(0,r);if("_"===n)return null;if(e[n])return n}return null}static getContextValueId(t){if(null===t||"string"==typeof t)return t;const e=t["@id"];return e||null}static isSimpleTermDefinitionPrefix(t,e){return!n.isPotentialKeyword(t)&&("_"===t[0]||e.allowPrefixNonGenDelims||n.isPrefixIriEndingWithGenDelim(t))}static isPotentialKeyword(t){return"string"==typeof t&&n.KEYWORD_REGEX.test(t)}static isPrefixIriEndingWithGenDelim(t){return n.ENDS_WITH_GEN_DELIM.test(t)}static isPrefixValue(t){return t&&("string"==typeof t||t&&"object"==typeof t)}static isValidIri(t){return Boolean(t&&n.IRI_REGEX.test(t))}static isValidIriWeak(t){return!!t&&":"!==t[0]&&n.IRI_REGEX_WEAK.test(t)}static isValidKeyword(t){return n.VALID_KEYWORDS[t]}static isTermProtected(t,e){const r=t[e];return!("string"==typeof r)&&r&&r["@protected"]}static hasProtectedTerms(t){for(const e of Object.keys(t))if(n.isTermProtected(t,e))return!0;return!1}static isReservedInternalKeyword(t){return t.startsWith("@__")}}e.Util=n,n.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/,n.IRI_REGEX_WEAK=/(?::[^:])|\//,n.KEYWORD_REGEX=/^@[a-z]+$/i,n.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/,n.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/,n.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/,n.VALID_KEYWORDS={"@annotation":!0,"@base":!0,"@container":!0,"@context":!0,"@direction":!0,"@graph":!0,"@id":!0,"@import":!0,"@included":!0,"@index":!0,"@json":!0,"@language":!0,"@list":!0,"@nest":!0,"@none":!0,"@prefix":!0,"@propagate":!0,"@protected":!0,"@reverse":!0,"@set":!0,"@type":!0,"@value":!0,"@version":!0,"@vocab":!0},n.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"],n.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"],n.ALIAS_RANGE_BLACKLIST=["@context","@preserve"],n.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"],n.CONTAINERS_1_0=["@list","@set","@index"]},252:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(237),e),i(r(253),e),i(r(238),e),i(r(239),e),i(r(226),e),i(r(240),e),i(r(241),e)},253:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataFactory=void 0;const n=r(237),i=r(238),a=r(239),o=r(226),s=r(240),l=r(241);let d=0;e.DataFactory=class{constructor(t){this.blankNodeCounter=0,t=t||{},this.blankNodePrefix=t.blankNodePrefix||`df_${d++}_`}namedNode(t){return new o.NamedNode(t)}blankNode(t){return new n.BlankNode(t||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(t,e){return new a.Literal(t,e)}variable(t){return new l.Variable(t)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(t,e,r,n){return new s.Quad(t,e,r,n||this.defaultGraph())}fromTerm(t){switch(t.termType){case"NamedNode":return this.namedNode(t.value);case"BlankNode":return this.blankNode(t.value);case"Literal":return t.language?this.literal(t.value,t.language):t.datatype.equals(a.Literal.XSD_STRING)?this.literal(t.value):this.literal(t.value,this.fromTerm(t.datatype));case"Variable":return this.variable(t.value);case"DefaultGraph":return this.defaultGraph();case"Quad":return this.quad(this.fromTerm(t.subject),this.fromTerm(t.predicate),this.fromTerm(t.object),this.fromTerm(t.graph))}}fromQuad(t){return this.fromTerm(t)}resetBlankNodeCounter(){this.blankNodeCounter=0}}},263:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonLdParser=void 0;const n=r(297),i=r(217),a=r(26),o=r(300),s=r(269),l=r(305),d=r(248),c=r(306),u=r(307),h=r(308),f=r(309),p=r(310),g=r(311),y=r(312),E=r(313),C=r(314),w=r(225),I=r(267),O=r(316);class _ extends a.Transform{constructor(t){super({readableObjectMode:!0}),t=t||{},this.options=t,this.parsingContext=new C.ParsingContext(Object.assign({parser:this},t)),this.util=new w.Util({dataFactory:t.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new n,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",()=>{void 0!==this.jsonParser.mode&&this.emit("error",new Error("Unclosed document"))})}static fromHttpResponse(t,e,r,n){let a,o;if("application/ld+json"!==e){if("application/json"!==e&&!e.endsWith("+json"))throw new i.ErrorCoded("Unsupported JSON-LD media type "+e,i.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(r&&r.has("Link")&&r.forEach((e,r)=>{if("link"===r){const r=(0,I.parse)(e);for(const e of r.get("rel","http://www.w3.org/ns/json-ld#context")){if(a)throw new i.ErrorCoded("Multiple JSON-LD context link headers were found on "+t,i.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);a=e.uri}}}),!a&&!(null==n?void 0:n.ignoreMissingContextLinkHeader))throw new i.ErrorCoded(`Missing context link header for media type ${e} on ${t}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED)}if(r&&r.has("Content-Type")){const t=r.get("Content-Type"),e=/; *profile=([^"]*)/.exec(t);e&&"http://www.w3.org/ns/json-ld#streaming"===e[1]&&(o=!0)}return new _(Object.assign({baseIRI:t,context:a,streamingProfile:o},n||{}))}import(t){if("pipe"in t){t.on("error",t=>e.emit("error",t));const e=t.pipe(new _(this.options));return e}{const e=new a.PassThrough({readableObjectMode:!0});t.on("error",t=>r.emit("error",t)),t.on("data",t=>e.push(t)),t.on("end",()=>e.push(null));const r=e.pipe(new _(this.options));return r}}_transform(t,e,r){this.jsonParser.write(t),this.lastOnValueJob.then(()=>r(),t=>r(t))}async newOnValueJob(t,e,r,n){let a=!0;if(n&&r1&&(c=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let e=Math.max(1,this.parsingContext.validationStack.length-1);e=0?this.parsingContext.idStack[t-r-1]:[await this.util.getGraphContainerValue(e,t)];if(a)for(const e of a){this.parsingContext.emittedStack[t]=!0;for(const r of n)this.util.emitQuadChecked(t,i,r.predicate,r.object,e,r.reverse,r.isEmbedded)}else{const r=this.parsingContext.getUnidentifiedGraphBufferSafe(t-await this.util.getDepthOffsetGraph(t,e)-1);for(const t of n)t.reverse?r.push({object:i,predicate:t.predicate,subject:t.object,isEmbedded:t.isEmbedded}):r.push({object:t.object,predicate:t.predicate,subject:i,isEmbedded:t.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(t,1),this.parsingContext.literalStack.splice(t,1),this.parsingContext.jsonLiteralStack.splice(t,1)}const a=this.parsingContext.unidentifiedGraphsBuffer[t];if(a){for(const e of r){const r=1!==t||"BlankNode"!==e.termType||this.parsingContext.topLevelProperties?e:this.util.getDefaultGraph();this.parsingContext.emittedStack[t]=!0;for(const e of a)this.parsingContext.emitQuad(t,this.util.dataFactory.quad(e.subject,e.predicate,e.object,r))}this.parsingContext.unidentifiedGraphsBuffer.splice(t,1)}const o=this.parsingContext.annotationsBuffer[t];if(o){o.length>0&&1===t&&this.parsingContext.emitError(new i.ErrorCoded("Annotations can not be made on top-level nodes",i.ERROR_CODES.INVALID_ANNOTATION));const e=this.parsingContext.getAnnotationsBufferSafe(t-1);for(const t of o)e.push(t);delete this.parsingContext.annotationsBuffer[t]}}async validateKey(t,e,r){for(const n of _.ENTRY_HANDLERS)if(await n.validate(this.parsingContext,this.util,t,e,r))return{valid:!0,property:r||n.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=t=>{const e=this.jsonParser.stack.length,r=new Array(e+1).fill(0).map((t,r)=>r===e?this.jsonParser.key:this.jsonParser.stack[r].key);if(!this.isParsingContextInner(e)){const n=()=>this.newOnValueJob(r,t,e,!0);if(this.parsingContext.streamingProfile||this.parsingContext.contextTree.getContext(r.slice(0,-1)))this.lastOnValueJob=this.lastOnValueJob.then(n);else if("@context"===r[e]){let t=this.contextJobs[e];t||(t=this.contextJobs[e]=[]),t.push(n)}else"@type"===r[e]||"number"==typeof r[e]&&"@type"===r[e-1]?this.typeJobs.push({job:n,keys:r.slice(0,r.length-1)}):this.contextAwaitingJobs.push({job:n,keys:r});this.parsingContext.streamingProfile||0!==e||(this.lastOnValueJob=this.lastOnValueJob.then(()=>this.executeBufferedJobs()))}},this.jsonParser.onError=t=>{this.emit("error",t)}}isParsingContextInner(t){for(let e=t;e>0;e--)if("@context"===this.jsonParser.stack[e-1].key)return!0;return!1}async executeBufferedJobs(){for(const t of this.contextJobs)if(t)for(const e of t)await e();this.parsingContext.unaliasedKeywordCacheStack.splice(0);for(const t of this.contextAwaitingJobs){if(this.typeJobs.length>0){const e=[],r=[];for(let n=0;nt.keys.length-e.keys.length);for(const t of n)await t.job();const i=r.sort().reverse();for(const t of i)this.typeJobs.splice(t,1)}await t.job()}}}e.JsonLdParser=_,_.DEFAULT_PROCESSING_MODE="1.1",_.ENTRY_HANDLERS=[new o.EntryHandlerArrayValue,new c.EntryHandlerKeywordContext,new h.EntryHandlerKeywordId,new f.EntryHandlerKeywordIncluded,new u.EntryHandlerKeywordGraph,new p.EntryHandlerKeywordNest,new g.EntryHandlerKeywordType,new E.EntryHandlerKeywordValue,new O.EntryHandlerKeywordAnnotation,new s.EntryHandlerContainer,new y.EntryHandlerKeywordUnknownFallback,new d.EntryHandlerPredicate,new l.EntryHandlerInvalidFallback]},264:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultExpandOptions=e.ContextParser=void 0,r(265);const n=r(235),i=r(236),a=r(266),o=r(268),s=r(251),l=r(247);class d{constructor(t){t=t||{},this.documentLoader=t.documentLoader||new a.FetchDocumentLoader,this.documentCache={},this.validateContext=!t.skipValidation,this.expandContentTypeToBase=!!t.expandContentTypeToBase,this.remoteContextsDepthLimit=t.remoteContextsDepthLimit||32,this.redirectSchemaOrgHttps=!("redirectSchemaOrgHttps"in t)||!!t.redirectSchemaOrgHttps}static validateLanguage(t,e,r){if("string"!=typeof t)throw new i.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(t)}'`,r);if(!s.Util.REGEX_LANGUAGE_TAG.test(t)){if(e)throw new i.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(t)}'`,r);return!1}return!0}static validateDirection(t,e){if("string"!=typeof t)throw new i.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(t)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);if(!s.Util.REGEX_DIRECTION_TAG.test(t)){if(e)throw new i.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(t)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);return!1}return!0}idifyReverseTerms(t){for(const e of Object.keys(t)){const r=t[e];if(r&&"object"==typeof r&&r["@reverse"]&&!r["@id"]){if("string"!=typeof r["@reverse"]||s.Util.isValidKeyword(r["@reverse"]))throw new i.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${r["@reverse"]}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);r["@id"]=r["@reverse"],s.Util.isPotentialKeyword(r["@reverse"])?delete r["@reverse"]:r["@reverse"]=!0}}return t}expandPrefixedTerms(t,e){const r=t.getContextRaw();for(const n of Object.keys(r))if(s.Util.EXPAND_KEYS_BLACKLIST.indexOf(n)<0&&!s.Util.isReservedInternalKeyword(n)){const a=r[n];if(s.Util.isPotentialKeyword(n)&&s.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(n)>=0&&("@type"!==n||"object"==typeof r[n]&&!r[n]["@protected"]&&"@set"!==r[n]["@container"]))throw new i.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${n} to ${JSON.stringify(a)}`,i.ERROR_CODES.KEYWORD_REDEFINITION);if(s.Util.ALIAS_RANGE_BLACKLIST.indexOf(s.Util.getContextValueId(a))>=0)throw new i.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${n} to ${JSON.stringify(a)}`,i.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(a&&s.Util.isPotentialKeyword(s.Util.getContextValueId(a))&&!0===a["@prefix"])throw new i.ErrorCoded(`Tried to use keyword aliases as prefix: '${n}': '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);for(;s.Util.isPrefixValue(r[n]);){const i=r[n];let a=!1;if("string"==typeof i)r[n]=t.expandTerm(i,!0),a=a||i!==r[n];else{const o=i["@id"],l=i["@type"],d=!("@prefix"in i)||s.Util.isValidIri(n);if("@id"in i)null!=o&&"string"==typeof o&&(r[n]["@id"]=t.expandTerm(o,!0),a=a||o!==r[n]["@id"]);else if(!s.Util.isPotentialKeyword(n)&&d){const e=t.expandTerm(n,!0);e!==n&&(r[n]["@id"]=e,a=!0)}!l||"string"!=typeof l||"@vocab"===l||i["@container"]&&i["@container"]["@type"]||!d||(r[n]["@type"]=t.expandTerm(l,!0),e&&l===r[n]["@type"]&&(r[n]["@type"]=t.expandTerm(l,!1)),a=a||l!==r[n]["@type"])}if(!a)break}}}normalize(t,{processingMode:e,normalizeLanguageTags:r}){if(r||1===e)for(const e of Object.keys(t))if("@language"===e&&"string"==typeof t[e])t[e]=t[e].toLowerCase();else{const r=t[e];r&&"object"==typeof r&&"string"==typeof r["@language"]&&(r["@language"]=r["@language"].toLowerCase())}}containersToHash(t){for(const e of Object.keys(t)){const r=t[e];if(r&&"object"==typeof r)if("string"==typeof r["@container"])r["@container"]={[r["@container"]]:!0};else if(Array.isArray(r["@container"])){const t={};for(const e of r["@container"])t[e]=!0;r["@container"]=t}}}applyScopedProtected(t,{processingMode:e}){if(e&&e>=1.1&&t["@protected"]){for(const e of Object.keys(t))if(!s.Util.isReservedInternalKeyword(e)&&!s.Util.isPotentialKeyword(e)&&!s.Util.isTermProtected(t,e)){const r=t[e];r&&"object"==typeof r?"@protected"in t[e]||(t[e]["@protected"]=!0):t[e]={"@id":r,"@protected":!0}}delete t["@protected"]}}validateKeywordRedefinitions(t,e,r){for(const n of Object.keys(e))if(s.Util.isTermProtected(t,n)){if("string"==typeof e[n]){const i=s.Util.isSimpleTermDefinitionPrefix(e[n],r);e[n]={"@id":e[n]},i&&(e[n]["@prefix"]=!0,t[n]["@prefix"]=!0)}const a=l(t[n]);e[n]["@protected"]=!0;if(a!==l(e[n]))throw new i.ErrorCoded(`Attempted to override the protected keyword ${n} from ${JSON.stringify(s.Util.getContextValueId(t[n]))} to ${JSON.stringify(s.Util.getContextValueId(e[n]))}`,i.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}}validate(t,{processingMode:e}){for(const r of Object.keys(t)){if(s.Util.isReservedInternalKeyword(r))continue;if(""===r)throw new i.ErrorCoded(`The empty term is not allowed, got: '${r}': '${JSON.stringify(t[r])}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);const n=t[r],a=typeof n;if(s.Util.isPotentialKeyword(r)){switch(r.substr(1)){case"vocab":if(null!==n&&"string"!==a)throw new i.ErrorCoded("Found an invalid @vocab IRI: "+n,i.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(null!==n&&"string"!==a)throw new i.ErrorCoded("Found an invalid @base IRI: "+t[r],i.ERROR_CODES.INVALID_BASE_IRI);break;case"language":null!==n&&d.validateLanguage(n,!0,i.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(null!==n&&"number"!==a)throw new i.ErrorCoded("Found an invalid @version number: "+n,i.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":null!==n&&d.validateDirection(n,!0);break;case"propagate":if(1===e)throw new i.ErrorCoded("Found an illegal @propagate keyword: "+n,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(null!==n&&"boolean"!==a)throw new i.ErrorCoded("Found an invalid @propagate value: "+n,i.ERROR_CODES.INVALID_PROPAGATE_VALUE)}if(s.Util.isValidKeyword(r)&&s.Util.isValidKeyword(s.Util.getContextValueId(n)))throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${s.Util.getContextValueId(n)}'`,i.ERROR_CODES.KEYWORD_REDEFINITION)}else if(null!==n)switch(a){case"string":if(s.Util.getPrefix(n,t)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===n)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(n)&&n!==new o.JsonLdContextNormalized(t).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!(s.Util.isCompactIri(r)||"@id"in n||("@id"===n["@type"]?t["@base"]:t["@vocab"])))throw new i.ErrorCoded(`Missing @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);for(const l of Object.keys(n)){const c=n[l];if(c)switch(l){case"@id":if(s.Util.isValidKeyword(c)&&"@type"!==c&&"@id"!==c&&"@graph"!==c&&"@nest"!==c)throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===c)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(c)&&c!==new o.JsonLdContextNormalized(t).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}if("string"!=typeof c)throw new i.ErrorCoded(`Detected non-string @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.getPrefix(c,t)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if("@type"===n["@container"]&&"@id"!==c&&"@vocab"!==c)throw new i.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${r}': '${c}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if("string"!=typeof c)throw new i.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if(!("@id"===c||"@vocab"===c||1!==e&&"@json"===c||1!==e&&"@none"===c||"_"!==c[0]&&s.Util.isValidIri(c)))throw new i.ErrorCoded(`A context @type must be an absolute IRI, found: '${r}': '${c}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if("string"==typeof c&&n["@id"]&&n["@id"]!==c)throw new i.ErrorCoded(`Found non-matching @id and @reverse term values in '${r}':'${c}' and '${n["@id"]}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in n)throw new i.ErrorCoded(`@nest is not allowed in the reverse property '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(1===e&&(Object.keys(c).length>1||s.Util.CONTAINERS_1_0.indexOf(Object.keys(c)[0])<0))throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${Object.keys(c)}') in 1.0, must be only one of ${s.Util.CONTAINERS_1_0.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const t of Object.keys(c)){if("@list"===t&&n["@reverse"])throw new i.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(s.Util.CONTAINERS.indexOf(t)<0)throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${t}'), must be one of ${s.Util.CONTAINERS.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":d.validateLanguage(c,!0,i.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":d.validateDirection(c,!0);break;case"@prefix":if(null!==c&&"boolean"!=typeof c)throw new i.ErrorCoded(`Found an invalid term @prefix boolean in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in n)&&!s.Util.isValidIri(r))throw new i.ErrorCoded(`Invalid @prefix definition for '${r}' ('${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(1===e||!n["@container"]||!n["@container"]["@index"])throw new i.ErrorCoded(`Attempt to add illegal key to value object: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(s.Util.isPotentialKeyword(c)&&"@nest"!==c)throw new i.ErrorCoded(`Found an invalid term @nest value in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new i.ErrorCoded(`Found an invalid term value: '${r}': '${n}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(t,e,r){return"string"==typeof t||(r&&!("@base"in t)&&e.parentContext&&"object"==typeof e.parentContext&&"@base"in e.parentContext&&(t["@base"]=e.parentContext["@base"],e.parentContext["@__baseDocument"]&&(t["@__baseDocument"]=!0)),e.baseIRI&&!e.external&&("@base"in t?null===t["@base"]||"string"!=typeof t["@base"]||s.Util.isValidIri(t["@base"])||(t["@base"]=(0,n.resolve)(t["@base"],e.parentContext&&e.parentContext["@base"]||e.baseIRI)):(t["@base"]=e.baseIRI,t["@__baseDocument"]=!0))),t}normalizeContextIri(t,e){if(!s.Util.isValidIri(t))try{t=(0,n.resolve)(t,e)}catch(e){throw new Error("Invalid context IRI: "+t)}return this.redirectSchemaOrgHttps&&t.startsWith("http://schema.org")&&(t="https://schema.org/"),t}async parseInnerContexts(t,e){for(const r of Object.keys(t)){const n=t[r];if(n&&"object"==typeof n&&"@context"in n&&null!==n["@context"]&&!e.ignoreScopedContexts){if(this.validateContext)try{const i=Object.assign({},t);i[r]=Object.assign({},i[r]),delete i[r]["@context"],await this.parse(n["@context"],Object.assign(Object.assign({},e),{external:!1,parentContext:i,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(t){throw new i.ErrorCoded(t.message,i.ERROR_CODES.INVALID_SCOPED_CONTEXT)}n["@context"]=(await this.parse(n["@context"],Object.assign(Object.assign({},e),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:t}))).getContextRaw()}}return t}async parse(t,r={}){const{baseIRI:n,parentContext:a,external:l,processingMode:c=d.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:u,ignoreProtection:h,minimalProcessing:f}=r;let p=a;const g=r.remoteContexts||{};if(Object.keys(g).length>=this.remoteContextsDepthLimit)throw new i.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(g),i.ERROR_CODES.CONTEXT_OVERFLOW);if(null==t){if(!h&&p&&s.Util.hasProtectedTerms(p))throw new i.ErrorCoded("Illegal context nullification when terms are protected",i.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new o.JsonLdContextNormalized(this.applyBaseEntry({},r,!1))}if("string"==typeof t){const e=this.normalizeContextIri(t,n),i=this.getOverriddenLoad(e,r);if(i)return new o.JsonLdContextNormalized(i);const a=await this.parse(await this.load(e),Object.assign(Object.assign({},r),{baseIRI:e,external:!0,remoteContexts:Object.assign(Object.assign({},g),{[e]:!0})}));return this.applyBaseEntry(a.getContextRaw(),r,!0),a}if(Array.isArray(t)){const e=[],i=await Promise.all(t.map((t,i)=>{if("string"==typeof t){const a=this.normalizeContextIri(t,n);e[i]=a;const o=this.getOverriddenLoad(a,r);return o||this.load(a)}return t}));if(f)return new o.JsonLdContextNormalized(i);const a=await i.reduce((t,n,i)=>t.then(t=>this.parse(n,Object.assign(Object.assign({},r),{baseIRI:e[i]||r.baseIRI,external:!!e[i]||r.external,parentContext:t.getContextRaw(),remoteContexts:e[i]?Object.assign(Object.assign({},g),{[e[i]]:!0}):g}))),Promise.resolve(new o.JsonLdContextNormalized(p||{})));return this.applyBaseEntry(a.getContextRaw(),r,!0),a}if("object"==typeof t){if("@context"in t)return await this.parse(t["@context"],r);t=JSON.parse(JSON.stringify(t)),p&&!f&&(p=JSON.parse(JSON.stringify(p)));let a={};if(l&&delete t["@base"],this.applyBaseEntry(t,r,!0),this.containersToHash(t),f)return new o.JsonLdContextNormalized(t);let g={};if("@import"in t){if(!(c>=1.1))throw new i.ErrorCoded("Context importing is not supported in JSON-LD 1.0",i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if("string"!=typeof t["@import"])throw new i.ErrorCoded("An @import value must be a string, but got "+typeof t["@import"],i.ERROR_CODES.INVALID_IMPORT_VALUE);g=await this.loadImportContext(this.normalizeContextIri(t["@import"],n)),delete t["@import"]}a=Object.assign(Object.assign(Object.assign(Object.assign({},a),"object"==typeof p?p:{}),g),t);const y=new o.JsonLdContextNormalized(a);return await this.parseInnerContexts(a,r),(a&&a["@version"]||d.DEFAULT_PROCESSING_MODE)>=1.1&&(t["@vocab"]&&"string"==typeof t["@vocab"]||""===t["@vocab"])&&(p&&"@vocab"in p&&t["@vocab"].indexOf(":")<0?a["@vocab"]=p["@vocab"]+t["@vocab"]:(s.Util.isCompactIri(t["@vocab"])||t["@vocab"]in y.getContextRaw())&&(a["@vocab"]=y.expandTerm(t["@vocab"],!0))),this.idifyReverseTerms(a),this.expandPrefixedTerms(y,this.expandContentTypeToBase),!h&&p&&c>=1.1&&this.validateKeywordRedefinitions(p,a,e.defaultExpandOptions),this.normalize(a,{processingMode:c,normalizeLanguageTags:u}),this.applyScopedProtected(a,{processingMode:c}),this.validateContext&&this.validate(a,{processingMode:c}),y}throw new i.ErrorCoded("Tried parsing a context that is not a string, array or object, but got "+t,i.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(t){const e=this.documentCache[t];if(e)return"string"==typeof e?e:Array.isArray(e)?e.slice():Object.assign({},e);let r;try{r=await this.documentLoader.load(t)}catch(e){throw new i.ErrorCoded(`Failed to load remote context ${t}: ${e.message}`,i.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in r))throw new i.ErrorCoded("Missing @context in remote context at "+t,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[t]=r["@context"]}getOverriddenLoad(t,e){if(t in(e.remoteContexts||{})){if(e.ignoreRemoteScopedContexts)return t;throw new i.ErrorCoded("Detected a cyclic context inclusion of "+t,i.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(t){const e=await this.load(t);if("object"!=typeof e||Array.isArray(e))throw new i.ErrorCoded("An imported context must be a single object: "+t,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in e)throw new i.ErrorCoded("An imported context can not import another context: "+t,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);return this.containersToHash(e),e}}e.ContextParser=d,d.DEFAULT_PROCESSING_MODE=1.1,e.defaultExpandOptions={allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},265:function(t,e){!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in t,o="ArrayBuffer"in t;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function d(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function u(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function g(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(t)||l(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var t,e,r,n=f(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=p(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function I(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function O(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},E.call(w.prototype),E.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},O.error=function(){var t=new O(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];O.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new O(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function R(t,r){return new Promise((function(n,a){var o=new w(t,r);if(o.signal&&o.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new O(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new e.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),o.signal&&(o.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",l)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}R.polyfill=!0,t.fetch||(t.fetch=R,t.Headers=h,t.Request=w,t.Response=O),e.Headers=h,e.Request=w,e.Response=O,e.fetch=R,Object.defineProperty(e,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},266:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FetchDocumentLoader=void 0,r(265);const n=r(236),i=r(267),a=r(235);e.FetchDocumentLoader=class{constructor(t){this.fetcher=t}async load(t){const e=await(this.fetcher||fetch)(t,{headers:new Headers({accept:"application/ld+json"})});if(e.ok&&e.headers){let r=e.headers.get("Content-Type");if(r){const t=r.indexOf(";");t>0&&(r=r.substr(0,t))}if("application/ld+json"===r)return await e.json();if(e.headers.has("Link")){let r;if(e.headers.forEach((e,n)=>{if("link"===n){const n=(0,i.parse)(e);for(const e of n.get("type","application/ld+json"))if("alternate"===e.rel){if(r)throw new Error("Multiple JSON-LD alternate links were found on "+t);r=(0,a.resolve)(e.uri,t)}}}),r)return this.load(r)}throw new n.ErrorCoded("Unsupported JSON-LD media type "+r,n.ERROR_CODES.LOADING_DOCUMENT_FAILED)}throw new Error(e.statusText||"Status code: "+e.status)}}},267:function(t,e,r){"use strict";(function(e){var r=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,i=/\s|\uFEFF|\xA0/,a=/\r?\n[\x20\x09]+/g,o=/[;,"]/,s=/[;,"]|\s/,l=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,d=1,c=2,u=4;function h(t){return t.replace(n,"")}function f(t){return i.test(t)}function p(t,e){for(;f(t[e]);)e++;return e}function g(t){return s.test(t)||!l.test(t)}class y{constructor(t){this.refs=[],t&&this.parse(t)}rel(t){for(var e=[],r=t.toLowerCase(),n=0;n",e)))throw new Error("Expected end of URI delimiter at offset "+e);i={uri:t.slice(e+1,g)},e=g,r=c,e++}else if(r===c){if(f(t[e])){e++;continue}if(";"===t[e])r=u,e++;else{if(","!==t[e])throw new Error('Unexpected character "'+t[e]+'" at offset '+e);r=d,e++}}else{if(r!==u)throw new Error('Unknown parser state "'+r+'"');if(";"===t[e]||f(t[e])){e++;continue}if(-1===(g=t.indexOf("=",e)))throw new Error("Expected attribute delimiter at offset "+e);var s=h(t.slice(e,g)).toLowerCase(),l="";if('"'===t[e=p(t,e=g+1)])for(e++;e"),t.push(e);return t.join(", ")}}y.isCompatibleEncoding=function(t){return r.test(t)},y.parse=function(t,e){return(new y).parse(t,e)},y.isSingleOccurenceAttr=function(t){return"rel"===t||"type"===t||"media"===t||"title"===t||"title*"===t},y.isTokenAttr=function(t){return"rel"===t||"type"===t||"anchor"===t},y.escapeQuotes=function(t){return t.replace(/"/g,'\\"')},y.expandRelations=function(t){return t.rel.split(" ").map((function(e){var r=Object.assign({},t);return r.rel=e,r}))},y.parseExtendedValue=function(t){var e=/([^']+)?(?:'([^']*)')?(.+)/.exec(t);return{language:e[2].toLowerCase(),encoding:y.isCompatibleEncoding(e[1])?null:e[1].toLowerCase(),value:y.isCompatibleEncoding(e[1])?decodeURIComponent(e[3]):e[3]}},y.formatExtendedAttribute=function(t,r){var n=(r.encoding||"utf-8").toUpperCase();return t+"="+n+"'"+(r.language||"en")+"'"+(e.isBuffer(r.value)&&y.isCompatibleEncoding(n)?r.value.toString(n):e.isBuffer(r.value)?r.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(r.value))},y.formatAttribute=function(t,e){return Array.isArray(e)?e.map(e=>y.formatAttribute(t,e)).join("; "):"*"===t[t.length-1]||"string"!=typeof e?y.formatExtendedAttribute(t,e):(y.isTokenAttr(t)?e=g(e)?'"'+y.escapeQuotes(e)+'"':y.escapeQuotes(e):g(e)&&(e='"'+(e=(e=encodeURIComponent(e)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),t+"="+e)},t.exports=y}).call(this,r(2).Buffer)},268:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonLdContextNormalized=void 0;const n=r(235),i=r(264),a=r(236),o=r(251);e.JsonLdContextNormalized=class{constructor(t){this.contextRaw=t}getContextRaw(){return this.contextRaw}expandTerm(t,e,r=i.defaultExpandOptions){const s=this.contextRaw[t];if(null===s||s&&null===s["@id"])return null;let l=!0;if(s&&e){const e=o.Util.getContextValueId(s);if(e&&e!==t){if("string"==typeof e&&(o.Util.isValidIri(e)||o.Util.isValidKeyword(e)))return e;o.Util.isPotentialKeyword(e)||(l=!1)}}const d=o.Util.getPrefix(t,this.contextRaw),c=this.contextRaw["@vocab"],u=(!!c||""===c)&&c.indexOf(":")<0,h=this.contextRaw["@base"],f=o.Util.isPotentialKeyword(t);if(d){const e=this.contextRaw[d],n=o.Util.getContextValueId(e);if(n){if("string"!=typeof e&&r.allowPrefixForcing){if("_"!==n[0]&&!f&&!e["@prefix"]&&!(t in this.contextRaw))return t}else if(!o.Util.isSimpleTermDefinitionPrefix(n,r))return t;return n+t.substr(d.length+1)}}else{if(e&&(c||""===c||r.allowVocabRelativeToBase&&h&&u)&&!f&&!o.Util.isCompactIri(t)){if(u){if(r.allowVocabRelativeToBase)return(c||h?(0,n.resolve)(c,h):"")+t;throw new a.ErrorCoded(`Relative vocab expansion for term '${t}' with vocab '${c}' is not allowed.`,a.ERROR_CODES.INVALID_VOCAB_MAPPING)}return c+t}if(!e&&h&&!f&&!o.Util.isCompactIri(t))return(0,n.resolve)(t,h)}if(l)return t;throw new a.ErrorCoded(`Invalid IRI mapping found for context entry '${t}': '${JSON.stringify(s)}'`,a.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(t,e){if(e&&this.contextRaw["@vocab"]&&t.startsWith(this.contextRaw["@vocab"]))return t.substr(this.contextRaw["@vocab"].length);if(!e&&this.contextRaw["@base"]&&t.startsWith(this.contextRaw["@base"]))return t.substr(this.contextRaw["@base"].length);const r={prefix:"",suffix:t};for(const n in this.contextRaw){const i=this.contextRaw[n];if(i&&!o.Util.isPotentialKeyword(n)){const a=o.Util.getContextValueId(i);if(t.startsWith(a)){const i=t.substr(a.length);if(i)i.length2||!("@set"in t)&&Object.keys(t).length>1)}static getContainerGraphIndex(t,e,r){let n=l.isSimpleGraphContainer(t),i="";for(let t=e;t=0;t--)if("number"!=typeof e[t]){const r=s.Util.getContextValue(a,"@container",e[t],!1);if(r&&l.isSimpleGraphContainer(r))return{containers:r,depth:t+1,fallback:!1};const o=s.Util.getContextValue(a,"@container",e[t-1],!1);if(o){const e="@graph"in o;for(const r in l.CONTAINER_HANDLERS)if(o[r])return e?l.CONTAINER_HANDLERS[r].canCombineWithGraph()?{containers:o,depth:t,fallback:!1}:n:i?n:{containers:o,depth:t,fallback:!1};return n}if(i)return n;i=!0}return n}static async isBufferableContainerHandler(t,e,r){const n=await l.getContainerHandler(t,e,r);return!n.fallback&&!("@graph"in n.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(t,e,r,n,i){return!!await this.test(t,e,null,r,n)}async test(t,e,r,n,i){const a=s.Util.getContextValueContainer(await t.getContext(n,2),n[i-1]);for(const t in l.CONTAINER_HANDLERS)if(a[t])return{containers:a,handler:l.CONTAINER_HANDLERS[t]};return null}async handle(t,e,r,n,i,a,o){return o.handler.handle(o.containers,t,e,n,i,a)}}e.EntryHandlerContainer=l,l.CONTAINER_HANDLERS={"@id":new n.ContainerHandlerIdentifier,"@index":new i.ContainerHandlerIndex,"@language":new a.ContainerHandlerLanguage,"@type":new o.ContainerHandlerType}},296:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(263),e)},297:function(t,e,r){var{Buffer:n}=r(2),a={},o=a.LEFT_BRACE=1,s=a.RIGHT_BRACE=2,l=a.LEFT_BRACKET=3,d=a.RIGHT_BRACKET=4,c=a.COLON=5,u=a.COMMA=6,h=a.TRUE=7,f=a.FALSE=8,p=a.NULL=9,g=a.STRING=10,y=a.NUMBER=11,E=a.START=17,C=a.STOP=18,w=a.TRUE1=33,I=a.TRUE2=34,O=a.TRUE3=35,_=a.FALSE1=49,R=a.FALSE2=50,b=a.FALSE3=51,x=a.FALSE4=52,m=a.NULL1=65,v=a.NULL2=66,S=a.NULL3=67,N=a.NUMBER1=81,A=a.NUMBER3=83,D=a.STRING1=97,T=a.STRING2=98,L=a.STRING3=99,P=a.STRING4=100,V=a.STRING5=101,k=a.STRING6=102,j=a.VALUE=113,U=a.KEY=114,F=a.OBJECT=129,B=a.ARRAY=130,G="\\".charCodeAt(0),M="/".charCodeAt(0),K="\b".charCodeAt(0),J="\f".charCodeAt(0),$="\n".charCodeAt(0),H="\r".charCodeAt(0),X="\t".charCodeAt(0);function q(t){return n.alloc?n.alloc(t):new n(t)}function Y(){this.tState=E,this.value=void 0,this.string=void 0,this.stringBuffer=q(65536),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=j,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:q(2),3:q(3),4:q(4)},this.offset=-1}Y.toknam=function(t){for(var e=Object.keys(a),r=0,n=e.length;r=65536&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},W.appendStringBuf=function(t,e,r){var n=t.length;"number"==typeof e&&(n="number"==typeof r?r<0?t.length-e+r:r-e:t.length-e),n<0&&(n=0),this.stringBufferOffset+n>65536&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,r),this.stringBufferOffset+=n},W.write=function(t){var e;"string"==typeof t&&(t=new n(t));for(var r=0,i=t.length;r=48&&e<64)this.string=String.fromCharCode(e),this.tState=A;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,r)}else if(this.tState===D)if(e=t[r],this.bytes_remaining>0){for(var a=0;a=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+Y.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>t.length){for(var y=0;y<=t.length-1-r;y++)this.temp_buffs[this.bytes_in_sequence][y]=t[r+y];this.bytes_remaining=r+this.bytes_in_sequence-t.length,r=t.length-1}else this.appendStringBuf(t,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===e)this.tState=E,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(g,this.string),this.offset+=n.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=T;else{if(!(e>=32))return this.charError(t,r);this.appendStringChar(e)}else if(this.tState===T)if(34===(e=t[r]))this.appendStringChar(e),this.tState=D;else if(92===e)this.appendStringChar(G),this.tState=D;else if(47===e)this.appendStringChar(M),this.tState=D;else if(98===e)this.appendStringChar(K),this.tState=D;else if(102===e)this.appendStringChar(J),this.tState=D;else if(110===e)this.appendStringChar($),this.tState=D;else if(114===e)this.appendStringChar(H),this.tState=D;else if(116===e)this.appendStringChar(X),this.tState=D;else{if(117!==e)return this.charError(t,r);this.unicode="",this.tState=L}else if(this.tState===L||this.tState===P||this.tState===V||this.tState===k){if(!((e=t[r])>=48&&e<64||e>64&&e<=70||e>96&&e<=102))return this.charError(t,r);if(this.unicode+=String.fromCharCode(e),this.tState++===k){var C=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&C>=56320&&C<57344?(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate,C))),this.highSurrogate=void 0):void 0===this.highSurrogate&&C>=55296&&C<56320?this.highSurrogate=C:(void 0!==this.highSurrogate&&(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new n(String.fromCharCode(C)))),this.tState=D}}else if(this.tState===N||this.tState===A)switch(e=t[r]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(e),this.tState=A;break;default:this.tState=E;var j=this.numberReviver(this.string);if(j)return j;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===w){if(114!==t[r])return this.charError(t,r);this.tState=I}else if(this.tState===I){if(117!==t[r])return this.charError(t,r);this.tState=O}else if(this.tState===O){if(101!==t[r])return this.charError(t,r);this.tState=E,this.onToken(h,!0),this.offset+=3}else if(this.tState===_){if(97!==t[r])return this.charError(t,r);this.tState=R}else if(this.tState===R){if(108!==t[r])return this.charError(t,r);this.tState=b}else if(this.tState===b){if(115!==t[r])return this.charError(t,r);this.tState=x}else if(this.tState===x){if(101!==t[r])return this.charError(t,r);this.tState=E,this.onToken(f,!1),this.offset+=4}else if(this.tState===m){if(117!==t[r])return this.charError(t,r);this.tState=v}else if(this.tState===v){if(108!==t[r])return this.charError(t,r);this.tState=S}else if(this.tState===S){if(108!==t[r])return this.charError(t,r);this.tState=E,this.onToken(p,null),this.offset+=3}},W.onToken=function(t,e){},W.parseError=function(t,e){this.tState=C,this.onError(new Error("Unexpected "+Y.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Y.toknam(this.state)))},W.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},W.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=j)},W.emit=function(t){this.mode&&(this.state=u),this.onValue(t)},W.onValue=function(t){},W.onToken=function(t,e){if(this.state===j)if(t===g||t===y||t===h||t===f||t===p)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===o)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=U,this.mode=F;else if(t===l)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=B,this.state=j;else if(t===s){if(this.mode!==F)return this.parseError(t,e);this.pop()}else{if(t!==d)return this.parseError(t,e);if(this.mode!==B)return this.parseError(t,e);this.pop()}else if(this.state===U)if(t===g)this.key=e,this.state=c;else{if(t!==s)return this.parseError(t,e);this.pop()}else if(this.state===c){if(t!==c)return this.parseError(t,e);this.state=j}else{if(this.state!==u)return this.parseError(t,e);if(t===u)this.mode===B?(this.key++,this.state=j):this.mode===F&&(this.state=U);else{if(!(t===d&&this.mode===B||t===s&&this.mode===F))return this.parseError(t,e);this.pop()}}},W.numberReviver=function(t){var e=Number(t);if(isNaN(e))return this.charError(buffer,i);t.match(/[0-9]+/)==t&&e.toString()!=t?this.onToken(g,t):this.onToken(y,e)},Y.C=a,t.exports=Y},298:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},299:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},300:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerArrayValue=void 0;const n=r(225),i=r(217);e.EntryHandlerArrayValue=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(t,e,r,n,i){return this.test(t,e,null,r,n)}async test(t,e,r,n,i){return"number"==typeof n[i]}async handle(t,e,r,i,a,o){let s=await e.unaliasKeywordParent(i,o);if("@list"===s){let r=null,n=0;for(let t=o-2;t>0;t--){const e=i[t];if("string"==typeof e||"number"==typeof e){n=t,r=e;break}}if(null!==r){const s=await e.valueToTerm(await t.getContext(i),r,a,o,i);for(const r of s)await this.handleListElement(t,e,r,a,o,i.slice(0,n),n);0===s.length&&await this.handleListElement(t,e,null,a,o,i.slice(0,n),n)}}else if("@set"===s)await t.newOnValueJob(i.slice(0,-2),a,o-2,!1);else if(void 0!==s&&"@type"!==s){for(let t=o-1;t>0;t--)if("number"!=typeof i[t]){s=await e.unaliasKeyword(i[t],i,t);break}const r=await t.getContext(i.slice(0,-1));if("@list"in n.Util.getContextValueContainer(r,s)){t.emittedStack[o+1]=!0;const r=await e.valueToTerm(await t.getContext(i),s,a,o,i);for(const n of r)await this.handleListElement(t,e,n,a,o,i.slice(0,-1),o-1);0===r.length&&await this.handleListElement(t,e,null,a,o,i.slice(0,-1),o-1)}else t.shiftStack(o,1),await t.newOnValueJob(i.slice(0,-1),a,o-1,!1),t.contextTree.removeContext(i.slice(0,-1))}}async handleListElement(t,e,r,n,a,o,s){let l=t.listPointerStack[a];if(null!==n&&null!==(await e.unaliasKeywords(n,o,a))["@value"]){if(l&&l.value){const r=e.dataFactory.blankNode();t.emitQuad(a,e.dataFactory.quad(l.value,e.rdfRest,r,e.getDefaultGraph())),l.value=r}else{const t=e.dataFactory.blankNode();l={value:t,listRootDepth:s,listId:t}}r&&t.emitQuad(a,e.dataFactory.quad(l.value,e.rdfFirst,r,e.getDefaultGraph()))}else l||(l={listRootDepth:s,listId:e.rdfNil});t.listPointerStack[a]=l,t.rdfstar&&t.annotationsBuffer[a]&&t.emitError(new i.ErrorCoded("Found an illegal annotation inside a list",i.ERROR_CODES.INVALID_ANNOTATION))}}},301:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerHandlerIdentifier=void 0;e.ContainerHandlerIdentifier=class{canCombineWithGraph(){return!0}async handle(t,e,r,n,i,a){let o;if(e.emittedStack[a+1]&&e.idStack[a+1])o=e.idStack[a+1][0];else{const t=null!==await r.getContainerKey(n[a],n,a)?await r.resourceToTerm(await e.getContext(n),n[a]):r.dataFactory.blankNode();if(!t)return void(e.emittedStack[a]=!1);o=t,e.idStack[a+1]=[o]}let s=e.idStack[a];s||(s=e.idStack[a]=[]),s.some(t=>t.equals(o))||s.push(o),await e.handlePendingContainerFlushBuffers()||(e.emittedStack[a]=!1)}}},302:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerHandlerIndex=void 0;const n=r(217),i=r(248),a=r(225);e.ContainerHandlerIndex=class{canCombineWithGraph(){return!0}async handle(t,e,r,o,s,l){if(!Array.isArray(s)){const d="@graph"in t,c=await e.getContext(o),u=o[l-1],h=a.Util.getContextValueIndex(c,u);if(h){if(n.Util.isPotentialKeyword(h))throw new n.ErrorCoded("Keywords can not be used as @index value, got: "+h,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("string"!=typeof h)throw new n.ErrorCoded("@index values must be strings, got: "+h,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("object"!=typeof s){if("@id"!==a.Util.getContextValueType(c,u))throw new n.ErrorCoded("Property-based index containers require nodes as values or strings with @type: @id, but got: "+s,n.ERROR_CODES.INVALID_VALUE_OBJECT);const t=r.resourceToTerm(c,s);t&&(e.idStack[l+1]=[t])}const t=r.createVocabOrBaseTerm(c,h);if(t){const n=await r.valueToTerm(c,h,await r.getContainerKey(o[l],o,l),l,o);if(d){const i=await r.getGraphContainerValue(o,l+1);for(const a of n)e.emitQuad(l,r.dataFactory.quad(i,t,a,r.getDefaultGraph()))}else for(const a of n)await i.EntryHandlerPredicate.handlePredicateObject(e,r,o,l+1,t,a,!1,!1,!1)}}const f=d?2:1;await e.newOnValueJob(o.slice(0,o.length-f),s,l-f,!0),await e.handlePendingContainerFlushBuffers()}e.emittedStack[l]=!1}}},303:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerHandlerLanguage=void 0;const n=r(217);e.ContainerHandlerLanguage=class{canCombineWithGraph(){return!1}async handle(t,e,r,i,a,o){const s=await r.getContainerKey(i[o],i,o);if(Array.isArray(a))a=a.map(t=>({"@value":t,"@language":s}));else{if("string"!=typeof a)throw new n.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(a)}', but expected string`,n.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);a={"@value":a,"@language":s}}await e.newOnValueJob(i.slice(0,i.length-1),a,o-1,!0),e.emittedStack[o]=!1}}},304:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContainerHandlerType=void 0;const n=r(248),i=r(225);e.ContainerHandlerType=class{canCombineWithGraph(){return!1}async handle(t,e,r,a,o,s){if(!Array.isArray(o)){if("string"==typeof o){const t=await e.getContext(a),n="@vocab"===i.Util.getContextValueType(t,a[s-1])?await r.createVocabOrBaseTerm(t,o):await r.resourceToTerm(t,o);if(n){const t={"@id":"NamedNode"===n.termType?n.value:o};await e.newOnValueJob(a.slice(0,a.length-1),t,s-1,!0),e.idStack[s+1]=[n]}}else{const t=!!e.idStack[s+1];t||delete e.idStack[s],await e.newOnValueJob(a.slice(0,a.length-1),o,s-1,!0),t||(e.idStack[s+1]=e.idStack[s])}const t=await r.getContainerKey(a[s],a,s),l=null!==t?r.createVocabOrBaseTerm(await e.getContext(a),t):null;l&&await n.EntryHandlerPredicate.handlePredicateObject(e,r,a,s+1,r.rdfType,l,!1,!1,!1),await e.handlePendingContainerFlushBuffers()}e.emittedStack[s]=!1}}},305:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerInvalidFallback=void 0;e.EntryHandlerInvalidFallback=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(t,e,r,n,i){return!1}async test(t,e,r,n,i){return!0}async handle(t,e,r,n,i,a){t.emittedStack[a]=!1}}},306:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordContext=void 0;const n=r(217),i=r(223);class a extends i.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(t,e,r,i,a,o){t.streamingProfile&&(t.processingStack[o]||t.processingType[o]||void 0!==t.idStack[o])&&t.emitError(new n.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const s=t.getContext(i),l=t.parseContext(a,(await s).getContextRaw());t.contextTree.setContext(i.slice(0,-1),l),t.emitContext(a),await t.validateContext(await l)}}e.EntryHandlerKeywordContext=a},307:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordGraph=void 0;const n=r(223);class i extends n.EntryHandlerKeyword{constructor(){super("@graph")}async handle(t,e,r,n,i,a){t.graphStack[a+1]=!0}}e.EntryHandlerKeywordGraph=i},308:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordId=void 0;const n=r(217),i=r(223);class a extends i.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(t,e,r,i,a,o){if("string"!=typeof a){if(t.rdfstar&&"object"==typeof a){const e=Object.keys(a);1===e.length&&"@id"===e[0]&&t.emitError(new n.ErrorCoded("Invalid embedded node without property with @id "+a["@id"],n.ERROR_CODES.INVALID_EMBEDDED_NODE))}else t.emitError(new n.ErrorCoded(`Found illegal @id '${a}'`,n.ERROR_CODES.INVALID_ID_VALUE));return}const s=await e.getPropertiesDepth(i,o);if(void 0!==t.idStack[s]&&(t.idStack[s][0].listHead?t.emitError(new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${i[o-1]}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):t.emitError(new n.ErrorCoded(`Found duplicate @ids '${t.idStack[s][0].value}' and '${a}'`,n.ERROR_CODES.COLLIDING_KEYWORDS))),t.rdfstar&&t.annotationsBuffer[o])for(const e of t.annotationsBuffer[o])e.depth===o&&t.emitError(new n.ErrorCoded("Found an illegal @id inside an annotation: "+a,n.ERROR_CODES.INVALID_ANNOTATION));t.idStack[s]=e.nullableTermToArray(await e.resourceToTerm(await t.getContext(i),a))}}e.EntryHandlerKeywordId=a},309:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordIncluded=void 0;const n=r(217),i=r(223);class a extends i.EntryHandlerKeyword{constructor(){super("@included")}async handle(t,e,r,i,a,o){"object"!=typeof a&&t.emitError(new n.ErrorCoded(`Found illegal @included '${a}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE));const s=await e.unaliasKeywords(a,i,o,await t.getContext(i));"@value"in s&&t.emitError(new n.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in s&&t.emitError(new n.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),t.emittedStack[o]=!1}}e.EntryHandlerKeywordIncluded=a},310:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordNest=void 0;const n=r(217),i=r(223);class a extends i.EntryHandlerKeyword{constructor(){super("@nest")}async handle(t,e,r,i,a,o){"object"!=typeof a&&t.emitError(new n.ErrorCoded(`Found invalid @nest entry for '${r}': '${a}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await e.unaliasKeywords(a,i,o,await t.getContext(i))&&t.emitError(new n.ErrorCoded(`Found an invalid @value node for '${r}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),t.emittedStack[o]=!1}}e.EntryHandlerKeywordNest=a},311:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordType=void 0;const n=r(217),i=r(225),a=r(248),o=r(223);class s extends o.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(t,e,r,o,s,l){const d=o[l],c=await t.getContext(o),u=e.rdfType,h=await e.unaliasKeywordParent(o,l),f=i.Util.isPropertyReverse(c,d,h),p=i.Util.isPropertyInEmbeddedNode(h);e.validateReverseInEmbeddedNode(r,f,p);const g=i.Util.isPropertyInAnnotationObject(h),y=Array.isArray(s)?s:[s];for(const r of y){"string"!=typeof r&&t.emitError(new n.ErrorCoded(`Found illegal @type '${r}'`,n.ERROR_CODES.INVALID_TYPE_VALUE));const i=e.createVocabOrBaseTerm(c,r);i&&await a.EntryHandlerPredicate.handlePredicateObject(t,e,o,l,u,i,f,p,g)}let E=Promise.resolve(c),C=!1;for(const e of y.sort()){const r=i.Util.getContextValue(c,"@context",e,null);r&&(C=!0,E=E.then(e=>t.parseContext(r,e.getContextRaw())))}!t.streamingProfile||!C&&t.streamingProfileAllowOutOfOrderPlainType||!t.processingStack[l]&&!t.idStack[l]||t.emitError(new n.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),C&&(E=E.then(t=>("@propagate"in t.getContextRaw()||(t.getContextRaw()["@propagate"]=!1),!1===t.getContextRaw()["@propagate"]&&(t.getContextRaw()["@__propagateFallback"]=c.getContextRaw()),t)),t.contextTree.setContext(o.slice(0,o.length-1),E)),t.processingType[l]=!0}}e.EntryHandlerKeywordType=s},312:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordUnknownFallback=void 0;const n=r(217);class i{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(t,e,r,i,a){const o=await e.unaliasKeyword(r[i],r,i);return!!n.Util.isPotentialKeyword(o)&&!(!a&&"@list"===o)}async test(t,e,r,i,a){return n.Util.isPotentialKeyword(r)}async handle(t,e,r,a,o,s){const l=i.VALID_KEYWORDS_TYPES[r];void 0!==l?l&&typeof o!==l.type&&t.emitError(new n.ErrorCoded(`Invalid value type for '${r}' with value '${o}'`,l.errorCode)):t.strictValues&&t.emitError(new Error(`Unknown keyword '${r}' with value '${o}'`)),t.emittedStack[s]=!1}}e.EntryHandlerKeywordUnknownFallback=i,i.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:n.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:n.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null}},313:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordValue=void 0;const n=r(223);class i extends n.EntryHandlerKeyword{constructor(){super("@value")}async validate(t,e,r,n,i){const a=r[n];return a&&!t.literalStack[n]&&await this.test(t,e,a,r,n)&&(t.literalStack[n]=!0),super.validate(t,e,r,n,i)}async test(t,e,r,n,i){return"@value"===await e.unaliasKeyword(n[i],n.slice(0,n.length-1),i-1,!0)}async handle(t,e,r,n,i,a){t.literalStack[a]=!0,delete t.unidentifiedValuesBuffer[a],delete t.unidentifiedGraphsBuffer[a],t.emittedStack[a]=!1}}e.EntryHandlerKeywordValue=i},314:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParsingContext=void 0;const n=r(217),i=r(236),a=r(315),o=r(263);class s{constructor(t){this.contextParser=new n.ContextParser({documentLoader:t.documentLoader,skipValidation:t.skipContextValidation}),this.streamingProfile=!!t.streamingProfile,this.baseIRI=t.baseIRI,this.produceGeneralizedRdf=!!t.produceGeneralizedRdf,this.allowSubjectList=!!t.allowSubjectList,this.processingMode=t.processingMode||o.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!t.strictValues,this.validateValueIndexes=!!t.validateValueIndexes,this.defaultGraph=t.defaultGraph,this.rdfDirection=t.rdfDirection,this.normalizeLanguageTags=t.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=t.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=!1!==t.rdfstar,this.rdfstarReverseInEmbedded=t.rdfstarReverseInEmbedded,this.topLevelProperties=!1,this.activeProcessingMode=parseFloat(this.processingMode),this.processingStack=[],this.processingType=[],this.emittedStack=[],this.idStack=[],this.graphStack=[],this.graphContainerTermStack=[],this.listPointerStack=[],this.contextTree=new a.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=t.parser,t.context?(this.rootContext=this.parseContext(t.context),this.rootContext.then(t=>this.validateContext(t))):this.rootContext=Promise.resolve(new n.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(t,e,r){return this.contextParser.parse(t,{baseIRI:this.baseIRI,ignoreProtection:r,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:e,processingMode:this.activeProcessingMode})}validateContext(t){const e=t.getContextRaw()["@version"];if(e){if(this.activeProcessingMode&&e>this.activeProcessingMode)throw new i.ErrorCoded(`Unsupported JSON-LD version '${e}' under active processing mode ${this.activeProcessingMode}.`,i.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&e0&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==e&&!r);return 0===i.depth&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==e&&(i.context=new n.JsonLdContextNormalized({})),i}async newOnValueJob(t,e,r,n){await this.parser.newOnValueJob(t,e,r,n)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const t of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(t.depth,t.keys),this.parser.flushStacks(t.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}return!1}emitQuad(t,e){1===t&&(this.topLevelProperties=!0),this.parser.push(e)}emitError(t){this.parser.emit("error",t)}emitContext(t){this.parser.emit("context",t)}getUnidentifiedValueBufferSafe(t){let e=this.unidentifiedValuesBuffer[t];return e||(e=[],this.unidentifiedValuesBuffer[t]=e),e}getUnidentifiedGraphBufferSafe(t){let e=this.unidentifiedGraphsBuffer[t];return e||(e=[],this.unidentifiedGraphsBuffer[t]=e),e}getAnnotationsBufferSafe(t){let e=this.annotationsBuffer[t];return e||(e=[],this.annotationsBuffer[t]=e),e}getExpandOptions(){return s.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(t,e){const r=this.idStack[t+e];if(r&&(this.idStack[t]=r,this.emittedStack[t]=!0,delete this.idStack[t+e]),this.pendingContainerFlushBuffers.length)for(const r of this.pendingContainerFlushBuffers)r.depth>=t+e&&(r.depth-=e,r.keys.splice(t,e));this.unidentifiedValuesBuffer[t+e]&&(this.unidentifiedValuesBuffer[t]=this.unidentifiedValuesBuffer[t+e],delete this.unidentifiedValuesBuffer[t+e]),this.annotationsBuffer[t+e-1]&&(this.annotationsBuffer[t-1]||(this.annotationsBuffer[t-1]=[]),this.annotationsBuffer[t-1]=[...this.annotationsBuffer[t-1],...this.annotationsBuffer[t+e-1]],delete this.annotationsBuffer[t+e-1])}}e.ParsingContext=s,s.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}}},315:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextTree=void 0;class n{constructor(){this.subTrees={}}getContext(t){if(t.length>0){const[e,...r]=t,n=this.subTrees[e];if(n){const t=n.getContext(r);if(t)return t.then(({context:t,depth:e})=>({context:t,depth:e+1}))}}return this.context?this.context.then(t=>({context:t,depth:0})):null}setContext(t,e){if(0===t.length)this.context=e;else{const[r,...i]=t;let a=this.subTrees[r];a||(a=this.subTrees[r]=new n),a.setContext(i,e)}}removeContext(t){this.setContext(t,null)}}e.ContextTree=n},316:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EntryHandlerKeywordAnnotation=void 0;const n=r(223),i=r(217);class a extends n.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(t,e,r,n,a,o){("string"==typeof a||"object"==typeof a&&a["@value"])&&t.emitError(new i.ErrorCoded("Found illegal annotation value: "+JSON.stringify(a),i.ERROR_CODES.INVALID_ANNOTATION))}}e.EntryHandlerKeywordAnnotation=a},382:function(t,e,r){"use strict";r.r(e);var n=r(221),i=r(61),a=r(234),o=r(296),s=r(26);var l=class{constructor(t,{baseIRI:e="null:",context:r=null,documentLoader:n,factory:l=i.a}={}){const d=new o.JsonLdParser({baseIRI:e,context:r,dataFactory:l,documentLoader:n,streamingProfile:!1});t.pipe(d);const c=function(t){const e=function(t){return e=>"NamedNode"!==e.termType?null:e.value.startsWith("null:")?t.namedNode(e.value.slice("null:".length)):null}(t);return r=>{const n=e(r.subject),i=e(r.predicate),a=e(r.object),o=e(r.graph);return n||i||a||o?t.quad(n||r.subject,i||r.predicate,a||r.object,o||r.graph):r}}(l),u=new s.Transform({objectMode:!0,transform:(t,e,r)=>{r(null,c(t))}});return d.on("context",t=>{Object.entries(t).forEach(([t,e])=>{u.emit("prefix",t,l.namedNode(e))})}),d.on("error",t=>u.destroy(t)),d.pipe(u),Object(a.a)(u)}};class d extends n.a{constructor(t){super(l,t)}}e.default=d}}]); +//# sourceMappingURL=ede0d9c570d71b59984d.js.map \ No newline at end of file diff --git a/converter/ede0d9c570d71b59984d.js.map b/converter/ede0d9c570d71b59984d.js.map new file mode 100644 index 00000000..e7486b76 --- /dev/null +++ b/converter/ede0d9c570d71b59984d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ede0d9c570d71b59984d.js","sources":["webpack:///ede0d9c570d71b59984d.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/f37c8ad051d692d8504b.js b/converter/f37c8ad051d692d8504b.js new file mode 100644 index 00000000..3b7b86a7 --- /dev/null +++ b/converter/f37c8ad051d692d8504b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[16,14,15,17],{244:function(n,o){},245:function(n,o){}}]); +//# sourceMappingURL=f37c8ad051d692d8504b.js.map \ No newline at end of file diff --git a/converter/f37c8ad051d692d8504b.js.map b/converter/f37c8ad051d692d8504b.js.map new file mode 100644 index 00000000..7f93b43f --- /dev/null +++ b/converter/f37c8ad051d692d8504b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"f37c8ad051d692d8504b.js","sources":["webpack:///f37c8ad051d692d8504b.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/converter/index.html b/converter/index.html new file mode 100644 index 00000000..82efa9ad --- /dev/null +++ b/converter/index.html @@ -0,0 +1 @@ +rdfjs-elements-demos \ No newline at end of file diff --git a/converter/precache-manifest.74f96f006fa86ffce308728e7246654c.js b/converter/precache-manifest.74f96f006fa86ffce308728e7246654c.js new file mode 100644 index 00000000..dbbd14e2 --- /dev/null +++ b/converter/precache-manifest.74f96f006fa86ffce308728e7246654c.js @@ -0,0 +1,186 @@ +self.__precacheManifest = (self.__precacheManifest || []).concat([ + { + "revision": "5b74c6700db608d84922", + "url": "0408b44b6fd78fcf196a.js" + }, + { + "revision": "5b74c6700db608d84922", + "url": "0408b44b6fd78fcf196a.js.map" + }, + { + "revision": "578da05ae52f98b2a2d0", + "url": "1d2bab617f7df0cd5414.js" + }, + { + "revision": "f129768dcf86b4efb87a8ab4f55f2b06", + "url": "1d2bab617f7df0cd5414.js.LICENSE.txt" + }, + { + "revision": "578da05ae52f98b2a2d0", + "url": "1d2bab617f7df0cd5414.js.map" + }, + { + "revision": "951bdb7089bed16bc221", + "url": "20fc87c45c11772f288e.js" + }, + { + "revision": "0872477229e6f2f9ea18700ab21389d6", + "url": "20fc87c45c11772f288e.js.LICENSE.txt" + }, + { + "revision": "951bdb7089bed16bc221", + "url": "20fc87c45c11772f288e.js.map" + }, + { + "revision": "40670ffae63ed4aef623", + "url": "2ba55068bb44300b652d.js" + }, + { + "revision": "d1b2409b94697cfebf92ce513e4dd6e3", + "url": "2ba55068bb44300b652d.js.LICENSE.txt" + }, + { + "revision": "40670ffae63ed4aef623", + "url": "2ba55068bb44300b652d.js.map" + }, + { + "revision": "8f1a12ccda4e64517cf5", + "url": "360cff4bf6981215a1d6.js" + }, + { + "revision": "8f1a12ccda4e64517cf5", + "url": "360cff4bf6981215a1d6.js.map" + }, + { + "revision": "296eadebd26fba2a10a0", + "url": "3d46d0acd2ee8f92cdfa.js" + }, + { + "revision": "296eadebd26fba2a10a0", + "url": "3d46d0acd2ee8f92cdfa.js.map" + }, + { + "revision": "57346f32329fcb8dc93f", + "url": "413f167fa27c82813743.js" + }, + { + "revision": "5b608667e509b3dea3cf2711f7bd79aa", + "url": "413f167fa27c82813743.js.LICENSE.txt" + }, + { + "revision": "57346f32329fcb8dc93f", + "url": "413f167fa27c82813743.js.map" + }, + { + "revision": "77b603c4f26eeaeb73bc", + "url": "47b7fc5dc91d1aadb739.js" + }, + { + "revision": "77b603c4f26eeaeb73bc", + "url": "47b7fc5dc91d1aadb739.js.map" + }, + { + "revision": "73de2291bd24584813ad", + "url": "74a0d36eb8170ad36fd0.js" + }, + { + "revision": "73de2291bd24584813ad", + "url": "74a0d36eb8170ad36fd0.js.map" + }, + { + "revision": "7c763ff4415c88dcedb9", + "url": "78333c9878ed6ee78e1b.js" + }, + { + "revision": "7c763ff4415c88dcedb9", + "url": "78333c9878ed6ee78e1b.js.map" + }, + { + "revision": "129797d2c7bf8fbde33d", + "url": "98a0f39ba08a3e1a741b.js" + }, + { + "revision": "129797d2c7bf8fbde33d", + "url": "98a0f39ba08a3e1a741b.js.map" + }, + { + "revision": "cecd942f8f53c071f54e", + "url": "a9fc8bb7b651bd49fb44.js" + }, + { + "revision": "cecd942f8f53c071f54e", + "url": "a9fc8bb7b651bd49fb44.js.map" + }, + { + "revision": "e70df935c02c4ee2b69c", + "url": "abc15c67319192d85f38.js" + }, + { + "revision": "e70df935c02c4ee2b69c", + "url": "abc15c67319192d85f38.js.map" + }, + { + "revision": "fee449d888c3a0cb3bbe", + "url": "ce018fa2e2b09b63e94f.js" + }, + { + "revision": "fee449d888c3a0cb3bbe", + "url": "ce018fa2e2b09b63e94f.js.map" + }, + { + "revision": "8558d83550b4c0f6c308", + "url": "d201d166f422ad178128.js" + }, + { + "revision": "8558d83550b4c0f6c308", + "url": "d201d166f422ad178128.js.map" + }, + { + "revision": "ccf2224a3699278c7f0d", + "url": "de4dda2facc175d66bb6.js" + }, + { + "revision": "ccf2224a3699278c7f0d", + "url": "de4dda2facc175d66bb6.js.map" + }, + { + "revision": "641096c9f82342236aa6", + "url": "e37acd904efbb43aa96a.js" + }, + { + "revision": "641096c9f82342236aa6", + "url": "e37acd904efbb43aa96a.js.map" + }, + { + "revision": "7cd51e6857758d522c3f", + "url": "edc5e3b80eb8cc706b60.js" + }, + { + "revision": "684385b6867b1a2580505cfe63f7e61e", + "url": "edc5e3b80eb8cc706b60.js.LICENSE.txt" + }, + { + "revision": "7cd51e6857758d522c3f", + "url": "edc5e3b80eb8cc706b60.js.map" + }, + { + "revision": "228f5daebe12e908b778", + "url": "ede0d9c570d71b59984d.js" + }, + { + "revision": "228f5daebe12e908b778", + "url": "ede0d9c570d71b59984d.js.map" + }, + { + "revision": "c8b173d02f95e14aea20", + "url": "f37c8ad051d692d8504b.js" + }, + { + "revision": "c8b173d02f95e14aea20", + "url": "f37c8ad051d692d8504b.js.map" + }, + { + "revision": "b6b58dd1ae397d75c1ed70fcf166d9a5", + "url": "index.html" + } +]); \ No newline at end of file diff --git a/converter/sw.js b/converter/sw.js new file mode 100644 index 00000000..b2245d2a --- /dev/null +++ b/converter/sw.js @@ -0,0 +1,34 @@ +/** + * Welcome to your Workbox-powered service worker! + * + * You'll need to register this file in your web app and you should + * disable HTTP caching for this file too. + * See https://goo.gl/nhQhGp + * + * The rest of the code is auto-generated. Please don't update this file + * directly; instead, make changes to your Workbox build configuration + * and re-run your build process. + * See https://goo.gl/2aRDsh + */ + +importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); + +importScripts( + "precache-manifest.74f96f006fa86ffce308728e7246654c.js" +); + +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting(); + } +}); + +/** + * The workboxSW.precacheAndRoute() method efficiently caches and responds to + * requests for URLs in the manifest. + * See https://goo.gl/S9QRab + */ +self.__precacheManifest = [].concat(self.__precacheManifest || []); +workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); + +workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html")); diff --git a/rdf-editor/0408b44b6fd78fcf196a.js b/rdf-editor/0408b44b6fd78fcf196a.js new file mode 100644 index 00000000..1389ab18 --- /dev/null +++ b/rdf-editor/0408b44b6fd78fcf196a.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{377:function(t,e,s){if("function"!=typeof queueMicrotask){let t=Promise.resolve();try{queueMicrotask=e=>t.then(e).catch(t=>setTimeout(()=>{throw t},0))}catch(t){}}const i=s(243),r=s(43),n=/^[a-z][a-z0-9+\-.]*:(?:[^\0-\x20<>"{}|^`\\]|\\u[A-Fa-f0-9]{4}|\\U[A-Fa-f0-9]{8})*$/,a=/^[a-z][a-z0-9+\-.]*:[^\0-\x20<>"{}|^`]*$/,l=/^([^\0-\x20<>"{}|^`\\]|\\u[A-Fa-f0-9]{4}|\\U[A-Fa-f0-9]{8})*$/,_=/^([^\0-\x20<>"{}|^`])*$/,o=/\\u([0-9A-Fa-f]{4})|\\U([0-9A-Fa-f]{8})/g,h=(t,e,s)=>String.fromCodePoint(parseInt(e||s,16)),c=/\s*(?:#[^\n]*\n\s*)*\s*/y,f=/\s*(#[^\n]*\n\s*)*\s*/y,d=/[\\]/,u=/[^\n]+\n/y,p=/^(?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_0-9])(?:(?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.])*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?$/u,m=/^[a-z]+(-[a-z0-9]+)*$/,g=/[ \t]*/y,x=/@([A-Za-z]+(?:-[A-Za-z0-9-]+)*)(?:\s+|(?=[.,;\])#]))/y,b=/<([^>]*)>\s*/y,y=(t,e,s,i,r,n)=>{if(e)switch(e){case"t":return"\t";case"n":return"\n";case"r":return"\r";case"f":return"\f";case"b":return"\b";default:console.assert(`bad regex escape char mapping: '${e}'`)}else{if(s)return s;if(i)return String.fromCodePoint(parseInt(i,16));if(r)return String.fromCodePoint(parseInt(r,16));if(n)throw"\\"===n[0]?new Error(`expected string_literal but invalid escape sequence within contents: '${n}'. failed to parse a valid token`):new Error(`expected string_literal but invalid whitespace character within contents: ${JSON.stringify(n)}. failed to parse a valid token`);console.assert("unexpected no match branch in escape sequence replace callback")}},w=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\.))/g,k=/(?:\\(?:([tnrfb])|([\\"'])|u([0-9A-Fa-f]{4})|U([0-9A-Fa-f]{8}))|([\r\n]|\\[^uU]|\\u[^]{4}|\\U[^]{8}))/g,I=t=>t.replace(w,y),[j,$]=(()=>{let t=(()=>{try{new RegExp("(?(e.exec=s,e)}return t=>t()})();return[t(()=>new RegExp("(?new RegExp('(?]*)>|_:([^\x20\t<]+))[\x20\t]*<([^\\>]*)>[\x20\t]*(?:(?:(<[^\\>]*)>|_:([^\x20\t<]+))[\x20\t]*(?:<([^\\>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+|"([^"\\]*)(?:(")(?:\^\^<([^\\>]*)>|@([^\x20\t.]+)|)[\x20\t]*(?:<([^\\>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+)?)/y,A=/(?:<([^>]*)>|_:([^\x20\t<]+))[\x20\t]*<([^>]*)>[\x20\t]*(?:(?:(<[^>]*)>|_:([^\x20\t<]+))[\x20\t]*(?:<([^>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+|"((?:[^"\\]|\\.)*)(?:(")(?:\^\^<([^>]*)>|@([^\x20\t.]+)|)[\x20\t]*(?:<([^>]*)>|_:([^\x20\t<]+)|)[\x20\t]*\.\s*(#[^\n]*\n\s*|\n\s*)+)?)/y,v=/_:([^\x20\t<]+)/y;class F extends i.Transform{constructor(t){super({decodeStrings:!1,writableObjectMode:!1,readableObjectMode:!0,flush:t.flush,transform:t.transform}),this.on("pipe",t=>{this._ds_input=t,"function"==typeof t.setEncoding&&t.setEncoding("utf8")})}pipe(t){let e=t;return e._writableState.objectMode?t.isGraphyWritable&&(t=i.quads_to_writable()):t=i.quads_to_json(),t!==e?(super.pipe(t),t.pipe(e)):super.pipe(e)}}class q{constructor(t){let{input:e=null,relax:s=!1,debug:i=!1}=t,o=t.allow_relative_iris||t.allowRelativeIRIs||t.allowRelativeIris||!1,h=this._dc_factory=r.adopt(t.dataFactory||t.data_factory||r.unfiltered),d=this._f_quad=h.quad;Object.assign(this,{s:t.prepend||"",n:0,_b_debug:i,_b_relax:s,_b_destroyed:!1,_b_trim_start:!0,_f_state:this.statement,_kt_subject:null,_kt_predicate:null,_kt_object:null,_s_literal:""}),this._kt_default_graph=h.defaultGraph(),this._kt_rdfs_lang_string=h.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");let u=this._r_clean=c;t.relaxed&&console.warn(new Error("no such option 'relaxed'; did you mean 'relax' ?").stack.replace(/^Error:/,"Warning:")),"validate"in t&&console.warn(new Error("option 'validate' has been removed and validation is now on by default. Use 'relax' option if you wish to disable validation.").stack.replace(/^Error:/,"Warning:"));let g,x=h.namedNode,b=h.blankNode,y=h.languagedLiteral,w=o?l:n,k=o?_:a,I=this;Object.assign(this,s?{create_named_node:x,create_named_node_escapeless:x,create_blank_node:b,create_languaged_literal:y}:{create_named_node:t=>w.test(t)?x(t):I._error(`invalid IRI: "${t}"`),create_named_node_escapeless:t=>k.test(t)?x(t):I._error(`invalid IRI: "${t}"`),create_blank_node:t=>p.test(t)?b(t):I._error(`Invalid blank node label: "${t}"`),create_languaged_literal:(t,e)=>m.test(e)?y(t,e):I._error("Invalid literal language tag: "+e)});let j=!1;if(g=this.transform=new F({transform:(t,e,s)=>{j||(g.emit("ready"),j=!1);let i=this.s+=t;if(this._b_trim_start){u.lastIndex=0;let t=u.exec(i);this.emit_comments&&this.emit_comments(t[1]),this.i=u.lastIndex}else this.i=0;this.n=i.length;try{this.parse(!0)}catch(t){return g.destroy(t)}g.emit("progress",t.length),s()},flush:t=>{if(this.s.length){if(this.s+="\n",this._b_trim_start){u.lastIndex=0;let t=u.exec(this.s);this.emit_comments&&this.emit_comments(t[1]),this.i=u.lastIndex}else this.i=0;try{this.parse()}catch(t){return g.demolish(t)}if(this.s.length)return g.demolish(new Error(`parsing error occurred in state: statement\n ${this.s.substr(0,50)}\n ^ starting here`))}if(this._f_state!==this.statement)return g.demolish(new Error(`parsing error occurred in state: ${this._f_state.name}\n ${this.s.substr(0,50)}\n ^ starting here`));this.s=null,g.emit("progress",0),g.emit("eof"),t()}}),g._destroy=(...t)=>{this.destroy(...t)},this._f_data_quad=(t,e,s,i)=>g.push(d(t,e,s,i)),g.on("newListener",t=>{"comment"===t&&(u=f,this.emit_comments=t=>{if(!t)return;let e=t.slice(1).replace(/\n\s+$/,"").split(/\n+\s*#/g);for(let t of e)g.emit("comment",t)})}),this.bind(t),e)if(e.stream){let t=e.stream;queueMicrotask(()=>{t.pipe(g)})}else{if("string"!=typeof e.string)throw new TypeError("Invalid argument for input parameter: "+("object"==typeof e?JSON.stringify(e):e));{let t=e.string;queueMicrotask(()=>{g.end(t,"utf8")})}}g._graphy_reader=this}_error(t){throw this._b_destroyed=!0,new Error(t)}bind(t){let e=this.transform;t.error&&e.on("error",t.error),t.comment&&e.on("comment",t.comment),t.read&&e.once("read",t.read),t.progress&&e.on("progress",t.progress),t.eof&&e.once("eof",t.eof),t.end&&e.once("end",t.end),t.finish&&e.once("finish",t.finish),t.data&&e.on("data",t.data)}parse(){let t=this._f_state();for(;"function"==typeof t;)t=t.apply(this)}statement(){let t=this.s,e=(this.n,this.i),s=this._f_data_quad,i=this.create_named_node,r=this.create_named_node_escapeless,n=this.create_languaged_literal,a=this.create_blank_node,l=this._dc_factory.simpleLiteral,_=this._dc_factory.datatypedLiteral,c=this._kt_default_graph;for(;;){E.lastIndex=e;let f=E.exec(t);if(f){let i;e=E.lastIndex;let o=!1;if(f[4]){i=r(f[4].slice(1))}else if(f[5])i=a(f[5]);else{o=!0;let s=f[9];if(!f[10]){this._s_literal=s,this.i=e;{let t=f[1];this._kt_subject=t||"string"==typeof t?r(t):a(f[2])}this._kt_predicate=r(f[3]);let i=this.strlit_contents();if(i&&this.statement!==i)return i;{let s=this._r_clean;s.lastIndex=this.i;let i=s.exec(t);this.emit_comments&&this.emit_comments(i[1]),e=s.lastIndex;continue}}if(f[11]){i=_(s,this.create_named_node_escapeless(f[11]))}else if(f[12]){i=n(s,f[12].toLowerCase())}else i=l(s)}let h,d=c;if(o){let t=f[13];t||"string"==typeof t?d=r(t):f[14]&&(d=a(f[14]))}else{let t=f[6];t||"string"==typeof t?d=r(t):f[7]&&(d=a(f[7]))}{let t=f[1];h=t||"string"==typeof t?r(t):a(f[2])}s(h,r(f[3]),i,d),this.emit_comments&&this.emit_comments(f[8]||f[15])}else{A.lastIndex=e;let r=A.exec(t);if(r){let f;e=A.lastIndex;let u=!1;if(r[4]){let t=r[4].slice(1);f=i(d.test(t)?t.replace(o,h):t)}else if(r[5])f=a(d.test(r[5])?r[5].replace(o,h):r[5]);else{u=!0;let s=r[9];if(!r[10]){this._s_literal=s,this.i=e;{let t=r[1];this._kt_subject=t||"string"==typeof t?i(d.test(t)?t.replace(o,h):t):a(r[2])}this._kt_predicate=i(d.test(r[3])?r[3].replace(o,h):r[3]);let n=this.strlit_contents();if(n&&this.statement!==n)return n;{let s=this._r_clean;s.lastIndex=this.i;let i=s.exec(t);this.emit_comments&&this.emit_comments(i[1]),e=s.lastIndex;continue}}if(s=I(s),r[11]){f=_(s,this.create_named_node(r[11]))}else if(r[12]){f=n(s,r[12].toLowerCase())}else f=l(s)}let p,m=c;if(u){let t=r[13];t||"string"==typeof t?m=i(d.test(t)?t.replace(o,h):t):r[14]&&(m=a(r[14]))}else{let t=r[6];t||"string"==typeof t?m=i(d.test(t)?t.replace(o,h):t):r[7]&&(m=a(r[7]))}{let t=r[1];p=t||"string"==typeof t?i(d.test(t)?t.replace(o,h):t):a(r[2])}let g=r[3];s(p,i(d.test(g)?g.replace(o,h):g),f,m),this.emit_comments&&this.emit_comments(r[8]||r[15])}else{if(u.lastIndex=e,!u.exec(t))break;e=u.lastIndex,this._error(`Failed to read statement:\n\`${t.substr(e,80).replace(/\n/g,"⏎")} [...]\`\n ^ starting here`)}}}return this.s=t.substr(e),this._f_state=this.statement,1}strlit_contents(){let{s:t,n:e,i:s}=this;$.lastIndex=s;let i=$.exec(t);if(i){let e=i.index,r=t.slice(s,e);return this._s_literal+=I(r),this.i=e+i[0].length,this._b_trim_start=!0,this.datatype_or_langtag()||this.statement}{let i=t.slice(s),[r,n]=(t=>{let e=j.exec(t);if(e){let s=e.index;return[t.slice(0,s).replace(k,y),t.slice(s)]}return[t.replace(k,y),""]})(i);this._s_literal+=r,this.i=s=e-n.length,this._b_trim_start=!1}return sthis.max_token_length?this.parse_error("strlit_contents"):(this._f_state=this.strlit_contents,this.s=t.slice(s),this.eos&&this.eos(),1)}datatype_or_langtag(){let{s:t,n:e,i:s}=this,i=t[s];for(;sthis.max_token_length?this.parse_error("datatype_or_langtag"):(this._f_state=this.datatype_or_langtag,this.s=t.slice(s),this.eos&&this.eos(),1)}statement_term(){let{s:t,n:e,i:s}=this,i=t.indexOf(".",s);return i>-1?(this._b_trim_start=!0,this.i=i+1,this.statement):(/^\s*$/.test(t.slice(s))||this.parse_error("statement_term"),this._b_trim_start=!1,this._f_state=this.statement_term,this.s=t.slice(s),this.eos&&this.eos(),1)}post_object(){let{s:t,n:e,i:s}=this;if(g.lastIndex=s,g.exec(t),s=g.lastIndex,s>=e)return this._f_state=this.post_object,this.s=t.slice(s),this.eos&&this.eos(),1;switch(t[s]){case".":return this.i=s+1,this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,this._kt_default_graph),this.statement;case"<":case"_":return this.i=s,this.graph();default:this.i=s,this.parse_error("post_object")}}graph(){let{s:t,n:e,i:s}=this;b.lastIndex=s;let i=b.exec(t);if(i){this.i=b.lastIndex;let t=this.create_named_node(i[1]);return this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,t),this.statement_term()}{v.lastIndex=s;let e=v.exec(t);if(e){this.i=v.lastIndex;let t=this._dc_factory.blankNode(e[1]);return this._f_data_quad(this._kt_subject,this._kt_predicate,this._kt_object,t),this.statement_term()}}return this._f_state=this.graph,this.s=t.slice(s),this.eos&&this.eos(),1}parse_error(t){return this._error(`Failed to read ${t}:\n\`${this.s.substr(this.i,80).replace(/\n/g,"⏎")} [...]\`\n ^ starting here`)}destroy(t){this._f_data_quad=()=>{},!t&&this._ds_input&&this._ds_input.destroy(t),this.transform.demolish(t)}}t.exports=function(...t){let e={};if(t.length){let s=t[0];if(s&&s.input&&void 0===s.input.string&&!s.input.stream&&(s=s.input),"string"==typeof s)e.input={string:s};else if(null===s)e.input=null;else if("function"==typeof s.setEncoding)e.input={stream:s};else{if("function"==typeof s.pipeTo)throw new TypeError("Sorry, WHATWG streams are currently not supported :(");if(!s||"object"!=typeof s||"[object Object]"!==Object.prototype.toString.call(s))throw new TypeError("unexpected input type: "+s);if(e=s,t.length>1)throw new TypeError("unexpected argument(s) after config struct: "+t.slice(1))}if(t.length>1&&(Object.assign(e,t[1]),t.length>2))throw new TypeError("unexpected argument(s) after input and config struct: "+t.slice(2))}return new q(e).transform}}}]); +//# sourceMappingURL=0408b44b6fd78fcf196a.js.map \ No newline at end of file diff --git a/rdf-editor/0408b44b6fd78fcf196a.js.map b/rdf-editor/0408b44b6fd78fcf196a.js.map new file mode 100644 index 00000000..f8d697ac --- /dev/null +++ b/rdf-editor/0408b44b6fd78fcf196a.js.map @@ -0,0 +1 @@ +{"version":3,"file":"0408b44b6fd78fcf196a.js","sources":["webpack:///0408b44b6fd78fcf196a.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/1d2bab617f7df0cd5414.js b/rdf-editor/1d2bab617f7df0cd5414.js new file mode 100644 index 00000000..e3af11f0 --- /dev/null +++ b/rdf-editor/1d2bab617f7df0cd5414.js @@ -0,0 +1,3 @@ +/*! For license information please see 1d2bab617f7df0cd5414.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{221:function(e,t,r){"use strict";function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;t{r.readable||r.emit("end")}),e.on("error",e=>{r.emit("error",e)}),r}}},234:function(e,t,r){"use strict";const i=new Set(["_write","_writableState","writable"]);t.a=function(e){return new Proxy(e,{has(e,t){return!i.has(t)&&Reflect.has(...arguments)},get(e,t){if(i.has(t))return;const r=Reflect.get(...arguments);return r&&"function"==typeof r.bind?r.bind(e):r},set(e,t,r){if(!i.has(t))return Reflect.set(...arguments)}})}},254:function(e,t,r){"use strict";const i="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",a="http://www.w3.org/2000/10/swap/";t.a={xsd:{decimal:s+"decimal",boolean:s+"boolean",double:s+"double",integer:s+"integer",string:s+"string"},rdf:{type:i+"type",nil:i+"nil",first:i+"first",rest:i+"rest",langString:i+"langString"},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:a+"reify#forSome",forAll:a+"reify#forAll"},log:{implies:a+"log#implies"}}},317:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return _}));var i=r(254),s=r(318),a=r.n(s);const{xsd:n}=i.a,u=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,h={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},l=/[\x00-\x20<>\\"\{\}\|\^\`]/,c={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},o=/$0^/;class _{constructor(e){if(this._iri=/^<((?:[^ <>{}\\]|\\[uU])+)>[ \t]*/,this._unescapedIri=/^<([^\x00-\x20<>\\"\{\}\|\^\`]*)>[ \t]*/,this._simpleQuotedString=/^"([^"\\\r\n]*)"(?=[^"])/,this._simpleApostropheString=/^'([^'\\\r\n]*)'(?=[^'])/,this._langcode=/^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\-])/i,this._prefix=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:(?=[#\s<])/,this._prefixed=/^((?:[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)?:((?:(?:[0-:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])(?:(?:[\.\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~])*(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff]|%[0-9a-fA-F]{2}|\\[!#-\/;=?\-@_~]))?)?)(?:[ \t]+|(?=\.?[,;!\^\s#()\[\]\{\}"'<>]))/,this._variable=/^\?(?:(?:[A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:[\-0-:A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?=[.,;!\^\s#()\[\]\{\}"'<>])/,this._blank=/^_:((?:[0-9A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])(?:\.?[\-0-9A-Z_a-z\xb7\xc0-\xd6\xd8-\xf6\xf8-\u037d\u037f-\u1fff\u200c\u200d\u203f\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]|[\ud800-\udb7f][\udc00-\udfff])*)(?:[ \t]+|(?=\.?[,;:\s#()\[\]\{\}"'<>]))/,this._number=/^[\-+]?(?:(\d+\.\d*|\.?\d+)[eE][\-+]?|\d*(\.)?)\d+(?=\.?[,;:\s#()\[\]\{\}"'<>])/,this._boolean=/^(?:true|false)(?=[.,;\s#()\[\]\{\}"'<>])/,this._keyword=/^@[a-z]+(?=[\s#<:])/i,this._sparqlKeyword=/^(?:PREFIX|BASE|GRAPH)(?=[\s#<])/i,this._shortPredicates=/^a(?=[\s#()\[\]\{\}"'<>])/,this._newline=/^[ \t]*(?:#[^\n\r]*)?(?:\r\n|\n|\r)[ \t]*/,this._comment=/#([^\n\r]*)/,this._whitespace=/^[ \t]+/,this._endOfFile=/^(?:#[^\n\r]*)?$/,e=e||{},this._lineMode=!!e.lineMode){this._n3Mode=!1;for(const e in this)!(e in c)&&this[e]instanceof RegExp&&(this[e]=o)}else this._n3Mode=!1!==e.n3;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,t){let r=this._input,i=r.length;for(;;){let e,u;for(;e=this._newline.exec(r);)this._comments&&(u=this._comment.exec(e[0]))&&s("comment",u[1],"",this._line,e[0].length),r=r.substr(e[0].length,r.length),i=r.length,this._line++;if(!e&&(e=this._whitespace.exec(r))&&(r=r.substr(e[0].length,r.length)),this._endOfFile.test(r))return t&&(this._comments&&(u=this._comment.exec(r))&&s("comment",u[1],"",this._line,r.length),r=null,s("eof","","",this._line,0)),this._input=r;const h=this._line,c=r[0];let o="",_="",d="",f=null,p=0,b=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(p=1,o="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){b=!0;break}case"<":if(f=this._unescapedIri.exec(r))o="IRI",_=f[1];else if(f=this._iri.exec(r)){if(_=this._unescape(f[1]),null===_||l.test(_))return a(this);o="IRI"}else r.length>1&&"<"===r[1]?(o="<<",p=2):this._n3Mode&&r.length>1&&"="===r[1]&&(o="inverse",p=2,_=">");break;case">":r.length>1&&">"===r[1]&&(o=">>",p=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(r+" ")))&&(o="blank",d="_",_=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))_=f[1];else if(({value:_,matchLength:p}=this._parseLiteral(r)),null===_)return a(this);null===f&&0===p||(o="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))_=f[1];else if(({value:_,matchLength:p}=this._parseLiteral(r)),null===_)return a(this);null===f&&0===p||(o="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(o="var",_=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(o="langcode",_=f[1]):(f=this._keyword.exec(r))&&(o=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){o=".",p=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(r+" ")))&&(o="literal",_=f[0],d="string"==typeof f[1]?n.double:"string"==typeof f[2]?n.decimal:n.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?o=f[0].toUpperCase():b=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(o="literal",_=f[0],d=n.boolean):b=!0;break;case"a":(f=this._shortPredicates.exec(r))?(o="abbreviation",_="a"):b=!0;break;case"=":this._n3Mode&&r.length>1&&(o="abbreviation",">"!==r[1]?(p=1,_="="):(p=2,_=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"{":case"}":this._lineMode||(p=1,o=c);break;default:b=!0}if(b&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(r+" ")))&&(o="prefixed",d=f[1]||"",_=this._unescape(f[2])):(o="prefix",_=f[1]||"")),"^^"===this._previousMarker)switch(o){case"prefixed":o="type";break;case"IRI":o="typeIRI";break;default:o=""}if(!o)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const g=p||f[0].length,x=s(o,_,d,h,g);this.previousToken=x,this._previousMarker=o,r=r.substr(g,r.length)}function s(t,s,a,n,u){const h=r?i-r.length:i,l={type:t,value:s,prefix:a,line:n,start:h,end:h+u};return e(null,l),l}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(u,(e,r,i,s)=>{if("string"==typeof r)return String.fromCharCode(Number.parseInt(r,16));if("string"==typeof i){let e=Number.parseInt(i,16);return e<=65535?String.fromCharCode(Number.parseInt(i,16)):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}return s in h?h[s]:(t=!0,"")});return t?null:r}_parseLiteral(e){if(e.length>=3){const t=e.match(/^(?:"""|"|'''|'|)/)[0],r=t.length;let i=Math.max(this._literalClosingPos,r);for(;(i=e.indexOf(t,i))>0;){let t=0;for(;"\\"===e[i-t-1];)t++;if(t%2==0){const t=e.substring(r,i),s=t.split(/\r\n|\r|\n/).length-1,a=i+r;if(1===r&&0!==s||3===r&&this._lineMode)break;return this._line+=s,{value:this._unescape(t),matchLength:a}}i++}this._literalClosingPos=e.length-r+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const t=new Error(`Unexpected "${e}" on line ${this._line}.`);return t.context={token:void 0,line:this._line,previousToken:this.previousToken},t}_readStartingBom(e){return e.startsWith("\ufeff")?e.substr(1):e}tokenize(t,r){if(this._line=1,"string"==typeof t){if(this._input=this._readStartingBom(t),"function"!=typeof r){const e=[];let t;if(this._tokenizeToEnd((r,i)=>r?t=r:e.push(i),!0),t)throw t;return e}a()(()=>this._tokenizeToEnd(r,!0))}else this._pendingBuffer=null,"function"==typeof t.setEncoding&&t.setEncoding("utf8"),t.on("data",t=>{null!==this._input&&0!==t.length&&(this._pendingBuffer&&(t=e.concat([this._pendingBuffer,t]),this._pendingBuffer=null),128&t[t.length-1]?this._pendingBuffer=t:(void 0===this._input?this._input=this._readStartingBom("string"==typeof t?t:t.toString()):this._input+=t,this._tokenizeToEnd(r,!1)))}),t.on("end",()=>{"string"==typeof this._input&&this._tokenizeToEnd(r,!0)}),t.on("error",r)}}}).call(this,r(2).Buffer)},318:function(e,t){let r;e.exports="function"==typeof queueMicrotask?queueMicrotask:e=>(r||(r=Promise.resolve())).then(e).catch(e=>setTimeout(()=>{throw e},0))},379:function(e,t,r){"use strict";r.r(t);var i=r(221),s=r(61),a=r(234),n=r(317),u=r(254);const{rdf:h,xsd:l}=u.a;let c,o=0;const _={namedNode:function(e){return new p(e)},blankNode:function(e){return new g(e||"n3-"+o++)},variable:function(e){return new x(e)},literal:function(e,t){if("string"==typeof t)return new b(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";""===r&&("boolean"==typeof e?r=l.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?l.integer:l.double:(r=l.double,Number.isNaN(e)||(e=e>0?"INF":"-INF"))));return""===r||r===l.string?new b(`"${e}"`):new b(`"${e}"^^${r}`)},defaultGraph:function(){return c},quad:y,triple:y};var d=_;class f{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof f?this.id===e.id:!!e&&this.termType===e.termType&&this.value===e.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class p extends f{get termType(){return"NamedNode"}}class b extends f{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let t=e.lastIndexOf('"')+1;return tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new n.a({lineMode:h,n3:u}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){k=0}_setBase(e){if(e){const t=e.indexOf("#");t>=0&&(e=e.substr(0,t)),this._base=e,this._basePath=e.indexOf("/")<0?e:e.replace(/[^\/?]*(?:\?.*)?$/,""),e=e.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\/\/[^\/]*)?/i),this._baseRoot=e[0],this._baseScheme=e[1]}else this._base="",this._basePath=""}_saveContext(e,t,r,i,s){const a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:i,object:s,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?this._graph.value+".":".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error("Unexpected "+t.type,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.quantified)}_readInTopContext(e){switch(e.type){case"eof":return null!==this._graph?this._error("Unclosed graph",e):(delete this._prefixes._,this._callback(null,null,this._prefixes));case"PREFIX":this._sparqlStyle=!0;case"@prefix":return this._readPrefix;case"BASE":this._sparqlStyle=!0;case"@base":return this._readBaseIRI;case"{":if(this._supportsNamedGraphs)return this._graph="",this._subject=null,this._readSubject;case"GRAPH":if(this._supportsNamedGraphs)return this._readNamedGraphLabel;default:return this._readSubject(e)}}_readEntity(e,t){let r;switch(e.type){case"IRI":case"typeIRI":const t=this._resolveIRI(e.value);if(null===t)return this._error("Invalid IRI",e);r=this._namedNode(t);break;case"type":case"prefixed":const i=this._prefixes[e.prefix];if(void 0===i)return this._error(`Undefined prefix "${e.prefix}:"`,e);r=this._namedNode(i+e.value);break;case"blank":r=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":r=this._variable(e.value.substr(1));break;default:return this._error("Expected entity but got "+e.type,e)}return!t&&this._n3Mode&&r.id in this._quantified&&(r=this._quantified[r.id]),r}_readSubject(e){switch(this._predicate=null,e.type){case"[":return this._saveContext("blank",this._graph,this._subject=this._blankNode(),null,null),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this.RDF_NIL,null,null),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._graph=this._blankNode(),null,null),this._readSubject):this._error("Unexpected graph",e);case"}":return this._readPunctuation(e);case"@forSome":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORSOME,this._quantifier=this._blankNode,this._readQuantifierList):this._error('Unexpected "@forSome"',e);case"@forAll":return this._n3Mode?(this._subject=null,this._predicate=this.N3_FORALL,this._quantifier=this._variable,this._readQuantifierList):this._error('Unexpected "@forAll"',e);case"literal":if(!this._n3Mode)return this._error("Unexpected literal",e);if(0===e.prefix.length)return this._literalValue=e.value,this._completeSubjectLiteral;this._subject=this._literal(e.value,this._namedNode(e.prefix));break;case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,null,null,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._subject=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const t=e.type;switch(t){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return null===this._predicate?this._error("Unexpected "+t,e):(this._subject=null,"]"===t?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return null!==this._predicate?this._readPredicate:this._error("Expected predicate but got ;",e);case"[":if(this._n3Mode)return this._saveContext("blank",this._graph,this._subject,this._subject=this._blankNode(),null),this._readBlankNodeHead;case"blank":if(!this._n3Mode)return this._error("Disallowed blank node as predicate",e);default:if(void 0===(this._predicate=this._readEntity(e)))return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(0===e.prefix.length)return this._literalValue=e.value,this._readDataTypeOrLang;this._object=this._literal(e.value,this._namedNode(e.prefix));break;case"[":return this._saveContext("blank",this._graph,this._subject,this._predicate,this._subject=this._blankNode()),this._readBlankNodeHead;case"(":return this._saveContext("list",this._graph,this._subject,this._predicate,this.RDF_NIL),this._subject=null,this._readListItem;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);case"<<":return this._supportsRDFStar?(this._saveContext("<<",this._graph,this._subject,this._predicate,null),this._graph=null,this._readSubject):this._error("Unexpected RDF* syntax",e);default:if(void 0===(this._object=this._readEntity(e)))return;if(this._n3Mode)return this._getPathReader(this._getContextEndReader())}return this._getContextEndReader()}_readPredicateOrNamedGraph(e){return"{"===e.type?this._readGraph(e):this._readPredicate(e)}_readGraph(e){return"{"!==e.type?this._error("Expected graph but got "+e.type,e):(this._graph=this._subject,this._subject=null,this._readSubject)}_readBlankNodeHead(e){return"]"===e.type?(this._subject=null,this._readBlankNodeTail(e)):(this._predicate=null,this._readPredicate(e))}_readBlankNodeTail(e){if("]"!==e.type)return this._readBlankNodePunctuation(e);null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph);const t=null===this._predicate;return this._restoreContext("blank",e),null!==this._object?this._getContextEndReader():null!==this._predicate?this._readObject:t?this._readPredicateOrNamedGraph:this._readPredicateAfterBlank}_readPredicateAfterBlank(e){switch(e.type){case".":case"}":return this._subject=null,this._readPunctuation(e);default:return this._readPredicate(e)}}_readListItem(e){let t=null,r=null,i=this._readListItem;const s=this._subject,a=this._contextStack,n=a[a.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,r=this._blankNode(),this.RDF_FIRST,this._subject=t=this._blankNode()),i=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,r=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),0!==a.length&&"list"===a[a.length-1].type&&this._emit(this._subject,this._predicate,this._object,this._graph),null===this._predicate){if(i=this._readPredicate,this._subject===this.RDF_NIL)return i}else if(i=this._getContextEndReader(),this._object===this.RDF_NIL)return i;r=this.RDF_NIL;break;case"literal":0===e.prefix.length?(this._literalValue=e.value,i=this._readListItemDataTypeOrLang):(t=this._literal(e.value,this._namedNode(e.prefix)),i=this._getContextEndReader());break;case"{":return this._n3Mode?(this._saveContext("formula",this._graph,this._subject,this._predicate,this._graph=this._blankNode()),this._readSubject):this._error("Unexpected graph",e);default:if(void 0===(t=this._readEntity(e)))return}if(null===r&&(this._subject=r=this._blankNode()),null===s?null===n.predicate?n.subject=r:n.object=r:this._emit(s,this.RDF_REST,r,this._graph),null!==t){if(this._n3Mode&&("IRI"===e.type||"prefixed"===e.type))return this._saveContext("item",this._graph,r,this.RDF_FIRST,t),this._subject=t,this._predicate=null,this._getPathReader(this._readListItem);this._emit(r,this.RDF_FIRST,t,this._graph)}return i}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let t=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const r=this._readEntity(e);if(void 0===r)return;t=this._literal(this._literalValue,r),e=null;break;case"langcode":t=this._literal(this._literalValue,e.value),e=null}return{token:e,literal:t}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,t){const r=this._completeLiteral(e);if(r)return this._object=r.literal,t&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),null===r.token?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(r.token))}_readFormulaTail(e){return"}"!==e.type?this._readPunctuation(e):(null!==this._subject&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),null===this._object?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let t,r=this._graph;const i=this._subject,s=this._inversePredicate;switch(e.type){case"}":if(null===this._graph)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,t=this._contextStack.length?this._readSubject:this._readInTopContext,s&&(this._inversePredicate=!1);break;case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:if(this._supportsQuads&&null===this._graph&&void 0!==(r=this._readEntity(e))){t=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(null!==i){const e=this._predicate,t=this._object;s?this._emit(t,e,i,r):this._emit(i,e,t,r)}return t}_readBlankNodePunctuation(e){let t;switch(e.type){case";":t=this._readPredicate;break;case",":t=this._readObject;break;default:return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}return this._emit(this._subject,this._predicate,this._object,this._graph),t}_readQuadPunctuation(e){return"."!==e.type?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return"prefix"!==e.type?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if("IRI"!==e.type)return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const t=this._readEntity(e);return this._prefixes[this._prefix]=t.value,this._prefixCallback(this._prefix,t),this._readDeclarationPunctuation}_readBaseIRI(e){const t="IRI"===e.type&&this._resolveIRI(e.value);return t?(this._setBase(t),this._readDeclarationPunctuation):this._error("Expected valid IRI to follow base declaration",e)}_readNamedGraphLabel(e){switch(e.type){case"IRI":case"blank":case"prefixed":return this._readSubject(e),this._readGraph;case"[":return this._readNamedGraphBlankLabel;default:return this._error("Invalid graph label",e)}}_readNamedGraphBlankLabel(e){return"]"!==e.type?this._error("Invalid graph label",e):(this._subject=this._blankNode(),this._readGraph)}_readDeclarationPunctuation(e){return this._sparqlStyle?(this._sparqlStyle=!1,this._readInTopContext(e)):"."!==e.type?this._error("Expected declaration to end with a dot",e):this._readInTopContext}_readQuantifierList(e){let t;switch(e.type){case"IRI":case"prefixed":if(void 0!==(t=this._readEntity(e,!0)))break;default:return this._error("Unexpected "+e.type,e)}return this._explicitQuantifiers?(null===this._subject?this._emit(this._graph||this.DEFAULTGRAPH,this._predicate,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH):this._emit(this._subject,this.RDF_REST,this._subject=this._blankNode(),this.QUANTIFIERS_GRAPH),this._emit(this._subject,this.RDF_FIRST,t,this.QUANTIFIERS_GRAPH)):this._quantified[t.id]=this._quantifier(this._blankNode().value),this._readQuantifierPunctuation}_readQuantifierPunctuation(e){return","===e.type?this._readQuantifierList:(this._explicitQuantifiers&&(this._emit(this._subject,this.RDF_REST,this.RDF_NIL,this.QUANTIFIERS_GRAPH),this._subject=null),this._readCallback=this._getContextEndReader(),this._readCallback(e))}_getPathReader(e){return this._afterPath=e,this._readPath}_readPath(e){switch(e.type){case"!":return this._readForwardPath;case"^":return this._readBackwardPath;default:const t=this._contextStack,r=t.length&&t[t.length-1];if(r&&"item"===r.type){const t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let t,r;const i=this._blankNode();if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(t=this._subject,this._subject=i):(t=this._object,this._object=i),this._emit(t,r,i,this._graph),this._readPath}_readBackwardPath(e){const t=this._blankNode();let r,i;if(void 0!==(r=this._readEntity(e)))return null===this._predicate?(i=this._subject,this._subject=t):(i=this._object,this._object=t),this._emit(t,r,i,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return">>"!==e.type?this._supportsQuads&&null===this._graph&&void 0!==(this._graph=this._readEntity(e))?this._readRDFStarTail:this._error(`Expected >> to follow "${this._object.id}"`,e):this._readRDFStarTail(e)}_readRDFStarTail(e){if(">>"!==e.type)return this._error("Expected >> but got "+e.type,e);const t=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),null===this._subject?(this._subject=t,this._readPredicate):(this._object=t,this._getContextEndReader())}_getContextEndReader(){const e=this._contextStack;if(!e.length)return this._readPunctuation;switch(e[e.length-1].type){case"blank":return this._readBlankNodeTail;case"list":return this._readListItem;case"formula":return this._readFormulaTail;case"<<":return this._readRDFStarTailOrGraph}}_emit(e,t,r,i){this._callback(null,this._quad(e,t,r,i||this.DEFAULTGRAPH))}_error(e,t){const r=new Error(`${e} on line ${t.line}.`);r.context={token:t,line:t.line,previousToken:this._lexer.previousToken},this._callback(r),this._callback=v}_resolveIRI(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)?e:this._resolveRelativeIRI(e)}_resolveRelativeIRI(e){if(!e.length)return this._base;switch(e[0]){case"#":return this._base+e;case"?":return this._base.replace(/(?:\?.*)?$/,e);case"/":return("/"===e[1]?this._baseScheme:this._baseRoot)+this._removeDotSegments(e);default:return/^[^/:]*:/.test(e)?null:this._removeDotSegments(this._basePath+e)}}_removeDotSegments(e){if(!/(^|\/)\.\.?($|[/#?])/.test(e))return e;const t=e.length;let r="",i=-1,s=-1,a=0,n="/";for(;i=s&&(r=r.substr(0,a)),"/"!==n)return`${r}/${e.substr(i+1)}`;a=i+1}}}n=e[++i]}return r+e.substring(a)}parse(e,t,r){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${k++}_`,this._prefixCallback=r||v,this._inversePredicate=!1,this._quantified=Object.create(null),!t){const t=[];let r;if(this._callback=(e,i)=>{e?r=e:i&&t.push(i)},this._lexer.tokenize(e).every(e=>this._readCallback=this._readCallback(e)),r)throw r;return t}this._callback=t,this._lexer.tokenize(e,(e,t)=>{null!==e?(this._callback(e),this._callback=v):this._readCallback&&(this._readCallback=this._readCallback(t))})}}function v(){}function I(e,t){const r=t.namedNode;e._namedNode=r,e._blankNode=t.blankNode,e._literal=t.literal,e._variable=t.variable,e._quad=t.quad,e.DEFAULTGRAPH=t.defaultGraph(),e.RDF_FIRST=r(u.a.rdf.first),e.RDF_REST=r(u.a.rdf.rest),e.RDF_NIL=r(u.a.rdf.nil),e.N3_FORALL=r(u.a.r.forAll),e.N3_FORSOME=r(u.a.r.forSome),e.ABBREVIATIONS={a:r(u.a.rdf.type),"=":r(u.a.owl.sameAs),">":r(u.a.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}I(j.prototype,d);var R=r(26);class P extends R.Transform{constructor(e){super({decodeStrings:!0}),this._readableState.objectMode=!0;let t,r;new j(e).parse({on:(e,i)=>{switch(e){case"data":t=i;break;case"end":r=i}}},(e,t)=>{e&&this.emit("error",e)||t&&this.push(t)},(e,t)=>{this.emit("prefix",e,t)}),this._transform=(e,r,i)=>{t(e),i()},this._flush=e=>{r(),e()}}import(e){return e.on("data",e=>{this.write(e)}),e.on("end",()=>{this.end()}),e.on("error",e=>{this.emit("error",e)}),this}}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function S(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N(e,t){if(null==e)return{};var r,i,s=function(e,t){if(null==e)return{};var r,i,s={},a=Object.keys(e);for(i=0;i=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var O=class{constructor(e,t={}){let{baseIRI:r="",factory:i=s.a}=t,n=N(t,["baseIRI","factory"]);const u={blankNode:i.blankNode.bind(i),defaultGraph:i.defaultGraph.bind(i),literal:i.literal.bind(i),namedNode:i.namedNode.bind(i),quad:i.quad.bind(i)},h=new P(function(e){for(var t=1;t */ diff --git a/rdf-editor/1d2bab617f7df0cd5414.js.map b/rdf-editor/1d2bab617f7df0cd5414.js.map new file mode 100644 index 00000000..d049a45c --- /dev/null +++ b/rdf-editor/1d2bab617f7df0cd5414.js.map @@ -0,0 +1 @@ +{"version":3,"file":"1d2bab617f7df0cd5414.js","sources":["webpack:///1d2bab617f7df0cd5414.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/2ba55068bb44300b652d.js b/rdf-editor/2ba55068bb44300b652d.js new file mode 100644 index 00000000..f3d98c1a --- /dev/null +++ b/rdf-editor/2ba55068bb44300b652d.js @@ -0,0 +1,3 @@ +/*! For license information please see 2ba55068bb44300b652d.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{226:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NamedNode=void 0;e.NamedNode=class{constructor(t){this.termType="NamedNode",this.value=t}equals(t){return!!t&&"NamedNode"===t.termType&&t.value===this.value}}},235:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}(i(250))},237:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlankNode=void 0;e.BlankNode=class{constructor(t){this.termType="BlankNode",this.value=t}equals(t){return!!t&&"BlankNode"===t.termType&&t.value===this.value}}},238:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultGraph=void 0;class s{constructor(){this.termType="DefaultGraph",this.value=""}equals(t){return!!t&&"DefaultGraph"===t.termType}}e.DefaultGraph=s,s.INSTANCE=new s},239:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Literal=void 0;const s=i(226);class a{constructor(t,e){this.termType="Literal",this.value=t,"string"==typeof e?(this.language=e,this.datatype=a.RDF_LANGUAGE_STRING):e?(this.language="",this.datatype=e):(this.language="",this.datatype=a.XSD_STRING)}equals(t){return!!t&&"Literal"===t.termType&&t.value===this.value&&t.language===this.language&&t.datatype.equals(this.datatype)}}e.Literal=a,a.RDF_LANGUAGE_STRING=new s.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),a.XSD_STRING=new s.NamedNode("http://www.w3.org/2001/XMLSchema#string")},240:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Quad=void 0;e.Quad=class{constructor(t,e,i,s){this.termType="Quad",this.value="",this.subject=t,this.predicate=e,this.object=i,this.graph=s}equals(t){return!!t&&("Quad"===t.termType||!t.termType)&&this.subject.equals(t.subject)&&this.predicate.equals(t.predicate)&&this.object.equals(t.object)&&this.graph.equals(t.graph)}}},241:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;e.Variable=class{constructor(t){this.termType="Variable",this.value=t}equals(t){return!!t&&"Variable"===t.termType&&t.value===this.value}}},250:function(t,e,i){"use strict";function s(t){const e=[];let i=0;for(;it.join("")).join("/")}function a(t,e){let i=e+1;e>=0?"/"===t[e+1]&&"/"===t[e+2]&&(i=e+3):"/"===t[0]&&"/"===t[1]&&(i=2);const a=t.indexOf("/",i);if(a<0)return t;return t.substr(0,a)+s(t.substr(a))}function r(t){return!t||"#"===t||"?"===t||"/"===t}Object.defineProperty(e,"__esModule",{value:!0}),e.resolve=function(t,e){const i=(e=e||"").indexOf("#");if(i>0&&(e=e.substr(0,i)),!t.length){if(e.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);return e}if(t.startsWith("?")){const i=e.indexOf("?");return i>0&&(e=e.substr(0,i)),e+t}if(t.startsWith("#"))return e+t;if(!e.length){const e=t.indexOf(":");if(e<0)throw new Error(`Found invalid relative IRI '${t}' for a missing baseIRI`);return a(t,e)}const r=t.indexOf(":");if(r>=0)return a(t,r);const n=e.indexOf(":");if(n<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);const o=e.substr(0,n+1);if(0===t.indexOf("//"))return o+a(t,r);let h;if(e.indexOf("//",n)===n+1){if(h=e.indexOf("/",n+3),h<0)return e.length>n+3?e+"/"+a(t,r):o+a(t,r)}else if(h=e.indexOf("/",n+1),h<0)return o+a(t,r);if(0===t.indexOf("/"))return e.substr(0,h)+s(t);let l=e.substr(h);const c=l.lastIndexOf("/");return c>=0&&ci.emit("error",t)),t.on("data",t=>e.push(t)),t.on("end",()=>e.push(null));const i=e.pipe(new l(this.options));return i}_transform(t,e,i){try{this.saxParser.write(t)}catch(t){return i(t)}i()}newParseError(t){return new n.ParseError(this,t)}valueToUri(t,e){return this.uriToNamedNode((0,s.resolve)(t,e.baseIRI))}uriToNamedNode(t){const e=(0,h.validateIri)(t,this.iriValidationStrategy);if(e instanceof Error)throw this.newParseError(e.message);return this.dataFactory.namedNode(t)}validateNcname(t){if(!l.NCNAME_MATCHER.test(t))throw this.newParseError("Not a valid NCName: "+t)}attachSaxListeners(){this.saxParser.on("error",t=>this.emit("error",t)),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(t){const e=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let i=c.RESOURCE;if(e&&(e.hadChildren=!0,i=e.childrenParseType),e&&e.childrenStringTags){const i=t.name;let s="";for(const e in t.attributes)s+=` ${e}="${t.attributes[e].value}"`;const a=`<${`${i}${s}`}>`;e.childrenStringTags.push(a);const r={childrenStringTags:e.childrenStringTags};return r.childrenStringEmitClosingTag=``,void this.activeTagStack.push(r)}const s={};e?(s.language=e.language,s.baseIRI=e.baseIRI):s.baseIRI=this.baseIRI,this.activeTagStack.push(s),i===c.RESOURCE?this.onTagResource(t,s,e,!e):this.onTagProperty(t,s,e)}onTagResource(t,e,i,a){e.childrenParseType=c.PROPERTY;let r=!0;if(t.uri===l.RDF){if(!a&&l.FORBIDDEN_NODE_ELEMENTS.indexOf(t.local)>=0)throw this.newParseError("Illegal node element name: "+t.local);switch(t.local){case"RDF":e.childrenParseType=c.RESOURCE;case"Description":r=!1}}const n=[],o=[];let h=null,d=!1,u=!1,p=null;for(const a in t.attributes){const r=t.attributes[a];if(i&&r.uri===l.RDF)switch(r.local){case"about":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);h=r.value;continue;case"ID":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);this.validateNcname(r.value),h="#"+r.value,d=!0;continue;case"nodeID":if(h)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${r.value} and ${h} where found.`);this.validateNcname(r.value),h=r.value,u=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":p=r.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(r.uri===l.XML){if("lang"===r.local){e.language=""===r.value?null:r.value.toLowerCase();continue}if("base"===r.local){e.baseIRI=(0,s.resolve)(r.value,e.baseIRI);continue}}"xml"===r.prefix||"xmlns"===r.prefix||""===r.prefix&&"xmlns"===r.local||!r.uri||(n.push(this.uriToNamedNode(r.uri+r.local)),o.push(r.value))}if(null!==h&&(e.subject=u?this.dataFactory.blankNode(h):this.valueToUri(h,e),d&&this.claimNodeId(e.subject)),e.subject||(e.subject=this.dataFactory.blankNode()),r){const s=this.uriToNamedNode(t.uri+t.local);this.emitTriple(e.subject,this.dataFactory.namedNode(l.RDF+"type"),s,i?i.reifiedStatementId:null)}if(i){if(i.predicate)if(i.childrenCollectionSubject){const t=this.dataFactory.blankNode();this.emitTriple(i.childrenCollectionSubject,i.childrenCollectionPredicate,t,i.reifiedStatementId),this.emitTriple(t,this.dataFactory.namedNode(l.RDF+"first"),e.subject,e.reifiedStatementId),i.childrenCollectionSubject=t,i.childrenCollectionPredicate=this.dataFactory.namedNode(l.RDF+"rest")}else{this.emitTriple(i.subject,i.predicate,e.subject,i.reifiedStatementId);for(let t=0;t=0)throw this.newParseError("Illegal property element name: "+t.local);e.predicateSubPredicates=[],e.predicateSubObjects=[];let s=!1,a=!1,r=null,n=!0;const o=[],h=[];for(const i in t.attributes){const d=t.attributes[i];if(d.uri===l.RDF)switch(d.local){case"resource":if(r)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${r}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);e.hadChildren=!0,r=d.value,n=!1;continue;case"datatype":if(a)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);e.datatype=this.valueToUri(d.value,e);continue;case"nodeID":if(a)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(e.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(s)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),e.hadChildren=!0,r=d.value,n=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(a)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(e.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${e.datatype.value})`);if(r)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${r})`);if("Resource"===d.value){s=!0,e.childrenParseType=c.PROPERTY;const t=this.dataFactory.blankNode();this.emitTriple(e.subject,e.predicate,t,e.reifiedStatementId),e.subject=t,e.predicate=null}else"Collection"===d.value?(s=!0,e.hadChildren=!0,e.childrenCollectionSubject=e.subject,e.childrenCollectionPredicate=e.predicate,n=!1):"Literal"===d.value&&(s=!0,e.childrenTagsToString=!0,e.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),e.reifiedStatementId=this.valueToUri("#"+d.value,e),this.claimNodeId(e.reifiedStatementId);continue}else if(d.uri===l.XML&&"lang"===d.local){e.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(s||e.datatype)throw this.newParseError("Found illegal rdf:* properties on property element with attribute: "+d.value);e.hadChildren=!0,a=!0,o.push(this.uriToNamedNode(d.uri+d.local)),h.push(this.dataFactory.literal(d.value,e.datatype||e.language))}}if(null!==r){const t=e.subject;e.subject=n?this.dataFactory.blankNode(r):this.valueToUri(r,e),this.emitTriple(t,e.predicate,e.subject,e.reifiedStatementId);for(let t=0;t/g,(t,e,i)=>(this.saxParser.ENTITIES[e]=i,""))}}var c;e.RdfXmlParser=l,l.MIME_TYPE="application/rdf+xml",l.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",l.XML="http://www.w3.org/XML/1998/namespace",l.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],l.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],l.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(t){t[t.RESOURCE=0]="RESOURCE",t[t.PROPERTY=1]="PROPERTY"}(c||(e.ParseType=c={}))},321:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaxesParser=e.EVENTS=void 0;const s=i(322),a=i(323),r=i(324);var n=s.isS,o=s.isChar,h=s.isNameStartChar,l=s.isNameChar,c=s.S_LIST,d=s.NAME_RE,u=a.isChar,p=r.isNCNameStartChar,f=r.isNCNameChar,m=r.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",v={__proto__:null,xml:g,xmlns:b},x={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},T=t=>34===t||39===t,w=[34,39],C=[...w,91,62],N=[...w,60,93],y=[61,63,...c],E=[...c,62,38,60];function S(t,e,i){switch(e){case"xml":i!==g&&t.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":i!==b&&t.fail(`xmlns prefix must be bound to ${b}.`)}switch(i){case b:t.fail(""===e?`the default namespace may not be set to ${i}.`:`may not assign a prefix (even "xmlns") to the URI ${b}.`);break;case g:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${i}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}}}const R=t=>m.test(t),P=t=>d.test(t);e.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const D={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};e.SaxesParser=class{get closed(){return this._closed}constructor(t){this.opt=null!=t?t:{},this.fragmentOpt=!!this.opt.fragment;const e=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){this.nameStartCheck=p,this.nameCheck=f,this.isName=R,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},v);const t=this.opt.additionalNamespaces;null!=t&&(!function(t,e){for(const i of Object.keys(e))S(t,i,e[i])}(this,t),Object.assign(this.ns,t))}else this.nameStartCheck=h,this.nameCheck=l,this.isName=P,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var t;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:e}=this;this.state=e?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:i}=this.opt;if(void 0===i){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");i="1.0"}this.setXMLVersion(i),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(x),null===(t=this.readyHandler)||void 0===t||t.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,e){this[D[t]]=e}off(t){this[D[t]]=void 0}makeError(t){var e;let i=null!==(e=this.fileName)&&void 0!==e?e:"";return this.trackPosition&&(i.length>0&&(i+=":"),i+=`${this.line}:${this.column}`),i.length>0&&(i+=": "),new Error(i+t)}fail(t){const e=this.makeError(t),i=this.errorHandler;if(void 0===i)throw e;return i(e),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let e=!1;null===t?(e=!0,t=""):"object"==typeof t&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let i=t.length;const s=t.charCodeAt(i-1);!e&&(13===s||s>=55296&&s<=56319)&&(this.carriedFromPrevious=t[i-1],i--,t=t.slice(0,i));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i=t.length)return-1;const i=t.charCodeAt(e);if(this.column++,i<55296){if(i>=32||9===i)return i;switch(i){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return 10===t.charCodeAt(e+1)&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;const s=65536+1024*(i-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,s>1114111&&this.fail("disallowed character."),s}getCode11(){const{chunk:t,i:e}=this;if(this.prevI=e,this.i=e+1,e>=t.length)return-1;const i=t.charCodeAt(e);if(this.column++,i<55296){if(i>31&&i<127||i>159&&8232!==i||9===i)return i;switch(i){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const i=t.charCodeAt(e+1);10!==i&&133!==i||(this.i=e+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),i}}if(i>56319)return i>=57344&&i<=65533||this.fail("disallowed character."),i;const s=65536+1024*(i-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,s>1114111&&this.fail("disallowed character."),s}getCodeNorm(){const t=this.getCode();return-2===t?10:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:e}=this;const{chunk:i}=this;for(;;){const s=this.getCode(),a=-2===s,r=a?10:s;if(-1===r||t.includes(r))return this.text+=i.slice(e,this.prevI),r;a&&(this.text+=i.slice(e,this.prevI)+"\n",e=this.i)}}captureToChar(t){let{i:e}=this;const{chunk:i}=this;for(;;){let s=this.getCode();switch(s){case-2:this.text+=i.slice(e,this.prevI)+"\n",e=this.i,s=10;break;case-1:return this.text+=i.slice(e),!1}if(s===t)return this.text+=i.slice(e,this.prevI),!0}}captureNameChars(){const{chunk:t,i:e}=this;for(;;){const i=this.getCode();if(-1===i)return this.name+=t.slice(e),-1;if(!l(i))return this.name+=t.slice(e,this.prevI),-2===i?10:i}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(-1===t||!n(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=o,this.getCode=this.getCode10):(this.isChar=u,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case 60:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var t;const e=this.captureTo(C);switch(e){case 62:null===(t=this.doctypeHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(e),91===e?this.state=4:T(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(N);-1!==t&&(this.text+=String.fromCodePoint(t),93===t?this.state=2:60===t?this.state=6:T(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:e}=this;t:for(;;)switch(this.getCode()){case-2:this.entity+=e.slice(t,this.prevI)+"\n",t=this.i;break;case 59:{const{entityReturnState:i}=this,s=this.entity+e.slice(t,this.prevI);let a;this.state=i,""===s?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(s),this.entity=""),13===i&&void 0===this.textHandler||(this.text+=a);break t}case-1:this.entity+=e.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(h(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var t;const e=this.getCodeNorm();45===e?(this.state=19,null===(t=this.commentHandler)||void 0===t||t.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(e),this.state=17)}sCommentEnded(){const t=this.getCodeNorm();62!==t?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(t),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();93===t?this.state=22:(this.text+="]"+String.fromCodePoint(t),this.state=20)}sCDataEnding2(){var t;const e=this.getCodeNorm();switch(e){case 62:null===(t=this.cdataHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(e),this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):63===t||n(t)?(this.fail("processing instruction without a target."),this.state=63===t?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:e}=this;for(;;){const i=this.getCodeNorm();if(-1===i)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(i)){this.piTarget+=t.slice(e,this.prevI);const s=63===i;s||n(i)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=s?33:27):this.state=s?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(i));break}}}sPIBody(){if(0===this.text.length){const t=this.getCodeNorm();63===t?this.state=26:n(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var t;const e=this.getCodeNorm();if(62===e){const{piTarget:e}=this;"xml"===e.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(t=this.piHandler)||void 0===t||t.call(this,{target:e,body:this.text}),this.piTarget=this.text="",this.state=13}else 63===e?this.text+="?":(this.text+="?"+String.fromCodePoint(e),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();63!==t?-1!==t&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=33}sXMLDeclName(){const t=this.captureTo(y);if(63===t)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(n(t)||61===t){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=61===t?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(63===t)return this.state=33,void this.fail("XML declaration is incomplete.");n(t)||(61!==t&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(63===t)return this.state=33,void this.fail("XML declaration is incomplete.");n(t)||(T(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,63]);if(63===t)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(-1===t)return;const e=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const t=e;this.xmlDecl.version=t,/^1\.[0-9]+$/.test(t)?this.opt.forceXMLVersion||this.setXMLVersion(t):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();63!==t?(n(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var t;62===this.getCodeNorm()?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(t=this.xmldeclHandler)||void 0===t||t.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var t;const e=this.captureNameChars();if(-1===e)return;const i=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=i.ns=Object.create(null)),null===(t=this.openTagStartHandler)||void 0===t||t.call(this,i),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),e){case 62:this.openTag();break;case 47:this.state=35;break;default:n(e)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){62===this.getCode()?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();-1!==t&&(h(t)?(this.unget(),this.state=37):62===t?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();61===t?this.state=39:n(t)?this.state=38:62===t?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):-1!==t&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",62===t?this.openTag():h(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();T(t)?(this.q=t,this.state=40):n(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:e}=this;let{i:i}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(i,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(i,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=e.slice(i,this.prevI)+" ",i=this.i;break;case 60:return this.text+=e.slice(i,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=e.slice(i))}}sAttribValueClosed(){const t=this.getCodeNorm();n(t)?this.state=36:62===t?this.openTag():47===t?this.state=35:h(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(E);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",62===t?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();62===t?this.closeTag():n(t)?this.state=44:-1!==t&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:e}=this;const{chunk:i,textHandler:s}=this;t:for(;;)switch(this.getCode()){case 60:if(this.state=15,void 0!==s){const{text:e}=this,a=i.slice(t,this.prevI);0!==e.length?(s(e+a),this.text=""):0!==a.length&&s(a)}e=0;break t;case 38:this.state=14,this.entityReturnState=13,void 0!==s&&(this.text+=i.slice(t,this.prevI)),e=0;break t;case 93:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case-2:void 0!==s&&(this.text+=i.slice(t,this.prevI)+"\n"),t=this.i,e=0;break;case-1:void 0!==s&&(this.text+=i.slice(t));break t;default:e=0}this.forbiddenState=e}handleTextOutsideRoot(){let{i:t}=this;const{chunk:e,textHandler:i}=this;let s=!1;t:for(;;){const a=this.getCode();switch(a){case 60:if(this.state=15,void 0!==i){const{text:s}=this,a=e.slice(t,this.prevI);0!==s.length?(i(s+a),this.text=""):0!==a.length&&i(a)}break t;case 38:this.state=14,this.entityReturnState=13,void 0!==i&&(this.text+=e.slice(t,this.prevI)),s=!0;break t;case-2:void 0!==i&&(this.text+=e.slice(t,this.prevI)+"\n"),t=this.i;break;case-1:void 0!==i&&(this.text+=e.slice(t));break t;default:n(a)||(s=!0)}}s&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,e){var i;const{prefix:s,local:a}=this.qname(t),r={name:t,prefix:s,local:a,value:e};if(this.attribList.push(r),null===(i=this.attributeHandler)||void 0===i||i.call(this,r),"xmlns"===s){const t=e.trim();"1.0"===this.currentXMLVersion&&""===t&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[a]=t,S(this,a,t)}else if("xmlns"===t){const t=e.trim();this.topNS[""]=t,S(this,"",t)}}pushAttribPlain(t,e){var i;const s={name:t,value:e};this.attribList.push(s),null===(i=this.attributeHandler)||void 0===i||i.call(this,s)}end(){var t,e;this.sawRoot||this.fail("document must contain a root element.");const{tags:i}=this;for(;i.length>0;){const t=i.pop();this.fail("unclosed tag: "+t.name)}0!==this.state&&13!==this.state&&this.fail("unexpected end.");const{text:s}=this;return 0!==s.length&&(null===(t=this.textHandler)||void 0===t||t.call(this,s),this.text=""),this._closed=!0,null===(e=this.endHandler)||void 0===e||e.call(this),this._init(),this}resolve(t){var e,i;let s=this.topNS[t];if(void 0!==s)return s;const{tags:a}=this;for(let e=a.length-1;e>=0;e--)if(s=a[e].ns[t],void 0!==s)return s;return s=this.ns[t],void 0!==s?s:null===(i=(e=this.opt).resolvePrefix)||void 0===i?void 0:i.call(e,t)}qname(t){const e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};const i=t.slice(e+1),s=t.slice(0,e);return(""===s||""===i||i.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:s,local:i}}processAttribsNS(){var t;const{attribList:e}=this,i=this.tag;{const{prefix:e,local:s}=this.qname(i.name);i.prefix=e,i.local=s;const a=i.uri=null!==(t=this.resolve(e))&&void 0!==t?t:"";""!==e&&("xmlns"===e&&this.fail('tags may not have "xmlns" as prefix.'),""===a&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),i.uri=e))}if(0===e.length)return;const{attributes:s}=i,a=new Set;for(const t of e){const{name:e,prefix:i,local:r}=t;let n,o;""===i?(n="xmlns"===e?b:"",o=e):(n=this.resolve(i),void 0===n&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),n=i),o=`{${n}}${r}`),a.has(o)&&this.fail(`duplicate attribute: ${o}.`),a.add(o),t.uri=n,s[e]=t}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,e=this.tag.attributes;for(const{name:i,value:s}of t)void 0!==e[i]&&this.fail(`duplicate attribute: ${i}.`),e[i]=s;this.attribList=[]}openTag(){var t;this.processAttribs();const{tags:e}=this,i=this.tag;i.isSelfClosing=!1,null===(t=this.openTagHandler)||void 0===t||t.call(this,i),e.push(i),this.state=13,this.name=""}openSelfClosingTag(){var t,e,i;this.processAttribs();const{tags:s}=this,a=this.tag;a.isSelfClosing=!0,null===(t=this.openTagHandler)||void 0===t||t.call(this,a),null===(e=this.closeTagHandler)||void 0===e||e.call(this,a);null===(this.tag=null!==(i=s[s.length-1])&&void 0!==i?i:null)&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:t,name:e}=this;if(this.state=13,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="");const i=this.closeTagHandler;let s=t.length;for(;s-- >0;){const s=this.tag=t.pop();if(this.topNS=s.ns,null==i||i(s),s.name===e)break;this.fail("unexpected close tag.")}0===s?this.closedRoot=!0:s<0&&(this.fail(`unmatched closing tag: ${e}.`),this.text+=``)}parseEntity(t){if("#"!==t[0]){const e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let e=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?e=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(e=parseInt(t.slice(1),10)),this.isChar(e)?String.fromCodePoint(e):(this.fail("malformed character entity."),`&${t};`)}}},322:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR="\t\n\r -퟿-�𐀀-􏿿",e.S=" \t\r\n",e.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NAME_CHAR="-"+e.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.CHAR_RE=new RegExp("^["+e.CHAR+"]$","u"),e.S_RE=new RegExp("^["+e.S+"]+$","u"),e.NAME_START_CHAR_RE=new RegExp("^["+e.NAME_START_CHAR+"]$","u"),e.NAME_CHAR_RE=new RegExp("^["+e.NAME_CHAR+"]$","u"),e.NAME_RE=new RegExp("^["+e.NAME_START_CHAR+"]["+e.NAME_CHAR+"]*$","u"),e.NMTOKEN_RE=new RegExp("^["+e.NAME_CHAR+"]+$","u");function s(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}e.S_LIST=[32,10,13,9],e.isChar=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isS=function(t){return 32===t||10===t||13===t||9===t},e.isNameStartChar=s,e.isNameChar=function(t){return s(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},323:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR="-퟿-�𐀀-􏿿",e.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",e.S=" \t\r\n",e.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NAME_CHAR="-"+e.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.CHAR_RE=new RegExp("^["+e.CHAR+"]$","u"),e.RESTRICTED_CHAR_RE=new RegExp("^["+e.RESTRICTED_CHAR+"]$","u"),e.S_RE=new RegExp("^["+e.S+"]+$","u"),e.NAME_START_CHAR_RE=new RegExp("^["+e.NAME_START_CHAR+"]$","u"),e.NAME_CHAR_RE=new RegExp("^["+e.NAME_CHAR+"]$","u"),e.NAME_RE=new RegExp("^["+e.NAME_START_CHAR+"]["+e.NAME_CHAR+"]*$","u"),e.NMTOKEN_RE=new RegExp("^["+e.NAME_CHAR+"]+$","u");function s(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}e.S_LIST=[32,10,13,9],e.isChar=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isRestrictedChar=function(t){return t>=1&&t<=8||11===t||12===t||t>=14&&t<=31||t>=127&&t<=132||t>=134&&t<=159},e.isCharAndNotRestricted=function(t){return 9===t||10===t||13===t||t>31&&t<127||133===t||t>159&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},e.isS=function(t){return 32===t||10===t||13===t||9===t},e.isNameStartChar=s,e.isNameChar=function(t){return s(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},324:function(t,e,i){"use strict";function s(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}Object.defineProperty(e,"__esModule",{value:!0}),e.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",e.NC_NAME_CHAR="-"+e.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",e.NC_NAME_START_CHAR_RE=new RegExp("^["+e.NC_NAME_START_CHAR+"]$","u"),e.NC_NAME_CHAR_RE=new RegExp("^["+e.NC_NAME_CHAR+"]$","u"),e.NC_NAME_RE=new RegExp("^["+e.NC_NAME_START_CHAR+"]["+e.NC_NAME_CHAR+"]*$","u"),e.isNCNameStartChar=s,e.isNCNameChar=function(t){return s(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},325:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParseError=void 0;class s extends Error{constructor(t,e){const i=t.saxParser;super(t.trackPosition?`Line ${i.line} column ${i.column+1}: ${e}`:e)}}e.ParseError=s},326:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var a=Object.getOwnPropertyDescriptor(e,i);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,a)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),a=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||s(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),a(i(327),e)},327:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateIri=e.IriValidationStrategy=void 0;const s=function(){const t="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",e=`${t}\\.${t}\\.${t}\\.${t}`,i="[a-fA-F0-9]{1,4}",s=`(${i}:${i}|${e})`,a="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",r=`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=]|[:@])*`,n=`(${r})+`,o=`(${r})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:${`(\\/\\/${`(${`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=]|:)*`}@)?${`(${`\\[(${`((${i}:){6}${s}|::(${i}:){5}${s}|(${i})?::(${i}:){4}${s}|((${i}:){0,1}${i})?::(${i}:){3}${s}|((${i}:){0,2}${i})?::(${i}:){2}${s}|((${i}:){0,3}${i})?::${i}:${s}|((${i}:){0,4}${i})?::${s}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)`}|v[a-fA-F0-9]+\\.([!$&'()*+,;=]|[!$&'()*+,;=]|":)+)\\]`}|${e}|${`(${a}|%[a-fA-F0-9]{2}|[!$&'()*+,;=])*`})`}(:[0-9]*)?`}${`(\\/${o})*`}|${`\\/(${n}(\\/${o})*)?`}|${`${n}(\\/${o})*`}|)`}(\\?${`(${r}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*`})?(#${`(${r}|[\\/?])*`})?$`,"u")}(),a=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var r;!function(t){t.Strict="strict",t.Pragmatic="pragmatic",t.None="none"}(r=e.IriValidationStrategy||(e.IriValidationStrategy={})),e.validateIri=function(t,e=r.Strict){switch(e){case r.Strict:return s.test(t)?void 0:new Error(`Invalid IRI according to RFC 3987: '${t}'`);case r.Pragmatic:return a.test(t)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${t}'`);case r.None:return;default:return new Error(`Not supported validation strategy "${e}"`)}}},372:function(t,e,i){"use strict";i.r(e);var s=i(319);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function r(t){for(var e=1;e=0||(a[i]=t[i]);return a}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(a[i]=t[i])}return a}class h extends s.RdfXmlParser{constructor(t={}){let{factory:e}=t;super(r(r({},o(t,["factory"])),{},{dataFactory:e}))}}e.default=h}}]); +//# sourceMappingURL=2ba55068bb44300b652d.js.map \ No newline at end of file diff --git a/rdf-editor/2ba55068bb44300b652d.js.LICENSE.txt b/rdf-editor/2ba55068bb44300b652d.js.LICENSE.txt new file mode 100644 index 00000000..d30b9865 --- /dev/null +++ b/rdf-editor/2ba55068bb44300b652d.js.LICENSE.txt @@ -0,0 +1,23 @@ +/** + * Character class utilities for XML NS 1.0 edition 3. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ + +/** + * Character classes and associated utilities for the 2nd edition of XML 1.1. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ + +/** + * Character classes and associated utilities for the 5th edition of XML 1.0. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + */ diff --git a/rdf-editor/2ba55068bb44300b652d.js.map b/rdf-editor/2ba55068bb44300b652d.js.map new file mode 100644 index 00000000..204dbf14 --- /dev/null +++ b/rdf-editor/2ba55068bb44300b652d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"2ba55068bb44300b652d.js","sources":["webpack:///2ba55068bb44300b652d.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/360cff4bf6981215a1d6.js b/rdf-editor/360cff4bf6981215a1d6.js new file mode 100644 index 00000000..08869d63 --- /dev/null +++ b/rdf-editor/360cff4bf6981215a1d6.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17,14,15,16],{244:function(n,o){},245:function(n,o){}}]); +//# sourceMappingURL=360cff4bf6981215a1d6.js.map \ No newline at end of file diff --git a/rdf-editor/360cff4bf6981215a1d6.js.map b/rdf-editor/360cff4bf6981215a1d6.js.map new file mode 100644 index 00000000..6516b450 --- /dev/null +++ b/rdf-editor/360cff4bf6981215a1d6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"360cff4bf6981215a1d6.js","sources":["webpack:///360cff4bf6981215a1d6.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/3d46d0acd2ee8f92cdfa.js b/rdf-editor/3d46d0acd2ee8f92cdfa.js new file mode 100644 index 00000000..334610e3 --- /dev/null +++ b/rdf-editor/3d46d0acd2ee8f92cdfa.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{228:function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"==typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},229:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(270),o=n(274);n(0)(u,i);for(var a=r(o.prototype),s=0;s{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}}class u extends s.Writable{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}import(e){return e.on("data",e=>this.write(e)).on("end",()=>this.end()).on("error",e=>this.emit("error",e)),this}}class d extends s.Duplex{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}}class f extends s.Transform{until(e,t){return new Promise((n,r)=>{this.on("error",e=>{r(e)}),t?this.once(e,(...e)=>{n(this,...e)}):this.once(e,n)})}bucket(e="utf8"){return this._readableState.objectMode?new Promise((e,t)=>{let n=[];this.pipe(new s.Writable({write(e,t,r){n.push(e),r()},writev(e,t){n.push(...e),t()}})).on("error",e=>{t(e)}).on("finish",()=>{e(n)})}):"utf8"===e||"utf-8"===e?new Promise((t,n)=>{let r="";this.setEncoding(e),this.pipe(new s.Writable({decodeStrings:!1,write(e,t,n){r+=e,n()},writev(e,t){r+=e.join(""),t()}})).on("error",e=>{n(e)}).on("finish",()=>{t(r)})}):"buffer"===e?new Promise((e,n)=>{let r=t.from([]);this.pipe(new s.Writable({decodeStrings:!0,write(e,n,i){r=t.concat([r,e],r.length+e.length),i()}})).on("error",e=>{n(e)}).on("finish",()=>{e(r)})}):void 0}import(e){return e.on("data",e=>this.write(e)).on("end",()=>this.end()).on("error",e=>this.emit("error",e)),this}demolish(e){if(this.push=e=>{if(null!==e)throw new Error("[ERR_STREAM_DESTROYED]: Cannot push after stream was destroyed")},this.emit=function(e,...t){"end"!==e&&Object.getPrototypeOf(this).emit.apply(this,[e,...t])},e)return s.Transform.prototype.destroy.call(this,e)}}const c=new Function("try {return this===global;}catch(e){return false;}")(),[h,p]=void 0===r?[!0,!1]:r.browser?[!0,!0]:"undefined"===r.versions||"undefined"===r.versions.node?[!0,!1]:[!1,!1];(p||c&&+/^v(\d+)/.exec(r.version)[1]<10)&&(f.prototype.destroy=d.prototype.destroy=function(e,t){this._readableState.destroyed=!0,this._writableState.destroyed=!0;let n=()=>{this._writableState.emitClose&&this._readableState.emitClose&&this.emit("close")};return this._destroy(e||null,e=>{!t&&e?(r.nextTick(()=>{this.emit("error",e),n()}),this._writableState.errorEmitted=!0):(r.nextTick(n),t&&t(e))}),this},f.prototype._destroy=d.prototype._destroy=(e,t)=>t(e));class b extends f{constructor(e={}){super(o(o({},e),{},{writableObjectMode:!0,readableObjectMode:!0})),this._as_inputs=new Set,this.on("pipe",e=>{this._as_inputs.add(e),e.on("prefix",(...e)=>{this.emit("prefix",...e)}).on("comment",(...e)=>{this.emit("comment",...e)})}),this.on("unpipe",e=>{this._as_inputs.delete(e)})}_destroy(){for(let e of this._as_inputs)e.destroy()}}class g extends b{_transform(e,t,n){n(null,JSON.stringify(e.isolate())+"\n")}}class y extends b{_transform(e,t,n){n(null,{type:"quad",value:e})}}f.QuadsToOther=b,e.exports=o(o({},s),{},{Readable:l,Writable:u,Duplex:d,Transform:f,QuadsToOther:b,quads_to_json:()=>new g,quads_to_writable:()=>new y,source:(e,n=null)=>(n||"string"!=typeof e||(n="utf8"),new l({objectMode:!n&&"string"!=typeof e&&!t.isBuffer(e),read(){this.push(e,n),this.push(null)}}))})}).call(this,n(2).Buffer,n(4))},256:function(e,t,n){"use strict";var r=n(228).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?S(e,new v):M(e,a,t,!0);else if(a.ended)S(e,new _);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?M(e,a,t,!1):x(e,a)):M(e,a,t,!1)}else r||(a.reading=!1,x(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(P,e))}function P(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,W(e)}function x(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(L,e,t))}function L(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function A(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),W(e),t.flowing&&!t.reading&&e.read(0)}function W(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(q,t,e))}function q(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function B(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):j(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new m("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,W(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?j(this):i.reading||r.nextTick(A,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(D,this),n},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(D,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},275:function(e,t,n){"use strict";e.exports=d;var r=n(228).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(229);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,n,r,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,n=i,r=s,a.prototype.copy.call(t,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&a.forEach(u),o||(a.forEach(u),i(r))}))}));return t.reduce(d)}}}]); +//# sourceMappingURL=3d46d0acd2ee8f92cdfa.js.map \ No newline at end of file diff --git a/rdf-editor/3d46d0acd2ee8f92cdfa.js.map b/rdf-editor/3d46d0acd2ee8f92cdfa.js.map new file mode 100644 index 00000000..4fe96067 --- /dev/null +++ b/rdf-editor/3d46d0acd2ee8f92cdfa.js.map @@ -0,0 +1 @@ +{"version":3,"file":"3d46d0acd2ee8f92cdfa.js","sources":["webpack:///3d46d0acd2ee8f92cdfa.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/413f167fa27c82813743.js b/rdf-editor/413f167fa27c82813743.js new file mode 100644 index 00000000..ebc05e57 --- /dev/null +++ b/rdf-editor/413f167fa27c82813743.js @@ -0,0 +1,3 @@ +/*! For license information please see 413f167fa27c82813743.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{218:function(e,t,n){"use strict";const r={};e.exports=r,r.isArray=Array.isArray,r.isBoolean=e=>"boolean"==typeof e||"[object Boolean]"===Object.prototype.toString.call(e),r.isDouble=e=>r.isNumber(e)&&(-1!==String(e).indexOf(".")||Math.abs(e)>=1e21),r.isEmptyObject=e=>r.isObject(e)&&0===Object.keys(e).length,r.isNumber=e=>"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e),r.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),r.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),r.isString=e=>"string"==typeof e||"[object String]"===Object.prototype.toString.call(e),r.isUndefined=e=>void 0===e},219:function(e,t,n){"use strict";const r=n(222),o=n(218),i=n(257).IdentifierIssuer,a=n(220),s=/(?:<[^>]*?>|"[^"]*?"|[^,])+/g,l=/\s*<([^>]*?)>\s*(?:;\s*(.*))?/,c=/(.*?)=(?:(?:"([^"]*?)")|([^"]*?))\s*(?:(?:;\s*)|$)/g,u={accept:"application/ld+json, application/json"},d={};e.exports=d,d.IdentifierIssuer=i,d.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,d.REGEX_KEYWORD=/^@[a-zA-Z]+$/,d.clone=function(e){if(e&&"object"==typeof e){let t;if(o.isArray(e)){t=[];for(let n=0;n{if(Object.keys(e).some(e=>"accept"===e.toLowerCase()))throw new RangeError('Accept header may not be specified; only "'+u.accept+'" is supported.');return Object.assign({Accept:u.accept},e)},d.parseLinkHeader=e=>{const t={},n=e.match(s);for(let e=0;e{if(!(o.isString(e)||o.isArray(e)&&e.every(e=>o.isString(e)))){if(t&&o.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if("@default"in e&&d.asArray(e["@default"]).every(e=>o.isString(e)))return}throw new a('Invalid JSON-LD syntax; "@type" value must a string, an array of strings, an empty object, or a default object.',"jsonld.SyntaxError",{code:"invalid type value",value:e})}},d.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const n=e[t];return!o.isArray(n)||n.length>0}return!1},d.hasValue=(e,t,n)=>{if(d.hasProperty(e,t)){let i=e[t];const a=r.isList(i);if(o.isArray(i)||a){a&&(i=i["@list"]);for(let e=0;e{if("propertyIsArray"in(r=r||{})||(r.propertyIsArray=!1),"valueIsArray"in r||(r.valueIsArray=!1),"allowDuplicate"in r||(r.allowDuplicate=!0),"prependValue"in r||(r.prependValue=!1),r.valueIsArray)e[t]=n;else if(o.isArray(n)){0===n.length&&r.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),r.prependValue&&(n=n.concat(e[t]),e[t]=[]);for(let o=0;o[].concat(e[t]||[]),d.removeProperty=(e,t)=>{delete e[t]},d.removeValue=(e,t,n,r)=>{"propertyIsArray"in(r=r||{})||(r.propertyIsArray=!1);const o=d.getValues(e,t).filter(e=>!d.compareValues(e,n));0===o.length?d.removeProperty(e,t):1!==o.length||r.propertyIsArray?e[t]=o:e[t]=o[0]},d.relabelBlankNodes=(e,t)=>function e(t,n){if(o.isArray(n))for(let r=0;re===t||(!(!r.isValue(e)||!r.isValue(t)||e["@value"]!==t["@value"]||e["@type"]!==t["@type"]||e["@language"]!==t["@language"]||e["@index"]!==t["@index"])||!!(o.isObject(e)&&"@id"in e&&o.isObject(t)&&"@id"in t)&&e["@id"]===t["@id"]),d.compareShortestLeast=(e,t)=>e.length{n.readable||n.emit("end")}),e.on("error",e=>{n.emit("error",e)}),n}}},222:function(e,t,n){"use strict";const r=n(218),o={};e.exports=o,o.isSubject=e=>{if(r.isObject(e)&&!("@value"in e||"@set"in e||"@list"in e)){return Object.keys(e).length>1||!("@id"in e)}return!1},o.isSubjectReference=e=>r.isObject(e)&&1===Object.keys(e).length&&"@id"in e,o.isValue=e=>r.isObject(e)&&"@value"in e,o.isList=e=>r.isObject(e)&&"@list"in e,o.isGraph=e=>r.isObject(e)&&"@graph"in e&&1===Object.keys(e).filter(e=>"@id"!==e&&"@index"!==e).length,o.isSimpleGraph=e=>o.isGraph(e)&&!("@id"in e),o.isBlankNode=e=>{if(r.isObject(e)){if("@id"in e){const t=e["@id"];return!r.isString(t)||0===t.indexOf("_:")}return 0===Object.keys(e).length||!("@value"in e||"@set"in e||"@list"in e)}return!1}},224:function(e,t,n){"use strict";const r=n(218),o={};e.exports=o,o.parsers={simple:{keys:["href","scheme","authority","path","query","fragment"],regex:/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/},full:{keys:["href","protocol","scheme","authority","auth","user","password","hostname","port","path","directory","file","query","fragment"],regex:/^(([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(?:(((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/}},o.parse=(e,t)=>{const n={},r=o.parsers[t||"full"],i=r.regex.exec(e);let a=r.keys.length;for(;a--;)n[r.keys[a]]=void 0===i[a]?null:i[a];return("https"===n.scheme&&"443"===n.port||"http"===n.scheme&&"80"===n.port)&&(n.href=n.href.replace(":"+n.port,""),n.authority=n.authority.replace(":"+n.port,""),n.port=null),n.normalizedPath=o.removeDotSegments(n.path),n},o.prependBase=(e,t)=>{if(null===e)return t;if(o.isAbsolute(t))return t;e&&!r.isString(e)||(e=o.parse(e||""));const n=o.parse(t),i={protocol:e.protocol||""};if(null!==n.authority)i.authority=n.authority,i.path=n.path,i.query=n.query;else if(i.authority=e.authority,""===n.path)i.path=e.path,null!==n.query?i.query=n.query:i.query=e.query;else{if(0===n.path.indexOf("/"))i.path=n.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf("/")+1),(t.length>0||e.authority)&&"/"!==t.substr(-1)&&(t+="/"),t+=n.path,i.path=t}i.query=n.query}""!==n.path&&(i.path=o.removeDotSegments(i.path));let a=i.protocol;return null!==i.authority&&(a+="//"+i.authority),a+=i.path,null!==i.query&&(a+="?"+i.query),null!==n.fragment&&(a+="#"+n.fragment),""===a&&(a="./"),a},o.removeBase=(e,t)=>{if(null===e)return t;e&&!r.isString(e)||(e=o.parse(e||""));let n="";if(""!==e.href?n+=(e.protocol||"")+"//"+(e.authority||""):t.indexOf("//")&&(n+="//"),0!==t.indexOf(n))return t;const i=o.parse(t.substr(n.length)),a=e.normalizedPath.split("/"),s=i.normalizedPath.split("/"),l=i.fragment||i.query?0:1;for(;a.length>0&&s.length>l&&a[0]===s[0];)a.shift(),s.shift();let c="";if(a.length>0){a.pop();for(let e=0;e{if(0===e.length)return"";const t=e.split("/"),n=[];for(;t.length>0;){const e=t.shift(),r=0===t.length;"."!==e?".."!==e?n.push(e):(n.pop(),r&&n.push("")):r&&n.push("")}return"/"===e[0]&&n.length>0&&""!==n[0]&&n.unshift(""),1===n.length&&""===n[0]?"/":n.join("/")};const i=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\s]*$/;o.isAbsolute=e=>r.isString(e)&&i.test(e),o.isRelative=e=>r.isString(e)},227:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t0){const n=t.substr(0,a),s=t.substr(a+1);if("_"===n||0===s.indexOf("//"))return t;r&&r.hasOwnProperty(n)&&w.createTermDefinition({activeCtx:e,localCtx:r,term:n,defined:o,options:i});const l=e.mappings.get(n);if(l&&l._prefix)return l["@id"]+s;if(p(t))return t}if(n.vocab&&"@vocab"in e){t=e["@vocab"]+t}else if(n.base){let n,r;"@base"in e?e["@base"]?(r=h(i.base,e["@base"]),n=h(r,t)):(r=e["@base"],n=t):(r=i.base,n=h(i.base,t)),t=n}return t}e.exports=w,w.process=async({activeCtx:e,localCtx:t,options:n,propagate:r=!0,overrideProtected:i=!1,cycles:a=new Set})=>{c(t)&&"@context"in t&&l(t["@context"])&&(t=t["@context"]);if(0===m(t).length)return e;const d=[],y=[({event:e,next:t})=>{d.push(e),t()}];n.eventHandler&&y.push(n.eventHandler);const b=n;n=o(o({},n),{},{eventHandler:y});const x=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});c(x[0].document)&&"boolean"==typeof x[0].document["@propagate"]&&(r=x[0].document["@propagate"]);let O=e;r||O.previousContext||(O=O.clone(),O.previousContext=e);for(const r of x){let{document:o}=r;if(e=O,null===o){if(!i&&0!==Object.keys(e.protected).length)throw new s("Tried to nullify a context with protected terms outside of a term definition.","jsonld.SyntaxError",{code:"invalid context nullification"});O=e=w.getInitialContext(n).clone();continue}const l=r.getProcessed(e);if(l){if(b.eventHandler)for(const e of l.events)v({event:e,options:b});O=e=l.context;continue}if(c(o)&&"@context"in o&&(o=o["@context"]),!c(o))throw new s("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:o});O=O.clone();const y=new Map;if("@version"in o){if(1.1!==o["@version"])throw new s("Unsupported JSON-LD version: "+o["@version"],"jsonld.UnsupportedVersion",{code:"invalid @version value",context:o});if(e.processingMode&&"json-ld-1.0"===e.processingMode)throw new s("@version: "+o["@version"]+" not compatible with "+e.processingMode,"jsonld.ProcessingModeConflict",{code:"processing mode conflict",context:o});O.processingMode="json-ld-1.1",O["@version"]=o["@version"],y.set("@version",!0)}if(O.processingMode=O.processingMode||e.processingMode,"@base"in o){let e=o["@base"];if(null===e||p(e));else{if(!f(e))throw new s('Invalid JSON-LD syntax; the value of "@base" in a @context must be an absolute IRI, a relative IRI, or null.',"jsonld.SyntaxError",{code:"invalid base IRI",context:o});e=h(O["@base"],e)}O["@base"]=e,y.set("@base",!0)}if("@vocab"in o){const e=o["@vocab"];if(null===e)delete O["@vocab"];else{if(!u(e))throw new s('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});if(!p(e)&&w.processingMode(O,1))throw new s('Invalid JSON-LD syntax; the value of "@vocab" in a @context must be an absolute IRI.',"jsonld.SyntaxError",{code:"invalid vocab mapping",context:o});{const t=j(O,e,{vocab:!0,base:!0},void 0,void 0,n);p(t)||n.eventHandler&&v({event:{type:["JsonLdEvent"],code:"relative @vocab reference",level:"warning",message:"Relative @vocab reference found.",details:{vocab:t}},options:n}),O["@vocab"]=t}}y.set("@vocab",!0)}if("@language"in o){const e=o["@language"];if(null===e)delete O["@language"];else{if(!u(e))throw new s('Invalid JSON-LD syntax; the value of "@language" in a @context must be a string or null.',"jsonld.SyntaxError",{code:"invalid default language",context:o});e.match(g)||n.eventHandler&&v({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:n}),O["@language"]=e.toLowerCase()}y.set("@language",!0)}if("@direction"in o){const t=o["@direction"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @direction not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context member",context:o});if(null===t)delete O["@direction"];else{if("ltr"!==t&&"rtl"!==t)throw new s('Invalid JSON-LD syntax; the value of "@direction" in a @context must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:o});O["@direction"]=t}y.set("@direction",!0)}if("@propagate"in o){const n=o["@propagate"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @propagate not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if("boolean"!=typeof n)throw new s("Invalid JSON-LD syntax; @propagate value must be a boolean.","jsonld.SyntaxError",{code:"invalid @propagate value",context:t});y.set("@propagate",!0)}if("@import"in o){const r=o["@import"];if("json-ld-1.0"===e.processingMode)throw new s("Invalid JSON-LD syntax; @import not compatible with "+e.processingMode,"jsonld.SyntaxError",{code:"invalid context entry",context:o});if(!u(r))throw new s("Invalid JSON-LD syntax; @import must be a string.","jsonld.SyntaxError",{code:"invalid @import value",context:t});const i=await n.contextResolver.resolve({activeCtx:e,context:r,documentLoader:n.documentLoader,base:n.base});if(1!==i.length)throw new s("Invalid JSON-LD syntax; @import must reference a single context.","jsonld.SyntaxError",{code:"invalid remote context",context:t});const a=i[0].getProcessed(e);if(a)o=a;else{const n=i[0].document;if("@import"in n)throw new s("Invalid JSON-LD syntax: imported context must not include @import.","jsonld.SyntaxError",{code:"invalid context entry",context:t});for(const e in n)o.hasOwnProperty(e)||(o[e]=n[e]);i[0].setProcessed(e,o)}y.set("@import",!0)}y.set("@protected",o["@protected"]||!1);for(const e in o)if(w.createTermDefinition({activeCtx:O,localCtx:o,term:e,defined:y,options:n,overrideProtected:i}),c(o[e])&&"@context"in o[e]){const t=o[e]["@context"];let r=!0;if(u(t)){const e=h(n.base,t);a.has(e)?r=!1:a.add(e)}if(r)try{await w.process({activeCtx:O.clone(),localCtx:o[e]["@context"],overrideProtected:!0,options:n,cycles:a})}catch(t){throw new s("Invalid JSON-LD syntax; invalid scoped context.","jsonld.SyntaxError",{code:"invalid scoped context",context:o[e]["@context"],term:e})}}r.setProcessed(e,{context:O,events:d})}return O},w.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:r,options:o,overrideProtected:i=!1})=>{if(r.has(n)){if(r.get(n))return;throw new s("Cyclical context definition detected.","jsonld.CyclicalContext",{code:"cyclic IRI mapping",context:t,term:n})}let a;if(r.set(n,!1),t.hasOwnProperty(n)&&(a=t[n]),"@type"===n&&c(a)&&"@set"===(a["@container"]||"@set")&&w.processingMode(e,1.1)){const e=["@container","@id","@protected"],r=Object.keys(a);if(0===r.length||r.some(t=>!e.includes(t)))throw new s("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n})}else{if(w.isKeyword(n))throw new s("Invalid JSON-LD syntax; keywords cannot be overridden.","jsonld.SyntaxError",{code:"keyword redefinition",context:t,term:n});if(n.match(y))return void(o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved term",level:"warning",message:'Terms beginning with "@" are reserved for future use and dropped.',details:{term:n}},options:o}));if(""===n)throw new s("Invalid JSON-LD syntax; a term cannot be an empty string.","jsonld.SyntaxError",{code:"invalid term definition",context:t})}const d=e.mappings.get(n);e.mappings.has(n)&&e.mappings.delete(n);let f=!1;if((u(a)||null===a)&&(f=!0,a={"@id":a}),!c(a))throw new s("Invalid JSON-LD syntax; @context term values must be strings or objects.","jsonld.SyntaxError",{code:"invalid term definition",context:t});const h={};e.mappings.set(n,h),h.reverse=!1;const g=["@container","@id","@language","@reverse","@type"];w.processingMode(e,1.1)&&g.push("@context","@direction","@index","@nest","@prefix","@protected");for(const e in a)if(!g.includes(e))throw new s("Invalid JSON-LD syntax; a term definition must not contain "+e,"jsonld.SyntaxError",{code:"invalid term definition",context:t});const m=n.indexOf(":");if(h._termHasColon=m>0,"@reverse"in a){if("@id"in a)throw new s("Invalid JSON-LD syntax; a @reverse term definition must not contain @id.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});if("@nest"in a)throw new s("Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});const i=a["@reverse"];if(!u(i))throw new s("Invalid JSON-LD syntax; a @context @reverse value must be a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(i.match(y))return o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved @reverse value",level:"warning",message:'@reverse values beginning with "@" are reserved for future use and dropped.',details:{reverse:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));const l=j(e,i,{vocab:!0,base:!1},t,r,o);if(!p(l))throw new s("Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});h["@id"]=l,h.reverse=!0}else if("@id"in a){let i=a["@id"];if(i&&!u(i))throw new s("Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(null===i)h["@id"]=null;else{if(!w.isKeyword(i)&&i.match(y))return o.eventHandler&&v({event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:'@id values beginning with "@" are reserved for future use and dropped.',details:{id:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));if(i!==n){if(i=j(e,i,{vocab:!0,base:!1},t,r,o),!p(i)&&!w.isKeyword(i))throw new s("Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t});if(n.match(/(?::[^:])|\//)){if(j(e,n,{vocab:!0,base:!1},t,new Map(r).set(n,!0),o)!==i)throw new s("Invalid JSON-LD syntax; term in form of IRI must expand to definition.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t})}h["@id"]=i,h._prefix=f&&!h._termHasColon&&i.match(/[:\/\?#\[\]@]$/)}}}if(!("@id"in h))if(h._termHasColon){const i=n.substr(0,m);if(t.hasOwnProperty(i)&&w.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:r,options:o}),e.mappings.has(i)){const t=n.substr(m+1);h["@id"]=e.mappings.get(i)["@id"]+t}else h["@id"]=n}else if("@type"===n)h["@id"]=n;else{if(!("@vocab"in e))throw new s("Invalid JSON-LD syntax; @context terms must define an @id.","jsonld.SyntaxError",{code:"invalid IRI mapping",context:t,term:n});h["@id"]=e["@vocab"]+n}if((!0===a["@protected"]||!0===r.get("@protected")&&!1!==a["@protected"])&&(e.protected[n]=!0,h.protected=!0),r.set(n,!0),"@type"in a){let n=a["@type"];if(!u(n))throw new s("Invalid JSON-LD syntax; an @context @type value must be a string.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if("@json"===n||"@none"===n){if(w.processingMode(e,1))throw new s(`Invalid JSON-LD syntax; an @context @type value must not be "${n}" in JSON-LD 1.0 mode.`,"jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else if("@id"!==n&&"@vocab"!==n){if(n=j(e,n,{vocab:!0,base:!1},t,r,o),!p(n))throw new s("Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.","jsonld.SyntaxError",{code:"invalid type mapping",context:t});if(0===n.indexOf("_:"))throw new s("Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}h["@type"]=n}if("@container"in a){const n=u(a["@container"])?[a["@container"]]:a["@container"]||[],r=["@list","@set","@index","@language"];let o=!0;const i=n.includes("@set");if(w.processingMode(e,1.1)){if(r.push("@graph","@id","@type"),n.includes("@list")){if(1!==n.length)throw new s("Invalid JSON-LD syntax; @context @container with @list must have no other values","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else if(n.includes("@graph")){if(n.some(e=>"@graph"!==e&&"@id"!==e&&"@index"!==e&&"@set"!==e))throw new s("Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set","jsonld.SyntaxError",{code:"invalid container mapping",context:t})}else o&=n.length<=(i?2:1);if(n.includes("@type")&&(h["@type"]=h["@type"]||"@id",!["@id","@vocab"].includes(h["@type"])))throw new s("Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.","jsonld.SyntaxError",{code:"invalid type mapping",context:t})}else o&=!l(a["@container"]),o&=n.length<=1;if(o&=n.every(e=>r.includes(e)),o&=!(i&&n.includes("@list")),!o)throw new s("Invalid JSON-LD syntax; @context @container value must be one of the following: "+r.join(", "),"jsonld.SyntaxError",{code:"invalid container mapping",context:t});if(h.reverse&&!n.every(e=>["@index","@set"].includes(e)))throw new s("Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.","jsonld.SyntaxError",{code:"invalid reverse property",context:t});h["@container"]=n}if("@index"in a){if(!("@container"in a)||!h["@container"].includes("@index"))throw new s(`Invalid JSON-LD syntax; @index without @index in @container: "${a["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});if(!u(a["@index"])||0===a["@index"].indexOf("@"))throw new s(`Invalid JSON-LD syntax; @index must expand to an IRI: "${a["@index"]}" on term "${n}".`,"jsonld.SyntaxError",{code:"invalid term definition",context:t});h["@index"]=a["@index"]}if("@context"in a&&(h["@context"]=a["@context"]),"@language"in a&&!("@type"in a)){let e=a["@language"];if(null!==e&&!u(e))throw new s("Invalid JSON-LD syntax; @context @language value must be a string or null.","jsonld.SyntaxError",{code:"invalid language mapping",context:t});null!==e&&(e=e.toLowerCase()),h["@language"]=e}if("@prefix"in a){if(n.match(/:|\//))throw new s("Invalid JSON-LD syntax; @context @prefix used on a compact IRI term","jsonld.SyntaxError",{code:"invalid term definition",context:t});if(w.isKeyword(h["@id"]))throw new s("Invalid JSON-LD syntax; keywords may not be used as prefixes","jsonld.SyntaxError",{code:"invalid term definition",context:t});if("boolean"!=typeof a["@prefix"])throw new s("Invalid JSON-LD syntax; @context value for @prefix must be boolean","jsonld.SyntaxError",{code:"invalid @prefix value",context:t});h._prefix=!0===a["@prefix"]}if("@direction"in a){const e=a["@direction"];if(null!==e&&"ltr"!==e&&"rtl"!==e)throw new s('Invalid JSON-LD syntax; @direction value must be null, "ltr", or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",context:t});h["@direction"]=e}if("@nest"in a){const e=a["@nest"];if(!u(e)||"@nest"!==e&&0===e.indexOf("@"))throw new s("Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.","jsonld.SyntaxError",{code:"invalid @nest value",context:t});h["@nest"]=e}const b=h["@id"];if("@context"===b||"@preserve"===b)throw new s("Invalid JSON-LD syntax; @context and @preserve cannot be aliased.","jsonld.SyntaxError",{code:"invalid keyword alias",context:t});if(d&&d.protected&&!i&&(e.protected[n]=!0,h.protected=!0,!function e(t,n){if(!t||"object"!=typeof t||!n||"object"!=typeof n)return t===n;const r=Array.isArray(t);if(r!==Array.isArray(n))return!1;if(r){if(t.length!==n.length)return!1;for(let r=0;rj(e,t,n,void 0,void 0,r),w.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),n=x.get(t);if(n)return n;const r={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},n=e.fastCurieMap={},r={},a=(e["@language"]||"@none").toLowerCase(),s=e["@direction"],l=e.mappings,c=[...l.keys()].sort(b);for(const e of c){const o=l.get(e);if(null===o)continue;let c=o["@container"]||"@none";if(c=[].concat(c).sort().join(""),null===o["@id"])continue;const u=m(o["@id"]);for(const l of u){let u=t[l];const d=w.isKeyword(l);if(u)d||o._termHasColon||r[l].push(e);else if(t[l]=u={},!d&&!o._termHasColon){r[l]=[e];const t={iri:l,terms:r[l]};l[0]in n?n[l[0]].push(t):n[l[0]]=[t]}if(u[c]||(u[c]={"@language":{},"@type":{},"@any":{}}),u=u[c],i(e,u["@any"],"@none"),o.reverse)i(e,u["@type"],"@reverse");else if("@none"===o["@type"])i(e,u["@any"],"@none"),i(e,u["@language"],"@none"),i(e,u["@type"],"@none");else if("@type"in o)i(e,u["@type"],o["@type"]);else if("@language"in o&&"@direction"in o){const t=o["@language"],n=o["@direction"];i(e,u["@language"],t&&n?`${t}_${n}`.toLowerCase():t?t.toLowerCase():n?"_"+n:"@null")}else"@language"in o?i(e,u["@language"],(o["@language"]||"@null").toLowerCase()):"@direction"in o?o["@direction"]?i(e,u["@language"],"_"+o["@direction"]):i(e,u["@language"],"@none"):s?(i(e,u["@language"],"_"+s),i(e,u["@language"],"@none"),i(e,u["@type"],"@none")):(i(e,u["@language"],a),i(e,u["@language"],"@none"),i(e,u["@type"],"@none"))}}for(const e in n)o(n,e,1);return t},clone:function(){const e={};e.mappings=a.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=a.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone());e.revertToPreviousContext=this.revertToPreviousContext,"@base"in this&&(e["@base"]=this["@base"]);"@language"in this&&(e["@language"]=this["@language"]);"@vocab"in this&&(e["@vocab"]=this["@vocab"]);return e},revertToPreviousContext:function(){if(!this.previousContext)return this;return this.previousContext.clone()},protected:{}};return 1e4===x.size&&x.clear(),x.set(t,r),r;function o(e,t,n){const r=e[t],i=e[t]={};let a,s;for(const e of r)a=e.iri,s=n>=a.length?"":a[n],s in i?i[s].push(e):i[s]=[e];for(const e in i)""!==e&&o(i,e,n+1)}function i(e,t,n){t.hasOwnProperty(n)||(t[n]=e)}},w.getContextValue=(e,t,n)=>{if(null===t){if("@context"===n)return;return null}if(e.mappings.has(t)){const r=e.mappings.get(t);if(d(n))return r;if(r.hasOwnProperty(n))return r[n]}return"@language"===n&&n in e||"@direction"===n&&n in e?e[n]:"@context"!==n?null:void 0},w.processingMode=(e,t)=>t.toString()>="1.1"?!e.processingMode||e.processingMode>="json-ld-"+t.toString():"json-ld-1.0"===e.processingMode,w.isKeyword=e=>{if(!u(e)||"@"!==e[0])return!1;switch(e){case"@base":case"@container":case"@context":case"@default":case"@direction":case"@embed":case"@explicit":case"@graph":case"@id":case"@included":case"@index":case"@json":case"@language":case"@list":case"@nest":case"@none":case"@omitDefault":case"@prefix":case"@preserve":case"@protected":case"@requireAll":case"@reverse":case"@set":case"@type":case"@value":case"@version":case"@vocab":return!0}return!1}},246:function(e,t,n){"use strict";const r=n(220),{isArray:o}=n(218),{asArray:i}=n(219),a={};e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?i(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{!function e({event:t,handlers:n}){let i=!0;for(let a=0;i&&a{i=!0}});else{if("object"!=typeof s)throw new r("Invalid event handler.","jsonld.InvalidEventHandler",{event:t});t.code in s?s[t.code]({event:t,next:()=>{i=!0}}):i=!0}}return i}({event:e,handlers:t.eventHandler})};const s=new Set(["empty object","free-floating scalar","invalid @language value","invalid property","null @id value","null @value value","object with only @id","object with only @language","object with only @list","object with only @value","relative @id reference","relative @type reference","relative @vocab reference","reserved @id value","reserved @reverse value","reserved term","blank node predicate","relative graph reference","relative object reference","relative predicate reference","relative subject reference"]);a.safeEventHandler=function({event:e,next:t}){if("warning"===e.level&&s.has(e.code))throw new r("Safe mode validation error.","jsonld.ValidationError",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log("EVENT: "+e.message,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){"warning"===e.level&&console.warn("WARNING: "+e.message,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new r("No handler for event.","jsonld.UnhandledEvent",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?i(e):null}},247:function(e,t,n){"use strict";e.exports=function(e){return function e(t){if(null===t||"object"!=typeof t||null!=t.toJSON)return JSON.stringify(t);if(Array.isArray(t)&&0===t.length)return"[]";if(Array.isArray(t)&&1===t.length)return"["+e(t[0])+"]";if(Array.isArray(t))return"["+t.reduce((t,n,r)=>(t=1===r?e(t):t)+","+e(n))+"]";const n=Object.keys(t);if(0===n.length)return"{}";if(1===n.length)return"{"+e(n[0])+":"+e(t[n[0]])+"}";return"{"+n.sort().reduce((n,r,o)=>(n=1===o?e(n)+":"+e(t[n]):n)+","+e(r)+":"+e(t[r]))+"}"}(e)}},249:function(e,t,n){"use strict";const{isKeyword:r}=n(227),o=n(222),i=n(218),a=n(219),s=n(220),l={};e.exports=l,l.createMergedNodeMap=(e,t)=>{const n=(t=t||{}).issuer||new a.IdentifierIssuer("_:b"),r={"@default":{}};return l.createNodeMap(e,r,"@default",n),l.mergeNodeMaps(r)},l.createNodeMap=(e,t,n,c,u,d)=>{if(i.isArray(e)){for(const r of e)l.createNodeMap(r,t,n,c,void 0,d);return}if(!i.isObject(e))return void(d&&d.push(e));if(o.isValue(e)){if("@type"in e){let t=e["@type"];0===t.indexOf("_:")&&(e["@type"]=t=c.getId(t))}return void(d&&d.push(e))}if(d&&o.isList(e)){const r=[];return l.createNodeMap(e["@list"],t,n,c,u,r),void d.push({"@list":r})}if("@type"in e){const t=e["@type"];for(const e of t)0===e.indexOf("_:")&&c.getId(e)}i.isUndefined(u)&&(u=o.isBlankNode(e)?c.getId(e["@id"]):e["@id"]),d&&d.push({"@id":u});const p=t[n],f=p[u]=p[u]||{};f["@id"]=u;const h=Object.keys(e).sort();for(let i of h){if("@id"===i)continue;if("@reverse"===i){const r={"@id":u},i=e["@reverse"];for(const e in i){const s=i[e];for(const i of s){let s=i["@id"];o.isBlankNode(i)&&(s=c.getId(s)),l.createNodeMap(i,t,n,c,s),a.addValue(p[s],e,r,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if("@graph"===i){u in t||(t[u]={}),l.createNodeMap(e[i],t,u,c);continue}if("@included"===i){l.createNodeMap(e[i],t,n,c);continue}if("@type"!==i&&r(i)){if("@index"===i&&i in f&&(e[i]!==f[i]||e[i]["@id"]!==f[i]["@id"]))throw new s("Invalid JSON-LD syntax; conflicting @index property detected.","jsonld.SyntaxError",{code:"conflicting indexes",subject:f});f[i]=e[i];continue}const d=e[i];if(0===i.indexOf("_:")&&(i=c.getId(i)),0!==d.length)for(let e of d)if("@type"===i&&(e=0===e.indexOf("_:")?c.getId(e):e),o.isSubject(e)||o.isSubjectReference(e)){if("@id"in e&&!e["@id"])continue;const r=o.isBlankNode(e)?c.getId(e["@id"]):e["@id"];a.addValue(f,i,{"@id":r},{propertyIsArray:!0,allowDuplicate:!1}),l.createNodeMap(e,t,n,c,r)}else if(o.isValue(e))a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1});else if(o.isList(e)){const r=[];l.createNodeMap(e["@list"],t,n,c,u,r),e={"@list":r},a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1})}else l.createNodeMap(e,t,n,c,u),a.addValue(f,i,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(f,i,[],{propertyIsArray:!0})}},l.mergeNodeMapGraphs=e=>{const t={};for(const n of Object.keys(e).sort())for(const o of Object.keys(e[n]).sort()){const i=e[n][o];o in t||(t[o]={"@id":o});const s=t[o];for(const e of Object.keys(i).sort())if(r(e)&&"@type"!==e)s[e]=a.clone(i[e]);else for(const t of i[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},l.mergeNodeMaps=e=>{const t=e["@default"],n=Object.keys(e).sort();for(const r of n){if("@default"===r)continue;const n=e[r];let i=t[r];i?"@graph"in i||(i["@graph"]=[]):t[r]=i={"@id":r,"@graph":[]};const a=i["@graph"];for(const e of Object.keys(n).sort()){const t=n[e];o.isSubjectReference(t)||a.push(t)}}return t}},257:function(e,t,n){e.exports=n(336)},258:function(e,t,n){"use strict";e.exports=class e{constructor(e,t=new Map,n=0){this.prefix=e,this._existing=t,this.counter=n}clone(){const{prefix:t,_existing:n,counter:r}=this;return new e(t,new Map(n),r)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const n=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,n),n}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},259:function(e,t,n){"use strict";const r="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",o="http://www.w3.org/2001/XMLSchema#string",i={};function a(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&("Literal"!==e.object.termType||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value))}i.eoln=/(?:\r\n)|(?:\n)|(?:\r)/g,i.empty=new RegExp("^[ \\t]*$"),i.quad=new RegExp('^[ \\t]*(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]+(?:<([^:]+:[^>]*)>)[ \\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?)|(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"(?:(?:\\^\\^(?:<([^:]+:[^>]*)>))|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))[ \\t]*(?:\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\t]*\\.))[ \\t]*$'),e.exports=class e{static parse(e){const t=[],n={},s=e.split(i.eoln);let c=0;for(const e of s){if(c++,i.empty.test(e))continue;const s=e.match(i.quad);if(null===s)throw new Error("N-Quads parse error on line "+c+".");const u={subject:null,predicate:null,object:null,graph:null};if(void 0!==s[1]?u.subject={termType:"NamedNode",value:s[1]}:u.subject={termType:"BlankNode",value:s[2]},u.predicate={termType:"NamedNode",value:s[3]},void 0!==s[4]?u.object={termType:"NamedNode",value:s[4]}:void 0!==s[5]?u.object={termType:"BlankNode",value:s[5]}:(u.object={termType:"Literal",value:void 0,datatype:{termType:"NamedNode"}},void 0!==s[7]?u.object.datatype.value=s[7]:void 0!==s[8]?(u.object.datatype.value=r,u.object.language=s[8]):u.object.datatype.value=o,u.object.value=s[6].replace(l,(function(e,t,n,r){if(t)switch(t){case"t":return"\t";case"b":return"\b";case"n":return"\n";case"r":return"\r";case"f":return"\f";case'"':return'"';case"'":return"'";case"\\":return"\\"}if(n)return String.fromCharCode(parseInt(n,16));if(r)throw new Error("Unsupported U escape")}))),void 0!==s[9]?u.graph={termType:"NamedNode",value:s[9]}:void 0!==s[10]?u.graph={termType:"BlankNode",value:s[10]}:u.graph={termType:"DefaultGraph",value:""},u.graph.value in n){let e=!0;const r=n[u.graph.value];for(const t of r)if(a(t,u)){e=!1;break}e&&(r.push(u),t.push(u))}else n[u.graph.value]=[u],t.push(u)}return t}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const n=[];for(const r of t)n.push(e.serializeQuad(r));return n.sort().join("")}static serializeQuad(e){const t=e.subject,n=e.predicate,i=e.object,a=e.graph;let l="";return"NamedNode"===t.termType?l+=`<${t.value}>`:l+=""+t.value,l+=` <${n.value}> `,"NamedNode"===i.termType?l+=`<${i.value}>`:"BlankNode"===i.termType?l+=i.value:(l+=`"${function(e){return e.replace(s,(function(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r"}}))}(i.value)}"`,i.datatype.value===r?i.language&&(l+="@"+i.language):i.datatype.value!==o&&(l+=`^^<${i.datatype.value}>`)),"NamedNode"===a.termType?l+=` <${a.value}>`:"BlankNode"===a.termType&&(l+=" "+a.value),l+=" .\n",l}static legacyDatasetToQuads(e){const t=[],n={"blank node":"BlankNode",IRI:"NamedNode",literal:"Literal"};for(const i in e){e[i].forEach(e=>{const a={};for(const t in e){const i=e[t],s={termType:n[i.type],value:i.value};"Literal"===s.termType&&(s.datatype={termType:"NamedNode"},"datatype"in i&&(s.datatype.value=i.datatype),"language"in i?("datatype"in i||(s.datatype.value=r),s.language=i.language):"datatype"in i||(s.datatype.value=o)),a[t]=s}a.graph="@default"===i?{termType:"DefaultGraph",value:""}:{termType:i.startsWith("_:")?"BlankNode":"NamedNode",value:i},t.push(a)})}return t}};const s=/["\\\n\r]/g;const l=/(?:\\([tbnrf"'\\]))|(?:\\u([0-9A-Fa-f]{4}))|(?:\\U([0-9A-Fa-f]{8}))/g},260:function(e,t,n){"use strict";const r="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o="http://www.w3.org/2001/XMLSchema#";e.exports={LINK_HEADER_REL:"http://www.w3.org/ns/json-ld#context",LINK_HEADER_CONTEXT:"http://www.w3.org/ns/json-ld#context",RDF:r,RDF_LIST:r+"List",RDF_FIRST:r+"first",RDF_REST:r+"rest",RDF_NIL:r+"nil",RDF_TYPE:r+"type",RDF_PLAIN_LITERAL:r+"PlainLiteral",RDF_XML_LITERAL:r+"XMLLiteral",RDF_JSON_LITERAL:r+"JSON",RDF_OBJECT:r+"object",RDF_LANGSTRING:r+"langString",XSD:o,XSD_BOOLEAN:o+"boolean",XSD_DOUBLE:o+"double",XSD_INTEGER:o+"integer",XSD_STRING:o+"string"}},276:function(e,t,n){"use strict";(function(t){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;tt.hash?1:0}e.exports=class{constructor(){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new a("_:c14n"),this.hashAlgorithm="sha256",this.quads=null}async main(e){this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];let r=0;for(const e of n)++r%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),s=[];for(const e of i){const n=t.get(e);if(n.length>1){s.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of s){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new a("_:b");e.getId(n);const r=await this.hashNDegreeQuads(n,e);t.push(r)}t.sort(u);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const l=[];for(const e of this.quads){const t=o({},e);t.subject=this._useCanonicalId({component:t.subject}),t.object=this._useCanonicalId({component:t.object}),t.graph=this._useCanonicalId({component:t.graph}),l.push(c.serializeQuad(t))}return l.sort(),l.join("")}async hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),r.object=this.modifyFirstDegreeComponent(e,n.object,"object"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(c.serializeQuad(r))}t.sort();const o=new s(this.hashAlgorithm);for(const e of t)o.update(e);return n.hash=await o.digest(),n.hash}async hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=new s(this.hashAlgorithm);return i.update(r),"g"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}async hashNDegreeQuads(e,t){const n=new s(this.hashAlgorithm),r=await this.createHashToRelated(e,t),o=[...r.keys()].sort();for(const e of o){n.update(e);let o,i="";const a=new l(r.get(e));let s=0;for(;a.hasNext();){const e=a.next();++s%3==0&&await this._yield();let n=t.clone(),r="";const l=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?r+=this.canonicalIssuer.getId(t):(n.hasId(t)||l.push(t),r+=n.getId(t)),0!==i.length&&r>i){c=!0;break}if(!c){for(const e of l){const t=await this.hashNDegreeQuads(e,n);if(r+=n.getId(e),r+=`<${t.hash}>`,n=t.issuer,0!==i.length&&r>i){c=!0;break}}c||(0===i.length||r`}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r)++o%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:"g",id:e,issuer:t,hashToRelated:n})]);return n}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=await this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if("BlankNode"!==t.termType||t.value===r)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,o,n),l=i.get(s);l?l.push(a):i.set(s,[a])}_useCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise(e=>t(e))}}}).call(this,n(337).setImmediate)},277:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,l=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nr)&&(s&&n>0&&a>e[n-1]||!s&&ne[n+1])&&(r=a,o=n)}if(null===r)this.done=!0;else{const n=t.get(r)?o-1:o+1;e[o]=e[n],e[n]=r;for(const n of e)n>r&&t.set(n,!t.get(n))}return n}}},280:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;tt.hash?1:0}e.exports=class{constructor(){this.name="URDNA2015",this.blankNodeInfo=new Map,this.canonicalIssuer=new a("_:c14n"),this.hashAlgorithm="sha256",this.quads=null}main(e){this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];for(const e of n)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const r=[...t.keys()].sort(),i=[];for(const e of r){const n=t.get(e);if(n.length>1){i.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of i){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new a("_:b");e.getId(n);const r=this.hashNDegreeQuads(n,e);t.push(r)}t.sort(u);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const s=[];for(const e of this.quads){const t=o({},e);t.subject=this._useCanonicalId({component:t.subject}),t.object=this._useCanonicalId({component:t.object}),t.graph=this._useCanonicalId({component:t.graph}),s.push(c.serializeQuad(t))}return s.sort(),s.join("")}hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,"subject"),r.object=this.modifyFirstDegreeComponent(e,n.object,"object"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,"graph"),t.push(c.serializeQuad(r))}t.sort();const o=new s(this.hashAlgorithm);for(const e of t)o.update(e);return n.hash=o.digest(),n.hash}hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=new s(this.hashAlgorithm);return i.update(r),"g"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}hashNDegreeQuads(e,t){const n=new s(this.hashAlgorithm),r=this.createHashToRelated(e,t),o=[...r.keys()].sort();for(const e of o){n.update(e);let o,i="";const a=new l(r.get(e));for(;a.hasNext();){const e=a.next();let n=t.clone(),r="";const s=[];let l=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?r+=this.canonicalIssuer.getId(t):(n.hasId(t)||s.push(t),r+=n.getId(t)),0!==i.length&&r>i){l=!0;break}if(!l){for(const e of s){const t=this.hashNDegreeQuads(e,n);if(r+=n.getId(e),r+=`<${t.hash}>`,n=t.issuer,0!==i.length&&r>i){l=!0;break}}l||(0===i.length||r`}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r)this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:"s",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:"o",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:"g",id:e,issuer:t,hashToRelated:n});return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if("BlankNode"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if("BlankNode"!==t.termType||t.value===r)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,o,n),l=i.get(s);l?l.push(a):i.set(s,[a])}_useCanonicalId({component:e}){return"BlankNode"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:"BlankNode",value:this.canonicalIssuer.getId(e.value)}}}},281:function(e,t,n){"use strict";e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},282:function(e,t,n){"use strict";const r=n(345),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),f=Symbol("updateAgeOnGet"),h=()=>1;const v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[f]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},y=e=>{if(e[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[d].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const x=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,y(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[i]+=e.length})),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;x(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;x(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach(e=>this[c](e.key,e.value)),this[p]=new Map,this[d]=new r,this[i]=0}dump(){return this[d].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[o])return m(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[c]&&(this[u]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const f=new b(e,t,s,r,n);return f.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=f.length,this[d].unshift(f),this[p].set(e,this[d].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[d].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach((e,t)=>v(this,t,!1))}}},335:function(e,t,n){function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0)&&n.push(f[e]);const h=n.length>0;if(1===n.length&&(n=n[0]),w(l)){const e=C({activeCtx:s,iri:"@graph",relativeTo:{vocab:!0}}),t=l;l={},h&&(l["@context"]=n),l[e]=t}else if(j(l)&&h){const e=l;l={"@context":n};for(const t in e)l[t]=e[t]}return l},e.expand=async function(t,n){if(arguments.length<1)throw new TypeError("Could not expand, too few arguments.");const r={},i=[];if("expandContext"in(n=a(n,{keepFreeFloatingNodes:!1,contextResolver:new u({sharedCache:o})}))){const e=c.clone(n.expandContext);j(e)&&"@context"in e?r.expandContext=e:r.expandContext={"@context":e},i.push(r.expandContext)}let s;if(O(t)){const o=await e.get(t,n);s=o.documentUrl,r.input=o.document,o.contextUrl&&(r.remoteContext={"@context":o.contextUrl},i.push(r.remoteContext))}else r.input=c.clone(t);"base"in n||(n.base=s||"");let l=N(n);for(const e of i)l=await E({activeCtx:l,localCtx:e,options:n});let d=await v({activeCtx:l,element:r.input,options:n});return j(d)&&"@graph"in d&&1===Object.keys(d).length?d=d["@graph"]:null===d&&(d=[]),w(d)||(d=[d]),d},e.flatten=async function(t,n,r){if(arguments.length<1)return new TypeError("Could not flatten, too few arguments.");n="function"==typeof n?null:n||null,r=a(r,{base:O(t)?t:"",contextResolver:new u({sharedCache:o})});const i=await e.expand(t,r),s=g(i);if(null===n)return s;r.graph=!0,r.skipExpansion=!0;const l=await e.compact(s,n,r);return l},e.frame=async function(t,n,r){if(arguments.length<2)throw new TypeError("Could not frame, too few arguments.");if(r=a(r,{base:O(t)?t:"",embed:"@once",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new u({sharedCache:o})}),O(n)){const t=await e.get(n,r);if(n=t.document,t.contextUrl){let e=n["@context"];e?w(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,n["@context"]=e}}const s=n&&n["@context"]||{},l=await e.processContext(N(r),s,r);r.hasOwnProperty("omitGraph")||(r.omitGraph=k(l,1.1)),r.hasOwnProperty("pruneBlankNodeIdentifiers")||(r.pruneBlankNodeIdentifiers=k(l,1.1));const c=await e.expand(t,r),d=i({},r);d.isFrame=!0,d.keepFreeFloatingNodes=!0;const p=await e.expand(n,d),f=Object.keys(n).map(e=>S(l,e,{vocab:!0}));d.merged=!f.includes("@graph"),d.is11=k(l,1.1);const h=b(c,p,d);d.graph=!r.omitGraph,d.skipExpansion=!0,d.link={},d.framing=!0;let v=await e.compact(h,s,d);return d.link={},v=x(v,d),v},e.link=async function(t,n,r){const o={};return n&&(o["@context"]=n),o["@embed"]="@link",e.frame(t,o,r)},e.normalize=e.canonize=async function(t,n){if(arguments.length<1)throw new TypeError("Could not canonize, too few arguments.");if("inputFormat"in(n=a(n,{base:O(t)?t:null,algorithm:"URDNA2015",skipExpansion:!1,safe:!0,contextResolver:new u({sharedCache:o})}))){if("application/n-quads"!==n.inputFormat&&"application/nquads"!==n.inputFormat)throw new p("Unknown canonicalization input format.","jsonld.CanonizeError");const e=h.parse(t);return s.canonize(e,n)}const r=i({},n);delete r.format,r.produceGeneralizedRdf=!1;const l=await e.toRDF(t,r);return s.canonize(l,n)},e.fromRDF=async function(e,n){if(arguments.length<1)throw new TypeError("Could not convert from RDF, too few arguments.");n=a(n,{format:O(e)?"application/n-quads":void 0});const{format:r}=n;let{rdfParser:o}=n;if(r){if(o=o||t[r],!o)throw new p("Unknown input format.","jsonld.UnknownFormat",{format:r})}else o=()=>e;const i=await o(e);return y(i,n)},e.toRDF=async function(t,n){if(arguments.length<1)throw new TypeError("Could not convert to RDF, too few arguments.");let r;r=(n=a(n,{base:O(t)?t:"",skipExpansion:!1,contextResolver:new u({sharedCache:o})})).skipExpansion?t:await e.expand(t,n);const i=m(r,n);if(n.format){if("application/n-quads"===n.format||"application/nquads"===n.format)return h.serialize(i);throw new p("Unknown output format.","jsonld.UnknownFormat",{format:n.format})}return i},e.createNodeMap=async function(t,n){if(arguments.length<1)throw new TypeError("Could not create node map, too few arguments.");n=a(n,{base:O(t)?t:"",contextResolver:new u({sharedCache:o})});const r=await e.expand(t,n);return T(r,n)},e.merge=async function(t,n,r){if(arguments.length<1)throw new TypeError("Could not merge, too few arguments.");if(!w(t))throw new TypeError('Could not merge, "docs" must be an array.');n="function"==typeof n?null:n||null,r=a(r,{contextResolver:new u({sharedCache:o})});const s=await Promise.all(t.map(t=>{const n=i({},r);return e.expand(t,n)}));let l=!0;"mergeNodes"in r&&(l=r.mergeNodes);const p=r.issuer||new d("_:b"),f={"@default":{}};for(let e=0;ee._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new p("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:e})},e.get=async function(t,n){let r;r="function"==typeof n.documentLoader?n.documentLoader:e.documentLoader;const o=await r(t);try{if(!o.document)throw new p("No remote document found at the given URL.","jsonld.NullRemoteDocument");O(o.document)&&(o.document=JSON.parse(o.document))}catch(e){throw new p("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:e,remoteDoc:o})}return o},e.processContext=async function(e,t,n){return n=a(n,{base:"",contextResolver:new u({sharedCache:o})}),null===t?N(n):(t=c.clone(t),j(t)&&"@context"in t||(t={"@context":t}),E({activeCtx:e,localCtx:t,options:n}))},e.getContextValue=n(227).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new p('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,n){t[e]=n},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",h.parse),e.registerRDFParser("application/nquads",h.parse),e.url=n(224),e.logEventHandler=R,e.logWarningEventHandler=P,e.safeEventHandler=_,e.setDefaultEventHandler=J,e.strictEventHandler=B,e.unhandledEventHandler=H,e.util=c,Object.assign(e,c),e.promises=e,e.RequestQueue=n(281),e.JsonLdProcessor=n(354)(e),l.setupGlobals(e),l.setupDocumentLoaders(e),e},q=function e(){return F((function(){return e()}))};F(q),e.exports=q},336:function(e,t,n){"use strict";const r=n(276),o=n(338),i=n(280),a=n(339);let s;try{s=n(340)}catch(e){}const l={};e.exports=l,l.NQuads=n(259),l.IdentifierIssuer=n(258),l._rdfCanonizeNative=function(e){return e&&(s=e),s},l.canonize=async function(e,t){if(Array.isArray(e)||(e=l.NQuads.legacyDatasetToQuads(e)),t.useNative){if(!s)throw new Error("rdf-canonize-native not available");return new Promise((n,r)=>s.canonize(e,t,(e,t)=>e?r(e):n(t)))}if("URDNA2015"===t.algorithm)return new r(t).main(e);if("URGNA2012"===t.algorithm)return new o(t).main(e);if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)},l._canonizeSync=function(e,t){if(Array.isArray(e)||(e=l.NQuads.legacyDatasetToQuads(e)),t.useNative){if(s)return s.canonizeSync(e,t);throw new Error("rdf-canonize-native not available")}if("URDNA2015"===t.algorithm)return new i(t).main(e);if("URGNA2012"===t.algorithm)return new a(t).main(e);if(!("algorithm"in t))throw new Error("No RDF Dataset Canonicalization algorithm specified.");throw new Error("Invalid RDF Dataset Canonicalization algorithm: "+t.algorithm)}},337:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(277),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},338:function(e,t,n){"use strict";const r=n(276);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.hashAlgorithm="sha1"}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r){let r,a;if("BlankNode"===i.subject.termType&&i.subject.value!==e)a=i.subject.value,r="p";else{if("BlankNode"!==i.object.termType||i.object.value===e)continue;a=i.object.value,r="r"}++o%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,i,t,r),l=n.get(s);l?l.push(a):n.set(s,[a])}return n}}},339:function(e,t,n){"use strict";const r=n(280);e.exports=class extends r{constructor(){super(),this.name="URGNA2012",this.hashAlgorithm="sha1"}modifyFirstDegreeComponent(e,t,n){return"BlankNode"!==t.termType?t:"graph"===n?{termType:"BlankNode",value:"_:g"}:{termType:"BlankNode",value:t.value===e?"_:a":"_:z"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r){let r,i;if("BlankNode"===o.subject.termType&&o.subject.value!==e)i=o.subject.value,r="p";else{if("BlankNode"!==o.object.termType||o.object.value===e)continue;i=o.object.value,r="r"}const a=this.hashRelatedBlankNode(i,o,t,r),s=n.get(a);s?s.push(i):n.set(a,[i])}return n}}},341:function(e,t,n){"use strict";const r=n(342),o={};e.exports=o,o.setupDocumentLoaders=function(e){"undefined"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=r,e.useDocumentLoader("xhr"))},o.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},342:function(e,t,n){"use strict";const{parseLinkHeader:r,buildHeaders:o}=n(219),{LINK_HEADER_CONTEXT:i}=n(260),a=n(220),s=n(281),{prependBase:l}=n(224),c=/(^|(\r\n))link:/i;e.exports=({secure:e,headers:t={},xhr:n}={headers:{}})=>{t=o(t);return(new s).wrapLoader((async function o(s){if(0!==s.indexOf("http:")&&0!==s.indexOf("https:"))throw new a('URL could not be dereferenced; only "http" and "https" URLs are supported.',"jsonld.InvalidUrl",{code:"loading document failed",url:s});if(e&&0!==s.indexOf("https"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\'s scheme is not "https".',"jsonld.InvalidUrl",{code:"loading document failed",url:s});let u;try{u=await function(e,t,n){const r=new(e=e||XMLHttpRequest);return new Promise((e,o)=>{r.onload=()=>e(r),r.onerror=e=>o(e),r.open("GET",t,!0);for(const e in n)r.setRequestHeader(e,n[e]);r.send()})}(n,s,t)}catch(e){throw new a("URL could not be dereferenced, an error occurred.","jsonld.LoadDocumentError",{code:"loading document failed",url:s,cause:e})}if(u.status>=400)throw new a("URL could not be dereferenced: "+u.statusText,"jsonld.LoadDocumentError",{code:"loading document failed",url:s,httpStatusCode:u.status});let d={contextUrl:null,documentUrl:s,document:u.response},p=null;const f=u.getResponseHeader("Content-Type");let h;c.test(u.getAllResponseHeaders())&&(h=u.getResponseHeader("Link"));if(h&&"application/ld+json"!==f){const e=r(h),t=e[i];if(Array.isArray(t))throw new a("URL could not be dereferenced, it has more than one associated HTTP Link Header.","jsonld.InvalidUrl",{code:"multiple context link headers",url:s});t&&(d.contextUrl=t.target),p=e.alternate,p&&"application/ld+json"==p.type&&!(f||"").match(/^application\/(\w*\+)?json$/)&&(d=await o(l(s,p.target)))}return d}))}},343:function(e,t,n){"use strict";const{isArray:r,isObject:o,isString:i}=n(218),{asArray:a}=n(219),{prependBase:s}=n(224),l=n(220),c=n(344);function u(e){throw new l("Invalid JSON-LD syntax; @context must be an object.","jsonld.SyntaxError",{code:"invalid local context",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:n,base:s,cycles:l=new Set}){t&&o(t)&&t["@context"]&&(t=t["@context"]),t=a(t);const d=[];for(const a of t){if(i(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:n,base:s,cycles:l})),r(t)?d.push(...t):d.push(t);continue}if(null===a){d.push(new c({document:null}));continue}o(a)||u(t);const p=JSON.stringify(a);let f=this._get(p);f||(f=new c({document:a}),this._cacheResolvedContext({key:p,resolved:f,tag:"static"})),d.push(f)}return d}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);n&&(t=n.get("static"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){if(this.perOpCache.set(e,t),void 0!==n){let r=this.sharedCache.get(e);r||(r=new Map,this.sharedCache.set(e,r)),r.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:a,cycles:l}){t=s(a,t);const{context:c,remoteDoc:u}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:l});(function e({context:t,base:n}){if(!t)return;const a=t["@context"];if(i(a))return void(t["@context"]=s(n,a));if(r(a)){for(let t=0;t10)throw new l("Maximum number of @context URLs exceeded.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"loading remote context failed":"context overflow",max:10});if(a.has(t))throw new l("Cyclical @context URLs detected.","jsonld.ContextUrlError",{code:"json-ld-1.0"===e.processingMode?"recursive context inclusion":"context overflow",url:t});let s,c;a.add(t);try{c=await n(t),s=c.document||null,i(s)&&(s=JSON.parse(s))}catch(e){throw new l("Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.","jsonld.InvalidUrl",{code:"loading remote context failed",url:t,cause:e})}if(!o(s))throw new l("Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.","jsonld.InvalidUrl",{code:"invalid remote context",url:t});return s="@context"in s?{"@context":s["@context"]}:{"@context":{}},c.contextUrl&&(r(s["@context"])||(s["@context"]=[s["@context"]]),s["@context"].push(c.contextUrl)),{context:s,remoteDoc:c}}}},344:function(e,t,n){"use strict";const r=n(282);e.exports=class{constructor({document:e}){this.document=e,this.cache=new r({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},345:function(e,t,n){"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r{if(null==n)return null;if("@default"===t&&(r=Object.assign({},r,{isFrame:!1})),!s(n)&&!l(n))return i||null!==t&&"@graph"!==g(e,t,{vocab:!0},r)?C({activeCtx:e,activeProperty:t,value:n,options:r}):(r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"free-floating scalar",level:"warning",message:"Dropping free-floating scalar not in a list.",details:{value:n}},options:r}),null);if(s(n)){let o=[];const a=y(e,t,"@container")||[];i=i||a.includes("@list");for(let a=0;a1?o.slice().sort():o:[o];for(const t of i){const n=y(O,t,"@context");d(n)||(e=await b({activeCtx:e,localCtx:n,options:r,propagate:!1}))}}}let M={};await async function e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:i,expandedParent:h,options:O={},insideList:N,typeKey:C,typeScopedContext:A}){const R=Object.keys(i).sort(),P=[];let _;const J=i[C]&&"@json"===g(t,s(i[C])?i[C][0]:i[C],{vocab:!0},o(o({},O),{},{typeExpansion:!0}));for(const e of R){let N,C=i[e];if("@context"===e)continue;const R=g(t,e,{vocab:!0},O);if(null===R||!w(R)&&!m(R)){O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"invalid property",level:"warning",message:"Dropping property that did not expand into an absolute IRI or keyword.",details:{property:e,expandedProperty:R}},options:O});continue}if(m(R)){if("@reverse"===r)throw new a("Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.","jsonld.SyntaxError",{code:"invalid reverse property map",value:C});if(R in h&&"@included"!==R&&"@type"!==R)throw new a("Invalid JSON-LD syntax; colliding keywords detected.","jsonld.SyntaxError",{code:"colliding keywords",keyword:R})}if("@id"===R){if(!u(C)){if(!O.isFrame)throw new a('Invalid JSON-LD syntax; "@id" value must a string.',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(l(C)){if(!c(C))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}else{if(!s(C))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C});if(!C.every(e=>u(e)))throw new a('Invalid JSON-LD syntax; "@id" value an empty object or array of strings, if framing',"jsonld.SyntaxError",{code:"invalid @id value",value:C})}}I(h,"@id",S(C).map(e=>{if(u(e)){const n=g(t,e,{base:!0},O);return O.eventHandler&&(null===n?k(null===e?{event:{type:["JsonLdEvent"],code:"null @id value",level:"warning",message:"Null @id found.",details:{id:e}},options:O}:{event:{type:["JsonLdEvent"],code:"reserved @id value",level:"warning",message:"Reserved @id found.",details:{id:e}},options:O}):w(n)||k({event:{type:["JsonLdEvent"],code:"relative @id reference",level:"warning",message:"Relative @id reference found.",details:{id:e,expandedId:n}},options:O})),n}return e}),{propertyIsArray:O.isFrame});continue}if("@type"===R){l(C)&&(C=Object.fromEntries(Object.entries(C).map(([e,t])=>[g(A,e,{vocab:!0}),S(t).map(e=>g(A,e,{base:!0,vocab:!0},o(o({},O),{},{typeExpansion:!0})))]))),E(C,O.isFrame),I(h,"@type",S(C).map(e=>{if(u(e)){const t=g(A,e,{base:!0,vocab:!0},o(o({},O),{},{typeExpansion:!0}));return"@json"===t||w(t)||O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"relative @type reference",level:"warning",message:"Relative @type reference found.",details:{type:e}},options:O}),t}return e}),{propertyIsArray:O.isFrame});continue}if("@included"===R&&x(t,1.1)){const e=S(await D.expand({activeCtx:t,activeProperty:n,element:C,options:O}));if(!e.every(e=>v(e)))throw new a("Invalid JSON-LD syntax; values of @included must expand to node objects.","jsonld.SyntaxError",{code:"invalid @included value",value:C});I(h,"@included",e,{propertyIsArray:!0});continue}if("@graph"===R&&!l(C)&&!s(C))throw new a('Invalid JSON-LD syntax; "@graph" value must not be an object or an array.',"jsonld.SyntaxError",{code:"invalid @graph value",value:C});if("@value"===R){_=C,J&&x(t,1.1)?h["@value"]=C:I(h,"@value",C,{propertyIsArray:O.isFrame});continue}if("@language"===R){if(null===C)continue;if(!u(C)&&!O.isFrame)throw new a('Invalid JSON-LD syntax; "@language" value must be a string.',"jsonld.SyntaxError",{code:"invalid language-tagged string",value:C});C=S(C).map(e=>u(e)?e.toLowerCase():e);for(const e of C)u(e)&&!e.match(j)&&O.eventHandler&&k({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:O});I(h,"@language",C,{propertyIsArray:O.isFrame});continue}if("@direction"===R){if(!u(C)&&!O.isFrame)throw new a('Invalid JSON-LD syntax; "@direction" value must be a string.',"jsonld.SyntaxError",{code:"invalid base direction",value:C});C=S(C);for(const e of C)if(u(e)&&"ltr"!==e&&"rtl"!==e)throw new a('Invalid JSON-LD syntax; "@direction" must be "ltr" or "rtl".',"jsonld.SyntaxError",{code:"invalid base direction",value:C});I(h,"@direction",C,{propertyIsArray:O.isFrame});continue}if("@index"===R){if(!u(C))throw new a('Invalid JSON-LD syntax; "@index" value must be a string.',"jsonld.SyntaxError",{code:"invalid @index value",value:C});I(h,"@index",C);continue}if("@reverse"===R){if(!l(C))throw new a('Invalid JSON-LD syntax; "@reverse" value must be an object.',"jsonld.SyntaxError",{code:"invalid @reverse value",value:C});if(N=await D.expand({activeCtx:t,activeProperty:"@reverse",element:C,options:O}),"@reverse"in N)for(const e in N["@reverse"])I(h,e,N["@reverse"][e],{propertyIsArray:!0});let e=h["@reverse"]||null;for(const t in N){if("@reverse"===t)continue;null===e&&(e=h["@reverse"]={}),I(e,t,[],{propertyIsArray:!0});const n=N[t];for(let r=0;r"@id"===e||"@index"===e)&&(N=S(N).map(e=>({"@graph":S(e)}))),M.mappings.has(e)&&M.mappings.get(e).reverse){const e=h["@reverse"]=h["@reverse"]||{};N=S(N);for(let t=0;t"@value"===g(t,e,{vocab:!0},O)))throw new a("Invalid JSON-LD syntax; nested value must be a node object.","jsonld.SyntaxError",{code:"invalid @nest value",value:o});await e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:o,expandedParent:h,options:O,insideList:N,typeScopedContext:A,typeKey:C})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:A,element:n,expandedParent:M,options:r,insideList:i,typeKey:J,typeScopedContext:O}),P=Object.keys(M);let B=P.length;if("@value"in M){if("@type"in M&&("@language"in M||"@direction"in M))throw new a('Invalid JSON-LD syntax; an element containing "@value" may not contain both "@type" and either "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});let t=B-1;if("@type"in M&&(t-=1),"@index"in M&&(t-=1),"@language"in M&&(t-=1),"@direction"in M&&(t-=1),0!==t)throw new a('Invalid JSON-LD syntax; an element containing "@value" may only have an "@index" property and either "@type" or either or both "@language" or "@direction".',"jsonld.SyntaxError",{code:"invalid value object",element:M});const n=null===M["@value"]?[]:S(M["@value"]),o=N(M,"@type");if(x(e,1.1)&&o.includes("@json")&&1===o.length);else if(0===n.length)r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"null @value value",level:"warning",message:"Dropping null @value value.",details:{value:M}},options:r}),M=null;else{if(!n.every(e=>u(e)||c(e))&&"@language"in M)throw new a("Invalid JSON-LD syntax; only strings may be language-tagged.","jsonld.SyntaxError",{code:"invalid language-tagged value",element:M});if(!o.every(e=>w(e)&&!(u(e)&&0===e.indexOf("_:"))||c(e)))throw new a('Invalid JSON-LD syntax; an element containing "@value" and "@type" must have an absolute IRI for the value of "@type".',"jsonld.SyntaxError",{code:"invalid typed value",element:M})}}else if("@type"in M&&!s(M["@type"]))M["@type"]=[M["@type"]];else if("@set"in M||"@list"in M){if(B>1&&(2!==B||!("@index"in M)))throw new a('Invalid JSON-LD syntax; if an element has the property "@set" or "@list", then it can have at most one other property that is "@index".',"jsonld.SyntaxError",{code:"invalid set or list object",element:M});"@set"in M&&(M=M["@set"],P=Object.keys(M),B=P.length)}else 1===B&&"@language"in M&&(r.eventHandler&&k({event:{type:["JsonLdEvent"],code:"object with only @language",level:"warning",message:"Dropping object with only @language.",details:{value:M}},options:r}),M=null);if(l(M)&&!r.keepFreeFloatingNodes&&!i&&(null===t||"@graph"===A)&&(0===B||"@value"in M||"@list"in M||1===B&&"@id"in M)){if(r.eventHandler){let e,t;0===B?(e="empty object",t="Dropping empty object."):"@value"in M?(e="object with only @value",t="Dropping object with only @value."):"@list"in M?(e="object with only @list",t="Dropping object with only @list."):1===B&&"@id"in M&&(e="object with only @id",t="Dropping object with only @id."),k({event:{type:["JsonLdEvent"],code:e,level:"warning",message:t,details:{value:M}},options:r})}M=null}return M}},349:function(e,t,n){"use strict";const{isSubjectReference:r}=n(222),{createMergedNodeMap:o}=n(249),i={};e.exports=i,i.flatten=e=>{const t=o(e),n=[],i=Object.keys(t).sort();for(let e=0;e0&&(s["@language"]=e,e.match(a)||o.eventHandler&&l({event:{type:["JsonLdEvent"],code:"invalid @language value",level:"warning",message:"@language value must be valid BCP47.",details:{language:e}},options:o})),s["@direction"]=t}else c!==m&&(s["@type"]=c)}return s}e.exports=b,b.fromRDF=async(e,t)=>{const n={},r={"@default":n},a={},{useRdfType:l=!1,useNativeTypes:h=!1,rdfDirection:v=null}=t;for(const o of e){const e="DefaultGraph"===o.graph.termType?"@default":o.graph.value;e in r||(r[e]={}),"@default"===e||e in n||(n[e]={"@id":e});const i=r[e],c=o.subject.value,u=o.predicate.value,d=o.object;c in i||(i[c]={"@id":c});const g=i[c],y=d.termType.endsWith("Node");if(y&&!(d.value in i)&&(i[d.value]={"@id":d.value}),u===f&&!l&&y){s(g,"@type",d.value,{propertyIsArray:!0});continue}const m=x(d,h,v,t);if(s(g,u,m,{propertyIsArray:!0}),y)if(d.value===p){const e=i[d.value];"usages"in e||(e.usages=[]),e.usages.push({node:g,property:u,value:m})}else d.value in a?a[d.value]=!1:a[d.value]={node:g,property:u,value:m}}for(const e in r){const t=r[e];if(!(p in t))continue;const n=t[p];if(n.usages){for(let e of n.usages){let n=e.node,r=e.property,s=e.value;const l=[],p=[];let f=Object.keys(n).length;for(;r===d&&i.isObject(a[n["@id"]])&&i.isArray(n[u])&&1===n[u].length&&i.isArray(n[d])&&1===n[d].length&&(3===f||4===f&&i.isArray(n["@type"])&&1===n["@type"].length&&n["@type"][0]===c)&&(l.push(n[u][0]),p.push(n["@id"]),e=a[n["@id"]],n=e.node,r=e.property,s=e.value,f=Object.keys(n).length,o.isBlankNode(n)););delete s["@id"],s["@list"]=l.reverse();for(const e of p)delete t[e]}delete n.usages}}const g=[],y=Object.keys(n).sort();for(const e of y){const t=n[e];if(e in r){const n=t["@graph"]=[],i=r[e],a=Object.keys(i).sort();for(const e of a){const t=i[e];o.isSubjectReference(t)||n.push(t)}}o.isSubjectReference(t)||g.push(t)}return g}},351:function(e,t,n){"use strict";const{createNodeMap:r}=n(249),{isKeyword:o}=n(227),i=n(222),a=n(247),s=n(218),l=n(219),{handleEvent:c}=n(246),{RDF_FIRST:u,RDF_REST:d,RDF_NIL:p,RDF_TYPE:f,RDF_JSON_LITERAL:h,RDF_LANGSTRING:v,XSD_BOOLEAN:g,XSD_DOUBLE:y,XSD_INTEGER:m,XSD_STRING:b}=n(260),{isAbsolute:x}=n(224),w={};function j(e,t,n,r,i){const a=Object.keys(t).sort();for(const s of a){const a=t[s],l=Object.keys(a).sort();for(let t of l){const l=a[t];if("@type"===t)t=f;else if(o(t))continue;for(const o of l){const a={termType:s.startsWith("_:")?"BlankNode":"NamedNode",value:s};if(!x(s)){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative subject reference",level:"warning",message:"Relative subject reference found.",details:{subject:s}},options:i});continue}const l={termType:t.startsWith("_:")?"BlankNode":"NamedNode",value:t};if(!x(t)){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative predicate reference",level:"warning",message:"Relative predicate reference found.",details:{predicate:t}},options:i});continue}if("BlankNode"===l.termType&&!i.produceGeneralizedRdf){i.eventHandler&&c({event:{type:["JsonLdEvent"],code:"blank node predicate",level:"warning",message:"Dropping blank node predicate.",details:{property:r.getOldIds().find(e=>r.getId(e)===t)}},options:i});continue}const u=O(o,r,e,n,i.rdfDirection,i);u&&e.push({subject:a,predicate:l,object:u,graph:n})}}}}function O(e,t,n,r,o,l){const f={};if(i.isValue(e)){f.termType="Literal",f.value=void 0,f.datatype={termType:"NamedNode"};let t=e["@value"];const n=e["@type"]||null;if("@json"===n)f.value=a(t),f.datatype.value=h;else if(s.isBoolean(t))f.value=t.toString(),f.datatype.value=n||g;else if(s.isDouble(t)||n===y)s.isDouble(t)||(t=parseFloat(t)),f.value=t.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),f.datatype.value=n||y;else if(s.isNumber(t))f.value=t.toFixed(0),f.datatype.value=n||m;else if("i18n-datatype"===o&&"@direction"in e){const n="https://www.w3.org/ns/i18n#"+(e["@language"]||"")+"_"+e["@direction"];f.datatype.value=n,f.value=t}else"@language"in e?(f.value=t,f.datatype.value=n||v,f.language=e["@language"]):(f.value=t,f.datatype.value=n||b)}else if(i.isList(e)){const i=function(e,t,n,r,o,i){const a={termType:"NamedNode",value:u},s={termType:"NamedNode",value:d},l={termType:"NamedNode",value:p},c=e.pop(),f=c?{termType:"BlankNode",value:t.getId()}:l;let h=f;for(const l of e){const e=O(l,t,n,r,o,i),c={termType:"BlankNode",value:t.getId()};n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:c,graph:r}),h=c}if(c){const e=O(c,t,n,r,o,i);n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:l,graph:r})}return f}(e["@list"],t,n,r,o,l);f.termType=i.termType,f.value=i.value}else{const t=s.isObject(e)?e["@id"]:e;f.termType=t.startsWith("_:")?"BlankNode":"NamedNode",f.value=t}return"NamedNode"!==f.termType||x(f.value)?f:(l.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative object reference",level:"warning",message:"Relative object reference found.",details:{object:f.value}},options:l}),null)}e.exports=w,w.toRDF=(e,t)=>{const n=new l.IdentifierIssuer("_:b"),o={"@default":{}};r(e,o,"@default",n);const i=[],a=Object.keys(o).sort();for(const e of a){let r;if("@default"===e)r={termType:"DefaultGraph",value:""};else{if(!x(e)){t.eventHandler&&c({event:{type:["JsonLdEvent"],code:"relative graph reference",level:"warning",message:"Relative graph reference found.",details:{graph:e}},options:t});continue}r=e.startsWith("_:")?{termType:"BlankNode"}:{termType:"NamedNode"},r.value=e}j(i,o[e],r,n,t)}return i}},352:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0;--r){const o=n[r];if(o.graph===t&&o.subject["@id"]===e["@id"])return!0}return!1}function y(e,t,n){const r="@"+n;let o=r in e?e[r][0]:t[n];if("embed"===n)if(!0===o)o="@once";else if(!1===o)o="@never";else if("@always"!==o&&"@never"!==o&&"@link"!==o&&"@first"!==o&&"@last"!==o&&"@once"!==o)throw new d("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:e});return o}function m(e){if(!l.isArray(e)||1!==e.length||!l.isObject(e[0]))throw new d("Invalid JSON-LD syntax; a JSON-LD frame must be a single object.","jsonld.SyntaxError",{frame:e});if("@id"in e[0])for(const t of c.asArray(e[0]["@id"]))if(!l.isObject(t)&&!u.isAbsolute(t)||l.isString(t)&&0===t.indexOf("_:"))throw new d("Invalid JSON-LD syntax; invalid @id in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e});if("@type"in e[0])for(const t of c.asArray(e[0]["@type"]))if(!l.isObject(t)&&!u.isAbsolute(t)||l.isString(t)&&0===t.indexOf("_:"))throw new d("Invalid JSON-LD syntax; invalid @type in frame.","jsonld.SyntaxError",{code:"invalid frame",frame:e})}function b(e,t,n,r){let o=!0,i=!1;for(const u in n){let d=!1;const p=c.getValues(t,u),f=0===c.getValues(n,u).length;if("@id"===u){if(l.isEmptyObject(n["@id"][0]||{})?d=!0:n["@id"].length>=0&&(d=n["@id"].includes(p[0])),!r.requireAll)return d}else if("@type"===u){if(o=!1,f){if(p.length>0)return!1;d=!0}else if(1===n["@type"].length&&l.isEmptyObject(n["@type"][0]))d=p.length>0;else for(const e of n["@type"])d=!(!l.isObject(e)||!("@default"in e))||(d||p.some(t=>t===e));if(!r.requireAll)return d}else{if(a(u))continue;{const t=c.getValues(n,u)[0];let i=!1;if(t&&(m([t]),i="@default"in t),o=!1,0===p.length&&i)continue;if(p.length>0&&f)return!1;if(void 0===t){if(p.length>0)return!1;d=!0}else if(s.isList(t)){const n=t["@list"][0];if(s.isList(p[0])){const t=p[0]["@list"];s.isValue(n)?d=t.some(e=>O(n,e)):(s.isSubject(n)||s.isSubjectReference(n))&&(d=t.some(t=>j(e,n,t,r)))}}else d=s.isValue(t)?p.some(e=>O(t,e)):s.isSubjectReference(t)?p.some(n=>j(e,t,n,r)):!!l.isObject(t)&&p.length>0}}if(!d&&r.requireAll)return!1;i=i||d}return o||i}function x(e,t){const n=e.uniqueEmbeds[e.graph],r=n[t],o=r.parent,i=r.property,a={"@id":t};if(l.isArray(o)){for(let e=0;e{const t=Object.keys(n);for(const r of t)r in n&&l.isObject(n[r].parent)&&n[r].parent["@id"]===e&&(delete n[r],s(r))};s(t)}function w(e,t,n){l.isObject(e)?c.addValue(e,t,n,{propertyIsArray:!0}):e.push(n)}function j(e,t,n,r){if(!("@id"in n))return!1;const o=e.subjects[n["@id"]];return o&&b(e,o,t,r)}function O(e,t){const n=t["@value"],r=t["@type"],o=t["@language"],i=e["@value"]?l.isArray(e["@value"])?e["@value"]:[e["@value"]]:[],a=e["@type"]?l.isArray(e["@type"])?e["@type"]:[e["@type"]]:[],s=e["@language"]?l.isArray(e["@language"])?e["@language"]:[e["@language"]]:[];return 0===i.length&&0===a.length&&0===s.length||!(!i.includes(n)&&!l.isEmptyObject(i[0]))&&(!!(!r&&0===a.length||a.includes(r)||r&&l.isEmptyObject(a[0]))&&!!(!o&&0===s.length||s.includes(o)||o&&l.isEmptyObject(s[0])))}e.exports=h,h.frameMergedOrDefault=(e,t,n)=>{const r={options:n,embedded:!1,graph:"@default",graphMap:{"@default":{}},subjectStack:[],link:{},bnodeMap:{}},o=new c.IdentifierIssuer("_:b");p(e,r.graphMap,"@default",o),n.merged&&(r.graphMap["@merged"]=f(r.graphMap),r.graph="@merged"),r.subjects=r.graphMap[r.graph];const i=[];return h.frame(r,Object.keys(r.subjects).sort(),t,i),n.pruneBlankNodeIdentifiers&&(n.bnodesToClear=Object.keys(r.bnodeMap).filter(e=>1===r.bnodeMap[e].length)),n.link={},function e(t,n){if(l.isArray(t))return t.map(t=>e(t,n));if(l.isObject(t)){if("@preserve"in t)return t["@preserve"][0];if(s.isValue(t))return t;if(s.isList(t))return t["@list"]=e(t["@list"],n),t;if("@id"in t){const e=t["@id"];if(n.link.hasOwnProperty(e)){const r=n.link[e].indexOf(t);if(-1!==r)return n.link[e][r];n.link[e].push(t)}else n.link[e]=[t]}for(const r in t)"@id"===r&&n.bnodesToClear.includes(t[r])?delete t["@id"]:t[r]=e(t[r],n)}return t}(i,n)},h.frame=(e,t,n,r,i=null)=>{m(n),n=n[0];const u=e.options,p={embed:y(n,u,"embed"),explicit:y(n,u,"explicit"),requireAll:y(n,u,"requireAll")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const f=e.link[e.graph],j=function(e,t,n,r){const o={};for(const i of t){const t=e.graphMap[e.graph][i];b(e,t,n,r)&&(o[i]=t)}return o}(e,t,n,p),I=Object.keys(j).sort();for(const m of I){const b=j[m];if(null===i?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},"@link"===p.embed&&m in f){w(r,i,f[m]);continue}const I={"@id":m};if(0===m.indexOf("_:")&&c.addValue(e.bnodeMap,m,I,{propertyIsArray:!0}),f[m]=I,("@first"===p.embed||"@last"===p.embed)&&e.is11)throw new d("Invalid JSON-LD syntax; invalid value of @embed.","jsonld.SyntaxError",{code:"invalid @embed value",frame:n});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(m))if(!e.embedded||"@never"!==p.embed&&!g(b,e.graph,e.subjectStack))if(!e.embedded||"@first"!=p.embed&&"@once"!=p.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(m)){if("@last"===p.embed&&m in e.uniqueEmbeds[e.graph]&&x(e,m),e.uniqueEmbeds[e.graph][m]={parent:r,property:i},e.subjectStack.push({subject:b,graph:e.graph}),m in e.graphMap){let t=!1,r=null;"@graph"in n?(r=n["@graph"][0],t=!("@merged"===m||"@default"===m),l.isObject(r)||(r={})):(t="@merged"!==e.graph,r={}),t&&h.frame(o(o({},e),{},{graph:m,embedded:!1}),Object.keys(e.graphMap[m]).sort(),[r],I,"@graph")}"@included"in n&&h.frame(o(o({},e),{},{embedded:!1}),t,n["@included"],I,"@included");for(const t of Object.keys(b).sort())if(a(t)){if(I[t]=c.clone(b[t]),"@type"===t)for(const t of b["@type"])0===t.indexOf("_:")&&c.addValue(e.bnodeMap,t,I,{propertyIsArray:!0})}else if(!p.explicit||t in n)for(const r of b[t]){const i=t in n?n[t]:v(p);if(s.isList(r)){const i=n[t]&&n[t][0]&&n[t][0]["@list"]?n[t][0]["@list"]:v(p),a={"@list":[]};w(I,t,a);const l=r["@list"];for(const t of l)s.isSubjectReference(t)?h.frame(o(o({},e),{},{embedded:!0}),[t["@id"]],i,a,"@list"):w(a,"@list",c.clone(t))}else s.isSubjectReference(r)?h.frame(o(o({},e),{},{embedded:!0}),[r["@id"]],i,I,t):O(i[0],r)&&w(I,t,c.clone(r))}for(const e of Object.keys(n).sort()){if("@type"===e){if(!l.isObject(n[e][0])||!("@default"in n[e][0]))continue}else if(a(e))continue;const t=n[e][0]||{};if(!y(t,u,"omitDefault")&&!(e in I)){let n="@null";"@default"in t&&(n=c.clone(t["@default"])),l.isArray(n)||(n=[n]),I[e]=[{"@preserve":n}]}}for(const t of Object.keys(n["@reverse"]||{}).sort()){const r=n["@reverse"][t];for(const n of Object.keys(e.subjects)){c.getValues(e.subjects[n],t).some(e=>e["@id"]===m)&&(I["@reverse"]=I["@reverse"]||{},c.addValue(I["@reverse"],t,[],{propertyIsArray:!0}),h.frame(o(o({},e),{},{embedded:!0}),[n],r,I["@reverse"][t],i))}}w(r,i,I),e.subjectStack.pop()}else w(r,i,I);else w(r,i,I)}},h.cleanupNull=(e,t)=>{if(l.isArray(e)){return e.map(e=>h.cleanupNull(e,t)).filter(e=>e)}if("@null"===e)return null;if(l.isObject(e)){if("@id"in e){const n=e["@id"];if(t.link.hasOwnProperty(n)){const r=t.link[n].indexOf(e);if(-1!==r)return t.link[n][r];t.link[n].push(e)}else t.link[n]=[e]}for(const n in e)e[n]=h.cleanupNull(e[n],t)}return e}},353:function(e,t,n){"use strict";const r=n(220),{isArray:o,isObject:i,isString:a,isUndefined:s}=n(218),{isList:l,isValue:c,isGraph:u,isSimpleGraph:d,isSubjectReference:p}=n(222),{expandIri:f,getContextValue:h,isKeyword:v,process:g,processingMode:y}=n(227),{removeBase:m,prependBase:b}=n(224),{REGEX_KEYWORD:x,addValue:w,asArray:j,compareShortestLeast:O}=n(219),I={};function S(e,t,n){if("@nest"!==f(e,t,{vocab:!0},n))throw new r("JSON-LD compact error; nested property must have an @nest value resolving to @nest.","jsonld.SyntaxError",{code:"invalid @nest value"})}e.exports=I,I.compact=async({activeCtx:e,activeProperty:t=null,element:n,options:f={}})=>{if(o(n)){let r=[];for(let o=0;o1&&(N=Array.from(N).sort());const E=e;for(const t of N){const n=I.compactIri({activeCtx:E,iri:t,relativeTo:{vocab:!0}}),r=h(x,n,"@context");s(r)||(e=await g({activeCtx:e,localCtx:r,options:f,propagate:!1}))}const k=Object.keys(n).sort();for(const s of k){const p=n[s];if("@id"!==s)if("@type"!==s)if("@reverse"!==s)if("@preserve"!==s)if("@index"!==s)if("@graph"!==s&&"@list"!==s&&"@included"!==s&&v(s)){const t=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,t,p)}else{if(!o(p))throw new r("JSON-LD expansion error; expanded value must be an array.","jsonld.SyntaxError");if(0===p.length){const t=I.compactIri({activeCtx:e,iri:s,value:p,relativeTo:{vocab:!0},reverse:m}),n=e.mappings.has(t)?e.mappings.get(t)["@nest"]:null;let r=b;n&&(S(e,n,f),i(b[n])||(b[n]={}),r=b[n]),w(r,t,p,{propertyIsArray:!0})}for(const t of p){const n=I.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:m}),r=e.mappings.has(n)?e.mappings.get(n)["@nest"]:null;let p=b;r&&(S(e,r,f),i(b[r])||(b[r]={}),p=b[r]);const v=h(e,n,"@container")||[],g=u(t),y=l(t);let x;y?x=t["@list"]:g&&(x=t["@graph"]);let O=await I.compact({activeCtx:e,activeProperty:n,element:y||g?x:t,options:f});if(y){if(o(O)||(O=[O]),v.includes("@list")){w(p,n,O,{valueIsArray:!0,allowDuplicate:!0});continue}O={[I.compactIri({activeCtx:e,iri:"@list",relativeTo:{vocab:!0}})]:O},"@index"in t&&(O[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"])}if(g)if(v.includes("@graph")&&(v.includes("@id")||v.includes("@index")&&d(t))){let r;p.hasOwnProperty(n)?r=p[n]:p[n]=r={};const o=(v.includes("@id")?t["@id"]:t["@index"])||I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}});w(r,o,O,{propertyIsArray:!f.compactArrays||v.includes("@set")})}else v.includes("@graph")&&d(t)?(o(O)&&O.length>1&&(O={"@included":O}),w(p,n,O,{propertyIsArray:!f.compactArrays||v.includes("@set")})):(o(O)&&1===O.length&&f.compactArrays&&(O=O[0]),O={[I.compactIri({activeCtx:e,iri:"@graph",relativeTo:{vocab:!0}})]:O},"@id"in t&&(O[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t["@id"]),"@index"in t&&(O[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=t["@index"]),w(p,n,O,{propertyIsArray:!f.compactArrays||v.includes("@set")}));else if(v.includes("@language")||v.includes("@index")||v.includes("@id")||v.includes("@type")){let r,o;if(p.hasOwnProperty(n)?r=p[n]:p[n]=r={},v.includes("@language"))c(O)&&(O=O["@value"]),o=t["@language"];else if(v.includes("@index")){const r=h(e,n,"@index")||"@index",i=I.compactIri({activeCtx:e,iri:r,relativeTo:{vocab:!0}});if("@index"===r)o=t["@index"],delete O[i];else{let e;if([o,...e]=j(O[r]||[]),a(o))switch(e.length){case 0:delete O[r];break;case 1:O[r]=e[0];break;default:O[r]=e}else o=null}}else if(v.includes("@id")){const t=I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}});o=O[t],delete O[t]}else if(v.includes("@type")){const r=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}});let i;switch([o,...i]=j(O[r]||[]),i.length){case 0:delete O[r];break;case 1:O[r]=i[0];break;default:O[r]=i}1===Object.keys(O).length&&"@id"in t&&(O=await I.compact({activeCtx:e,activeProperty:n,element:{"@id":t["@id"]},options:f}))}o||(o=I.compactIri({activeCtx:e,iri:"@none",relativeTo:{vocab:!0}})),w(r,o,O,{propertyIsArray:v.includes("@set")})}else{const e=!f.compactArrays||v.includes("@set")||v.includes("@list")||o(O)&&0===O.length||"@list"===s||"@graph"===s;w(p,n,O,{propertyIsArray:e})}}}else{if((h(e,t,"@container")||[]).includes("@index"))continue;const n=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,n,p)}else{const n=await I.compact({activeCtx:e,activeProperty:t,element:p,options:f});o(n)&&0===n.length||w(b,s,n)}else{const t=await I.compact({activeCtx:e,activeProperty:"@reverse",element:p,options:f});for(const n in t)if(e.mappings.has(n)&&e.mappings.get(n).reverse){const r=t[n],o=(h(e,n,"@container")||[]).includes("@set")||!f.compactArrays;w(b,n,r,{propertyIsArray:o}),delete t[n]}if(Object.keys(t).length>0){const n=I.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(b,n,t)}}else{let t=j(p).map(e=>I.compactIri({activeCtx:x,iri:e,relativeTo:{vocab:!0}}));1===t.length&&(t=t[0]);const n=I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}}),r=(h(e,n,"@container")||[]).includes("@set")&&y(e,1.1)||o(t)&&0===p.length;w(b,n,t,{propertyIsArray:r})}else{let t=j(p).map(t=>I.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:f.base}));1===t.length&&(t=t[0]);b[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]=t}}return b}return n},I.compactIri=({activeCtx:e,iri:t,value:n=null,relativeTo:o={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const d=e.getInverse();if(v(t)&&t in d&&"@none"in d[t]&&"@type"in d[t]["@none"]&&"@none"in d[t]["@none"]["@type"])return d[t]["@none"]["@type"]["@none"];if(o.vocab&&t in d){const r=e["@language"]||"@none",o=[];i(n)&&"@index"in n&&!("@graph"in n)&&o.push("@index","@index@set"),i(n)&&"@preserve"in n&&(n=n["@preserve"][0]),u(n)?("@index"in n&&o.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n&&o.push("@graph@id","@graph@id@set"),o.push("@graph","@graph@set","@set"),"@index"in n||o.push("@graph@index","@graph@index@set","@index","@index@set"),"@id"in n||o.push("@graph@id","@graph@id@set")):i(n)&&!c(n)&&o.push("@id","@id@set","@type","@set@type");let s="@language",d="@null";if(a)s="@type",d="@reverse",o.push("@set");else if(l(n)){"@index"in n||o.push("@list");const e=n["@list"];if(0===e.length)s="@any",d="@none";else{let t=0===e.length?r:null,n=null;for(let r=0;re.includes("_"));e&&s.push(e.replace(/^[^_]+_/,"_"))}s.push("@none");const l=e.inverse[t];for(const e of r){if(!(e in l))continue;const t=l[e][o];for(const e of s)if(e in t)return t[e]}return null}(e,t,n,o,s,d);if(null!==p)return p}if(o.vocab&&"@vocab"in e){const n=e["@vocab"];if(0===t.indexOf(n)&&t!==n){const r=t.substr(n.length);if(!e.mappings.has(r))return r}}let p=null;const f=[];let h=e.fastCurieMap;const g=t.length-1;for(let e=0;e=0;--r){const o=f[r],i=o.terms;for(const r of i){const i=r+":"+t.substr(o.iri.length);e.mappings.get(r)._prefix&&(!e.mappings.has(i)||null===n&&e.mappings.get(i)["@id"]===t)&&(null===p||O(i,p)<0)&&(p=i)}}if(null!==p)return p;for(const[n,o]of e.mappings)if(o&&o._prefix&&t.startsWith(n+":"))throw new r(`Absolute IRI "${t}" confused with prefix "${n}".`,"jsonld.SyntaxError",{code:"IRI confused with prefix",context:e});if(!o.vocab){if("@base"in e){if(e["@base"]){const n=m(b(s,e["@base"]),t);return x.test(n)?"./"+n:n}return t}return m(s,t)}return t},I.compactValue=({activeCtx:e,activeProperty:t,value:n,options:r})=>{if(c(n)){const r=h(e,t,"@type"),o=h(e,t,"@language"),i=h(e,t,"@direction"),s=h(e,t,"@container")||[],l="@index"in n&&!s.includes("@index");if(!l&&"@none"!==r){if(n["@type"]===r)return n["@value"];if("@language"in n&&n["@language"]===o&&"@direction"in n&&n["@direction"]===i)return n["@value"];if("@language"in n&&n["@language"]===o)return n["@value"];if("@direction"in n&&n["@direction"]===i)return n["@value"]}const c=Object.keys(n).length,u=1===c||2===c&&"@index"in n&&!l,d="@language"in e,p=a(n["@value"]),f=e.mappings.has(t)&&null===e.mappings.get(t)["@language"];if(u&&"@none"!==r&&(!d||!p||f))return n["@value"];const v={};return l&&(v[I.compactIri({activeCtx:e,iri:"@index",relativeTo:{vocab:!0}})]=n["@index"]),"@type"in n?v[I.compactIri({activeCtx:e,iri:"@type",relativeTo:{vocab:!0}})]=I.compactIri({activeCtx:e,iri:n["@type"],relativeTo:{vocab:!0}}):"@language"in n&&(v[I.compactIri({activeCtx:e,iri:"@language",relativeTo:{vocab:!0}})]=n["@language"]),"@direction"in n&&(v[I.compactIri({activeCtx:e,iri:"@direction",relativeTo:{vocab:!0}})]=n["@direction"]),v[I.compactIri({activeCtx:e,iri:"@value",relativeTo:{vocab:!0}})]=n["@value"],v}const o=f(e,t,{vocab:!0},r),i=h(e,t,"@type"),s=I.compactIri({activeCtx:e,iri:n["@id"],relativeTo:{vocab:"@vocab"===i},base:r.base});return"@id"===i||"@vocab"===i||"@graph"===o?s:{[I.compactIri({activeCtx:e,iri:"@id",relativeTo:{vocab:!0}})]:s}}},354:function(e,t,n){"use strict";e.exports=e=>{class t{toString(){return"[object JsonLdProcessor]"}}return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,n){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,n)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}},381:function(e,t,n){"use strict";n.r(t);var r=n(221),o=n(335),i=n.n(o),a=n(26);function s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(s=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new s(e)}var l=async function(e){const t=[];var n,r=!0,o=!1;try{for(var i,a,l=function(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new s(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}(e);r=(i=await l.next()).done,a=await i.value,!r;r=!0){const e=a;t.push(e)}}catch(e){o=!0,n=e}finally{try{r||null==l.return||await l.return()}finally{if(o)throw n}}return t};class c extends a.Readable{constructor(e,{baseIRI:t,compact:n,context:r={},encoding:o="object",flatten:i,frame:a,prettyPrint:s,skipContext:l}={}){super({objectMode:!0,read:()=>{}}),this.compact=n,this.context=r,this.encoding=o,this.flatten=i,this.frame=a,this.prettyPrint=s,this.skipContext=l,t&&(this.context["@base"]=t.value||t.toString()),e.on("prefix",(e,t)=>{this.context[e]||(this.context[e]=t.value)}),this.handleData(e)}async handleData(e){try{const t=(await l(e)).map(c.toJsonldQuad),n=await i.a.fromRDF(t),r=await this.transform(n,this.options);this.push(r),this.push(null)}catch(e){this.emit("error",e)}}async transform(e){return this.compact&&(e=await i.a.compact(e,this.context)),this.flatten&&(e=await i.a.flatten(e,this.context)),this.frame&&(e=await i.a.frame(e,this.context)),this.skipContext&&e["@context"]&&delete e["@context"],"string"===this.encoding?this.prettyPrint?JSON.stringify(e,null,2):JSON.stringify(e):e}static toJsonldQuad(e){return{subject:c.toJsonldTerm(e.subject),predicate:c.toJsonldTerm(e.predicate),object:c.toJsonldTerm(e.object),graph:c.toJsonldTerm(e.graph)}}static toJsonldTerm(e){return"BlankNode"===e.termType?{termType:"BlankNode",value:"_:"+e.value}:e}}var u=c;class d extends r.a{constructor(e){super(u,e)}}t.default=d}}]); +//# sourceMappingURL=413f167fa27c82813743.js.map \ No newline at end of file diff --git a/rdf-editor/413f167fa27c82813743.js.LICENSE.txt b/rdf-editor/413f167fa27c82813743.js.LICENSE.txt new file mode 100644 index 00000000..3f6ab57b --- /dev/null +++ b/rdf-editor/413f167fa27c82813743.js.LICENSE.txt @@ -0,0 +1,50 @@ +/** + * A JavaScript implementation of the JSON-LD API. + * + * @author Dave Longley + * + * @license BSD 3-Clause License + * Copyright (c) 2011-2022 Digital Bazaar, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the Digital Bazaar, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * Removes the @preserve keywords from expanded result of framing. + * + * @param input the framed, framed output. + * @param options the framing options used. + * + * @return the resulting output. + */ + +// disallow aliasing @context and @preserve + +// remove @preserve + +// remove @preserve from results diff --git a/rdf-editor/413f167fa27c82813743.js.map b/rdf-editor/413f167fa27c82813743.js.map new file mode 100644 index 00000000..9d72a4a4 --- /dev/null +++ b/rdf-editor/413f167fa27c82813743.js.map @@ -0,0 +1 @@ +{"version":3,"file":"413f167fa27c82813743.js","sources":["webpack:///413f167fa27c82813743.js"],"mappings":";AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/47b7fc5dc91d1aadb739.js b/rdf-editor/47b7fc5dc91d1aadb739.js new file mode 100644 index 00000000..ab85865a --- /dev/null +++ b/rdf-editor/47b7fc5dc91d1aadb739.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8,14,15,16,17],{242:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e){for(var t=1;te.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const u=r(43),o=r(243);class a extends o.Transform{static _flush_buffer(e){e._s_push&&(e.push(e._s_push),e._s_push="")}constructor(e={}){super({writableObjectMode:!0,readableObjectMode:!1});let{prefixes:t={}}=e;this._s_push="",this._n_max_buffer=e.max_buffer||e.maxBuffer||32768,this._h_prefixes=u.cache_prefixes(t||{}),this.on("pipe",e=>{e.on("prefix",(e,t)=>{this.write({type:"prefixes",value:{[e]:t}})}),e.on("comment",e=>{this.write({type:"comment",value:e})})}),e.close&&this.once("close",e.close),e.drain&&this.on("drain",e.drain),e.error&&this.on("error",e.error),e.finish&&this.once("finish",e.finish),e.data&&this.on("data",e.data),e.end&&this.once("end",e.end),e.warning&&this.on("warning",e.warning)}_serialize_hash_comment(e){return"# "+e.replace(/\n/g,"\n# ")+"\n"}_serialize_newlines(e=1){return"\n".repeat(e)}_serialize_c4r(e){let t=this._h_prefixes,r=[],i="";for(let t in e)"*"!==t&&r.push(t),i+=this._serialize_c3r(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>u.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return i}_serialize_c3(){throw new Error("Write event type 'c3' not supported by "+this.constructor.name)}_serialize_c4(){throw new Error("Write event type 'c4' not supported by "+this.constructor.name)}_serialize_c3r(){throw new Error("Write event type 'c3r' should have been implemented by subclass "+this.constructor.name)}_serialize_quad(){throw new Error("Write event type 'quad' should have been implemented by subclass "+this.constructor.name)}_serialize_comment(){}_update_prefixes(e,t=!1){let r=s(s({},this._h_prefixes),e);this._h_prefixes=u.cachePrefixes(r||{},t)}_transform(e,t,r){let i;try{i=this.serialize(e)}catch(e){return r(e),e}if(i)a._flush_buffer(this),this.push(i);else{let e=this._s_push.length;e>this._n_max_buffer?a._flush_buffer(this):e&&queueMicrotask(()=>a._flush_buffer(this))}r()}_queue(e){this._s_push+=e,this._s_push.length>this._n_max_buffer?a._flush_buffer(this):queueMicrotask(()=>a._flush_buffer(this))}serialize(e){switch(e.type){case void 0:return this._serialize_quad(e);case"c3r":return this._serialize_c3r(e.value);case"c4r":return this._serialize_c4r(e.value);case"array":{let t="";for(let r of e.value){let e=this.serialize(r);e?t+=e:this._s_push&&(t+=this._s_push,this._s_push="")}return t}case"quad":return this._serialize_quad(e.value);case"c3":return this._serialize_c3(e.value);case"c4":return this._serialize_c4(e.value);case"prefixes":return this._serialize_prefixes(e.value);case"comment":return this._serialize_comment(e.value);case"newline":case"newlines":return this._serialize_newlines(e.value);default:throw new Error(`no such writable data event type for RDF stream: '${e.type}'`)}}rinse(){this._reset(),a._flush_buffer(this)}_flush(){a._flush_buffer(this),this.push(null)}}Object.assign(a.prototype,{isGraphyWritable:!0,_serialize_prefixes:a.prototype._update_prefixes}),e.exports=a},244:function(e,t){},245:function(e,t){},374:function(e,t,r){const i=r(43),s=r(242),{c1:n,namedNode:u,$_PREFIX_CACHE:o}=i,a=/[&"<>']/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},_=/^xml/i,f=e=>e.replace(a,e=>l[e]),h=/([A-Za-z_][A-Za-z_.0-9-]*)$/,p=/([A-Za-z_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}][A-Za-z_.0-9\-\u00b7\u203f-\u2040\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*$)/u;function c(e,t,r,i){if(i.isNamedNode)r+=' rdf:resource="'+f(i.value)+'"/>';else if(i.isLiteral)i.isLanguaged?r+=' xml:lang="'+i.language+'"':i.isDatatyped&&(r+=' rdf:datatype="'+f(i.datatype.value)+'"'),r+=">"+f(i.value)+"";else{if(!i.isBlankNode)throw new Error(`Not allowed to serialize term type '${i.termType}' as object in XML serializer.`);r+=' rdf:nodeID="'+f(i.value)+'"/>'}return r}function d(e,t){let r,i,s,n,u=e._h_prefixes,a=t.value;{let e=h.exec(a);if(e)r=a.slice(0,e.index),i=e[1];else{if(e=p.exec(a),!e)throw new Error(`Cannot serialize predicate <${a}> into an XML qname`);r=a.slice(0,e.index),i=e[1]}}e:for(;;){t:for(;;){if(u[o]){let e=u[o]._h_inverse;if(r in e){let t=e[r];s=(t?t+":":"")+i,n="<"+s;break e}break}for(let e in u){if(u[e]===r){s=(e?e+":":"")+i,n="<"+s;break t}}break}let t="__g"+e._c_prefixes_tmp++;s=t+":"+i,n="<"+s+" xmlns:"+t+'="'+r+'"';break}return[s,n]}class b extends s{constructor(e={}){let t=e.prefixes;delete e.prefixes,super(e),this._b_prefixes_open=!0,this._c_prefixes_tmp=0,this._kt_subject=null;let r='\n to <${e[s]}>`)}else{if(_.test(s))throw new Error(`Cannot serialize prefix '${s}' since it is reserved under the blanket XML namespace.`);i+=`\n\txmlns${s?":"+s:""}="${u(e[s]).value}"`}return i&&this._update_prefixes(e,!0),i}_serialize_c3r(e){let t="";this._b_prefixes_open&&(t+=">",this._b_prefixes_open=!1);let r=this._h_prefixes;null!==this._kt_subject&&(t+="\n\t",this._kt_subject=null);for(let i in e){let s="",u=n(i,r);if(!u.termType)continue;if(!u.isNamedNode&&!u.isBlankNode)throw new Error(`Cannot use ${u.termType} term type in subject position`);if(u.isNamedNode)s+='\n\n\t';else{if(!u.isBlankNode)throw new Error(`Not allowed to serialize term type '${u.termType}' as subject in XML serializer.`);s+='\n\n\t'}let o=!1,a=e[i];for(let e in a){let t=n(e,r);if(!t.termType)continue;if(!t.isNamedNode)throw new Error(`Cannot use ${t.termType} term type in subject position`);let[i,u]=d(this,t),l="";for(let t of a[e]){let e=n(t,r);e.termType&&(l+="\n\t\t"+c(0,i,u,e))}l&&(s+=l,o=!0)}o&&(t+=s+"\n\t")}return t}_serialize_quad(e){let t=i.from.quad(e);this._b_prefixes_open&&(this._s_push+=">",this._b_prefixes_open=!1);let{subject:r,predicate:s,object:n}=t,[u,o]=d(this,s),a="\n\t\t"+c(0,u,o,n);if(r.equals(this._kt_subject))this._s_push+=a;else{if(!r.isNamedNode&&!r.isBlankNode)throw new Error(`Cannot use ${r.termType} term type in subject position`);let e;if(r.isNamedNode)e='\n\n\t'+a;else{if(!r.isBlankNode)throw new Error(`Not allowed to serialize term type '${r.termType}' as subject in XML serializer.`);e='\n\n\t'+a}this._kt_subject?this._s_push+="\n\t"+e:this._s_push+=e,this._kt_subject=r}}_flush(){b._flush_buffer(this),this._b_prefixes_open&&(this.push(">"),this._b_prefixes_open=!1),this._kt_subject?this.push("\n\t\n\n"):this.push("\n\n"),this.push(null)}}Object.assign(b,{_serialize_comment:s.prototype._serialize_hash_comment}),e.exports=function(e){return new b(e)}}}]); +//# sourceMappingURL=47b7fc5dc91d1aadb739.js.map \ No newline at end of file diff --git a/rdf-editor/47b7fc5dc91d1aadb739.js.map b/rdf-editor/47b7fc5dc91d1aadb739.js.map new file mode 100644 index 00000000..e417afef --- /dev/null +++ b/rdf-editor/47b7fc5dc91d1aadb739.js.map @@ -0,0 +1 @@ +{"version":3,"file":"47b7fc5dc91d1aadb739.js","sources":["webpack:///47b7fc5dc91d1aadb739.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/74a0d36eb8170ad36fd0.js b/rdf-editor/74a0d36eb8170ad36fd0.js new file mode 100644 index 00000000..364b8a2b --- /dev/null +++ b/rdf-editor/74a0d36eb8170ad36fd0.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{230:function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},231:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(283),a=n(287);n(0)(u,i);for(var o=r(a.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},233:function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(290),a=n(294);n(0)(u,i);for(var o=r(a.prototype),s=0;s0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?S(e,new m):M(e,o,t,!0);else if(o.ended)S(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?M(e,o,t,!1):j(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,j(e,o));return!o.ended&&(o.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(x,e))}function x(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function q(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):L(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new v("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==q(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===a(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},288:function(e,t,n){"use strict";e.exports=d;var r=n(230).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(231);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?S(e,new m):M(e,o,t,!0);else if(o.ended)S(e,new w);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?M(e,o,t,!1):j(e,o)):M(e,o,t,!1)}else r||(o.reading=!1,j(e,o));return!o.ended&&(o.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(x,e))}function x(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function j(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){u("readable nexttick read 0"),e.read(0)}function C(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(B,t,e))}function B(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function q(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):L(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){S(this,new v("_read()"))},k.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:g;function s(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",d),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",c),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){u("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var d=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",d);var f=!1;function c(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==q(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===a(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",n),i.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(D,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(C,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a-1))throw new m(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new b("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,j(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,n(12),n(4))},295:function(e,t,n){"use strict";e.exports=d;var r=n(232).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(233);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{this.push(r.from(this._str,this._encoding)),this.push(null)}),this.ended=!0)}}}).call(this,n(4),n(2).Buffer)},356:function(e,t,n){(t=e.exports=n(283)).Stream=t,t.Readable=t,t.Writable=n(287),t.Duplex=n(231),t.Transform=n(288),t.PassThrough=n(362),t.finished=n(261),t.pipeline=n(363)},358:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&o.forEach(u),a||(o.forEach(u),i(r))}))}));return t.reduce(d)}},365:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&o.forEach(u),a||(o.forEach(u),i(r))}))}));return t.reduce(d)}}}]); +//# sourceMappingURL=74a0d36eb8170ad36fd0.js.map \ No newline at end of file diff --git a/rdf-editor/74a0d36eb8170ad36fd0.js.map b/rdf-editor/74a0d36eb8170ad36fd0.js.map new file mode 100644 index 00000000..71395950 --- /dev/null +++ b/rdf-editor/74a0d36eb8170ad36fd0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"74a0d36eb8170ad36fd0.js","sources":["webpack:///74a0d36eb8170ad36fd0.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/78333c9878ed6ee78e1b.js b/rdf-editor/78333c9878ed6ee78e1b.js new file mode 100644 index 00000000..1dc64516 --- /dev/null +++ b/rdf-editor/78333c9878ed6ee78e1b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{340:function(n,w){}}]); +//# sourceMappingURL=78333c9878ed6ee78e1b.js.map \ No newline at end of file diff --git a/rdf-editor/78333c9878ed6ee78e1b.js.map b/rdf-editor/78333c9878ed6ee78e1b.js.map new file mode 100644 index 00000000..4127b522 --- /dev/null +++ b/rdf-editor/78333c9878ed6ee78e1b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"78333c9878ed6ee78e1b.js","sources":["webpack:///78333c9878ed6ee78e1b.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/98a0f39ba08a3e1a741b.js b/rdf-editor/98a0f39ba08a3e1a741b.js new file mode 100644 index 00000000..ab1c8d29 --- /dev/null +++ b/rdf-editor/98a0f39ba08a3e1a741b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15,14,16,17],{244:function(n,o){},245:function(n,o){}}]); +//# sourceMappingURL=98a0f39ba08a3e1a741b.js.map \ No newline at end of file diff --git a/rdf-editor/98a0f39ba08a3e1a741b.js.map b/rdf-editor/98a0f39ba08a3e1a741b.js.map new file mode 100644 index 00000000..8ec9dcbb --- /dev/null +++ b/rdf-editor/98a0f39ba08a3e1a741b.js.map @@ -0,0 +1 @@ +{"version":3,"file":"98a0f39ba08a3e1a741b.js","sources":["webpack:///98a0f39ba08a3e1a741b.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/a9fc8bb7b651bd49fb44.js b/rdf-editor/a9fc8bb7b651bd49fb44.js new file mode 100644 index 00000000..40cd51ea --- /dev/null +++ b/rdf-editor/a9fc8bb7b651bd49fb44.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{221:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t{r.readable||r.emit("end")}),e.on("error",e=>{r.emit("error",e)}),r}}},380:function(e,t,r){"use strict";r.r(t);var n=r(221),o=r(26);var i=class{constructor(e){this.stream=e,this.array=[]}push(e){this.array.push(e)}end(){this.stream.push(this.array),this.stream.push(null)}};var s=class{constructor(e){this.stream=e,this.first=!0,this.stream.push("[")}push(e){this.first?this.first=!1:this.stream.push(","),this.stream.push(JSON.stringify(e))}end(){this.stream.push("]"),this.stream.push(null)}};class a extends o.Readable{constructor(e,{encoding:t="object"}={}){if(super({objectMode:!0,read:()=>{}}),"object"===t&&(this.encoder=new i(this)),"string"===t&&(this.encoder=new s(this)),!this.encoder)throw new Error("unknown encoding: "+t);e.on("data",e=>{const t={};let r=t;"DefaultGraph"!==e.graph.termType&&(t["@id"]=e.graph.value,t["@graph"]={},r=t["@graph"]),r["@id"]=a.subjectValue(e.subject),"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===e.predicate.value?r["@type"]=a.subjectValue(e.object):r[e.predicate.value]=a.objectValue(e.object),this.encoder.push(t)}),e.on("end",()=>this.encoder.end()),e.on("error",e=>this.emit("error",e))}static subjectValue(e){return"BlankNode"===e.termType?"_:"+e.value:e.value}static objectValue(e){return"NamedNode"===e.termType?{"@id":e.value}:"BlankNode"===e.termType?{"@id":"_:"+e.value}:e.language?{"@language":e.language,"@value":e.value}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{"@type":e.datatype.value,"@value":e.value}:e.value}}var u=a;class c extends n.a{constructor(e){super(u,e)}}var p=c;function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;te.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const o=r(43),c=r(243);class a extends c.Transform{static _flush_buffer(e){e._s_push&&(e.push(e._s_push),e._s_push="")}constructor(e={}){super({writableObjectMode:!0,readableObjectMode:!1});let{prefixes:t={}}=e;this._s_push="",this._n_max_buffer=e.max_buffer||e.maxBuffer||32768,this._h_prefixes=o.cache_prefixes(t||{}),this.on("pipe",e=>{e.on("prefix",(e,t)=>{this.write({type:"prefixes",value:{[e]:t}})}),e.on("comment",e=>{this.write({type:"comment",value:e})})}),e.close&&this.once("close",e.close),e.drain&&this.on("drain",e.drain),e.error&&this.on("error",e.error),e.finish&&this.once("finish",e.finish),e.data&&this.on("data",e.data),e.end&&this.once("end",e.end),e.warning&&this.on("warning",e.warning)}_serialize_hash_comment(e){return"# "+e.replace(/\n/g,"\n# ")+"\n"}_serialize_newlines(e=1){return"\n".repeat(e)}_serialize_c4r(e){let t=this._h_prefixes,r=[],i="";for(let t in e)"*"!==t&&r.push(t),i+=this._serialize_c3r(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>o.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return i}_serialize_c3(){throw new Error("Write event type 'c3' not supported by "+this.constructor.name)}_serialize_c4(){throw new Error("Write event type 'c4' not supported by "+this.constructor.name)}_serialize_c3r(){throw new Error("Write event type 'c3r' should have been implemented by subclass "+this.constructor.name)}_serialize_quad(){throw new Error("Write event type 'quad' should have been implemented by subclass "+this.constructor.name)}_serialize_comment(){}_update_prefixes(e,t=!1){let r=s(s({},this._h_prefixes),e);this._h_prefixes=o.cachePrefixes(r||{},t)}_transform(e,t,r){let i;try{i=this.serialize(e)}catch(e){return r(e),e}if(i)a._flush_buffer(this),this.push(i);else{let e=this._s_push.length;e>this._n_max_buffer?a._flush_buffer(this):e&&queueMicrotask(()=>a._flush_buffer(this))}r()}_queue(e){this._s_push+=e,this._s_push.length>this._n_max_buffer?a._flush_buffer(this):queueMicrotask(()=>a._flush_buffer(this))}serialize(e){switch(e.type){case void 0:return this._serialize_quad(e);case"c3r":return this._serialize_c3r(e.value);case"c4r":return this._serialize_c4r(e.value);case"array":{let t="";for(let r of e.value){let e=this.serialize(r);e?t+=e:this._s_push&&(t+=this._s_push,this._s_push="")}return t}case"quad":return this._serialize_quad(e.value);case"c3":return this._serialize_c3(e.value);case"c4":return this._serialize_c4(e.value);case"prefixes":return this._serialize_prefixes(e.value);case"comment":return this._serialize_comment(e.value);case"newline":case"newlines":return this._serialize_newlines(e.value);default:throw new Error(`no such writable data event type for RDF stream: '${e.type}'`)}}rinse(){this._reset(),a._flush_buffer(this)}_flush(){a._flush_buffer(this),this.push(null)}}Object.assign(a.prototype,{isGraphyWritable:!0,_serialize_prefixes:a.prototype._update_prefixes}),e.exports=a},255:function(e,t,r){const i=r(43),s=r(242),n=/^`\[[^\]]+\](.*)$/,o=new Map([[Date,e=>i.dateTime(e)],[Number,e=>i.number(e)]]);e.exports=class extends s{constructor(e={}){super(e);let{lists:t=null}=e,r=o;if(e.coercions){r=new Map(r);for(let[t,i]of e.coercions)r.set(t,i)}let i={first:">http://www.w3.org/1999/02/22-rdf-syntax-ns#first",rest:">http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",nil:">http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"};if(t){let{first:e=null,rest:r=null,nil:s=null}=t;e&&(i.first=e),r&&(i.rest=r),s&&(i.nil=s)}Object.assign(this,{_xc_state:0,_hm_coercions:r,_g_lists:i})}_serialize_comment(e,t){let r="";if(2!==this._xc_state&&(r+="\n",this._xc_state=2),t&&t.width){let r=t.width,i=[];for(;e.length>r;){let t=e.slice(0,r+1),s=/^(.*[^\s])\s+/.exec(t);if(s){let t=s[1];i.push(t),e=e.slice(t.length).replace(/^\s+/,"")}else i.push(e.slice(0,r)),e=e.slice(r)}e=i.join("\n")}return r+(super._serialize_comment(e)||"")}_transcode_list(e,t=this._g_lists){if(e.length){let r=e[0],i=r;return Array.isArray(r)&&(i=this._transcode_list(r,t)),{[t.first]:i,[t.rest]:1===e.length?t.nil:this._transcode_list(e.slice(1),t)}}return t.nil}_apply_directive(e,t){let r,i=n.exec(e);if(!i)throw new Error(`Invalid writable data event directive string: "${e}"`);try{r=JSON.parse(i[1])}catch(e){throw new Error(`Unable to parse JSON in writable data event directive: "${i[1]}"`)}let s=r.type;switch(s){case"comment":if(this._serialize_comment)return{write:this._serialize_comment(t+"",r)};break;case"newlines":if(this._serialize_newlines)return{write:this._serialize_newlines(t)};break;case"config":switch(r.value){case"lists":{let e=this._a_list_serializers;e.push(this._serialize_list_object);let r=this._g_lists,i={first:t.first||r.first,rest:t.rest||r.rest,nil:t.nil||r.nil};return this._serialize_list_object=function(e,t){let r=this._transcode_list(e,i);return this._encode_objects(r,t)},{exit:()=>{this._serialize_list_object=e.pop()}}}default:throw new Error(`No such config key '${r.value}'`)}default:throw new Error(`Invalid writable data event directive type: '${s}'`)}return{}}_serialize_c4(e){let t=this._h_prefixes,r=[],s="";for(let t in e)"*"!==t&&r.push(t),s+=this._serialize_c3(e[t]);if(r.length){let e="Destination format does not support quads; an implicit union into the default graph was performed on the quads contained in graphs: "+r.map(e=>i.c1(e,t).verbose()).join(", ");this.emit("warning",e)||console.warn(e)}return s}}},373:function(e,t,r){function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}if("function"!=typeof queueMicrotask){let e=Promise.resolve();try{queueMicrotask=t=>e.then(t).catch(e=>setTimeout(()=>{throw e},0))}catch(e){}}const n=r(43),o=r(255),c=/^([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}]([A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}.]*[A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u{02ff}\u{0370}-\u{037d}\u{037f}-\u{1fff}\u{200c}-\u{200d}\u{2070}-\u{218f}\u{2c00}-\u{2fef}\u{3001}-\u{d7ff}\u{f900}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{effff}_\-0-9\xb7\u{0300}-\u{036f}\u{203f}-\u{2040}])?)?$/u;class a extends o{constructor(e={}){super(e);let{prefixes:t={},lists:r=null,debug:i=!1,style:s=null}=e;if(Object.assign(this,{_b_debug:i,_s_indent:"\t",_b_simplify_default_graph:!1,_xc_directives:0,_s_token_prefix:"@prefix"}),s){s.indent&&(this._s_indent=s.indent.replace(/[^\s]/g,""));let e=s.directives||s.directives;if(e)switch(e){case"sparql":this._xc_directives=1,this._s_token_prefix="prefix";break;case"Sparql":this._xc_directives=3,this._s_token_prefix="Prefix";break;case"SPARQL":this._xc_directives=5,this._s_token_prefix="PREFIX";break;case"turtle":break;case"Turtle":this._xc_directives=2,this._s_token_prefix="@Prefix";break;case"TURTLE":this._xc_directives=4,this._s_token_prefix="@PREFIX";break;default:throw new Error("Value not understood for 'directives' option: "+e)}}r&&(this._serialize_list_object=function(e,t){let r=this._transcode_list(e);return this._encode_objects(r,t)});let o=this._s_token_prefix,a=1&this._xc_directives?"\n":" .\n",u="";try{for(let e in t){if(!c.test(e))throw new Error(`Invlalid prefix id for text/turtle RDF serialization format: '${e}'`);u+=`${o} ${e}: ${n.namedNode(t[e]).verbose()}${a}`}}catch(e){queueMicrotask(()=>{this.emit("error",e)})}u&&this.push(u)}_serialize_prefixes(e){let t=2===this._xc_state?"\n\n":"";this._xc_state=0,this._h_prefixes=function(e){for(var t=1;t" + }, + "description": "when the editor contents have changed and but failed to parse. Check `detail.noParser` (boolean) or `detail.error` properties for the reason", + "inheritedFrom": { + "name": "RdfEditor", + "module": "src/RdfEditor.js" + } + }, + { + "name": "quads-changed", + "type": { + "text": "CustomEvent<{ quads: Quad[]; }>" + }, + "description": "when the editor contents have changed and have been successfully parsed", + "inheritedFrom": { + "name": "RdfEditor", + "module": "src/RdfEditor.js" + } + }, + { + "name": "serialized", + "type": { + "text": "CustomEvent" + }, + "inheritedFrom": { + "name": "RdfEditor", + "module": "src/RdfEditor.js" + } + }, + { + "name": "prefixes-parsed", + "type": { + "text": "CustomEvent<{ prefixes: Record; }>" + }, + "description": "prefixes returned by parser", + "inheritedFrom": { + "name": "RdfEditor", + "module": "src/RdfEditor.js" + } + } + ] + } + ], + "exports": [ + { + "kind": "custom-element-definition", + "name": "rdf-editor", + "declaration": { + "name": "anonymous_0", + "module": "rdf-editor.js" + } + } + ] + }, + { + "kind": "javascript-module", + "path": "demo/index.js", + "declarations": [], + "exports": [] + }, + { + "kind": "javascript-module", + "path": "src/RdfEditor.js", + "declarations": [ + { + "kind": "class", + "description": "A text editor custom element which parses and serializes RDF/JS Quads using a selected RDF format.\n\n## Usage\n\nThe element requires a single property/attribute `format` which should be an RDF serialization media type supported by\n`@rdfjs/formats-common` package.\n\nThe element is easiest to bootstrap by setting the `value` property **before** first render. This property is\nonly used to provide the initial contents of the editor as it is parsed on first render, when the element has been added\nto the page.\n\n```js\nimport '@rdfjs-elements/rdf-editor'\nimport { html } from 'lit'\n\nconst jsonld = {\n '@context': {\n '@base': 'http://example.com/',\n '@vocab': 'http://schema.org/'\n },\n '@id': 'john-doe',\n '@type': 'Person',\n '@name': 'John Doe'\n}\n\nconst initialValue = JSON.stringify(jsonld, null, 2)\n\nconst template = html``\n```\n\nBy default most common formats are supported\n\n- JSON-LD\n- N-Triples\n- N-Quads\n- RDF/XML\n- Turtle/N3\n- TriG *(no highlighting)*\n\nSyntax highlighting is relying on support from CodeMirror.", + "name": "RdfEditor", + "members": [ + { + "kind": "field", + "name": "quads", + "privacy": "public", + "description": "get or sets the RDF/JS quads", + "return": { + "type": { + "text": "Quad[]" + } + }, + "type": { + "text": "Quad[]" + }, + "attribute": "quads" + }, + { + "kind": "method", + "name": "_parse" + }, + { + "kind": "method", + "name": "__serialize" + }, + { + "kind": "method", + "name": "_errorLine", + "parameters": [ + { + "name": "error" + } + ] + }, + { + "kind": "method", + "name": "__notifyParsedPrefixes", + "parameters": [ + { + "name": "parsedPrefixes" + } + ] + }, + { + "kind": "field", + "name": "isParsing", + "type": { + "text": "boolean" + }, + "default": "false" + }, + { + "kind": "field", + "name": "noReserialize", + "privacy": "public", + "type": { + "text": "boolean" + }, + "default": "false", + "description": "Prevents the editor from serializing the quads when format changes", + "attribute": "no-reserialize" + }, + { + "type": { + "text": "string" + }, + "description": "The string representation of the RDF graph.", + "name": "value", + "kind": "field" + }, + { + "kind": "field", + "name": "format", + "privacy": "public", + "type": { + "text": "string" + }, + "description": "Media type of the RDF serialization to use. Custom parsers and serializers must be added to `@rdfjs/formats-common`", + "attribute": "format", + "reflects": true + } + ], + "events": [ + { + "name": "parsing-failed", + "type": { + "text": "CustomEvent<{ notFound?: boolean; error?: Error; }>" + }, + "description": "when the editor contents have changed and but failed to parse. Check `detail.noParser` (boolean) or `detail.error` properties for the reason" + }, + { + "name": "quads-changed", + "type": { + "text": "CustomEvent<{ quads: Quad[]; }>" + }, + "description": "when the editor contents have changed and have been successfully parsed" + }, + { + "name": "serialized", + "type": { + "text": "CustomEvent" + } + }, + { + "name": "prefixes-parsed", + "type": { + "text": "CustomEvent<{ prefixes: Record; }>" + }, + "description": "prefixes returned by parser" + } + ], + "attributes": [ + { + "name": "format", + "type": { + "text": "string" + }, + "description": "Media type of the RDF serialization to use. Custom parsers and serializers must be added to `@rdfjs/formats-common`", + "fieldName": "format" + }, + { + "name": "quads", + "description": "get or sets the RDF/JS quads", + "return": { + "type": { + "text": "Quad[]" + } + }, + "type": { + "text": "Quad[]" + }, + "fieldName": "quads" + }, + { + "name": "no-reserialize", + "type": { + "text": "boolean" + }, + "default": "false", + "description": "Prevents the editor from serializing the quads when format changes", + "fieldName": "noReserialize" + } + ], + "superclass": { + "name": "Editor", + "package": "@rdfjs-elements/editor-base" + } + } + ], + "exports": [ + { + "kind": "js", + "name": "RdfEditor", + "declaration": { + "name": "RdfEditor", + "module": "src/RdfEditor.js" + } + } + ] + }, + { + "kind": "javascript-module", + "path": "src/stream.js", + "declarations": [ + { + "kind": "variable", + "name": "toStream", + "default": "stringToStream" + } + ], + "exports": [ + { + "kind": "js", + "name": "Readable", + "declaration": { + "name": "Readable", + "package": "readable-stream" + } + }, + { + "kind": "js", + "name": "toStream", + "declaration": { + "name": "toStream", + "module": "src/stream.js" + } + } + ] + }, + { + "kind": "javascript-module", + "path": "src/mode/javascript.js", + "declarations": [], + "exports": [] + }, + { + "kind": "javascript-module", + "path": "src/mode/ntriples.js", + "declarations": [], + "exports": [] + }, + { + "kind": "javascript-module", + "path": "src/mode/turtle.js", + "declarations": [], + "exports": [] + }, + { + "kind": "javascript-module", + "path": "src/mode/xml.js", + "declarations": [], + "exports": [] + } + ] +} diff --git a/rdf-editor/d201d166f422ad178128.js b/rdf-editor/d201d166f422ad178128.js new file mode 100644 index 00000000..b2957dd6 --- /dev/null +++ b/rdf-editor/d201d166f422ad178128.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{221:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e{r.readable||r.emit("end")}),t.on("error",t=>{r.emit("error",t)}),r}}},234:function(t,e,r){"use strict";const n=new Set(["_write","_writableState","writable"]);e.a=function(t){return new Proxy(t,{has(t,e){return!n.has(e)&&Reflect.has(...arguments)},get(t,e){if(n.has(e))return;const r=Reflect.get(...arguments);return r&&"function"==typeof r.bind?r.bind(t):r},set(t,e,r){if(!n.has(e))return Reflect.set(...arguments)}})}},383:function(t,e,r){"use strict";r.r(e);var n=r(221),o=r(34),i=r.n(o),c=r(234),s=r(26);var u=class{constructor(t){const e=new s.Transform({objectMode:!0,transform:(t,e,r)=>{r(null,i()(t)+"\n")}});return t.pipe(e),Object(c.a)(e)}};class a extends n.a{constructor(){super(u)}}e.default=a}}]); +//# sourceMappingURL=d201d166f422ad178128.js.map \ No newline at end of file diff --git a/rdf-editor/d201d166f422ad178128.js.map b/rdf-editor/d201d166f422ad178128.js.map new file mode 100644 index 00000000..6f04143d --- /dev/null +++ b/rdf-editor/d201d166f422ad178128.js.map @@ -0,0 +1 @@ +{"version":3,"file":"d201d166f422ad178128.js","sources":["webpack:///d201d166f422ad178128.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/rdf-editor/db96c74897fd63df67cc.js b/rdf-editor/db96c74897fd63df67cc.js new file mode 100644 index 00000000..34e0a9b9 --- /dev/null +++ b/rdf-editor/db96c74897fd63df67cc.js @@ -0,0 +1,791 @@ +/*! For license information please see db96c74897fd63df67cc.js.LICENSE.txt */ +!function(e){function t(t){for(var r,i,o=t[0],s=t[1],a=0,u=[];a=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return $(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;oa&&(r=a-l),o=r;o>=0;o--){for(var f=!0,d=0;di&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},l.prototype.compare=function(e,t,r,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(12))},function(e,t,r){"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error:Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise:Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String:String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean:Boolean,Uint8Array:Uint8Array}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l,u=[],c=!1,f=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f1)for(var r=1;r=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function u(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,f=67108863&l,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:c[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],x=8191&S,k=S>>>13,E=0|s[5],M=8191&E,A=E>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],D=8191&R,P=R>>>13,L=0|s[8],N=8191&L,j=L>>>13,I=0|s[9],B=8191&I,F=I>>>13,$=0|a[0],z=8191&$,U=$>>>13,W=0|a[1],q=8191&W,H=W>>>13,K=0|a[2],V=8191&K,G=K>>>13,Y=0|a[3],X=8191&Y,Z=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],fe=8191&ce,de=ce>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,U))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,U))+Math.imul(b,z)|0,o=Math.imul(b,U);var me=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,q)|0))<<13)|0;u=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,z),i=(i=Math.imul(m,U))+Math.imul(y,z)|0,o=Math.imul(y,U),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,H)|0;var ye=(u+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,U))+Math.imul(_,z)|0,o=Math.imul(_,U),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,H)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,G)|0;var ve=(u+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,U))+Math.imul(k,z)|0,o=Math.imul(k,U),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,V)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0;var we=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,U))+Math.imul(A,z)|0,o=Math.imul(A,U),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,U))+Math.imul(O,z)|0,o=Math.imul(O,U),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,U))+Math.imul(P,z)|0,o=Math.imul(P,U),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var xe=(u+(n=n+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,U))+Math.imul(j,z)|0,o=Math.imul(j,U),n=n+Math.imul(D,q)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ue)|0;var ke=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,U))+Math.imul(F,z)|0,o=Math.imul(F,U),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Ee=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(F,q)|0,o=Math.imul(F,H),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(F,V)|0,o=Math.imul(F,G),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ue)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var Ce=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Te=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(k,pe)|0))<<13)|0;u=((o=o+Math.imul(k,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,ue)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,ue)|0,n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Re=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Pe=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(u+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,be))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=me,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=ke,l[9]=Ee,l[10]=Me,l[11]=Ae,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=De,l[17]=Pe,l[18]=Le,0!==u&&(l[19]=u,r.length++),r};function b(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):b(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-o|f>>>o,c=f&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(f)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(v,y),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return m[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,x),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(94)(e))},function(e,t,r){"use strict";r.r(t),r.d(t,"acl",(function(){return l})),r.d(t,"as",(function(){return c})),r.d(t,"bibo",(function(){return d})),r.d(t,"cc",(function(){return p})),r.d(t,"cert",(function(){return g})),r.d(t,"cnt",(function(){return y})),r.d(t,"constant",(function(){return w})),r.d(t,"crm",(function(){return S})),r.d(t,"csvw",(function(){return k})),r.d(t,"ctag",(function(){return M})),r.d(t,"dashSparql",(function(){return C})),r.d(t,"dash",(function(){return O})),r.d(t,"dbo",(function(){return D})),r.d(t,"dc11",(function(){return L})),r.d(t,"dcam",(function(){return j})),r.d(t,"dcat",(function(){return B})),r.d(t,"dcmitype",(function(){return $})),r.d(t,"dcterms",(function(){return U})),r.d(t,"dig",(function(){return q})),r.d(t,"discipline",(function(){return K})),r.d(t,"doap",(function(){return G})),r.d(t,"dpv",(function(){return X})),r.d(t,"dqv",(function(){return J})),r.d(t,"dtype",(function(){return ee})),r.d(t,"duv",(function(){return re})),r.d(t,"earl",(function(){return ie})),r.d(t,"ebucore",(function(){return se})),r.d(t,"exif",(function(){return le})),r.d(t,"foaf",(function(){return ce})),r.d(t,"frbr",(function(){return de})),r.d(t,"geo",(function(){return pe})),r.d(t,"geof",(function(){return ge})),r.d(t,"geor",(function(){return ye})),r.d(t,"gml",(function(){return we})),r.d(t,"gn",(function(){return Se})),r.d(t,"gr",(function(){return ke})),r.d(t,"grddl",(function(){return Me})),r.d(t,"gs1",(function(){return Ce})),r.d(t,"gtfs",(function(){return Oe})),r.d(t,"http",(function(){return De})),r.d(t,"hydra",(function(){return Le})),r.d(t,"ical",(function(){return je})),r.d(t,"la",(function(){return Be})),r.d(t,"ldp",(function(){return $e})),r.d(t,"list",(function(){return Ue})),r.d(t,"locn",(function(){return qe})),r.d(t,"log",(function(){return Ke})),r.d(t,"lvont",(function(){return Ge})),r.d(t,"m4i",(function(){return Xe})),r.d(t,"ma",(function(){return Je})),r.d(t,"mads",(function(){return et})),r.d(t,"math",(function(){return rt})),r.d(t,"oa",(function(){return it})),r.d(t,"og",(function(){return st})),r.d(t,"oidc",(function(){return lt})),r.d(t,"org",(function(){return ct})),r.d(t,"owl",(function(){return dt})),r.d(t,"pim",(function(){return pt})),r.d(t,"prefix",(function(){return gt})),r.d(t,"prov",(function(){return yt})),r.d(t,"qb",(function(){return wt})),r.d(t,"qkdv",(function(){return St})),r.d(t,"quantitykind",(function(){return kt})),r.d(t,"qudt",(function(){return Mt})),r.d(t,"rdau",(function(){return Ct})),r.d(t,"rdf",(function(){return Ot})),r.d(t,"rdfa",(function(){return Dt})),r.d(t,"rdfs",(function(){return Lt})),r.d(t,"rev",(function(){return jt})),r.d(t,"rico",(function(){return Bt})),r.d(t,"rr",(function(){return $t})),r.d(t,"rss",(function(){return Ut})),r.d(t,"schema",(function(){return qt})),r.d(t,"sd",(function(){return Kt})),r.d(t,"sdmx",(function(){return Gt})),r.d(t,"sem",(function(){return Xt})),r.d(t,"set",(function(){return Jt})),r.d(t,"sf",(function(){return er})),r.d(t,"sh",(function(){return rr})),r.d(t,"shex",(function(){return ir})),r.d(t,"shsh",(function(){return sr})),r.d(t,"sioc",(function(){return lr})),r.d(t,"skos",(function(){return cr})),r.d(t,"skosxl",(function(){return dr})),r.d(t,"solid",(function(){return pr})),r.d(t,"sosa",(function(){return gr})),r.d(t,"sou",(function(){return yr})),r.d(t,"ssn",(function(){return wr})),r.d(t,"stat",(function(){return Sr})),r.d(t,"string",(function(){return kr})),r.d(t,"test",(function(){return Mr})),r.d(t,"time",(function(){return Cr})),r.d(t,"unit",(function(){return Or})),r.d(t,"vaem",(function(){return Dr})),r.d(t,"vann",(function(){return Lr})),r.d(t,"vcard",(function(){return jr})),r.d(t,"_void",(function(){return Br})),r.d(t,"vs",(function(){return $r})),r.d(t,"wdrs",(function(){return Ur})),r.d(t,"wgs",(function(){return qr})),r.d(t,"xhv",(function(){return Kr})),r.d(t,"xkos",(function(){return Gr})),r.d(t,"xsd",(function(){return Xr})),r.d(t,"rif",(function(){return Jr})),r.d(t,"v",(function(){return en})),r.d(t,"wdr",(function(){return rn})),r.d(t,"xml",(function(){return on}));var n={};r.r(n),r.d(n,"default",(function(){return sn})),r.d(n,"acl",(function(){return l})),r.d(n,"as",(function(){return c})),r.d(n,"bibo",(function(){return d})),r.d(n,"cc",(function(){return p})),r.d(n,"cert",(function(){return g})),r.d(n,"cnt",(function(){return y})),r.d(n,"constant",(function(){return w})),r.d(n,"crm",(function(){return S})),r.d(n,"csvw",(function(){return k})),r.d(n,"ctag",(function(){return M})),r.d(n,"dashSparql",(function(){return C})),r.d(n,"dash",(function(){return O})),r.d(n,"dbo",(function(){return D})),r.d(n,"dc11",(function(){return L})),r.d(n,"dcam",(function(){return j})),r.d(n,"dcat",(function(){return B})),r.d(n,"dcmitype",(function(){return $})),r.d(n,"dcterms",(function(){return U})),r.d(n,"dig",(function(){return q})),r.d(n,"discipline",(function(){return K})),r.d(n,"doap",(function(){return G})),r.d(n,"dpv",(function(){return X})),r.d(n,"dqv",(function(){return J})),r.d(n,"dtype",(function(){return ee})),r.d(n,"duv",(function(){return re})),r.d(n,"earl",(function(){return ie})),r.d(n,"ebucore",(function(){return se})),r.d(n,"exif",(function(){return le})),r.d(n,"foaf",(function(){return ce})),r.d(n,"frbr",(function(){return de})),r.d(n,"geo",(function(){return pe})),r.d(n,"geof",(function(){return ge})),r.d(n,"geor",(function(){return ye})),r.d(n,"gml",(function(){return we})),r.d(n,"gn",(function(){return Se})),r.d(n,"gr",(function(){return ke})),r.d(n,"grddl",(function(){return Me})),r.d(n,"gs1",(function(){return Ce})),r.d(n,"gtfs",(function(){return Oe})),r.d(n,"http",(function(){return De})),r.d(n,"hydra",(function(){return Le})),r.d(n,"ical",(function(){return je})),r.d(n,"la",(function(){return Be})),r.d(n,"ldp",(function(){return $e})),r.d(n,"list",(function(){return Ue})),r.d(n,"locn",(function(){return qe})),r.d(n,"log",(function(){return Ke})),r.d(n,"lvont",(function(){return Ge})),r.d(n,"m4i",(function(){return Xe})),r.d(n,"ma",(function(){return Je})),r.d(n,"mads",(function(){return et})),r.d(n,"math",(function(){return rt})),r.d(n,"oa",(function(){return it})),r.d(n,"og",(function(){return st})),r.d(n,"oidc",(function(){return lt})),r.d(n,"org",(function(){return ct})),r.d(n,"owl",(function(){return dt})),r.d(n,"pim",(function(){return pt})),r.d(n,"prefix",(function(){return gt})),r.d(n,"prov",(function(){return yt})),r.d(n,"qb",(function(){return wt})),r.d(n,"qkdv",(function(){return St})),r.d(n,"quantitykind",(function(){return kt})),r.d(n,"qudt",(function(){return Mt})),r.d(n,"rdau",(function(){return Ct})),r.d(n,"rdf",(function(){return Ot})),r.d(n,"rdfa",(function(){return Dt})),r.d(n,"rdfs",(function(){return Lt})),r.d(n,"rev",(function(){return jt})),r.d(n,"rico",(function(){return Bt})),r.d(n,"rr",(function(){return $t})),r.d(n,"rss",(function(){return Ut})),r.d(n,"schema",(function(){return qt})),r.d(n,"sd",(function(){return Kt})),r.d(n,"sdmx",(function(){return Gt})),r.d(n,"sem",(function(){return Xt})),r.d(n,"set",(function(){return Jt})),r.d(n,"sf",(function(){return er})),r.d(n,"sh",(function(){return rr})),r.d(n,"shex",(function(){return ir})),r.d(n,"shsh",(function(){return sr})),r.d(n,"sioc",(function(){return lr})),r.d(n,"skos",(function(){return cr})),r.d(n,"skosxl",(function(){return dr})),r.d(n,"solid",(function(){return pr})),r.d(n,"sosa",(function(){return gr})),r.d(n,"sou",(function(){return yr})),r.d(n,"ssn",(function(){return wr})),r.d(n,"stat",(function(){return Sr})),r.d(n,"string",(function(){return kr})),r.d(n,"test",(function(){return Mr})),r.d(n,"time",(function(){return Cr})),r.d(n,"unit",(function(){return Or})),r.d(n,"vaem",(function(){return Dr})),r.d(n,"vann",(function(){return Lr})),r.d(n,"vcard",(function(){return jr})),r.d(n,"_void",(function(){return Br})),r.d(n,"vs",(function(){return $r})),r.d(n,"wdrs",(function(){return Ur})),r.d(n,"wgs",(function(){return qr})),r.d(n,"xhv",(function(){return Kr})),r.d(n,"xkos",(function(){return Gr})),r.d(n,"xsd",(function(){return Xr})),r.d(n,"rif",(function(){return Jr})),r.d(n,"v",(function(){return en})),r.d(n,"wdr",(function(){return rn})),r.d(n,"xml",(function(){return on}));var i=r(61);const o={apply:(e,t,r)=>e(r[0]),get:(e,t)=>e(t)};var s=function(e,{factory:t=i.a}={}){const r=(r="")=>t.namedNode(`${e}${r.raw||r}`);return"undefined"==typeof Proxy?r:new Proxy(r,o)};const a=s("http://www.w3.org/ns/auth/acl#"),l=a,u=s("https://www.w3.org/ns/activitystreams#"),c=u,f=s("http://purl.org/ontology/bibo/"),d=f,h=s("http://creativecommons.org/ns#"),p=h,b=s("http://www.w3.org/ns/auth/cert#"),g=b,m=s("http://www.w3.org/2011/content#"),y=m,v=s("http://qudt.org/vocab/constant/"),w=v,_=s("http://www.cidoc-crm.org/cidoc-crm/"),S=_,x=s("http://www.w3.org/ns/csvw#"),k=x,E=s("http://commontag.org/ns#"),M=E,A=s("http://datashapes.org/sparql#"),C=A,T=s("http://datashapes.org/dash#"),O=T,R=s("http://dbpedia.org/ontology/"),D=R,P=s("http://purl.org/dc/elements/1.1/"),L=P,N=s("http://purl.org/dc/dcam/"),j=N,I=s("http://www.w3.org/ns/dcat#"),B=I,F=s("http://purl.org/dc/dcmitype/"),$=F,z=s("http://purl.org/dc/terms/"),U=z,W=s("http://www.ics.forth.gr/isl/CRMdig/"),q=W,H=s("http://qudt.org/vocab/discipline/"),K=H,V=s("http://usefulinc.com/ns/doap#"),G=V,Y=s("http://www.w3.org/ns/dpv#"),X=Y,Z=s("http://www.w3.org/ns/dqv#"),J=Z,Q=s("http://www.linkedmodel.org/schema/dtype#"),ee=Q,te=s("http://www.w3.org/ns/duv#"),re=te,ne=s("http://www.w3.org/ns/earl#"),ie=ne,oe=s("http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#"),se=oe,ae=s("http://www.w3.org/2003/12/exif/ns#"),le=ae,ue=s("http://xmlns.com/foaf/0.1/"),ce=ue,fe=s("http://purl.org/vocab/frbr/core#"),de=fe,he=s("http://www.opengis.net/ont/geosparql#"),pe=he,be=s("http://www.opengis.net/def/function/geosparql/"),ge=be,me=s("http://www.opengis.net/def/rule/geosparql/"),ye=me,ve=s("http://www.opengis.net/ont/gml#"),we=ve,_e=s("http://www.geonames.org/ontology#"),Se=_e,xe=s("http://purl.org/goodrelations/v1#"),ke=xe,Ee=s("http://www.w3.org/2003/g/data-view#"),Me=Ee,Ae=s("https://gs1.org/voc/"),Ce=Ae,Te=s("http://vocab.gtfs.org/terms#"),Oe=Te,Re=s("http://www.w3.org/2011/http#"),De=Re,Pe=s("http://www.w3.org/ns/hydra/core#"),Le=Pe,Ne=s("http://www.w3.org/2002/12/cal/icaltzd#"),je=Ne,Ie=s("https://linked.art/ns/terms/"),Be=Ie,Fe=s("http://www.w3.org/ns/ldp#"),$e=Fe,ze=s("http://www.w3.org/2000/10/swap/list#"),Ue=ze,We=s("http://www.w3.org/ns/locn#"),qe=We,He=s("http://www.w3.org/2000/10/swap/log#"),Ke=He,Ve=s("http://lexvo.org/ontology#"),Ge=Ve,Ye=s("http://w3id.org/nfdi4ing/metadata4ing#"),Xe=Ye,Ze=s("http://www.w3.org/ns/ma-ont#"),Je=Ze,Qe=s("http://www.loc.gov/mads/rdf/v1#"),et=Qe,tt=s("http://www.w3.org/2000/10/swap/math#"),rt=tt,nt=s("http://www.w3.org/ns/oa#"),it=nt,ot=s("http://ogp.me/ns#"),st=ot,at=s("http://www.w3.org/ns/solid/oidc#"),lt=at,ut=s("http://www.w3.org/ns/org#"),ct=ut,ft=s("http://www.w3.org/2002/07/owl#"),dt=ft,ht=s("http://www.w3.org/ns/pim/space#"),pt=ht,bt=s("http://qudt.org/vocab/prefix/"),gt=bt,mt=s("http://www.w3.org/ns/prov#"),yt=mt,vt=s("http://purl.org/linked-data/cube#"),wt=vt,_t=s("http://qudt.org/vocab/dimensionvector/"),St=_t,xt=s("http://qudt.org/vocab/quantitykind/"),kt=xt,Et=s("http://qudt.org/schema/qudt/"),Mt=Et,At=s("http://rdaregistry.info/Elements/u/"),Ct=At,Tt=s("http://www.w3.org/1999/02/22-rdf-syntax-ns#"),Ot=Tt,Rt=s("http://www.w3.org/ns/rdfa#"),Dt=Rt,Pt=s("http://www.w3.org/2000/01/rdf-schema#"),Lt=Pt,Nt=s("http://purl.org/stuff/rev#"),jt=Nt,It=s("https://www.ica.org/standards/RiC/ontology#"),Bt=It,Ft=s("http://www.w3.org/ns/r2rml#"),$t=Ft,zt=s("http://purl.org/rss/1.0/"),Ut=zt,Wt=s("http://schema.org/"),qt=Wt,Ht=s("http://www.w3.org/ns/sparql-service-description#"),Kt=Ht,Vt=s("http://purl.org/linked-data/sdmx#"),Gt=Vt,Yt=s("http://semanticweb.cs.vu.nl/2009/11/sem/"),Xt=Yt,Zt=s("http://www.w3.org/2000/10/swap/set#"),Jt=Zt,Qt=s("http://www.opengis.net/ont/sf#"),er=Qt,tr=s("http://www.w3.org/ns/shacl#"),rr=tr,nr=s("http://www.w3.org/ns/shex#"),ir=nr,or=s("https://www.w3.org/ns/shacl-shacl#"),sr=or,ar=s("http://rdfs.org/sioc/ns#"),lr=ar,ur=s("http://www.w3.org/2004/02/skos/core#"),cr=ur,fr=s("http://www.w3.org/2008/05/skos-xl#"),dr=fr,hr=s("http://www.w3.org/ns/solid/terms#"),pr=hr,br=s("http://www.w3.org/ns/sosa/"),gr=br,mr=s("http://qudt.org/vocab/sou/"),yr=mr,vr=s("http://www.w3.org/ns/ssn/"),wr=vr,_r=s("http://www.w3.org/ns/posix/stat#"),Sr=_r,xr=s("http://www.w3.org/2000/10/swap/string#"),kr=xr,Er=s("http://www.w3.org/2006/03/test-description#"),Mr=Er,Ar=s("http://www.w3.org/2006/time#"),Cr=Ar,Tr=s("http://qudt.org/vocab/unit/"),Or=Tr,Rr=s("http://www.linkedmodel.org/schema/vaem#"),Dr=Rr,Pr=s("http://purl.org/vocab/vann/"),Lr=Pr,Nr=s("http://www.w3.org/2006/vcard/ns#"),jr=Nr,Ir=s("http://rdfs.org/ns/void#"),Br=Ir,Fr=s("http://www.w3.org/2003/06/sw-vocab-status/ns#"),$r=Fr,zr=s("http://www.w3.org/2007/05/powder-s#"),Ur=zr,Wr=s("http://www.w3.org/2003/01/geo/wgs84_pos#"),qr=Wr,Hr=s("http://www.w3.org/1999/xhtml/vocab#"),Kr=Hr,Vr=s("http://rdf-vocabulary.ddialliance.org/xkos#"),Gr=Vr,Yr=s("http://www.w3.org/2001/XMLSchema#"),Xr=Yr,Zr=s("http://www.w3.org/2007/rif#"),Jr=Zr,Qr=s("http://rdf.data-vocabulary.org/#"),en=Qr,tn=s("http://www.w3.org/2007/05/powder#"),rn=tn,nn=s("http://www.w3.org/XML/1998/namespace/"),on=nn;var sn=t.default=class{init(){this.ns=n}}},function(e,t,r){"use strict";const n=r(2),{kResistStopPropagation:i,SymbolDispose:o}=r(3),s=globalThis.AbortSignal||r(27).AbortSignal,a=globalThis.AbortController||r(27).AbortController,l=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,c=void 0!==u?function(e){return e instanceof u}:function(e){return!1},f=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class d extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n}),resolve:e,reject:t}},promisify:e=>new Promise((t,r)=>{e((e,...n)=>e?r(e):t(...n))}),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();if("f"===r)return n.toFixed(6);if("j"===r)return JSON.stringify(n);if("s"===r&&"object"==typeof n){return((n.constructor!==Object?n.constructor.name:"")+" {}").trim()}return n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return String(e)+"n";case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof l,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:c,deprecate:(e,t)=>e,addAbortListener:r(15).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return f(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE(t,"Function",e)})(t,"listener"),e.aborted?queueMicrotask(()=>t()):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[o](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:s.any||function(e){if(1===e.length)return e[0];const t=new a,r=()=>t.abort();return e.forEach(e=>{f(e,"signals"),e.addEventListener("abort",r,{once:!0})}),t.signal.addEventListener("abort",()=>{e.forEach(e=>e.removeEventListener("abort",r))},{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},function(e,t,r){"use strict";const{format:n,inspect:i,AggregateError:o}=r(7),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),l=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,c={};function f(e,t){if(!e)throw new c.ERR_INTERNAL_ASSERTION(t)}function d(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,c[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class b extends Error{constructor(e="The operation was aborted",t){if(void 0!==t&&"object"!=typeof t)throw new c.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=e+" ":n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),l.includes(e)?o.push(e.toLowerCase()):u.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+="of type "+o[0];break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+="an instance of "+s[0];break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=""+a[0];break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=". Received "+r;else if("function"==typeof r&&r.name)n+=". Received function "+r.name;else if("object"==typeof r){var c;if(null!==(c=r.constructor)&&void 0!==c&&c.name)n+=". Received an instance of "+r.constructor.name;else{n+=". Received "+i(r,{depth:-1})}}else{let e=i(r,{colors:!1});e.length>25&&(e=e.slice(0,25)+"..."),n+=`. Received type ${typeof r} (${e})`}return n},TypeError),h("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let n=i(t);n.length>128&&(n=n.slice(0,128)+"...");return`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?"instance of "+r.constructor.name:"type "+typeof r}.`},TypeError),h("ERR_MISSING_ARGS",(...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(e=>`"${e}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return t+" must be specified"},TypeError),h("ERR_OUT_OF_RANGE",(e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:b,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:c}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=t,i=r(5),o=r(9),s=r(102);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-l:l,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+i&3,u=t.andln(3)+o&3;3===l&&(l=-1),3===u&&(u=-1),s=0==(1&l)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?l:-l,r[0].push(s),a=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==l?u:-u,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(9),i=r(0);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var l=0,u=t;return l+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,l,u){var c=0,f=t;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,l,u){return t+n+o+a+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:o}=r(3),s=o("nodejs.stream.destroyed"),a=o("nodejs.stream.errored"),l=o("nodejs.stream.readable"),u=o("nodejs.stream.writable"),c=o("nodejs.stream.disturbed"),f=o("nodejs.webstream.isClosedPromise"),d=o("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function b(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||b(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||b(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function y(e){return!(!e||b(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[s]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function S(e){return e&&null!=e[l]?e[l]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&(h(e)&&e.readable&&!_(e))}function x(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&(p(e)&&e.writable&&!w(e))}function k(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function E(e){return"boolean"==typeof e._sent100&&k(e)}e.exports={isDestroyed:v,kIsDestroyed:s,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[c])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:c,isErrored:function(e){var t,r,n,i,o,s,l,u,c,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[a])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(l=e._readableState)||void 0===l?void 0:l.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(c=e._readableState)||void 0===c?void 0:c.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:a,isReadable:S,kIsReadable:l,kIsClosedPromise:f,kControllerErrorFunction:d,kIsWritable:u,isClosed:function(e){if(!b(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&k(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return b(e)?!!v(e)||(!1===(null==t?void 0:t.readable)||!S(e))&&(!1===(null==t?void 0:t.writable)||!x(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return b(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:b,isWebStream:function(e){return g(e)||m(e)||y(e)},isWritable:x,isWritableNodeStream:p,isWritableStream:m,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return b(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:E,willEmitClose:function(e){if(!b(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&E(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:y}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){const n=r(4),{AbortError:i,codes:o}=r(8),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:l,once:u}=r(7),{validateAbortSignal:c,validateFunction:f,validateObject:d,validateBoolean:h}=r(28),{Promise:p,PromisePrototypeThen:b,SymbolDispose:g}=r(3),{isClosed:m,isReadable:y,isReadableNodeStream:v,isReadableStream:w,isReadableFinished:_,isReadableErrored:S,isWritable:x,isWritableNodeStream:k,isWritableStream:E,isWritableFinished:M,isWritableErrored:A,isNodeStream:C,willEmitClose:T,kIsClosedPromise:O}=r(13);let R;function D(e){return e.setHeader&&"function"==typeof e.abort}const P=()=>{};function L(e,t,o){var h,p;if(2===arguments.length?(o=t,t=l):null==t?t=l:d(t,"options"),f(o,"callback"),c(t.signal,"options.signal"),o=u(o),w(e)||E(e))return N(e,t,o);if(!C(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const b=null!==(h=t.readable)&&void 0!==h?h:v(e),O=null!==(p=t.writable)&&void 0!==p?p:k(e),L=e._writableState,j=e._readableState,I=()=>{e.writable||$()};let B=T(e)&&v(e)===b&&k(e)===O,F=M(e,!1);const $=()=>{F=!0,e.destroyed&&(B=!1),(!B||e.readable&&!b)&&(b&&!z||o.call(e))};let z=_(e,!1);const U=()=>{z=!0,e.destroyed&&(B=!1),(!B||e.writable&&!O)&&(O&&!F||o.call(e))},W=t=>{o.call(e,t)};let q=m(e);const H=()=>{q=!0;const t=A(e)||S(e);return t&&"boolean"!=typeof t?o.call(e,t):b&&!z&&v(e,!0)&&!_(e,!1)?o.call(e,new a):!O||F||M(e,!1)?void o.call(e):o.call(e,new a)},K=()=>{q=!0;const t=A(e)||S(e);if(t&&"boolean"!=typeof t)return o.call(e,t);o.call(e)},V=()=>{e.req.on("finish",$)};D(e)?(e.on("complete",$),B||e.on("abort",H),e.req?V():e.on("request",V)):O&&!L&&(e.on("end",I),e.on("close",I)),B||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",U),e.on("finish",$),!1!==t.error&&e.on("error",W),e.on("close",H),q?n.nextTick(H):null!=L&&L.errorEmitted||null!=j&&j.errorEmitted?B||n.nextTick(K):(b||B&&!y(e)||!F&&!1!==x(e))&&(O||B&&!x(e)||!z&&!1!==y(e))?j&&e.req&&e.aborted&&n.nextTick(K):n.nextTick(K);const G=()=>{o=P,e.removeListener("aborted",H),e.removeListener("complete",$),e.removeListener("abort",H),e.removeListener("request",V),e.req&&e.req.removeListener("finish",$),e.removeListener("end",I),e.removeListener("close",I),e.removeListener("finish",$),e.removeListener("end",U),e.removeListener("error",W),e.removeListener("close",H)};if(t.signal&&!q){const s=()=>{const r=o;G(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(s);else{R=R||r(7).addAbortListener;const n=R(t.signal,s),i=o;o=u((...t)=>{n[g](),i.apply(e,t)})}}return G}function N(e,t,o){let s=!1,a=P;if(t.signal)if(a=()=>{s=!0,o.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(a);else{R=R||r(7).addAbortListener;const n=R(t.signal,a),i=o;o=u((...t)=>{n[g](),i.apply(e,t)})}const l=(...t)=>{s||n.nextTick(()=>o.apply(e,t))};return b(e[O].promise,l,l),P}e.exports=L,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=l),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p((r,i)=>{const o=L(e,t,e=>{n&&o(),e?i(e):r()})})}},function(e,t,r){var n=r(1).Buffer,i=r(26).Transform,o=r(18).StringDecoder;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},function(e,t,r){"use strict";var n=r(1).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";const n=r(4),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(8),{Symbol:a}=r(3),{kIsDestroyed:l,isDestroyed:u,isFinished:c,isServerRequest:f}=r(13),d=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function b(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){y(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function y(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(y,e,t):y(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(d,r):r?v(e,r,!0):n.nextTick(_,e)}try{e._construct(e=>{n.nextTick(r,e)})}catch(e){n.nextTick(r,e)}}function _(e){e.emit(h)}function S(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function x(e){e.emit("close")}function k(e,t){e.emit("error",t),n.nextTick(x,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!u(e)&&(t||c(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):S(e)?e.abort():S(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(k,e,t):n.nextTick(x,e),e.destroyed||(e[l]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?b(this,e,t):this.once(d,(function(r){b(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},function(e,t,r){"use strict";(function(t,n){var i=r(1).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(70),o=r(74);r(0)(u,i);for(var s=n(o.prototype),a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,s,a;if("string"==typeof t&&(i="not ",t.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(l," ").concat(n," ").concat(o(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(96),o=r(100);r(0)(u,i);for(var s=n(o.prototype),a=0;ai}),e.exports.Stream=n.Stream,e.exports.default=e.exports},function(e,t,r){"use strict";const{AbortController:n,AbortSignal:i}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=n,e.exports.AbortSignal=i,e.exports.default=n},function(e,t,r){"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:l,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:c,NumberParseInt:f,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:b,StringPrototypeTrim:g}=r(3),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:y,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:S}}=r(8),{normalizeEncoding:x}=r(7),{isAsyncFunction:k,isArrayBufferView:E}=r(7).types,M={};const A=/^[0-7]+$/;const C=m((e,t,r=c,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)}),T=m((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(en)throw new _(t,`>= ${r} && <= ${n}`,e)}),O=m((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0;if(e4294967295)throw new _(t,`>= ${n} && <= 4294967295`,e)});function R(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const D=m((e,t,r)=>{if(!i(r,e)){const n=o(s(r,e=>"string"==typeof e?`'${e}'`:p(e)),", ");throw new w(t,e,"must be one of: "+n)}});function P(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function L(e,t,r){return null!=e&&d(e,t)?e[t]:r}const N=m((e,t,r=null)=>{const i=L(r,"allowArray",!1),o=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new v(t,"Object",e)}),j=m((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)}),I=m((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!E(e))throw new v(t,["Buffer","TypedArray","DataView"],e)});const F=m((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)}),$=m((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)}),z=m((e,t)=>{if("function"!=typeof e||k(e))throw new v(t,"Function",e)}),U=m((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)});const W=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function q(e,t){if(void 0===e||!h(W,e))throw new w(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(A,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return O(e,t),e},validateArray:I,validateStringArray:function(e,t){I(e,t);for(let r=0;rn||(null!=r||null!=n)&&l(e))throw new _(t,`${null!=r?">= "+r:""}${null!=r&&null!=n?" && ":""}${null!=n?"<= "+n:""}`,e)},validateObject:N,validateOneOf:D,validatePlainFunction:z,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new y(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(R(e,t),void 0===M[e]){if(void 0!==M[b(e)])throw new S(e+" (signals must use all capital letters)");throw new S(e)}},validateString:R,validateUint32:O,validateUndefined:U,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${o(r,"|")}')`,e)},validateAbortSignal:F,validateLinkHeaderValue:function(e){if("string"==typeof e)return q(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},function(e,t,r){"use strict";var n=r(0),i=r(47),o=r(49),s=r(50),a=r(17);function l(e){a.call(this,"digest"),this._hash=e}n(l,a),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new l(s(e))}},function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o{T=e});const O=r(120),R=r(19),{getHighWaterMark:D,getDefaultHighWaterMark:P}=r(37),{aggregateTwoErrors:L,codes:{ERR_INVALID_ARG_TYPE:N,ERR_METHOD_NOT_IMPLEMENTED:j,ERR_OUT_OF_RANGE:I,ERR_STREAM_PUSH_AFTER_EOF:B,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:F},AbortError:$}=r(8),{validateObject:z}=r(28),U=S("kPaused"),{StringDecoder:W}=r(18),q=r(64);m(Y.prototype,k.prototype),m(Y,k);const H=()=>{},{errorOrDestroy:K}=R;function V(e){return{enumerable:!1,get(){return 0!=(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function G(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(14)),this.state=6192,e&&e.objectMode&&(this.state|=1),n&&e&&e.readableObjectMode&&(this.state|=1),this.highWaterMark=e?D(this,e,"readableHighWaterMark",n):P(!1),this.buffer=new O,this.length=0,this.pipes=[],this.flowing=null,this[U]=null,e&&!1===e.emitClose&&(this.state&=-2049),e&&!1===e.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new W(e.encoding),this.encoding=e.encoding)}function Y(e){if(!(this instanceof Y))return new Y(e);const t=this instanceof r(14);this._readableState=new G(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&A(e.signal,this)),k.call(this,e),R.construct(this,()=>{this._readableState.needReadable&&te(this,this._readableState)})}function X(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let o;if(0==(1&i.state)&&("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=M.from(t,r).toString(i.encoding):(t=M.from(t,r),r=""))):t instanceof M?r="":k._isUint8Array(t)?(t=k._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new N("chunk",["string","Buffer","Uint8Array"],t))),o)K(e,o);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),t.ended)return;if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Q(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}(e,i);else if(0!=(1&i.state)||t&&t.length>0)if(n)if(0!=(4&i.state))K(e,new F);else{if(i.destroyed||i.errored)return!1;Z(e,i,t,!0)}else if(i.ended)K(e,new B);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?Z(e,i,t,!1):te(e,i)):Z(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(0!=(65536&t.state)?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),0!=(64&t.state)&&Q(e)),te(e,t)}b(G.prototype,{objectMode:V(1),ended:V(2),endEmitted:V(4),reading:V(8),constructed:V(16),sync:V(32),needReadable:V(64),emittedReadable:V(128),readableListening:V(256),resumeScheduled:V(512),errorEmitted:V(1024),emitClose:V(2048),autoDestroy:V(4096),destroyed:V(8192),closed:V(16384),closeEmitted:V(32768),multiAwaitDrain:V(65536),readingMore:V(1<<17),dataEmitted:V(1<<18)}),Y.prototype.destroy=R.destroy,Y.prototype._undestroy=R.undestroy,Y.prototype._destroy=function(e,t){t(e)},Y.prototype[x.captureRejectionSymbol]=function(e){this.destroy(e)},Y.prototype[w]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new $,this.destroy(e)),new y((t,r)=>C(this,n=>n&&n!==e?r(n):t(null)))},Y.prototype.push=function(e,t){return X(this,e,t,!1)},Y.prototype.unshift=function(e,t){return X(this,e,t,!0)},Y.prototype.isPaused=function(){const e=this._readableState;return!0===e[U]||!1===e.flowing},Y.prototype.setEncoding=function(e){const t=new W(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this};function J(e,t){return e<=0||0===t.length&&t.ended?0:0!=(1&t.state)?1:h(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Q(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,c.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,se(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,c.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[U]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function oe(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),se(e),t.flowing&&!t.reading&&e.read(0)}function se(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function ae(e,t){"function"!=typeof e.read&&(e=Y.wrap(e,{objectMode:!0}));const r=function(e,t){return le.apply(this,arguments)}(e,t);return r.stream=e,r}function le(){return(le=a((function*(e,t){let r,n=H;function i(t){this===e?(n(),n=H):n=t}e.on("readable",i);const o=C(e,{writable:!1},e=>{r=e?L(r,e):null,n(),n=H});try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;yield s(new y(i))}}}catch(e){throw r=L(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):R.destroyer(e,null)}}))).apply(this,arguments)}function ue(e,t){if(0===t.length)return null;let r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ce(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,c.nextTick(fe,t,e))}function fe(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)c.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let he;function pe(){return void 0===he&&(he={}),he}Y.prototype.read=function(e){T("read",e),void 0===e?e=NaN:d(e)||(e=p(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new I("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ce(this):Q(this),null;if(0===(e=J(e,t))&&t.ended)return 0===t.length&&ce(this),null;let n,i=0!=(64&t.state);if(T("need readable",i),(0===t.length||t.length-e0?ue(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ce(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},Y.prototype._read=function(e){throw new j("_read()")},Y.prototype.pipe=function(e,t){const r=this,n=this._readableState;1===n.pipes.length&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new v(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(e),T("pipe count=%d opts=%j",n.pipes.length,t);const i=(!t||!1!==t.end)&&e!==c.stdout&&e!==c.stderr?s:b;function o(t,i){T("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,function(){T("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a);e.removeListener("error",d),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",b),r.removeListener("data",f),l=!0,a&&n.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a()}())}function s(){T("onend"),e.end()}let a;n.endEmitted?c.nextTick(i):r.once("end",i),e.on("unpipe",o);let l=!1;function u(){l||(1===n.pipes.length&&n.pipes[0]===e?(T("false write response, pause",0),n.awaitDrainWriters=e,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(e)&&(T("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function f(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),b(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?K(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),b()}function p(){T("onfinish"),e.removeListener("close",h),b()}function b(){T("unpipe"),r.unpipe(e)}return r.on("data",f),E(e,"error",d),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?u():n.flowing||(T("pipe resume"),r.resume()),e},Y.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,T("on readable",n.length,n.reading),n.length?Q(this):n.reading||c.nextTick(ie,this))),r},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(e,t){const r=k.prototype.removeListener.call(this,e,t);return"readable"===e&&c.nextTick(ne,this),r},Y.prototype.off=Y.prototype.removeListener,Y.prototype.removeAllListeners=function(e){const t=k.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||c.nextTick(ne,this),t},Y.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,c.nextTick(oe,e,t))}(this,e)),e[U]=!1,this},Y.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[U]=!0,this},Y.prototype.wrap=function(e){let t=!1;e.on("data",r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())}),e.on("end",()=>{this.push(null)}),e.on("error",e=>{K(this,e)}),e.on("close",()=>{this.destroy()}),e.on("destroy",()=>{this.destroy()}),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=g(e);for(let t=1;t{if("object"!=typeof e||!("aborted"in e))throw new c(t,"AbortSignal",e)})(t,"signal"),!s(r)&&!a(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const o=s(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[l](new i(void 0,{cause:e.reason}))};if(e.aborted)o();else{f=f||r(7).addAbortListener;const i=f(e,o);u(t,i[n])}return t}},function(e,t,r){"use strict";const{MathFloor:n,NumberIsInteger:i}=r(3),{validateInteger:o}=r(28),{ERR_INVALID_ARG_VALUE:s}=r(8).codes;let a=16384,l=16;function u(e){return e?l:a}e.exports={getHighWaterMark:function(e,t,r,o){const a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,o,r);if(null!=a){if(!i(a)||a<0){throw new s(o?"options."+r:"options.highWaterMark",a)}return n(a)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){o(t,"value",0),e?l=t:a=t}}},function(e,t,r){var n=r(1).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^c[p>>>16&255]^f[b>>>8&255]^d[255&g]^t[m++],s=u[p>>>24]^c[b>>>16&255]^f[g>>>8&255]^d[255&h]^t[m++],a=u[b>>>24]^c[g>>>16&255]^f[h>>>8&255]^d[255&p]^t[m++],l=u[g>>>24]^c[h>>>16&255]^f[p>>>8&255]^d[255&b]^t[m++],h=o,p=s,b=a,g=l;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&g])^t[m++],s=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[g>>>8&255]<<8|n[255&h])^t[m++],a=(n[b>>>24]<<24|n[g>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[m++],l=(n[g>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var c=e[s],f=e[c],d=e[f],h=257*e[u]^16843008*u;i[0][s]=h<<24|h>>>8,i[1][s]=h<<16|h>>>16,i[2][s]=h<<8|h>>>24,i[3][s]=h,h=16843009*d^65537*f^257*c^16843008*s,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=l.SBOX[s>>>24]<<24|l.SBOX[s>>>16&255]<<16|l.SBOX[s>>>8&255]<<8|l.SBOX[255&s]),i[o]=i[o-t]^s}for(var u=[],c=0;c>>24]]^l.INV_SUB_MIX[1][l.SBOX[d>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[d>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){var n=r(1).Buffer,i=r(47);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),l=n.alloc(o||0),u=n.alloc(0);s>0||o>0;){var c=new i;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var f=0;if(s>0){var d=a.length-s;f=Math.min(s,u.length),u.copy(a,d,0,f),s-=f}if(f0){var h=l.length-o,p=Math.min(o,u.length-f);u.copy(l,h,f,f+p),o-=p}}return u.fill(0),{key:a,iv:l}}},function(e,t,r){"use strict";var n=r(5),i=r(10),o=i.getNAF,s=i.getJSF,a=i.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=s;c--)l=(l<<1)+n[c];u.push(l)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s=0;u--){for(var c=0;u>=0&&0===s[u];u--)c++;if(u>=0&&c++,l=l.dblp(c),u<0)break;var f=s[u];a(0!==f),l="affine"===e.type?f>0?l.mixedAdd(i[f-1>>1]):l.mixedAdd(i[-f-1>>1].neg()):f>0?l.add(i[f-1>>1]):l.add(i[-f-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,n,i){var a,l,u,c=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a=1;a-=2){var b=a-1,g=a;if(1===c[b]&&1===c[g]){var m=[t[b],null,null,t[g]];0===t[b].y.cmp(t[g].y)?(m[1]=t[b].add(t[g]),m[2]=t[b].toJ().mixedAdd(t[g].neg())):0===t[b].y.cmp(t[g].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[g]),m[2]=t[b].add(t[g].neg())):(m[1]=t[b].toJ().mixedAdd(t[g]),m[2]=t[b].toJ().mixedAdd(t[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[b],r[g]);for(h=Math.max(v[0].length,h),d[b]=new Array(h),d[g]=new Array(h),l=0;l=0;a--){for(var k=0;a>=0;){var E=!0;for(l=0;l=0&&k++,S=S.dblp(k),a<0)break;for(l=0;l0?u=f[l][M-1>>1]:M<0&&(u=f[l][-M-1>>1].neg()),S="affine"===u.type?S.mixedAdd(u):S.add(u))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i"{}|^`\\]|%(?![0-9A-F][0-9A-F]))/g,l=(e,t)=>{let r=t.codePointAt(0).toString(16)+"";return r.length>4?"\\U"+r.padStart(8,"0"):"\\u"+r.padStart(4,"0")},u=e=>e.replace(a,l),c=/^(?:[\u0000-@[-`{-\u00bf\u00d7\u00f7\u0300-\u306f\u037e\u2000-\u200b\u200e-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].+|(?:.+?[\u0000-,\/:-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].*)|.+\.)$/,f=/^(?:\\|[\u0000-\/;-@[-^`{-\u00bf\u00d7\u00f7\u0300-\u306f\u037e\u2000-\u200b\u200e-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff].+|(?:.+?(?:\\|[\u0000-,\/;-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff]).+)|(?:.+?(?:\\|[\u0000-,.\/;-@[-^`{-\u00b6\u00b8-\u00bf\u00d7\u00f7\u037e\u2000-\u200b\u200e-\u203e\u2041-\u206f\u2190-\u2bff\u2ff0-\u3000\ud800-\uf8ff\ufdd0-\ufddf\ufffe\uffff])))$/,d=/^([Tt](rue)?|TRUE)$/,h=/^([Ff](alse)?|FALSE)$/,p=/[xy]/g,b=()=>{let e=Date.now();return"undefined"!=typeof performance&&(e+=performance.now()),"xxxxxxxx_xxxx_4xxx_yxxx_xxxxxxxxxxxx".replace(p,t=>{let r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)})},g=Symbol("prefix-cache"),m=/[$^*()+[\\{}|.?]/g;function y(e,t=!1){let r=[],n={};for(let i in e){let o=e[i];t&&c.test(i)||(n[o]=i,r.push(o.replace(m,"\\$&")))}return r.length?(e[g]={_r_iris:new RegExp(`^(${r.join("|")})((?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_:0-9]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%])(?:(?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_\\-0-9\\xb7\\u{0300}-\\u{036f}\\u{203f}-\\u{2040}.:]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%])*(?:[A-Za-z\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u{02ff}\\u{0370}-\\u{037d}\\u{037f}-\\u{1fff}\\u{200c}-\\u{200d}\\u{2070}-\\u{218f}\\u{2c00}-\\u{2fef}\\u{3001}-\\u{d7ff}\\u{f900}-\\u{fdcf}\\u{fdf0}-\\u{fffd}\\u{10000}-\\u{effff}_\\-0-9\\xb7\\u{0300}-\\u{036f}\\u{203f}-\\u{2040}:]|%[A-Fa-f0-9]{2}|\\\\[_~.\\-!$&'()*+,;=/?#@%]))?)$`,"u"),_h_inverse:n},Object.freeze(e)):e}const v=(e,t)=>{let r=t[g];if(r){let t=r._r_iris.exec(e);if(t)return r._h_inverse[t[1]]+":"+t[2]}else{let r="",n="",i=-1;for(let o in t){let s=t[o];if(0===e.indexOf(s)&&s.length>i&&!c.test(o)){let t=e.slice(s.length);f.test(t)||(n=t,r=o,i=s.length)}}if(-1!==i)return r+":"+n}return"<"+e+">"},w=(e,t={})=>{let r=t[g];if(r){let t=r._r_iris.exec(e);if(t)return r._h_inverse[t[1]]+":"+t[2]}else{let r="",n=-1;for(let i in t){let o=t[i];e.startsWith(o)&&o.length>n&&(r=i,n=o.length)}if(-1!==n)return r+":"+e.slice(n)}return">"+e},_=/^([^:]*):(.*)$/;class S{valueOf(){return this.concise()}toString(){return this.concise()}equals(e){return!!e&&(this===e||e.termType===this.termType&&e.value===this.value)}}Object.assign(S.prototype,{isGraphyTerm:!0});class x extends S{constructor(e){super(),this.value=e}concise(e={}){return w(this.value,e)}terse(e={},t=!1){return v(u(this.value),e)}verbose(){return"<"+u(this.value)+">"}isolate(){return{termType:"NamedNode",value:this.value}}}Object.assign(x.prototype,{termType:"NamedNode",isNamedNode:!0});const k=new x("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");k.isRdfTypeAlias=!0;const E=new x("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),M=E.isolate(),A=new x("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),C=new x("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),T=new x("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"),O=new x("http://www.w3.org/2001/XMLSchema#date"),R=new x("http://www.w3.org/2001/XMLSchema#dateTime"),D=new x("http://www.w3.org/2001/XMLSchema#string");class P extends S{equals(e){return!!e&&(this===e||"Literal"===e.termType&&e.value===this.value&&this.datatype.equals(e.datatype)&&e.language===this.language)}verbose(){return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+this.datatype.verbose())}concise(e){return this.language?"@"+this.language+'"'+this.value:"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+t)}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(P.prototype,{datatype:D,language:"",termType:"Literal",isLiteral:!0,isSimple:!1});class L extends P{constructor(e,t){super(),this.value=e,this.language=("@"===t[0]?t.slice(1):t).toLowerCase()}verbose(){return JSON.stringify(this.value)+"@"+this.language}concise(){return"@"+this.language+'"'+this.value}terse(){return JSON.stringify(this.value)+"@"+this.language}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:M}}}Object.assign(L.prototype,{datatype:E,isLanguaged:!0});class N extends P{verbose(){return JSON.stringify(this.value)+"^^"+this.datatype.verbose()}concise(e){return"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+"^^"+t}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(N.prototype,{isDatatyped:!0});class j extends N{constructor(e,t){super(),this.value=e,this.datatype=t}}class I extends S{constructor(e){super(),this.value=e}get isSimple(){return!this.language&&!this.datatype.equals(D)}get isLanguaged(){return!!this.language}get isDatatyped(){return D.equals(this.datatype)}equals(e){return!!e&&(this===e||"Literal"===e.termType&&e.value===this.value&&this.datatype.equals(e.datatype)&&e.language===this.language)}verbose(){return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+this.datatype.verbose())}concise(e){return this.language?"@"+this.language+'"'+this.value:"^"+w(this.datatype.value,e)+'"'+this.value}terse(e={}){let t=this.datatype.terse(e);return JSON.stringify(this.value)+(this.language?"@"+this.language:"^^"+t)}isolate(){return{termType:"Literal",value:this.value,language:this.language,datatype:this.datatype.isolate()}}}Object.assign(I.prototype,{datatype:D,language:"",termType:"Literal",isLiteral:!0});class B extends P{constructor(e){super(),this.value=e}verbose(){return JSON.stringify(this.value)}concise(){return'"'+this.value}terse(){return JSON.stringify(this.value)}}Object.assign(B.prototype,{isSimple:!0});const F=new x("http://www.w3.org/2001/XMLSchema#integer");class $ extends N{static from(e){let t=new $(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+F.concise(e)+'"'+this.value}terse(){return this.value.includes("e")?`"${this.value}"^^`:this.value}}Object.assign($.prototype,{datatype:F,isNumeric:!0,isInteger:!0});const z=new x("http://www.w3.org/2001/XMLSchema#double");class U extends N{static from(e){let t=new U(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+z.concise(e)+'"'+this.value}terse(){return this.number.toExponential()}}Object.assign(U.prototype,{datatype:z,isNumeric:!0,isDouble:!0});const W=new x("http://www.w3.org/2001/XMLSchema#decimal");class q extends N{static from(e){let t=new q(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.number=e}concise(e={}){return"^"+W.concise(e)+'"'+this.value}terse(){return this.value.includes("e")?`"${this.value}"^^`:this.value+(this.value.includes(".")?"":".0")}}Object.assign(q.prototype,{datatype:W,isNumeric:!0,isDecimal:!0});const H=new x("http://www.w3.org/2001/XMLSchema#boolean");class K extends N{static from(e){let t=new K(+e);return t.value=e,t}constructor(e){super(),this.value=e+"",this.boolean=e}concise(e={}){return"^"+H.concise(e)+'"'+this.value}terse(){return this.value+""}}Object.assign(K.prototype,{datatype:H,isBoolean:!0});class V extends U{constructor(){super(1/0),this.value="INF"}terse(e){return'"INF"^^'+z.terse(e)}}Object.assign(V.prototype,{isInfinite:!0});class G extends U{constructor(){super(-1/0),this.value="-INF"}terse(e){return'"-INF"^^'+z.terse(e)}}Object.assign(G.prototype,{isInfinite:!0});class Y extends U{constructor(){super(NaN),this.value="NaN"}terse(e){return'"NaN"^^'+z.terse(e)}}function X(e,t=!1){this.value=e,this.isAnonymous=t}function Z(){}Object.assign(Y.prototype,{isNaN:!0}),X.prototype=Object.assign(Object.create(S.prototype),{termType:"BlankNode",isBlankNode:!0,concise(){return"_:"+this.value},terse(){return"_:"+this.value},verbose(){return"_:"+this.value},isolate(){return{termType:"BlankNode",value:this.value}}}),Z.prototype=Object.assign(Object.create(X.prototype),{isAnonymous:!0,isEphemeral:!0,concise(){return"_:#"+this.value},terse:()=>"[]",verbose(){return"_:"+this.value},isolate(){return{termType:"BlankNode",value:this.value}},equals:()=>!1}),Object.defineProperty(Z.prototype,"value",{get:()=>"_"+b()});class J extends S{constructor(e){super(),this.value=e}concise(){return"?"+this.value}terse(){throw new Error("Cannot call .terse() on 'Variable' term type")}verbose(){throw new Error("Cannot call .verbose() on 'Variable' term type")}isolate(){return{termType:"Variable",value:this.value}}}function Q(){}Object.assign(J.prototype,{termType:"Variable",isVariable:!0}),Q.prototype=Object.assign(Object.create(S.prototype),{value:"",termType:"DefaultGraph",isDefaultGraph:!0,concise:()=>"*",terse:()=>"",verbose:()=>"",isolate:()=>({termType:"DefaultGraph",value:""})}),Object.assign(Object.create(S.prototype),{value:"",termType:"NoGraph",concise:()=>"",terse:()=>"",verbose:()=>"",isolate:()=>({termType:"NoGraph",value:""})});const ee=new Q;function te(e,t,r,n=ee){this.subject=e,this.predicate=t,this.object=r,this.graph=n}Object.assign(te.prototype,{isGraphyQuad:!0,equals(e){return!!e&&(this===e||this.object.equals(e.object)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.graph.equals(e.graph))},valueOf(){return this.verbose()},concise(e={}){return[this.subject.concise(e),this.predicate.concise(e),this.object.concise(e),this.graph.concise(e)]},terse(e){let t=this.graph.isDefaultGraph;return(t?"":this.graph.terse(e)+" { ")+this.subject.terse(e)+" "+this.predicate.terse(e)+" "+this.object.terse(e)+" ."+(t?"":" }")},verbose(){return this.subject.verbose()+" "+this.predicate.verbose()+" "+this.object.verbose()+" "+(this.graph.isDefaultGraph?"":this.graph.verbose()+" ")+"."},isolate(){return{subject:this.subject.isolate(),predicate:this.predicate.isolate(),object:this.object.isolate(),graph:this.graph.isolate()}}});let re={namedNode:e=>new x(e),blankNode:(e,t)=>new X(e,t),literal:e=>new I(e),defaultGraph:()=>new Q,quad:(e,t,r,n)=>new te(e,t,r,n||ee),integer:e=>$.from(e),double:e=>U.from(e),decimal:e=>q.from(e),boolean:e=>new K(e)};const ne=e.exports={concise:w,adopt(e){let t=Object.create(e),r=!1;if("function"!=typeof e.boolean){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#boolean");t.boolean=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.double){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#double");t.double=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.decimal){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#decimal");t.decimal=t=>e.literal(t+"",n),r=!0}if("function"!=typeof e.integer){let n=e.namedNode("http://www.w3.org/2001/XMLSchema#integer");t.integer=t=>e.literal(t+"",n),r=!0}return"function"!=typeof e.simpleLiteral&&(t.simpleLiteral=t=>e.literal(t),r=!0),"function"!=typeof e.languagedLiteral&&(t.languagedLiteral=(t,r)=>e.literal(t,r),r=!0),"function"!=typeof e.datatypedLiteral&&(t.datatypedLiteral=(t,r)=>e.literal(t,r),r=!0),r?t:e},raw:re,unfiltered:i(i({},re),{},{literal:(e,t)=>!t||D.equals(t)?new B(e):"string"==typeof t?new L(e,t):D.equals(t)?new B(e):new j(e,t),simpleLiteral:e=>new B(e),languagedLiteral:(e,t)=>new L(e,t),datatypedLiteral:(e,t)=>D.equals(t)?new B(e):new j(e,t)}),number:e=>"number"!=typeof e||Number.isFinite(e)&&!Number.isNaN(e)?Number.isInteger(e)||"bigint"==typeof e?ne.integer(e):ne.decimal(e):ne.double(e),date:e=>ne.literal(e.toISOString().replace(/T.+$/,"Z"),O),dateTime:e=>ne.literal(e.toISOString(),R),namedNode:e=>new x(e),ephemeral:()=>new Z,anonymous:()=>new Z,blankNode(e){if(!e)return new X("_"+b(),!0);if("string"==typeof e)return new X(e);throw new TypeError("factory.blankNode(label) expects 'label' parameter to be falsy or a string; instead found: "+e)},literal:(e,t)=>!t||D.equals(t)?new B(e):"string"==typeof t?new L(e,t):new j(e,t),integer(e){let t=typeof e;if("number"===t){if(!Number.isFinite(e)){if(Number.isNaN(e))throw new Error("XSD integer cannot encode NaN. Try using double");throw new Error("XSD integer cannot encode +/-infinity. Try using double")}if(!Number.isInteger(e))throw new Error("Number is not an integer: "+e);return new $(e)}if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:integer");let t=+e;if(Number.isNaN(t)||!Number.isInteger(t))throw new Error("Invalid integer string: "+e);return new $(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:integer");if(null===e)throw new Error("Refusing to serialize null value as xsd:integer");throw new Error("XSD integer expects a number type or integer string")},double(e){let t=typeof e;if("number"===t)return Number.isFinite(e)?new U(e):Number.isNaN(e)?new Y:e>0?new V:new G;if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:double");let t=+e;if(Number.isNaN(t))throw new Error("Invalid decimal string: "+e);return new U(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:double");if(null===e)throw new Error("Refusing to serialize null value as xsd:double");throw new Error("XSD double expects a number type or double string")},decimal(e){let t=typeof e;if("number"===t){if(!Number.isFinite(e)){if(Number.isNaN(e))throw new Error("XSD decimal cannot encode NaN. Try using double");throw new Error("XSD decimal cannot encode +/-infinity. Try using double")}return new q(e)}if("string"===t){if(""===e)throw new Error("Refusing to serialize empty string as xsd:decimal");let t=+e;if(Number.isNaN(t))throw new Error("Invalid decimal string: "+e);return new q(t)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:decimal");if(null===e)throw new Error("Refusing to serialize null value as xsd:decimal");throw new Error("XSD decimal expects a number type or decimal string")},boolean(e){let t=typeof e;if("boolean"===t)return new K(e);if("number"===t){if(1===e)return new K(!0);if(0===e)return new K(!1);throw new Error("Boolean value 'w_value' must be either a '1' or '0' if using numbers")}if("string"===t){if(d.test(e))return new K(!0);if(h.test(e))return new K(!1);if(""===e)throw new Error("Refusing to serialize empty string as xsd:boolean");throw new Error("Invalid boolean string: "+e)}if("undefined"===t)throw new Error("Refusing to serialize undefined value as xsd:boolean");if(null===e)throw new Error("Refusing to serialize null value as xsd:boolean");throw new Error("XSD boolean expects a boolean type or boolean string")},defaultGraph:()=>new Q,variable:e=>new J(e),triple(e,t,r){let n=new Error("It is strongly encouraged to use .quad() instead of .triple()");return console.warn(n.stack.replace(/^(\s*)Error:/,"$1Warning:")),new te(e,t,r)},quad:(e,t,r,n)=>new te(e,t,r,n||ee),term:(e,t)=>"string"==typeof e?ne.c1(e,t):ne.from.rdfjs_term(e),c1(e,t={}){switch(e[0]){case"^":{let r=e.indexOf('"');if(-1===r)throw new Error(`Invalid concise-term string, no content literal delimiter found: '${e}'`);let n=e.slice(1,r);return ne.literal(e.slice(r+1),ne.c1_node_explicit(n,t))}case"@":{let t=e.indexOf('"');if(-1===t)throw new Error(`Invalid concise-term string, no content literal delimiter found: '${e}'`);let r=e.slice(1,t);return ne.literal(e.slice(t+1),r)}case'"':return ne.literal(e.slice(1));default:return ne.c1_node(e,t)}},c1_node(e,t={}){if("a"===e)return k;if("*"===e)return ne.defaultGraph();if("_"===e[0]){if(":"!==e[1])throw new Error(`Invliad concise-term string, prefixes are not allowed to start with an underscore: '${e}'`);return"#"===e[2]||2===e.length?ne.ephemeral():ne.blankNode(e.slice(2))}return ne.c1_node_explicit(e,t)},c1_named_node:(e,t={})=>"a"===e?k:ne.c1_node_explicit(e,t),c1_node_explicit(e,t={}){switch(e[0]){case">":return ne.namedNode(e.slice(1));case"<":throw new Error(`Whoops! It looks like this concise-term string starts with a '<' character. Remember to use '>' if you are trying to make an absolute IRI reference.\nInvalid concise-term string '${e}'`);case"`":throw new Error(`The backtick character '\`' is reserved for concise-struct key directives and should not be used in the object position.\nInvalid concise-term string '${e}'`);default:return this.c1_prefixed_node(e,t)}},c1_prefixed_node(e,t={}){let r=e.indexOf(":");if(-1===r)throw new Error(`A relative or prefixed node must include a ':' character. \nInvalid concise-term string for node: '${e}'`);let n=e.slice(0,r),i=e.slice(r+1);if(n in t)return ne.namedNode(t[n]+i);throw new Error(`Prefix not defined: '${n}'`)},c1_to_nt:function e(t,r={},n=!1){switch(t[0]){case">":return"<"+t.slice(1)+">";case"_":return t.length<=2||"#"===t[2]?(new Z)[n?"verbose":"terse"]():t;case'"':return JSON.stringify(t.slice(1));case"@":{let e=t.indexOf('"');return JSON.stringify(t.slice(e+1))+t.slice(0,e)}case"^":{let i=t.indexOf('"');return JSON.stringify(t.slice(i+1))+"^^"+e(t.slice(1,i),r,n)}case"*":return"";case"<":case"`":return ne.c1(t).terse(r);default:{if("a"===t)return n?"":"a";let[,e,i]=_.exec(t);return n||f.test(i)||c.test(e)?"<"+r[e]+i+">":t}}},*quads(e,t={}){for(let r in e)yield*ne.triples(e[r],t,r)},*triples(e,t={},r="*"){let n=ne.c1(r,t);for(let r in e){let i=ne.c1(r,t),o=e[r];yield*ne.pairs(n,i,o,t)}},*pairs(e,t,r,n={}){for(let i in r){let o=ne.c1(i,n),s=r[i];yield*ne.objects(e,t,o,s,n)}},*collection(e,t,r,n={}){yield*ne.objects(e,t,A,r[0],n);let i=r.slice(1);if(i.length){let r=ne.blankNode();yield new te(t,C,r,e),yield*ne.collection(e,r,i,n)}else yield new te(t,C,T,e)},*objects(e,t,r,n,i,o=!1){switch(typeof n){case"string":yield new te(t,r,ne.c1(n,i),e);break;case"number":yield new te(t,r,ne.number(n),e);break;case"object":if(Array.isArray(n))if(o){let o=ne.blankNode();yield new te(t,r,o,e),yield*ne.collection(e,o,n,i)}else for(let o of n)yield*ne.objects(e,t,r,o,i,!0);else{let o=ne.blankNode();yield new te(t,r,o,e),yield*ne.pairs(e,o,n,i)}break;default:throw new Error("invalid object type: "+typeof n)}},from:{term:e=>null===e||e.isGraphyTerm?e:ne.from.rdfjs_term(e),quad(e){if(null===e)return e;if(e.isGraphyQuad)return e;let t=ne.from;return new te(t.rdfjs_term(e.subject),t.rdfjs_term(e.predicate),t.rdfjs_term(e.object),e.graph?t.rdfjs_term(e.graph):ee)},rdfjs_term(e){switch(e.termType){case"NamedNode":return new x(e.value);case"BlankNode":return new X(e.value);case"Literal":return ne.literal(e.value,e.language?e.language:e.datatype?new x(e.datatype.value):null);case"DefaultGraph":return new Q;default:throw new TypeError("invalid termType: "+e.termType)}},sparql_result(e){switch(e.type){case"uri":return new x(e.value);case"literal":case"typed-literal":return"xml:lang"in e?new L(e.value,e["xml:lang"]):"datatype"in e&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype?new j(e.value,new x(e.datatype)):new B(e.value);case"bnode":return new X(e.value);default:throw new Error("unexpected SPARQL Result JSON Format Term type: "+e.type)}}},to:{boolean:e=>K.from(e),integer:e=>$.from(e),decimal:e=>q.from(e),double:e=>U.from(e)},comment:(e={})=>`\`[${b()}]${JSON.stringify(i(i({},e),{},{type:"comment"}))}`,newlines:()=>`\`[${b()}]{"type":"newlines"}`,config(e){if("string"!=typeof e)throw new TypeError("Expected 'key' argument to be a string, instead found "+typeof e);return`\`[${b()}]{"type":"config","value":${JSON.stringify(e)}}`},hash(e){let t=ne.from.quad(e),r=s.createHash("sha256");return r.update(t.verbose()),r.digest("hex")},cache_prefixes:y,cachePrefixes:y,terse:v,clean_iri:u,cleanIri:u,$_PREFIX_CACHE:g};Object.assign(ne,{c3:ne.triples,c4:ne.quads,fromTerm:ne.from.term,fromQuad:ne.from.quad})},function(e,t,r){function n(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function n(t,r){try{var o=e[t](r),s=o.value,a=s instanceof l;Promise.resolve(a?s.v:s).then((function(r){if(a){var l="return"===t?"return":"next";if(!s.k||r.done)return n(l,r);r=e[l](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new s(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function s(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(s=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new s(e)}function a(e){var t={},r=!1;function n(t,n){return r=!0,{done:!1,value:new l(n=new Promise((function(r){r(e[t](n))})),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function l(e,t){this.v=e,this.k=t}i.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)};const u=r(4),{ArrayIsArray:c,Promise:f,SymbolAsyncIterator:d,SymbolDispose:h}=r(3),p=r(16),{once:b}=r(7),g=r(19),m=r(14),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:v,ERR_INVALID_RETURN_VALUE:w,ERR_MISSING_ARGS:_,ERR_STREAM_DESTROYED:S,ERR_STREAM_PREMATURE_CLOSE:x},AbortError:k}=r(8),{validateFunction:E,validateAbortSignal:M}=r(28),{isIterable:A,isReadable:C,isReadableNodeStream:T,isNodeStream:O,isTransformStream:R,isWebStream:D,isReadableStream:P,isReadableFinished:L}=r(13),N=globalThis.AbortController||r(27).AbortController;let j,I,B;function F(e,t,r){let n=!1;e.on("close",()=>{n=!0});return{destroy:t=>{n||(n=!0,g.destroyer(e,t||new S("pipe")))},cleanup:p(e,{readable:t,writable:r},e=>{n=!e})}}function $(e){if(A(e))return e;if(T(e))return function(e){return z.apply(this,arguments)}(e);throw new v("val",["Readable","Iterable","AsyncIterable"],e)}function z(){return(z=n((function*(e){I||(I=r(35)),yield*a(o(I.prototype[d].call(e)))}))).apply(this,arguments)}async function U(e,t,r,{end:n}){let i,s=null;const a=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},l=()=>new f((e,t)=>{i?t(i):s=()=>{i?t(i):e()}});t.on("drain",a);const u=p(t,{readable:!1},a);try{t.writableNeedDrain&&await l();var c,d=!0,h=!1;try{for(var b,g,m=o(e);d=(b=await m.next()).done,g=await b.value,!d;d=!0){const e=g;t.write(e)||await l()}}catch(e){h=!0,c=e}finally{try{d||null==m.return||await m.return()}finally{if(h)throw c}}n&&(t.end(),await l()),r()}catch(e){r(i!==e?y(i,e):e)}finally{u(),t.off("drain",a)}}async function W(e,t,r,{end:n}){R(t)&&(t=t.writable);const i=t.getWriter();try{var s,a=!0,l=!1;try{for(var u,c,f=o(e);a=(u=await f.next()).done,c=await u.value,!a;a=!0){const e=c;await i.ready,i.write(e).catch(()=>{})}}catch(e){l=!0,s=e}finally{try{a||null==f.return||await f.return()}finally{if(l)throw s}}await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function q(e,t,n){if(1===e.length&&c(e[0])&&(e=e[0]),e.length<2)throw new _("streams");const i=new N,o=i.signal,s=null==n?void 0:n.signal,a=[];function l(){x(new k)}let f,d,p;M(s,"options.signal"),B=B||r(7).addAbortListener,s&&(f=B(s,l));const b=[];let g,y=0;function S(e){x(e,0==--y)}function x(e,r){var n;if(!e||d&&"ERR_STREAM_PREMATURE_CLOSE"!==d.code||(d=e),d||r){for(;b.length;)b.shift()(d);null===(n=f)||void 0===n||n[h](),i.abort(),r&&(d||a.forEach(e=>e()),u.nextTick(t,d,p))}}for(let t=0;t0,c=s||!1!==(null==n?void 0:n.end),f=t===e.length-1;if(O(i)){if(c){const{destroy:e,cleanup:t}=F(i,s,l);b.push(e),C(i)&&f&&a.push(t)}function E(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&S(e)}i.on("error",E),C(i)&&f&&a.push(()=>{i.removeListener("error",E)})}if(0===t)if("function"==typeof i){if(g=i({signal:o}),!A(g))throw new w("Iterable, AsyncIterable or Stream","source",g)}else g=A(i)||T(i)||R(i)?i:m.from(i);else if("function"==typeof i){var L;if(R(g))g=$(null===(L=g)||void 0===L?void 0:L.readable);else g=$(g);if(g=i(g,{signal:o}),s){if(!A(g,!0))throw new w("AsyncIterable",`transform[${t-1}]`,g)}else{var I;j||(j=r(65));const e=new j({objectMode:!0}),t=null===(I=g)||void 0===I?void 0:I.then;if("function"==typeof t)y++,t.call(g,t=>{p=t,null!=t&&e.write(t),c&&e.end(),u.nextTick(S)},t=>{e.destroy(t),u.nextTick(S,t)});else if(A(g,!0))y++,U(g,e,S,{end:c});else{if(!P(g)&&!R(g))throw new w("AsyncIterable or Promise","destination",g);{const t=g.readable||g;y++,U(t,e,S,{end:c})}}g=e;const{destroy:n,cleanup:i}=F(g,!1,!0);b.push(n),f&&a.push(i)}}else if(O(i)){if(T(g)){y+=2;const e=H(g,i,S,{end:c});C(i)&&f&&a.push(e)}else if(R(g)||P(g)){const e=g.readable||g;y++,U(e,i,S,{end:c})}else{if(!A(g))throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);y++,U(g,i,S,{end:c})}g=i}else if(D(i)){if(T(g))y++,W($(g),i,S,{end:c});else if(P(g)||A(g))y++,W(g,i,S,{end:c});else{if(!R(g))throw new v("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],g);y++,W(g.readable,i,S,{end:c})}g=i}else g=m.from(i)}return(null!=o&&o.aborted||null!=s&&s.aborted)&&u.nextTick(l),g}function H(e,t,r,{end:n}){let i=!1;if(t.on("close",()=>{i||r(new x)}),e.pipe(t,{end:!1}),n){function o(){i=!0,t.end()}L(e)?u.nextTick(o):e.once("end",o)}else r();return p(e,{readable:!0,writable:!1},t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)}),p(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:q,pipeline:function(...e){return q(e,b(function(e){return E(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},function(e,t,r){"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(3),{EventEmitter:o}=r(15);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",l),r.on("close",u));let s=!1;function l(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",l),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",c),a(e,"error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},function(e,t,r){const n=r(4),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:l,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:c,Symbol:f,SymbolHasInstance:d}=r(3);e.exports=L,L.WritableState=D;const{EventEmitter:h}=r(15),p=r(45).Stream,{Buffer:b}=r(2),g=r(19),{addAbortSignal:m}=r(36),{getHighWaterMark:y,getDefaultHighWaterMark:v}=r(37),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:x,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:M,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:C}=r(8).codes,{errorOrDestroy:T}=g;function O(){}u(L.prototype,p.prototype),u(L,p);const R=f("kOnFinished");function D(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(14)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?y(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=B.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,P(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[R]=[]}function P(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){const t=this instanceof r(14);if(!t&&!s(L,this))return new L(e);this._writableState=new D(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),p.call(this,e),g.construct(this,()=>{const e=this._writableState;e.writing||U(this,e),H(this,e)})}function N(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!b.isEncoding(r))throw new C(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=O)}if(null===t)throw new M;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=b.from(t,r),r="buffer");else if(t instanceof b)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new A:o.destroyed&&(s=new k("write")),s?(n.nextTick(i,s),T(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.lengthr.bufferedIndex&&U(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(F,r.afterWriteTickInfo)):$(e,r,1,o))):T(e,new S)}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,$(e,t,r,n)}function $(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&z(t),H(e,t)}function z(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?O:e=>{for(let t=a;t256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function W(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function q(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)T(e,null!=i?i:S());else if(r=!0,t.pendingcb--,i){const r=t[R].splice(0);for(let e=0;e{W(t)?K(e,t):t.pendingcb--},e,t)):W(t)&&(t.pendingcb++,K(e,t))))}function K(e,t){t.pendingcb--,t.finished=!0;const r=t[R].splice(0);for(let e=0;e>>32-t}function u(e,t,r,n,i,o,s){return l(e+(t&r|~t&n)+i+o|0,s)+t|0}function c(e,t,r,n,i,o,s){return l(e+(t&n|r&~n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return l(e+(t^r^n)+i+o|0,s)+t|0}function d(e,t,r,n,i,o,s){return l(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=f(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=d(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,r,n,i,e[7],1126891415,10),i=d(i,o,r,n,e[14],2878612391,15),n=d(n,i,o,r,e[5],4237533241,21),r=d(r,n,i,o,e[12],1700485571,6),o=d(o,r,n,i,e[3],2399980690,10),i=d(i,o,r,n,e[10],4293915773,15),n=d(n,i,o,r,e[1],2240044497,21),r=d(r,n,i,o,e[8],1873313359,6),o=d(o,r,n,i,e[15],4264355552,10),i=d(i,o,r,n,e[6],2734768916,15),n=d(n,i,o,r,e[13],1309151649,21),r=d(r,n,i,o,e[4],4149444226,6),o=d(o,r,n,i,e[11],3174756917,10),i=d(i,o,r,n,e[2],718787259,15),n=d(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,r){"use strict";var n=r(21).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i>>32-t}function b(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(h,o),h.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,x=0|this._d,k=0|this._e,E=0;E<80;E+=1){var M,A;E<16?(M=b(r,n,i,o,h,e[a[E]],f[0],u[E]),A=v(w,_,S,x,k,e[l[E]],d[0],c[E])):E<32?(M=g(r,n,i,o,h,e[a[E]],f[1],u[E]),A=y(w,_,S,x,k,e[l[E]],d[1],c[E])):E<48?(M=m(r,n,i,o,h,e[a[E]],f[2],u[E]),A=m(w,_,S,x,k,e[l[E]],d[2],c[E])):E<64?(M=y(r,n,i,o,h,e[a[E]],f[3],u[E]),A=g(w,_,S,x,k,e[l[E]],d[3],c[E])):(M=v(r,n,i,o,h,e[a[E]],f[4],u[E]),A=b(w,_,S,x,k,e[l[E]],d[4],c[E])),r=h,h=o,o=p(i,10),i=n,n=M,w=k,k=x,x=p(S,10),S=_,_=A}var C=this._b+i+x|0;this._b=this._c+o+k|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(137),t.sha1=r(138),t.sha224=r(139),t.sha256=r(76),t.sha384=r(140),t.sha512=r(77)},function(e,t,r){"use strict";var n=r(9);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}e.exports=o,o.getr=s}).call(this,r(2).Buffer)},function(e,t,r){"use strict";var n=t;n.version=r(174).version,n.utils=r(10),n.rand=r(54),n.curve=r(103),n.curves=r(58),n.ec=r(185),n.eddsa=r(189)},function(e,t,r){"use strict";var n,i=t,o=r(59),s=r(103),a=r(10).assert;function l(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=l,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(184)}catch(e){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){var n=t;n.utils=r(11),n.common=r(31),n.sha=r(178),n.ripemd=r(182),n.hmac=r(183),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(12))},function(e,t,r){"use strict";const n=new(r(42).a);t.a=n},function(e,t,r){const{Buffer:n}=r(2),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(3),{promisify:{custom:a}}=r(7),{streamReturningOperators:l,promiseReturningOperators:u}=r(119),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(8),f=r(63),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(37),{pipeline:p}=r(44),{destroyer:b}=r(19),g=r(16),m=r(67),y=r(13),v=e.exports=r(45).Stream;v.isDestroyed=y.isDestroyed,v.isDisturbed=y.isDisturbed,v.isErrored=y.isErrored,v.isReadable=y.isReadable,v.isWritable=y.isWritable,v.Readable=r(35);for(const e of o(l)){const t=l[e];function w(...e){if(new.target)throw c();return v.Readable.from(s(t,this,e))}i(w,"name",{__proto__:null,value:t.name}),i(w,"length",{__proto__:null,value:t.length}),i(v.Readable.prototype,e,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(const e of o(u)){const t=u[e];function w(...e){if(new.target)throw c();return s(t,this,e)}i(w,"name",{__proto__:null,value:t.name}),i(w,"length",{__proto__:null,value:t.length}),i(v.Readable.prototype,e,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(46),v.Duplex=r(14),v.Transform=r(66),v.PassThrough=r(65),v.pipeline=p;const{addAbortSignal:_}=r(36);v.addAbortSignal=_,v.finished=g,v.destroy=b,v.compose=f,v.setDefaultHighWaterMark=d,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(p,a,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,a,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},function(e,t,r){"use strict";const{pipeline:n}=r(44),i=r(14),{destroyer:o}=r(19),{isNodeStream:s,isReadable:a,isWritable:l,isWebStream:u,isTransformStream:c,isWritableStream:f,isReadableStream:d}=r(13),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:b}}=r(8),g=r(16);e.exports=function(...e){if(0===e.length)throw new b("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(l(e[r])||f(e[r])||c(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,m,y,v,w;const _=e[0],S=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):k||x||w.destroy()})),x=!!(l(_)||f(_)||c(_)),k=!!(a(S)||d(S)||c(S));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==S||!S.readableObjectMode),writable:x,readable:k}),x){if(s(_))w._write=function(e,t,n){_.write(e,t)?n():r=n},w._final=function(e){_.end(),m=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(_)){const e=(c(_)?_.writable:_).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch(()=>{}),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch(()=>{}),m=t}catch(e){t(e)}}}const e=c(S)?S.readable:S;g(e,()=>{if(m){const e=m;m=null,e()}})}if(k)if(s(S))S.on("readable",(function(){if(y){const e=y;y=null,e()}})),S.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=S.read();if(null===e)return void(y=w._read);if(!w.push(e))return}};else if(u(S)){const e=(c(S)?S.readable:S).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch(e){return}}}return w._destroy=function(e,t){e||null===v||(e=new h),y=null,r=null,m=null,null===v?t(e):(v=t,s(S)&&o(S,e))},w}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;ts.nextTick(t,e),r=>s.nextTick(t,r||e))},h}},function(e,t,r){"use strict";const{ObjectSetPrototypeOf:n}=r(3);e.exports=o;const i=r(66);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())})}function p(){this._final!==h&&h.call(this)}d.prototype._final=h,d.prototype._transform=function(e,t,r){throw new l("_transform()")},d.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,(e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length{let i,u;const c=e[e.length-1];if(c&&"object"==typeof c&&!s(c)&&!o(c)&&!a(c)){const t=n(e);i=t.signal,u=t.end}l(e,(e,n)=>{e?r(e):t(n)},{signal:i,end:u})})}}},function(e,t){e.exports=function(e){return"<"+e.value+">"}},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(129).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=E,E.ReadableState=k;r(15).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(71),a=r(2).Buffer,l=t.Uint8Array||function(){};var u,c=r(130);u=c&&c.debuglog?c.debuglog("stream"):function(){};var f,d,h,p=r(131),b=r(72),g=r(73).getHighWaterMark,m=r(21).codes,y=m.ERR_INVALID_ARG_TYPE,v=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(0)(E,s);var S=b.errorOrDestroy,x=["error","close","destroy","pause","resume"];function k(e,t,n){i=i||r(22),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(18).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function E(e){if(i=i||r(22),!(this instanceof E))return new E(e);var t=this instanceof i;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function M(e,t,r,n,i){u("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,s);else if(i||(o=function(e,t){var r;n=t,a.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(s,t)),o)S(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?S(e,new _):A(e,s,t,!0);else if(s.ended)S(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):R(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,R(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(O,e))}function O(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):T(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){S(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:g;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",g),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var f=!1;function d(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==$(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(L,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(21).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(22);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,p=0|this._f,b=0|this._g,g=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var y=0;y<64;++y){var v=g+d(l)+u(l,p,b)+s[y]+r[y]|0,w=f(n)+c(n,i,o)|0;g=b,b=p,p=l,l=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=l},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function l(){this.init(),this._w=a,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,l=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,x=0|this._dl,k=0|this._el,E=0|this._fl,M=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var T=t[C-30],O=t[C-30+1],R=h(T,O),D=p(O,T),P=b(T=t[C-4],O=t[C-4+1]),L=g(O,T),N=t[C-14],j=t[C-14+1],I=t[C-32],B=t[C-32+1],F=D+j|0,$=R+N+m(F,D)|0;$=($=$+P+m(F=F+L|0,L)|0)+I+m(F=F+B|0,B)|0,t[C]=$,t[C+1]=F}for(var z=0;z<160;z+=2){$=t[z],F=t[z+1];var U=c(r,n,i),W=c(w,_,S),q=f(r,w),H=f(w,r),K=d(a,k),V=d(k,a),G=s[z],Y=s[z+1],X=u(a,l,y),Z=u(k,E,M),J=A+V|0,Q=v+K+m(J,A)|0;Q=(Q=(Q=Q+X+m(J=J+Z|0,Z)|0)+G+m(J=J+Y|0,Y)|0)+$+m(J=J+F|0,F)|0;var ee=H+W|0,te=q+U+m(ee,H)|0;v=y,A=M,y=l,M=E,l=a,E=k,a=o+Q+m(k=x+J|0,x)|0,o=i,x=S,i=n,S=_,n=r,_=w,r=Q+te+m(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+x|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+M|0,this._hl=this._hl+A|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+o+m(this._dl,x)|0,this._eh=this._eh+a+m(this._el,k)|0,this._fh=this._fh+l+m(this._fl,E)|0,this._gh=this._gh+y+m(this._gl,M)|0,this._hh=this._hh+v+m(this._hl,A)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=l},function(e,t,r){"use strict";var n=r(0),i=r(141),o=r(17),s=r(1).Buffer,a=r(79),l=r(49),u=r(50),c=s.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new l:u(e)).update(t).digest():t.lengthr||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){(function(t){var r;if(t.browser)r="utf-8";else if(t.version){r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,r(4))},function(e,t,r){var n=r(79),i=r(49),o=r(50),s=r(1).Buffer,a=r(82),l=r(83),u=r(85),c=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,r){var a=function(e){function t(t){return o(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=a(t):t.length>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var o=0,s=0,a=n.length>>>1,l=0;l>>n[l]&1;for(l=a;l>>n[l]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,e.keys,s)}},l.prototype._update=function(e,t,r,n){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},l.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,s=d}o.rip(a,s,n,i)},l.prototype._decrypt=function(e,t,r,n,i){for(var s=r,a=t,l=e.keys.length-2;l>=0;l-=2){var u=e.keys[l],c=e.keys[l+1];o.expand(s,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var f=o.substitute(u,c),d=s;s=(a^o.permute(f))>>>0,a=d}o.rip(s,a,n,i)}},function(e,t,r){var n=r(30),i=r(1).Buffer,o=r(89);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;ae;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(l),t.cmp(l)){if(!t.cmp(u))for(;r.mod(c).cmp(f);)r.iadd(h)}else for(;r.mod(o).cmp(d);)r.iadd(h);if(g(p=r.shrn(1))&&g(r)&&m(p)&&m(r)&&s.test(p)&&s.test(r))return r}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(5),i=r(54);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),l=0;!a.testn(l);l++);for(var u=e.shrn(l),c=a.toRed(o);t>0;t--){var f=this._randrange(new n(2),a);r&&r(f);var d=f.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new n(2),s),f=e.gcd(c);if(0!==f.cmpn(1))return f;var d=c.toRed(i).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var h=1;h0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),n)s.endEmitted?S(e,new _):A(e,s,t,!0);else if(s.ended)S(e,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):R(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,R(e,s));return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(O,e))}function O(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function R(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):T(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){S(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:g;function a(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",a),r.removeListener("end",l),r.removeListener("end",g),r.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",a);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,j(e))}}(r);e.on("drain",c);var f=!1;function d(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==$(i.pipes,e))&&!f&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===o(e,"error")&&S(e,t)}function p(){e.removeListener("finish",b),g()}function b(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(L,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(P,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,R(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(12),r(4))},function(e,t,r){"use strict";e.exports=c;var n=r(24).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,l=r(25);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>8,s=255&i;o?r.push(o,s):r.push(s)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(40),n.short=r(175),n.mont=r(176),n.edwards=r(177)},function(e,t,r){"use strict";var n=r(11).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(11),i=r(31),o=r(104),s=r(9),a=n.sum32,l=n.sum32_4,u=n.sum32_5,c=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n=49&&u<=54?u-49+10:u>=17&&u<=22?u-17+10:u,s|=l}return n(!(240&s),"Invalid character in "+e),i}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s"}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=a(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=a(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c:o.prototype.inspect=c;var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?f[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],c=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(e);r=(p=p.idivn(c)).isZero()?b+r:f[u-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,f=67108863&l,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&s}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&t;for(;0!==o&&s>26,this.words[s]=67108863&t;if(0===o&&s>>13,h=0|s[1],p=8191&h,b=h>>>13,g=0|s[2],m=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],x=8191&S,k=S>>>13,E=0|s[5],M=8191&E,A=E>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],D=8191&R,P=R>>>13,L=0|s[8],N=8191&L,j=L>>>13,I=0|s[9],B=8191&I,F=I>>>13,$=0|a[0],z=8191&$,U=$>>>13,W=0|a[1],q=8191&W,H=W>>>13,K=0|a[2],V=8191&K,G=K>>>13,Y=0|a[3],X=8191&Y,Z=Y>>>13,J=0|a[4],Q=8191&J,ee=J>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],fe=8191&ce,de=ce>>>13,he=0|a[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(u+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,U))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,U))+Math.imul(b,z)|0,o=Math.imul(b,U);var me=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,H)|0)+Math.imul(d,q)|0))<<13)|0;u=((o=o+Math.imul(d,H)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,z),i=(i=Math.imul(m,U))+Math.imul(y,z)|0,o=Math.imul(y,U),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,H)|0;var ye=(u+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,V)|0))<<13)|0;u=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,U))+Math.imul(_,z)|0,o=Math.imul(_,U),n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,H)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,H)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,G)|0;var ve=(u+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,U))+Math.imul(k,z)|0,o=Math.imul(k,U),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(m,V)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0;var we=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,U))+Math.imul(A,z)|0,o=Math.imul(A,U),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,H)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,X)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,U))+Math.imul(O,z)|0,o=Math.imul(O,U),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,U))+Math.imul(P,z)|0,o=Math.imul(P,U),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,H)|0,n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0;var xe=(u+(n=n+Math.imul(f,le)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,U))+Math.imul(j,z)|0,o=Math.imul(j,U),n=n+Math.imul(D,q)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,H)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ue)|0;var ke=(u+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,U))+Math.imul(F,z)|0,o=Math.imul(F,U),n=n+Math.imul(N,q)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,de)|0;var Ee=(u+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,H))+Math.imul(F,q)|0,o=Math.imul(F,H),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,G)|0,n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,Z)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,de)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(F,V)|0,o=Math.imul(F,G),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(x,le)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ue)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,de)|0;var Ae=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var Ce=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Te=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(k,pe)|0))<<13)|0;u=((o=o+Math.imul(k,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,ue)|0)+Math.imul(P,le)|0,o=o+Math.imul(P,ue)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,oe),i=(i=Math.imul(B,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(j,le)|0,o=o+Math.imul(j,ue)|0,n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,de)|0;var Re=(u+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,de)|0;var De=(u+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var Pe=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(j,pe)|0))<<13)|0;u=((o=o+Math.imul(j,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(u+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,be))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=me,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=Se,l[7]=xe,l[8]=ke,l[9]=Ee,l[10]=Me,l[11]=Ae,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=De,l[17]=Pe,l[18]=Le,0!==u&&(l[19]=u,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(b=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?p(this,e,t):r<1024?g(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},y.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-o|f>>>o,c=f&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,l=n.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(f)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(l)):(r.isub(t),a.isub(i),l.isub(s))}return{a:a,b:l,gcd:r.iushln(u)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return v[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=s;0!==h.cmp(a);){for(var b=h,g=0;0!==b.cmp(a);g++)b=b.redSqr();n(g=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===c)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}l=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,E),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(94)(e))},function(e,t,r){var n=r(0),i=r(33).Reporter,o=r(2).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(198)},function(e,t,r){var n=r(0),i=r(32),o=i.base,s=i.bignum,a=i.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.Node.call(this,"der",e)}function c(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var l=1,u=n.length;u>=256;u>>=8)l++;(o=new i(2+l))[0]=s,o[1]=128|l;u=1+l;for(var c=n.length;c>0;u--,c>>=8)o[u]=255&c;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;s>>=7)o++}var a=new i(o),l=a.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(a[l--]=127&s;(s>>=7)>0;)a[l--]=128|127&s}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0?s-4:s;for(r=0;r>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-c)-1,h>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=u}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<0;e[r+h]=255&s,h+=p,s/=256,u-=8);e[r+h-p]|=128*b}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function n(e){var t={},r=!1;function n(t,n){return r=!0,{done:!1,value:new u(n=new Promise((function(r){r(e[t](n))})),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):n("return",e)}),t}function i(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(o=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function s(e){return new u(e,0)}function a(e){return function(){return new l(e.apply(this,arguments))}}function l(e){var t,r;function n(t,r){try{var o=e[t](r),s=o.value,a=s instanceof u;Promise.resolve(a?s.v:s).then((function(r){if(a){var l="return"===t?"return":"next";if(!s.k||r.done)return n(l,r);r=e[l](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function u(e,t){this.v=e,this.k=t}l.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},l.prototype.next=function(e){return this._invoke("next",e)},l.prototype.throw=function(e){return this._invoke("throw",e)},l.prototype.return=function(e){return this._invoke("return",e)};const c=globalThis.AbortController||r(27).AbortController,{codes:{ERR_INVALID_ARG_VALUE:f,ERR_INVALID_ARG_TYPE:d,ERR_MISSING_ARGS:h,ERR_OUT_OF_RANGE:p},AbortError:b}=r(8),{validateAbortSignal:g,validateInteger:m,validateObject:y}=r(28),v=r(3).Symbol("kWeak"),w=r(3).Symbol("kResistStopPropagation"),{finished:_}=r(16),S=r(63),{addAbortSignalNoValidate:x}=r(36),{isWritable:k,isNodeStream:E}=r(13),{deprecate:M}=r(7),{ArrayPrototypePush:A,Boolean:C,MathFloor:T,Number:O,NumberIsNaN:R,Promise:D,PromiseReject:P,PromiseResolve:L,PromisePrototypeThen:N,Symbol:j}=r(3),I=j("kEmpty"),B=j("kEof");function F(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let o=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(o=T(t.highWaterMark)),m(n,"options.concurrency",1),m(o,"options.highWaterMark",0),o+=n,function(){var l=a((function*(){const a=r(7).AbortSignalAny([null==t?void 0:t.signal].filter(C)),l=this,u=[],c={signal:a};let f,d,h=!1,p=0;function g(){h=!0,m()}function m(){p-=1,y()}function y(){d&&!h&&p=o||p>=n)&&await new D(e=>{d=e})}}catch(e){s=!0,t=e}finally{try{r||null==w.return||await w.return()}finally{if(s)throw t}}u.push(B)}catch(e){const t=P(e);N(t,m,g),u.push(t)}finally{h=!0,f&&(f(),f=null)}}();try{for(;;){for(;u.length>0;){const e=yield s(u[0]);if(e===B)return;if(a.aborted)throw new b;e!==I&&(yield e),u.shift(),y()}yield s(new D(e=>{f=e}))}}finally{h=!0,d&&(d(),d=null)}}));return function(){return l.apply(this,arguments)}}().call(this)}async function $(e,t){var r,n=!0,o=!1;try{for(var s,a=i(z.call(this,e,t));n=(s=await a.next()).done,await s.value,!n;n=!0){return!0}}catch(e){o=!0,r=e}finally{try{n||null==a.return||await a.return()}finally{if(o)throw r}}return!1}function z(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);return F.call(this,(async function(t,r){return await e(t,r)?t:I}),t)}class U extends h{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function W(e){if(e=O(e),R(e))return 0;if(e<0)throw new p("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:M((function(e){return null!=e&&y(e,"options"),null!=(null==e?void 0:e.signal)&&g(e.signal,"options.signal"),function(){var t=a((function*(){let t=0;var r,n=!0,o=!1;try{for(var a,l,u=i(this);n=(a=yield s(u.next())).done,l=yield s(a.value),!n;n=!0){const r=l;var c;if(null!=e&&null!==(c=e.signal)&&void 0!==c&&c.aborted)throw new b({cause:e.signal.reason});yield[t++,r]}}catch(e){o=!0,r=e}finally{try{n||null==u.return||(yield s(u.return()))}finally{if(o)throw r}}}));return function(){return t.apply(this,arguments)}}().call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t){return null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),e=W(e),function(){var r=a((function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new b;var n,o=!0,a=!1;try{for(var l,u,c=i(this);o=(l=yield s(c.next())).done,u=yield s(l.value),!o;o=!0){const r=u;var f;if(null!=t&&null!==(f=t.signal)&&void 0!==f&&f.aborted)throw new b;e--<=0&&(yield r)}}catch(e){a=!0,n=e}finally{try{o||null==c.return||(yield s(c.return()))}finally{if(a)throw n}}}));return function(){return r.apply(this,arguments)}}().call(this)},filter:z,flatMap:function(e,t){const r=F.call(this,e,t);return function(){var e=a((function*(){var e,t=!0,o=!1;try{for(var a,l,u=i(r);t=(a=yield s(u.next())).done,l=yield s(a.value),!t;t=!0){const e=l;yield*n(i(e))}}catch(t){o=!0,e=t}finally{try{t||null==u.return||(yield s(u.return()))}finally{if(o)throw e}}}));return function(){return e.apply(this,arguments)}}().call(this)},map:F,take:function(e,t){return null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),e=W(e),function(){var r=a((function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new b;var n,o=!0,a=!1;try{for(var l,u,c=i(this);o=(l=yield s(c.next())).done,u=yield s(l.value),!o;o=!0){const r=u;var f;if(null!=t&&null!==(f=t.signal)&&void 0!==f&&f.aborted)throw new b;if(e-- >0&&(yield r),e<=0)return}}catch(e){a=!0,n=e}finally{try{o||null==c.return||(yield s(c.return()))}finally{if(a)throw n}}}));return function(){return r.apply(this,arguments)}}().call(this)},compose:function(e,t){if(null!=t&&y(t,"options"),null!=(null==t?void 0:t.signal)&&g(t.signal,"options.signal"),E(e)&&!k(e))throw new f("stream",e,"must be writable");const r=S(this,e);return null!=t&&t.signal&&x(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);return!await $.call(this,async(...t)=>!await e(...t),t)},forEach:async function(e,t){if("function"!=typeof e)throw new d("fn",["Function","AsyncFunction"],e);var r,n=!0,o=!1;try{for(var s,a=i(F.call(this,(async function(t,r){return await e(t,r),I}),t));n=(s=await a.next()).done,await s.value,!n;n=!0){}}catch(e){o=!0,r=e}finally{try{n||null==a.return||await a.return()}finally{if(o)throw r}}},reduce:async function(e,t,r){var n;if("function"!=typeof e)throw new d("reducer",["Function","AsyncFunction"],e);null!=r&&y(r,"options"),null!=(null==r?void 0:r.signal)&&g(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(n=r.signal)&&void 0!==n&&n.aborted){const e=new b(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await _(this.destroy(e)),e}const s=new c,a=s.signal;if(null!=r&&r.signal){const e={once:!0,[v]:this,[w]:!0};r.signal.addEventListener("abort",()=>s.abort(),e)}let l=!1;try{var u,f=!0,h=!1;try{for(var p,m,S=i(this);f=(p=await S.next()).done,m=await p.value,!f;f=!0){const n=m;var x;if(l=!0,null!=r&&null!==(x=r.signal)&&void 0!==x&&x.aborted)throw new b;o?t=await e(t,n,{signal:a}):(t=n,o=!0)}}catch(e){h=!0,u=e}finally{try{f||null==S.return||await S.return()}finally{if(h)throw u}}if(!l&&!o)throw new U}finally{s.abort()}return t},toArray:async function(e){null!=e&&y(e,"options"),null!=(null==e?void 0:e.signal)&&g(e.signal,"options.signal");const t=[];var r,n=!0,o=!1;try{for(var s,a,l=i(this);n=(s=await l.next()).done,a=await s.value,!n;n=!0){const r=a;var u;if(null!=e&&null!==(u=e.signal)&&void 0!==u&&u.aborted)throw new b(void 0,{cause:e.signal.reason});A(t,r)}}catch(e){o=!0,r=e}finally{try{n||null==l.return||await l.return()}finally{if(o)throw r}}return t},some:$,find:async function(e,t){var r,n=!0,o=!1;try{for(var s,a,l=i(z.call(this,e,t));n=(s=await l.next()).done,a=await s.value,!n;n=!0){return a}}catch(e){o=!0,r=e}finally{try{n||null==l.return||await l.return()}finally{if(o)throw r}}}}},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return c.alloc(0);const t=c.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)l(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ei.length)){e===i.length?(t+=i,++n,r.next?this.head=r.next:this.head=this.tail=null):(t+=s(i,0,e),this.head=r,r.data=s(i,e));break}t+=i,e-=i.length,++n}while(null!==(r=r.next));return this.length-=n,t}_getBuffer(e){const t=c.allocUnsafe(e),r=e;let n=this.head,i=0;do{const o=n.data;if(!(e>o.length)){e===o.length?(l(t,o,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(l(t,new u(o.buffer,o.byteOffset,e),r-e),this.head=n,n.data=o.slice(e));break}l(t,o,r-e),e-=o.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return f(this,i(i({},t),{},{depth:0,customInspect:!1}))}}},function(e,t,r){function n(e){return new s(e,0)}function i(e){return function(){return new o(e.apply(this,arguments))}}function o(e){var t,r;function n(t,r){try{var o=e[t](r),a=o.value,l=a instanceof s;Promise.resolve(l?a.v:a).then((function(r){if(l){var s="return"===t?"return":"next";if(!a.k||r.done)return n(s,r);r=e[s](r).value}i(o.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};r?r=r.next=a:(t=r=a,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function s(e,t){this.v=e,this.k=t}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)};const a=r(4),l=r(2),{isReadable:u,isWritable:c,isIterable:f,isNodeStream:d,isReadableNodeStream:h,isWritableNodeStream:p,isDuplexNodeStream:b,isReadableStream:g,isWritableStream:m}=r(13),y=r(16),{AbortError:v,codes:{ERR_INVALID_ARG_TYPE:w,ERR_INVALID_RETURN_VALUE:_}}=r(8),{destroyer:S}=r(19),x=r(14),k=r(35),E=r(46),{createDeferredPromise:M}=r(7),A=r(64),C=globalThis.Blob||l.Blob,T=void 0!==C?function(e){return e instanceof C}:function(e){return!1},O=globalThis.AbortController||r(27).AbortController,{FunctionPrototypeCall:R}=r(3);class D extends x{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function P(e){const t=e.readable&&"function"!=typeof e.readable.read?k.wrap(e.readable):e.readable,r=e.writable;let n,i,o,s,a,l=!!u(t),f=!!c(r);function d(e){const t=s;s=null,t?t(e):e&&a.destroy(e)}return a=new D({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:f}),f&&(y(r,e=>{f=!1,e&&S(t,e),d(e)}),a._write=function(e,t,i){r.write(e,t)?i():n=i},a._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(y(t,e=>{l=!1,e&&S(t,e),d(e)}),t.on("readable",(function(){if(o){const e=o;o=null,e()}})),t.on("end",(function(){a.push(null)})),a._read=function(){for(;;){const e=t.read();if(null===e)return void(o=a._read);if(!a.push(e))return}}),a._destroy=function(e,a){e||null===s||(e=new v),o=null,n=null,i=null,null===s?a(e):(s=a,S(r,e),S(t,e))},a}e.exports=function e(t,r){if(b(t))return t;if(h(t))return P({readable:t});if(p(t))return P({writable:t});if(d(t))return P({writable:!1,readable:!1});if(g(t))return P({readable:k.fromWeb(t)});if(m(t))return P({writable:E.fromWeb(t)});if("function"==typeof t){const{value:e,write:o,final:s,destroy:l}=function(e){let{promise:t,resolve:r}=M();const o=new O,s=o.signal;return{value:e(i((function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:l}=yield n(e);if(a.nextTick(l),o)return;if(s.aborted)throw new v(void 0,{cause:s.reason});({promise:t,resolve:r}=M()),yield i}}))(),{signal:s}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){o.abort(),t(e)}}}(t);if(f(e))return A(D,e,{objectMode:!0,write:o,final:s,destroy:l});const u=null==e?void 0:e.then;if("function"==typeof u){let t;const r=R(u,e,e=>{if(null!=e)throw new _("nully","body",e)},e=>{S(t,e)});return t=new D({objectMode:!0,readable:!1,write:o,final(e){s(async()=>{try{await r,a.nextTick(e,null)}catch(t){a.nextTick(e,t)}})},destroy:l})}throw new _("Iterable, AsyncIterable or AsyncFunction",r,e)}if(T(t))return e(t.arrayBuffer());if(f(t))return A(D,t,{objectMode:!0,writable:!1});if(g(null==t?void 0:t.readable)&&m(null==t?void 0:t.writable))return D.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return P({readable:null!=t&&t.readable?h(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?p(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const o=null==t?void 0:t.then;if("function"==typeof o){let e;return R(o,t,t=>{null!=t&&e.push(t),e.push(null)},t=>{S(e,t)}),e=new D({objectMode:!0,writable:!1,read(){}})}throw new w(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},function(e,t){e.exports=function(e){return"_:"+e.value}},function(e,t){e.exports=function(e,t){return[...e].map(e=>t(e)).join("\n")+"\n"}},function(e,t){e.exports=function(){return""}},function(e,t,r){const n=r(68),i=/["\\\\\n\r]/,o=/["\\\\\n\r]/g,s={'"':'\\"',"\\":"\\\\","\n":"\\n","\r":"\\r"};function a(e){return s[e]}e.exports=function(e){const t=(r=e.value,i.test(r)?r.replace(o,a):r);var r;return"http://www.w3.org/2001/XMLSchema#string"===e.datatype.value?'"'+t+'"':"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"===e.datatype.value?'"'+t+'"@'+e.language:'"'+t+'"^^'+n(e.datatype)}},function(e,t){e.exports=function(e,t){const r=t(e.subject),n=t(e.predicate),i=t(e.object),o=t(e.graph);return`${r} ${n} ${i} ${o?o+" ":""}.`}},function(e,t){e.exports=function(e){return"?"+e.value}},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(20),t.createHash=t.Hash=r(29),t.createHmac=t.Hmac=r(78);var n=r(142),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(81);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(144);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var l=r(159);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var u=r(164);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(207);var c=r(208);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var f=r(211);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){(t=e.exports=r(70)).Stream=t,t.Readable=t,t.Writable=r(74),t.Duplex=r(22),t.Transform=r(75),t.PassThrough=r(135),t.finished=r(48),t.pipeline=r(136)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&s.forEach(u),o||(s.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,a)+l+r[d]+s[h];l=a,a=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,r){var n=r(0),i=r(23),o=r(1).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function l(){this.init(),this._w=a,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,l=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+f(p,i,o,a)+l+r[h]+s[p]|0;l=a,a=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=l},function(e,t,r){var n=r(0),i=r(76),o=r(23),s=r(1).Buffer,a=new Array(64);function l(){this.init(),this._w=a,o.call(this,64,56)}n(l,i),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=l},function(e,t,r){var n=r(0),i=r(77),o=r(23),s=r(1).Buffer,a=new Array(160);function l(){this.init(),this._w=a,o.call(this,128,112)}n(l,i),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=l},function(e,t,r){"use strict";var n=r(0),i=r(1).Buffer,o=r(17),s=i.alloc(128);function a(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,s],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),a=0;a<64;a++)r[a]=54^t[a],n[a]=92^t[a];this._hash=[r]}n(a,o),a.prototype._update=function(e){this._hash.push(e)},a.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=a},function(e,t,r){e.exports=r(80)},function(e,t,r){(function(t,n){var i,o=r(1).Buffer,s=r(82),a=r(83),l=r(84),u=r(85),c=t.crypto&&t.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function h(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,p,b,g,m){"function"==typeof g&&(m=g,g=void 0);var y=f[(g=g||"sha1").toLowerCase()];if(!y||"function"!=typeof t.Promise)return n.nextTick((function(){var t;try{t=l(e,r,p,b,g)}catch(e){return m(e)}m(null,t)}));if(s(p,b),e=u(e,a,"Password"),r=u(r,a,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){n.nextTick((function(){t(null,e)}))}),(function(e){n.nextTick((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[e])return d[e];var r=h(i=i||o.alloc(8),i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return d[e]=r,r}(y).then((function(t){return t?h(e,r,p,b,y):l(e,r,p,b,g)})),m)}}).call(this,r(12),r(4))},function(e,t,r){var n=r(145),i=r(52),o=r(53),s=r(158),a=r(39);function l(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return l(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=l,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},function(e,t,r){var n=r(17),i=r(146),o=r(0),s=r(1).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=i.create({key:o,iv:l,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=l,o(l,n),l.prototype._update=function(e){return s.from(this._des.update(e))},l.prototype._final=function(){return s.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(86),t.Cipher=r(51),t.DES=r(87),t.CBC=r(147),t.EDE=r(148)},function(e,t,r){"use strict";var n=r(9),i=r(0),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},function(e,t,r){var n=r(91),i=r(1).Buffer,o=r(53),s=r(92),a=r(17),l=r(38),u=r(39);function c(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function d(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new c(a.module,t,r)}r(0)(c,a),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return d(e,n.key,n.iv)},t.createDecipheriv=d},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,r){(function(e){var n=r(93),i=r(162),o=r(163);var s={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,a,l){return e.isBuffer(i)||void 0===s[i]?t(r,"binary",i,a):(i=i||"binary",l=l||"binary",a=a||new e([2]),e.isBuffer(a)||(a=new e(a,l)),"number"==typeof r?new o(n(r,a),a,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,a,!0)))}}).call(this,r(2).Buffer)},function(e,t){},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){(function(t){var n=r(5),i=new(r(95)),o=new n(24),s=new n(11),a=new n(10),l=new n(3),u=new n(7),c=r(93),f=r(20);function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=b;var p={};function b(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=h):this._primeCode=8}function g(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var f,d=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return d+=1,d+="02"===r||"05"===r?8:4,p[n]=d,d;switch(i.test(e.shrn(1))||(d+=2),r){case"02":e.mod(o).cmp(s)&&(d+=8);break;case"05":(f=e.mod(a)).cmp(l)&&f.cmp(u)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&s.forEach(u),o||(s.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){var n=r(1).Buffer,i=r(78),o=r(56),s=r(57).ec,a=r(107),l=r(41),u=r(112);function c(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function d(e,t,r){var o,s;do{for(o=n.alloc(0);8*o.length","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t,r){"use strict";var n=r(10),i=r(5),o=r(0),s=r(40),a=n.assert;function l(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(l,s),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,l,u,c,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),m=new i(1),y=0;0!==d.cmpn(0);){var v=h.div(d);u=h.sub(v.mul(d)),c=g.sub(v.mul(p));var w=m.sub(v.mul(b));if(!n&&u.cmp(f)<0)t=l.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++y)break;l=u,h=d,d=u,g=p,p=c,m=b,b=w}s=u.neg(),a=c;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),l=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),l.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),f=n.redMul(u),d=l.redSqr().redIAdd(c).redISub(f).redISub(f),h=l.redMul(f.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),c=r.redMul(l),f=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(f)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(f,d,h)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(5),i=r(0),o=r(40),s=r(10);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(l,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new l(this,e,t)},a.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),l=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(10),i=r(5),o=r(0),s=r(40),a=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(l,s),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var l=a.fromRed().isOdd();return(t&&!l||!t&&l)&&(a=a.redNeg()),this.point(e,a)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,s.BasePoint),l.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},l.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),l=i.redMul(s),u=o.redMul(a),c=i.redMul(a),f=s.redMul(o);return this.curve.point(l,u,f,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(a)).redAdd(l);this.zOne?(e=s.redSub(a).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(l)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=s.redSub(a).redISub(l).redMul(o),t=u.redMul(n.redSub(l)),r=u.redMul(o))}else n=a.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(l)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),l=r.redAdd(t),u=o.redMul(s),c=a.redMul(l),f=o.redMul(l),d=s.redMul(a);return this.curve.point(u,c,d,f)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),l=i.redSub(a),u=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),f=n.redMul(l).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=l.redMul(u)):(t=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(l).redMul(u)),this.curve.point(f,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(179),t.sha224=r(180),t.sha256=r(105),t.sha384=r(181),t.sha512=r(106)},function(e,t,r){"use strict";var n=r(11),i=r(31),o=r(104),s=n.rotl32,a=n.sum32,l=n.sum32_5,u=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),l=e.toArray("be",s),u=new i({hash:this.hash,entropy:a,nonce:l,pers:o.pers,persEnc:o.persEnc||"utf8"}),f=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(f)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var m=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new c({r:g,s:m,recoveryParam:y})}}}}}},f.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new c(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,l=s.invm(this.n),u=l.mul(e).umod(this.n),f=l.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(u,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var o=this.n,s=new n(e),a=t.r,u=t.s,f=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var h=t.r.invm(o),p=o.sub(s).mul(h).umod(o),b=u.mul(h).umod(o);return this.g.mulAdd(p,a,b)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(59),i=r(102),o=r(9);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(5),i=r(10),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o>>=0;return!(i<=127)&&(t.place=s,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=l(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=l(e,r);if(!1===s)return!1;var u=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var c=l(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var f=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(u),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,e)}},function(e,t,r){"use strict";var n=r(59),i=r(58),o=r(10),s=o.assert,a=o.parseBytes,l=r(190),u=r(191);function c(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),l=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:o})},c.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,c){var f=s(r);if("ec"===f.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,f)}if("dsa"===f.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,a=r.data.g,u=r.data.pub_key,c=s.signature.decode(e,"der"),f=c.s,d=c.r;l(f,o),l(d,o);var h=i.mont(n),p=f.invm(o);return 0===a.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(d.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(d)}(e,t,f)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([c,t]);for(var d=f.modulus.byteLength(),h=[1],p=0;t.length+h.length+2r-d-2)throw new Error("message too long");var h=f.alloc(r-n-d-2),p=r-c-1,b=i(c),g=a(f.concat([u,h,f.alloc(1,1),t],p),s(b,p)),m=a(b,s(g,c));return new l(f.concat([f.alloc(1),m,g],r))}(p,t);else if(1===d)h=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=r?f.alloc(s-o-3,255):function(e){var t,r=f.allocUnsafe(e),n=0,o=i(2*e),s=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(h,p):u(h,p)}},function(e,t,r){var n=r(41),i=r(113),o=r(114),s=r(5),a=r(56),l=r(29),u=r(115),c=r(1).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var d,h=n(e),p=h.modulus.byteLength();if(t.length>p||new s(t).cmp(h.modulus)>=0)throw new Error("decryption error");d=r?u(new s(t),h):a(t,h);var b=c.alloc(p-d.length);if(d=c.concat([b,d],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=l("sha1").update(c.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),u=t.slice(s+1),f=o(a,i(u,s)),d=o(u,i(f,r-s-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var s=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,d,r);if(3===f)return d;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(1),s=r(20),a=o.Buffer,l=o.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function d(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return u.getRandomValues(a),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(r,t.length),d(n,r,t.length),h(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(a.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(r,t.length),void 0===n&&(n=t.length-r);return d(n,r,t.length),h(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(12),r(4))},function(e,t){window.CodeMirror.defineMode("javascript",(function(e,t){var r,n,i=e.indentUnit,o=t.statementIndent,s=t.jsonld,a=t.json||s,l=t.typescript,u=t.wordCharacters||/[\w$\xa1-\uffff]/,c=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),f=/[+\-*&%=<>!?|~^@]/,d=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,i){return r=e,n=i,t}function p(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,i=!1;if(s&&"@"==e.peek()&&e.match(d))return t.tokenize=p,h("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||i);)i=!i&&"\\"==n;return i||(t.tokenize=p),h("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==n&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return h(n);if("="==n&&e.eat(">"))return h("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==n)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):Ke(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==n)return t.tokenize=g,g(e,t);if("#"==n)return e.skipToEnd(),h("error","error");if("<"==n&&e.match("!--")||"-"==n&&e.match("->"))return e.skipToEnd(),h("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),h("operator","operator",e.current());if(u.test(n)){e.eatWhile(u);var i=e.current();if("."!=t.lastType){if(c.propertyIsEnumerable(i)){var o=c[i];return h(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",i)}return h("variable","variable",i)}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=p;break}n="*"==r}return h("comment","comment")}function g(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=p;break}n=!n&&"\\"==r}return h("quasi","string-2",e.current())}function m(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(l){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,s=r-1;s>=0;--s){var a=e.string.charAt(s),c="([{}])".indexOf(a);if(c>=0&&c<3){if(!i){++s;break}if(0==--i){"("==a&&(o=!0);break}}else if(c>=3&&c<6)++i;else if(u.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(e.string.charAt(s-1)==a&&"\\"!=e.string.charAt(s-2)){s--;break}}else if(o&&!i){++s;break}}o&&!i&&(t.fatArrowAt=s)}}var y={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function v(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function w(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}var _={state:null,column:null,marked:null,cc:null};function S(){for(var e=arguments.length-1;e>=0;e--)_.cc.push(arguments[e])}function x(){return S.apply(null,arguments),!0}function k(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function E(e){var r=_.state;if(_.marked="def",r.context)if("var"==r.lexical.info&&r.context&&r.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new A(n,r.vars,!0):null}return k(t,r.vars)?r:new A(r.prev,new C(t,r.vars),!1)}return null}(e,r.context);if(null!=n)return void(r.context=n)}else if(!k(e,r.localVars))return void(r.localVars=new C(e,r.localVars));t.globalVars&&!k(e,r.globalVars)&&(r.globalVars=new C(e,r.globalVars))}function M(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,r){this.prev=e,this.vars=t,this.block=r}function C(e,t){this.name=e,this.next=t}var T=new C("this",new C("arguments",null));function O(){_.state.context=new A(_.state.context,_.state.localVars,!1),_.state.localVars=T}function R(){_.state.context=new A(_.state.context,_.state.localVars,!0),_.state.localVars=null}function D(){_.state.localVars=_.state.context.vars,_.state.context=_.state.context.prev}function P(e,t){var r=function(){var r=_.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new v(n,_.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function L(){var e=_.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function N(e){return function t(r){return r==e?x():";"==e||"}"==r||")"==r||"]"==r?S():x(t)}}function j(e,t){return"var"==e?x(P("vardef",t),me,N(";"),L):"keyword a"==e?x(P("form"),$,j,L):"keyword b"==e?x(P("form"),j,L):"keyword d"==e?_.stream.match(/^\s*$/,!1)?x():x(P("stat"),U,N(";"),L):"debugger"==e?x(N(";")):"{"==e?x(P("}"),R,ie,L,D):";"==e?x():"if"==e?("else"==_.state.lexical.info&&_.state.cc[_.state.cc.length-1]==L&&_.state.cc.pop()(),x(P("form"),$,j,L,xe)):"function"==e?x(Ae):"for"==e?x(P("form"),ke,j,L):"class"==e||l&&"interface"==t?(_.marked="keyword",x(P("form","class"==e?e:t),De,L)):"variable"==e?l&&"declare"==t?(_.marked="keyword",x(j)):l&&("module"==t||"enum"==t||"type"==t)&&_.stream.match(/^\s*\w/,!1)?(_.marked="keyword","enum"==t?x(qe):"type"==t?x(Te,N("operator"),ue,N(";")):x(P("form"),ye,N("{"),P("}"),ie,L,L)):l&&"namespace"==t?(_.marked="keyword",x(P("form"),B,j,L)):l&&"abstract"==t?(_.marked="keyword",x(j)):x(P("stat"),Z):"switch"==e?x(P("form"),$,N("{"),P("}","switch"),R,ie,L,L,D):"case"==e?x(B,N(":")):"default"==e?x(N(":")):"catch"==e?x(P("form"),O,I,j,L,D):"export"==e?x(P("stat"),je,L):"import"==e?x(P("stat"),Be,L):"async"==e?x(j):"@"==t?x(B,j):S(P("stat"),B,N(";"),L)}function I(e){if("("==e)return x(Oe,N(")"))}function B(e,t){return z(e,t,!1)}function F(e,t){return z(e,t,!0)}function $(e){return"("!=e?S():x(P(")"),B,N(")"),L)}function z(e,t,r){if(_.state.fatArrowAt==_.stream.start){var n=r?G:V;if("("==e)return x(O,P(")"),re(Oe,")"),L,N("=>"),n,D);if("variable"==e)return S(O,ye,N("=>"),n,D)}var i=r?q:W;return y.hasOwnProperty(e)?x(i):"function"==e?x(Ae,i):"class"==e||l&&"interface"==t?(_.marked="keyword",x(P("form"),Re,L)):"keyword c"==e||"async"==e?x(r?F:B):"("==e?x(P(")"),U,N(")"),L,i):"operator"==e||"spread"==e?x(r?F:B):"["==e?x(P("]"),We,L,i):"{"==e?ne(Q,"}",null,i):"quasi"==e?S(H,i):"new"==e?x(function(e){return function(t){return"."==t?x(e?X:Y):"variable"==t&&l?x(pe,e?q:W):S(e?F:B)}}(r)):"import"==e?x(B):x()}function U(e){return e.match(/[;\}\)\],]/)?S():S(B)}function W(e,t){return","==e?x(B):q(e,t,!1)}function q(e,t,r){var n=0==r?W:q,i=0==r?B:F;return"=>"==e?x(O,r?G:V,D):"operator"==e?/\+\+|--/.test(t)||l&&"!"==t?x(n):l&&"<"==t&&_.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?x(P(">"),re(ue,">"),L,n):"?"==t?x(B,N(":"),i):x(i):"quasi"==e?S(H,n):";"!=e?"("==e?ne(F,")","call",n):"."==e?x(J,n):"["==e?x(P("]"),U,N("]"),L,n):l&&"as"==t?(_.marked="keyword",x(ue,n)):"regexp"==e?(_.state.lastType=_.marked="operator",_.stream.backUp(_.stream.pos-_.stream.start-1),x(i)):void 0:void 0}function H(e,t){return"quasi"!=e?S():"${"!=t.slice(t.length-2)?x(H):x(B,K)}function K(e){if("}"==e)return _.marked="string-2",_.state.tokenize=g,x(H)}function V(e){return m(_.stream,_.state),S("{"==e?j:B)}function G(e){return m(_.stream,_.state),S("{"==e?j:F)}function Y(e,t){if("target"==t)return _.marked="keyword",x(W)}function X(e,t){if("target"==t)return _.marked="keyword",x(q)}function Z(e){return":"==e?x(L,j):S(W,N(";"),L)}function J(e){if("variable"==e)return _.marked="property",x()}function Q(e,t){return"async"==e?(_.marked="property",x(Q)):"variable"==e||"keyword"==_.style?(_.marked="property","get"==t||"set"==t?x(ee):(l&&_.state.fatArrowAt==_.stream.start&&(r=_.stream.match(/^\s*:\s*/,!1))&&(_.state.fatArrowAt=_.stream.pos+r[0].length),x(te))):"number"==e||"string"==e?(_.marked=s?"property":_.style+" property",x(te)):"jsonld-keyword"==e?x(te):l&&M(t)?(_.marked="keyword",x(Q)):"["==e?x(B,oe,N("]"),te):"spread"==e?x(F,te):"*"==t?(_.marked="keyword",x(Q)):":"==e?S(te):void 0;var r}function ee(e){return"variable"!=e?S(te):(_.marked="property",x(Ae))}function te(e){return":"==e?x(F):"("==e?S(Ae):void 0}function re(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var s=_.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),x((function(r,n){return r==t||n==t?S():S(e)}),n)}return i==t||o==t?x():r&&r.indexOf(";")>-1?S(e):x(N(t))}return function(r,i){return r==t||i==t?x():S(e,n)}}function ne(e,t,r){for(var n=3;n"),ue):void 0}function ce(e){if("=>"==e)return x(ue)}function fe(e,t){return"variable"==e||"keyword"==_.style?(_.marked="property",x(fe)):"?"==t||"number"==e||"string"==e?x(fe):":"==e?x(ue):"["==e?x(N("variable"),se,N("]"),fe):"("==e?S(Ce,fe):void 0}function de(e,t){return"variable"==e&&_.stream.match(/^\s*[?:]/,!1)||"?"==t?x(de):":"==e?x(ue):"spread"==e?x(de):S(ue)}function he(e,t){return"<"==t?x(P(">"),re(ue,">"),L,he):"|"==t||"."==e||"&"==t?x(ue):"["==e?x(ue,N("]"),he):"extends"==t||"implements"==t?(_.marked="keyword",x(ue)):"?"==t?x(ue,N(":"),ue):void 0}function pe(e,t){if("<"==t)return x(P(">"),re(ue,">"),L,he)}function be(){return S(ue,ge)}function ge(e,t){if("="==t)return x(ue)}function me(e,t){return"enum"==t?(_.marked="keyword",x(qe)):S(ye,oe,_e,Se)}function ye(e,t){return l&&M(t)?(_.marked="keyword",x(ye)):"variable"==e?(E(t),x()):"spread"==e?x(ye):"["==e?ne(we,"]"):"{"==e?ne(ve,"}"):void 0}function ve(e,t){return"variable"!=e||_.stream.match(/^\s*:/,!1)?("variable"==e&&(_.marked="property"),"spread"==e?x(ye):"}"==e?S():"["==e?x(B,N("]"),N(":"),ve):x(N(":"),ye,_e)):(E(t),x(_e))}function we(){return S(ye,_e)}function _e(e,t){if("="==t)return x(F)}function Se(e){if(","==e)return x(me)}function xe(e,t){if("keyword b"==e&&"else"==t)return x(P("form","else"),j,L)}function ke(e,t){return"await"==t?x(ke):"("==e?x(P(")"),Ee,L):void 0}function Ee(e){return"var"==e?x(me,Me):"variable"==e?x(Me):S(Me)}function Me(e,t){return")"==e?x():";"==e?x(Me):"in"==t||"of"==t?(_.marked="keyword",x(B,Me)):S(B,Me)}function Ae(e,t){return"*"==t?(_.marked="keyword",x(Ae)):"variable"==e?(E(t),x(Ae)):"("==e?x(O,P(")"),re(Oe,")"),L,ae,j,D):l&&"<"==t?x(P(">"),re(be,">"),L,Ae):void 0}function Ce(e,t){return"*"==t?(_.marked="keyword",x(Ce)):"variable"==e?(E(t),x(Ce)):"("==e?x(O,P(")"),re(Oe,")"),L,ae,D):l&&"<"==t?x(P(">"),re(be,">"),L,Ce):void 0}function Te(e,t){return"keyword"==e||"variable"==e?(_.marked="type",x(Te)):"<"==t?x(P(">"),re(be,">"),L):void 0}function Oe(e,t){return"@"==t&&x(B,Oe),"spread"==e?x(Oe):l&&M(t)?(_.marked="keyword",x(Oe)):l&&"this"==e?x(oe,_e):S(ye,oe,_e)}function Re(e,t){return"variable"==e?De(e,t):Pe(e,t)}function De(e,t){if("variable"==e)return E(t),x(Pe)}function Pe(e,t){return"<"==t?x(P(">"),re(be,">"),L,Pe):"extends"==t||"implements"==t||l&&","==e?("implements"==t&&(_.marked="keyword"),x(l?ue:B,Pe)):"{"==e?x(P("}"),Le,L):void 0}function Le(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||l&&M(t))&&_.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(_.marked="keyword",x(Le)):"variable"==e||"keyword"==_.style?(_.marked="property",x(l?Ne:Ae,Le)):"number"==e||"string"==e?x(l?Ne:Ae,Le):"["==e?x(B,oe,N("]"),l?Ne:Ae,Le):"*"==t?(_.marked="keyword",x(Le)):l&&"("==e?S(Ce,Le):";"==e||","==e?x(Le):"}"==e?x():"@"==t?x(B,Le):void 0}function Ne(e,t){if("?"==t)return x(Ne);if(":"==e)return x(ue,_e);if("="==t)return x(F);var r=_.state.lexical.prev;return S(r&&"interface"==r.info?Ce:Ae)}function je(e,t){return"*"==t?(_.marked="keyword",x(Ue,N(";"))):"default"==t?(_.marked="keyword",x(B,N(";"))):"{"==e?x(re(Ie,"}"),Ue,N(";")):S(j)}function Ie(e,t){return"as"==t?(_.marked="keyword",x(N("variable"))):"variable"==e?S(F,Ie):void 0}function Be(e){return"string"==e?x():"("==e?S(B):S(Fe,$e,Ue)}function Fe(e,t){return"{"==e?ne(Fe,"}"):("variable"==e&&E(t),"*"==t&&(_.marked="keyword"),x(ze))}function $e(e){if(","==e)return x(Fe,$e)}function ze(e,t){if("as"==t)return _.marked="keyword",x(Fe)}function Ue(e,t){if("from"==t)return _.marked="keyword",x(B)}function We(e){return"]"==e?x():S(re(F,"]"))}function qe(){return S(P("form"),ye,N("{"),P("}"),re(He,"}"),L,L)}function He(){return S(ye,_e)}function Ke(e,t,r){return t.tokenize==p&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return D.lex=!0,L.lex=!0,{startState:function(e){var r={tokenize:p,lastType:"sof",cc:[],lexical:new v((e||0)-i,0,"block",!1),localVars:t.localVars,context:t.localVars&&new A(null,null,!1),indented:e||0};return t.globalVars&&"object"==typeof t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),m(e,t)),t.tokenize!=b&&e.eatSpace())return null;var i=t.tokenize(e,t);return"comment"==r?i:(t.lastType="operator"!=r||"++"!=n&&"--"!=n?r:"incdec",function(e,t,r,n,i){var o=e.cc;for(_.state=e,_.stream=i,_.marked=null,_.cc=o,_.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((o.length?o.pop():a?B:j)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return _.marked?_.marked:"variable"==r&&w(e,n)?"variable-2":t}}}(t,i,r,n,e))},indent:function(e,r){if(e.tokenize==b)return CodeMirror.Pass;if(e.tokenize!=p)return 0;var n,s=r&&r.charAt(0),a=e.lexical;if(!/^\s*else\b/.test(r))for(var l=e.cc.length-1;l>=0;--l){var u=e.cc[l];if(u==L)a=a.prev;else if(u!=xe)break}for(;("stat"==a.type||"form"==a.type)&&("}"==s||(n=e.cc[e.cc.length-1])&&(n==W||n==q)&&!/^[,\.=+\-*:?[\(]/.test(r));)a=a.prev;o&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,d=s==c;return"vardef"==c?a.indented+("operator"==e.lastType||","==e.lastType?a.info.length+1:0):"form"==c&&"{"==s?a.indented:"form"==c?a.indented+i:"stat"==c?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(e,r)?o||i:0):"switch"!=a.info||d||0==t.doubleIndentSwitch?a.align?a.column+(d?0:1):a.indented+(d?0:i):a.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:s,jsonMode:a,expressionAllowed:Ke,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=F||e.cc.pop()}}})),CodeMirror.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/x-javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})},function(e,t){window.CodeMirror.defineMode("turtle",(function(e){var t,r=e.indentUnit;function n(e){return new RegExp("^(?:"+e.join("|")+")$","i")}n([]);var i=n(["@prefix","@base","a"]),o=/[*+\-<>=&|]/;function s(e,r){var n,a=e.next();if(t=null,"<"!=a||e.match(/^[\s\u00a0=]/,!1)){if('"'==a||"'"==a)return r.tokenize=(n=a,function(e,t){for(var r,i=!1;null!=(r=e.next());){if(r==n&&!i){t.tokenize=s;break}i=!i&&"\\"==r}return"string"}),r.tokenize(e,r);if(/[{}\(\),\.;\[\]]/.test(a))return t=a,null;if("#"==a)return e.skipToEnd(),"comment";if(o.test(a))return e.eatWhile(o),null;if(":"==a)return"operator";if(e.eatWhile(/[_\w\d]/),":"==e.peek())return"variable-3";var l=e.current();return i.test(l)?"meta":a>="A"&&a<="Z"?"comment":"keyword"}return e.match(/^[^\s\u00a0>]*>?/),"atom"}function a(e,t,r){e.context={prev:e.context,indent:e.indent,col:r,type:t}}function l(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:s,context:null,indent:0,col:0}},token:function(e,r){if(e.sol()&&(r.context&&null==r.context.align&&(r.context.align=!1),r.indent=e.indentation()),e.eatSpace())return null;var n=r.tokenize(e,r);if("comment"!=n&&r.context&&null==r.context.align&&"pattern"!=r.context.type&&(r.context.align=!0),"("==t)a(r,")",e.column());else if("["==t)a(r,"]",e.column());else if("{"==t)a(r,"}",e.column());else if(/[\]\}\)]/.test(t)){for(;r.context&&"pattern"==r.context.type;)l(r);r.context&&t==r.context.type&&l(r)}else"."==t&&r.context&&"pattern"==r.context.type?l(r):/atom|string|variable/.test(n)&&r.context&&(/[\}\]]/.test(r.context.type)?a(r,"pattern",e.column()):"pattern"!=r.context.type||r.context.align||(r.context.align=!0,r.context.col=e.column()));return n},indent:function(e,t){var n=t&&t.charAt(0),i=e.context;if(/[\]\}]/.test(n))for(;i&&"pattern"==i.type;)i=i.prev;var o=i&&n==i.type;return i?"pattern"==i.type?i.col:i.align?i.col+(o?0:1):i.indent+(o?0:r):0},lineComment:"#"}})),CodeMirror.defineMIME("text/turtle","turtle"),CodeMirror.defineMIME("text/n3","turtle"),CodeMirror.defineMIME("application/trig","turtle")},function(e,t){window.CodeMirror.defineMode("ntriples",(function(){var e=0,t=1,r=2,n=3,i=4,o=5,s=6,a=7,l=8,u=9,c=10,f=11,d=12;function h(h,p){var b,g=h.location;b=g==e&&"<"==p?t:g==e&&"_"==p?r:g==n&&"<"==p?i:g==o&&"<"==p?s:g==o&&"_"==p?a:g==o&&'"'==p?l:g==t&&">"==p||g==r&&" "==p?n:g==i&&">"==p?o:g==s&&">"==p||g==a&&" "==p||g==l&&'"'==p||g==u&&" "==p||g==c&&">"==p?f:g==l&&"@"==p?u:g==l&&"^"==p?c:" "!=p||g!=e&&g!=n&&g!=o&&g!=f?g==f&&"."==p?e:d:g,h.location=b}return{startState:function(){return{location:e,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,t){var r=e.next();if("<"==r){h(t,r);var n="";return e.eatWhile((function(e){return"#"!=e&&">"!=e&&(n+=e,!0)})),t.uris.push(n),e.match("#",!1)?"variable":(e.next(),h(t,">"),"variable")}if("#"==r){var i="";return e.eatWhile((function(e){return">"!=e&&" "!=e&&(i+=e,!0)})),t.anchors.push(i),"variable-2"}if(">"==r)return h(t,">"),"variable";if("_"==r){h(t,r);var o="";return e.eatWhile((function(e){return" "!=e&&(o+=e,!0)})),t.bnodes.push(o),e.next(),h(t," "),"builtin"}if('"'==r)return h(t,r),e.eatWhile((function(e){return'"'!=e})),e.next(),"@"!=e.peek()&&"^"!=e.peek()&&h(t,'"'),"string";if("@"==r){h(t,"@");var s="";return e.eatWhile((function(e){return" "!=e&&(s+=e,!0)})),t.langs.push(s),e.next(),h(t," "),"string-2"}if("^"==r){e.next(),h(t,"^");var a="";return e.eatWhile((function(e){return">"!=e&&(a+=e,!0)})),t.types.push(a),e.next(),h(t,">"),"variable"}" "==r&&h(t,r),"."==r&&h(t,r)}}})),CodeMirror.defineMIME("application/n-triples","ntriples"),CodeMirror.defineMIME("application/n-quads","ntriples"),CodeMirror.defineMIME("text/n-triples","ntriples")},function(e,t){var r={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};window.CodeMirror.defineMode("xml",(function(e,t){var i,o,s=e.indentUnit,a={},l=t.htmlMode?r:n;for(var u in l)a[u]=l[u];for(var u in t)a[u]=t[u];function c(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(d("atom","]]>")):null:e.match("--")?r(d("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(function e(t){return function(r,n){for(var i;null!=(i=r.next());){if("<"==i)return n.tokenize=e(t+1),n.tokenize(r,n);if(">"==i){if(1==t){n.tokenize=c;break}return n.tokenize=e(t-1),n.tokenize(r,n)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var r,n,o=e.next();if(">"==o||"/"==o&&e.eat(">"))return t.tokenize=c,i=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return i="equals",null;if("<"==o){t.tokenize=c,t.state=g,t.tagName=t.tagStart=null;var s=t.tokenize(e,t);return s?s+" tag error":"tag error"}return/[\'\"]/.test(o)?(t.tokenize=(r=o,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=f;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=c;break}r.next()}return e}}function h(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(a.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function p(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!a.contextGrabbers.hasOwnProperty(r)||!a.contextGrabbers[r].hasOwnProperty(t))return;p(e)}}function g(e,t,r){return"openTag"==e?(r.tagStart=t.column(),m):"closeTag"==e?y:g}function m(e,t,r){return"word"==e?(r.tagName=t.current(),o="tag",_):a.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,t,r)):(o="error",m)}function y(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&a.implicitlyClosed.hasOwnProperty(r.context.tagName)&&p(r),r.context&&r.context.tagName==n||!1===a.matchClosing?(o="tag",v):(o="tag error",w)}return a.allowMissingTagName&&"endTag"==e?(o="tag bracket",v(e,t,r)):(o="error",w)}function v(e,t,r){return"endTag"!=e?(o="error",v):(p(r),g)}function w(e,t,r){return o="error",v(e,0,r)}function _(e,t,r){if("word"==e)return o="attribute",S;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||a.autoSelfClosers.hasOwnProperty(n)?b(r,n):(b(r,n),r.context=new h(r,n,i==r.indented)),g}return o="error",_}function S(e,t,r){return"equals"==e?x:(a.allowMissing||(o="error"),_(e,0,r))}function x(e,t,r){return"string"==e?k:"word"==e&&a.allowUnquoted?(o="string",_):(o="error",_(e,0,r))}function k(e,t,r){return"string"==e?k:_(e,0,r)}return c.isInText=!0,{startState:function(e){var t={tokenize:c,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var r=t.tokenize(e,t);return(r||i)&&"comment"!=r&&(o=null,t.state=t.state(i||r,e,t),o&&(r="error"==o?r+" error":o)),r},indent:function(e,t,r){var n=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(n&&n.noIndent)return CodeMirror.Pass;if(e.tokenize!=f&&e.tokenize!=c)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==a.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=_)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)r.tagName&&t.push(r.tagName);return t.reverse()}}})),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0})},function(e,t,r){"use strict";r.r(t);const n=[],i=(e,t)=>{n[e]=t},o=Object.freeze({HOST:"host",KNOB:"knob",SLOT:"slot",PREFIX:"prefix",SUFFIX:"suffix",WRAPPER:"wrapper"}),s=e=>e instanceof HTMLTemplateElement,a=(e,t)=>r=>{const{element:n,target:i}=r.dataset;return n===e&&i===t},l=e=>s(e)?e.content.firstElementChild:null,u=(e,t,r)=>n[e].find(a(t,r)),c=(e,t,r)=>n[e].some(a(t,r));function f(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}Object.create;Object.create;const d=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),p=new Map;class b{constructor(e,t){if(this._$cssResult$=!0,t!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){let e=p.get(this.cssText);return d&&void 0===e&&(p.set(this.cssText,e=new CSSStyleSheet),e.replaceSync(this.cssText)),e}toString(){return this.cssText}}const g=(e,...t)=>{const r=1===e.length?e[0]:t.reduce((t,r,n)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new b(r,h)},m=d?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new b("string"==typeof e?e:e+"",h))(t)})(e):e;var y;const v=window.trustedTypes,w=v?v.emptyScript:"",_=window.reactiveElementPolyfillSupport,S={toAttribute(e,t){switch(t){case Boolean:e=e?w:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},x=(e,t)=>t!==e&&(t==t||e==e),k={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:x};class E extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(e){var t;null!==(t=this.l)&&void 0!==t||(this.l=[]),this.l.push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,r)=>{const n=this._$Eh(r,t);void 0!==n&&(this._$Eu.set(n,r),e.push(n))}),e}static createProperty(e,t=k){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const r="symbol"==typeof e?Symbol():"__"+e,n=this.getPropertyDescriptor(e,r,t);void 0!==n&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){return{get(){return this[t]},set(n){const i=this[e];this[t]=n,this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||k}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of t)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(m(e))}else void 0!==e&&t.push(m(e));return t}static _$Eh(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}o(){var e;this._$Ep=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(e=this.constructor.l)||void 0===e||e.forEach(e=>e(this))}addController(e){var t,r;(null!==(t=this._$Eg)&&void 0!==t?t:this._$Eg=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(r=e.hostConnected)||void 0===r||r.call(e))}removeController(e){var t;null===(t=this._$Eg)||void 0===t||t.splice(this._$Eg.indexOf(e)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Et.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return r=t,n=this.constructor.elementStyles,d?r.adoptedStyleSheets=n.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):n.forEach(e=>{const t=document.createElement("style"),n=window.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=e.cssText,r.appendChild(t)}),t;var r,n}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ES(e,t,r=k){var n,i;const o=this.constructor._$Eh(e,r);if(void 0!==o&&!0===r.reflect){const s=(null!==(i=null===(n=r.converter)||void 0===n?void 0:n.toAttribute)&&void 0!==i?i:S.toAttribute)(t,r.type);this._$Ei=e,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$Ei=null}}_$AK(e,t){var r,n,i;const o=this.constructor,s=o._$Eu.get(e);if(void 0!==s&&this._$Ei!==s){const e=o.getPropertyOptions(s),a=e.converter,l=null!==(i=null!==(n=null===(r=a)||void 0===r?void 0:r.fromAttribute)&&void 0!==n?n:"function"==typeof a?a:null)&&void 0!==i?i:S.fromAttribute;this._$Ei=s,this[s]=l(t,e.type),this._$Ei=null}}requestUpdate(e,t,r){let n=!0;void 0!==e&&(((r=r||this.constructor.getPropertyOptions(e)).hasChanged||x)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Ei!==e&&(void 0===this._$E_&&(this._$E_=new Map),this._$E_.set(e,r))):n=!1),!this.isUpdatePending&&n&&(this._$Ep=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ep}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach((e,t)=>this[t]=e),this._$Et=void 0);let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),null===(e=this._$Eg)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(r)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(r)}willUpdate(e){}_$AE(e){var t;null===(t=this._$Eg)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(e){return!0}update(e){void 0!==this._$E_&&(this._$E_.forEach((e,t)=>this._$ES(t,this[t],e)),this._$E_=void 0),this._$EU()}updated(e){}firstUpdated(e){}}var M;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRootOptions={mode:"open"},null==_||_({ReactiveElement:E}),(null!==(y=globalThis.reactiveElementVersions)&&void 0!==y?y:globalThis.reactiveElementVersions=[]).push("1.0.2");const A=globalThis.trustedTypes,C=A?A.createPolicy("lit-html",{createHTML:e=>e}):void 0,T=`lit$${(Math.random()+"").slice(9)}$`,O="?"+T,R=`<${O}>`,D=document,P=(e="")=>D.createComment(e),L=e=>null===e||"object"!=typeof e&&"function"!=typeof e,N=Array.isArray,j=e=>{var t;return N(e)||"function"==typeof(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,F=/>/g,$=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,z=/'/g,U=/"/g,W=/^(?:script|style|textarea)$/i,q=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),H=q(1),K=(q(2),Symbol.for("lit-noChange")),V=Symbol.for("lit-nothing"),G=new WeakMap,Y=(e,t,r)=>{var n,i;const o=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:t;let s=o._$litPart$;if(void 0===s){const e=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new te(t.insertBefore(P(),e),e,void 0,null!=r?r:{})}return s._$AI(e),s},X=D.createTreeWalker(D,129,null,!1),Z=(e,t)=>{const r=e.length-1,n=[];let i,o=2===t?"":"",s=I;for(let t=0;t"===l[0]?(s=null!=i?i:I,u=-1):void 0===l[1]?u=-2:(u=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?$:'"'===l[3]?U:z):s===U||s===z?s=$:s===B||s===F?s=I:(s=$,i=void 0);const f=s===$&&e[t+1].startsWith("/>")?" ":"";o+=s===I?r+R:u>=0?(n.push(a),r.slice(0,u)+"$lit$"+r.slice(u)+T+f):r+T+(-2===u?(n.push(void 0),t):f)}const a=o+(e[r]||"")+(2===t?"":"");return[void 0!==C?C.createHTML(a):a,n]};class J{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let i=0,o=0;const s=e.length-1,a=this.parts,[l,u]=Z(e,t);if(this.el=J.createElement(l,r),X.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(n=X.nextNode())&&a.length0){n.textContent=A?A.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,n){const i=this.strings;let o=!1;if(void 0===i)e=Q(this,e,t,0),o=!L(e)||e!==this._$AH&&e!==K,o&&(this._$AH=e);else{const n=e;let s,a;for(e=i[0],s=0;s"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?be(be({},t),{},{finisher(r){r.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(r){r.createProperty(t.key,e)}};function ye(e){return(t,r)=>void 0!==r?((e,t,r)=>{t.constructor.createProperty(r,e)})(e,t,r):me(e,t)}const ve=2,we=e=>(...t)=>({_$litDirective$:e,values:t});class _e{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const{H:Se}=le,xe=(e,t)=>{var r,n;return void 0===t?void 0!==(null===(r=e)||void 0===r?void 0:r._$litType$):(null===(n=e)||void 0===n?void 0:n._$litType$)===t},ke=()=>document.createComment(""),Ee=(e,t,r)=>{var n;const i=e._$AA.parentNode,o=void 0===t?e._$AB:t._$AA;if(void 0===r){const t=i.insertBefore(ke(),o),n=i.insertBefore(ke(),o);r=new Se(t,n,e,e.options)}else{const t=r._$AB.nextSibling,s=r._$AM,a=s!==e;if(a){let t;null===(n=r._$AQ)||void 0===n||n.call(r,e),r._$AM=e,void 0!==r._$AP&&(t=e._$AU)!==s._$AU&&r._$AP(t)}if(t!==o||a){let e=r._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,o),e=t}}}return r},Me={},Ae=(e,t=Me)=>e._$AH=t,Ce=e=>e._$AH,Te=we(class extends _e{constructor(e){super(e),this.tt=new WeakMap}render(e){return[e]}update(e,[t]){if(xe(this.it)&&(!xe(t)||this.it.strings!==t.strings)){const t=Ce(e).pop();let r=this.tt.get(this.it.strings);if(void 0===r){const e=document.createDocumentFragment();r=Y(V,e),r.setConnected(!1),this.tt.set(this.it.strings,r)}Ae(r,[t]),Ee(r,void 0,t)}if(xe(t)){if(!xe(this.it)||this.it.strings!==t.strings){const r=this.tt.get(t.strings);if(void 0!==r){const t=Ce(r).pop();e._$AR(),Ee(e,void 0,t),Ae(e,[t])}}this.it=t}else this.it=void 0;return this.render(t)}}),Oe=(e,t)=>{var r,n;const i=e._$AN;if(void 0===i)return!1;for(const e of i)null===(n=(r=e)._$AO)||void 0===n||n.call(r,t,!1),Oe(e,t);return!0},Re=e=>{let t,r;do{if(void 0===(t=e._$AM))break;r=t._$AN,r.delete(e),e=t}while(0===(null==r?void 0:r.size))},De=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),Ne(t)}};function Pe(e){void 0!==this._$AN?(Re(this),this._$AM=e,De(this)):this._$AM=e}function Le(e,t=!1,r=0){const n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(n))for(let e=r;e{var t,r,n,i;e.type==ve&&(null!==(t=(n=e)._$AP)&&void 0!==t||(n._$AP=Le),null!==(r=(i=e)._$AQ)&&void 0!==r||(i._$AQ=Pe))};class je extends _e{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),De(this),this.isConnected=e._$AU}_$AO(e,t=!0){var r,n;e!==this.isConnected&&(this.isConnected=e,e?null===(r=this.reconnected)||void 0===r||r.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),t&&(Oe(this,e),Re(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class Ie{constructor(e){this.U=e}disconnect(){this.U=void 0}reconnect(e){this.U=e}deref(){return this.U}}class Be{constructor(){this.Y=void 0,this.q=void 0}get(){return this.Y}pause(){var e;null!==(e=this.Y)&&void 0!==e||(this.Y=new Promise(e=>this.q=e))}resume(){var e;null===(e=this.q)||void 0===e||e.call(this),this.Y=this.q=void 0}}const Fe=e=>{return!(t=e,null===t||"object"!=typeof t&&"function"!=typeof t||"function"!=typeof e.then);var t};const $e=we(class extends je{constructor(){super(...arguments),this._$Cft=1073741823,this._$Cwt=[],this._$CG=new Ie(this),this._$CK=new Be}render(...e){var t;return null!==(t=e.find(e=>!Fe(e)))&&void 0!==t?t:K}update(e,t){const r=this._$Cwt;let n=r.length;this._$Cwt=t;const i=this._$CG,o=this._$CK;this.isConnected||this.disconnected();for(let e=0;ethis._$Cft);e++){const s=t[e];if(!Fe(s))return this._$Cft=e,s;e{for(;o.get();)await o.get();const t=i.deref();if(void 0!==t){const r=t._$Cwt.indexOf(s);r>-1&&r{var t,r;return(null===(t=e.exports)||void 0===t?void 0:t.some(e=>"custom-element-definition"===e.kind))||(null===(r=e.declarations)||void 0===r?void 0:r.some(e=>e.customElement))})}const Ue=e=>"custom-element-definition"===e.kind,We=e=>!("private"===e.privacy||"protected"===e.privacy);function qe(e,t){var r;const n=(null!==(r=e.modules)&&void 0!==r?r:[]).flatMap(e=>{var t,r;return null!==(t=null===(r=e.exports)||void 0===r?void 0:r.filter(Ue))&&void 0!==t?t:[]});return t?n.filter(e=>t.includes(e.name)):n}function He(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}Object.create;Object.create;const Ke=H` +
No custom elements found in the JSON file.
+`,Ve=e=>{class t extends e{constructor(){super(...arguments),this.jsonFetched=Promise.resolve(null)}willUpdate(){const{src:e}=this;this.manifest?ze(this.manifest)?(this.lastSrc=void 0,this.jsonFetched=Promise.resolve(this.manifest)):console.error("No custom elements found in the `manifest` object."):e&&this.lastSrc!==e&&(this.lastSrc=e,this.jsonFetched=async function(e){try{const t=await fetch(e),r=await t.json();if(ze(r))return r;throw new Error("No element definitions found at "+e)}catch(e){return console.error(e),null}}(e))}}return He([ye()],t.prototype,"src",void 0),He([ye({attribute:!1})],t.prototype,"manifest",void 0),He([ye({reflect:!0,converter:{fromAttribute:e=>e.split(","),toAttribute:e=>e.join(",")}})],t.prototype,"only",void 0),He([ye()],t.prototype,"selected",void 0),t},Ge=e=>"string"==typeof e&&e.startsWith("'")&&e.endsWith("'")?e.slice(1,e.length-1):e;function Ye(e,...t){const r=document.createElement("template");return r.innerHTML=t.reduce((t,r,n)=>t+r+e[n+1],e[0]),r}function Xe(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}Object.create;Object.create;let Ze=0;const Je=Ye` + + +`;class Qe extends HTMLElement{constructor(){super(),this._mousedown=!1,this._selected=!1;this.attachShadow({mode:"open"}).appendChild(Je.content.cloneNode(!0)),this.addEventListener("focus",()=>this._setFocused(!0),!0),this.addEventListener("blur",()=>{this._setFocused(!1),this._setActive(!1)},!0),this.addEventListener("mousedown",()=>{this._setActive(this._mousedown=!0);const e=()=>{this._setActive(this._mousedown=!1),document.removeEventListener("mouseup",e)};document.addEventListener("mouseup",e)})}get selected(){return this._selected}set selected(e){this._selected=e,this.setAttribute("aria-selected",String(e)),this.setAttribute("tabindex",e?"0":"-1"),this.toggleAttribute("selected",e)}connectedCallback(){this.setAttribute("role","tab"),this.id||(this.id="api-viewer-tab-"+Ze++)}_setActive(e){this.toggleAttribute("active",e)}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&!this._mousedown)}}customElements.define("api-viewer-tab",Qe);let et=0;const tt=Ye` + + +`;class rt extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"}).appendChild(tt.content.cloneNode(!0))}connectedCallback(){this.setAttribute("role","tabpanel"),this.id||(this.id="api-viewer-panel-"+et++)}}customElements.define("api-viewer-panel",rt);const nt=Ye` + +
+ +
+ +`;class it extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"});e.appendChild(nt.content.cloneNode(!0));const t=e.querySelectorAll("slot");t[0].addEventListener("slotchange",()=>this._linkPanels()),t[1].addEventListener("slotchange",()=>this._linkPanels()),this.addEventListener("keydown",this.handleEvent),this.addEventListener("click",this.handleEvent)}connectedCallback(){this.setAttribute("role","tablist"),requestAnimationFrame(()=>{this._linkPanels()})}_linkPanels(){const{tabs:e}=this;e.forEach(e=>{const t=e.nextElementSibling;e.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",e.id)});const t=e.find(e=>e.selected)||e[0];this._selectTab(t)}get tabs(){return Array.from(this.querySelectorAll("api-viewer-tab"))}_getAvailableIndex(e,t){const{tabs:r}=this,n=r.length;for(let i=0;"number"==typeof e&&i=n&&(e=0);if(!r[e].hasAttribute("hidden"))return e}return-1}_prevTab(e){const t=this._getAvailableIndex(e.findIndex(e=>e.selected)-1,-1);return e[(t+e.length)%e.length]}_nextTab(e){const t=this._getAvailableIndex(e.findIndex(e=>e.selected)+1,1);return e[t%e.length]}reset(){this.tabs.forEach(e=>{e.selected=!1}),this.querySelectorAll("api-viewer-panel").forEach(e=>{e.hidden=!0})}selectFirst(){const e=this._getAvailableIndex(0,1);this._selectTab(this.tabs[e%this.tabs.length])}_selectTab(e){this.reset();const t=e.getAttribute("aria-controls"),r=this.querySelector("#"+t);r&&(e.selected=!0,r.hidden=!1)}handleEvent(e){const{target:t}=e;if(t&&t instanceof Qe){let r;if("keydown"===e.type){const{tabs:t}=this;switch(e.key){case"ArrowLeft":case"ArrowUp":r=this._prevTab(t);break;case"ArrowDown":case"ArrowRight":r=this._nextTab(t);break;case"Home":r=t[0];break;case"End":r=t[t.length-1];break;default:return}e.preventDefault()}else r=t;this._selectTab(r),r.focus()}}}customElements.define("api-viewer-tabs",it);class ot{constructor(e,t){this._data=[],(this.host=e).addController(this),this.el=t}get data(){return this._data}set data(e){this._data=e,this.updateData(e)}updateData(e){this.host.isConnected&&this.host.requestUpdate()}clear(){this.data=[]}destroy(){this.host.removeController(this)}}class st extends ot{constructor(e,t,r){super(e,t),r.forEach(({name:r})=>{t.addEventListener(r,n=>{const i="-changed";if(r.endsWith(i)){const{knob:n}=e.getKnob(r.replace(i,""));n&&e.syncKnob(t,n)}this.data=[...this.data,n]})})}}const at=e=>(e=>e[0].toUpperCase()+e.slice(1))(""===e?"content":e),lt=(e,t)=>{const{name:r,value:n}=e;return H` + + `},ut=(e,t)=>{const{name:r,knobType:n,value:i,options:o}=e;let s;return s="select"===n&&Array.isArray(o)?H` + + `:"boolean"===n?H` + + `:H` + + `,s},ct=(e,t)=>{const{name:r,content:n}=e;return H` + + `},ft=(e,t,r,n)=>{const i=e.map(e=>{const{name:t}=e,i=`${r}-${t||"default"}`,o="slot"===r?at(t):t;return H` + + + + + ${n(e,i)} + + `});return H` +

${t}

+ + ${i} +
+ `};function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t""===e.name?1:""===t.name?-1:e.name.localeCompare(t.name)).map(e=>ht(ht({},e),{},{content:at(e.name)}))}setValue(e,t){this.data=this.data.map(r=>r.name===e?ht(ht({},r),{},{content:t}):r)}updateData(e){super.updateData(e),this.enabled&&this.el.isConnected&&e&&e.length&&(this.el.innerHTML="",e.forEach(e=>{let t;const{name:r,content:n}=e;r?(t=document.createElement("div"),t.setAttribute("slot",r),t.textContent=n):t=document.createTextNode(n),this.el.appendChild(t)}))}}function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t{let r=t.default?Ge(t.default):e.getPropertyValue(t.name);const n=t;return r&&(r=r.trim(),n.default=r,n.value=r),n})}}setValue(e,t){this.data=this.data.map(r=>r.name===e?mt(mt({},r),{},{value:t}):r)}updateData(e){super.updateData(e),e.length&&e.forEach(e=>{const{name:t,value:r}=e;r&&(r===e.default?this.el.style.removeProperty(t):this.el.style.setProperty(t,r))})}}const wt=e=>H` + ${e.map(e=>H` +

+ event: + ${e.type}.${null==e.detail?V:(e=>{const t=e;return"value"in e&&void 0===e.value&&(t.value="undefined")," detail: "+JSON.stringify(e).replace('"undefined"',"undefined")})(e.detail)} +

+ `)} + `;class _t extends _e{constructor(e){if(super(e),this.it=V,e.type!==ve)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===V||null==e)return this.vt=void 0,this.it=e;if(e===K)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.vt;this.it=e;const t=[e];return t.raw=t,this.vt={_$litType$:this.constructor.resultType,strings:t,values:[]}}}_t.directiveName="unsafeHTML",_t.resultType=1;const St=we(_t);var xt={text:function(e){return e.replace(/&/g,"&").replace(//g,">")},join:function(e){return e.join("")},wrap:function(e,t){return''+t+""}};var kt=function(){return(kt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r`]+/}]}]}]},zt={name:"xml",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},It("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0}]},{className:"tag",begin:"|$)",end:">",keywords:{name:"style"},contains:[$t],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"|$)",end:">",keywords:{name:"script"},contains:[$t],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},$t]}]};function Ut(e,t){var r=e&&e.exec(t);return r&&0===r.index||!1}function Wt(e,t,r,n,i,o){var s=[{content:[]}];function a(e){var t=s[0].content;"string"==typeof e&&t.length&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e)}function l(e){a(t.text(e))}function u(t,r){r||(t=e.classPrefix+t),s.unshift({className:t,content:[]})}function c(t){t=e.classPrefix+t,s.push({className:t,content:[]})}function f(){if(s.length<2)throw"unbalanced";var e=s.shift(),r=e.className,n=e.content,i=t.join(n);a(r?t.wrap(r,i):i)}function d(){null!=m.subLanguage?function(r){var n=1==r.length&&r[0];if(!n||Dt(n)){var i=n?Wt(e,t,n,v,!0,y[n]):qt(e,t,v,r.length?m.subLanguage:void 0);m.relevance>0&&(w+=i.relevance),n&&i.top&&(y[n]=i.top),u(i.language,!0),a(i.value),f()}else l(v)}(m.subLanguage):function(){if(m.keywords){var e=0;m.lexemesRe.lastIndex=0;for(var t=m.lexemesRe.exec(v);t;){l(v.substring(e,t.index));var r=b.case_insensitive?t[0].toLowerCase():t[0],n=m.keywords.hasOwnProperty(r)&&m.keywords[r];n?(w+=n[1],u(n[0],!1),l(t[0]),f()):l(t[0]),e=m.lexemesRe.lastIndex,t=m.lexemesRe.exec(v)}l(v.substr(e))}else l(v)}(),v=""}function h(e){e.className&&u(e.className,!1),m=Object.create(e,{parent:{value:m}})}function p(e,t){if(v+=e,null==t)return d(),0;for(var r,n=0,o=m.contains;n")+'"');return v+=t,t.length||1}var b=Dt(r);if(!b)throw new Error('Unknown language: "'+r+'"');var g,m=o||b,y={};for(g=m;g&&g!==b;g=g.parent)g.className&&c(g.className);var v="",w=0;try{for(var _=void 0,S=void 0,x=0;m.terminators.lastIndex=x,_=m.terminators.exec(n);)S=p(n.substring(x,_.index),_[0]),x=_.index+S;for(p(n.substr(x)),g=m;g.parent;g=g.parent)g.className&&f();if(1!=s.length)throw"unbalanced";var k=s[0],E=k.className,M=k.content,A=t.join(M),C=E?t.wrap(E,A):A;return{language:r,relevance:w,value:C,top:m}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{language:r,relevance:0,value:t.text(n)};throw e}}function qt(e,t,r,n){void 0===n&&(n=e.languages||Object.keys(Tt));var i={language:"",relevance:0,value:t.text(r)};if(""!=r){for(var o=i,s=0,a=n.filter(Dt);so.relevance&&(o=l),l.relevance>i.relevance&&(o=i,i=l)}o.language&&(i.second_best=o)}return i}var Ht={classPrefix:"hljs-",useBr:!1};!function(){for(var e=[],t=0;t((e,t)=>{if(!e)return e;const r=e.replace(/\t/g," ").split("\n"),n=r.reduce((e,t)=>{if(/^\s*$/.test(t))return e;const r=t.match(/^(\s*)/),n=r&&r[0].length;return null===e||nt+e.substr(n)).join("\n")})(e.innerHTML.replace(/\s+$/,"").replace(/(="")/g,""),t),Qt=(e,t,r,n,i)=>{let o="";const a=u(e,t,Gt);s(a)&&(o+=Jt(a,"").trim()+"\n");let c="",f=null;const d=u(e,t,Zt),h=l(d);if(h){c=" ";const e=h.outerHTML.match(/<([a-z]+)[^>]*>/);e&&(f=h.tagName.toLowerCase(),o+=e[0]+"\n ")}o+="<"+t,Object.keys(r).sort((e,t)=>e>t?1:-1).forEach(e=>{const{value:t,knobType:n,attribute:i}=r[e],s=i||e;switch(n){case"boolean":o+=t?" "+s:"";break;case"select":o+=""!==t?` ${s}="${t}"`:"";break;default:o+=null!=t?` ${s}="${t}"`:""}}),o+=">";const p=u(e,t,Yt);s(p)?o+=`${Jt(p,c+" ")}\n${c}`:n.length&&(1!==n.length||n[0].name?(o+=n.reduce((e,t)=>{const{name:r,content:n}=t;return`${e}\n${c} ${r?`
${n}
`:n}`},""),o+="\n"+c):o+=n[0].content),o+=``,f&&(o+=`\n`);const b=u(e,t,Xt);s(b)&&(o+=`\n${Jt(b,"").trim()}\n`);const g=i.filter(e=>e.value!==e.default);g.length&&(o+=`\n");const{value:m}=function(e,t,r){var n=e.render,i=e.options;return"string"==typeof r?Wt(i,n,r,t,!1):qt(i,n,t,r)}(Kt,o,["xml","css"]);return H`
${St(m)}
`};function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t{const{knobType:t,default:r}=e;switch(t){case"boolean":return"false"!==r;case"number":return Number(r);default:return Ge(r)}},ir=(e="")=>e.replace(" | undefined","").replace(" | null",""),or=(e,t,r="")=>{let n=t.filter(({name:t})=>!r.includes(t)&&!((e,t)=>{let r=!1;if(e){const n=function e(r){return r===HTMLElement?void 0:Object.getOwnPropertyDescriptor(r.prototype,t)||e(Object.getPrototypeOf(r))}(e);r=Boolean(n&&n.get&&void 0===n.set)}return r})(customElements.get(e),t));return n=n.map(e=>{var t;const r=tr(tr({},e),{},{knobType:ir(null===(t=e.type)||void 0===t?void 0:t.text)});return"string"==typeof r.default&&(r.value=nr(r)),r}),n},sr=(e,t)=>{return(r=t,i=e,s=o.KNOB,n[r].filter(a(i,s))).map(e=>{const{attr:t,type:r}=e.dataset;let n=null;if(t){if("select"===r){const i=l(e),o=i?Array.from(i.children).filter(e=>e instanceof HTMLOptionElement).map(e=>e.value):[];i instanceof HTMLSelectElement&&o.length>1&&(n={name:t,attribute:t,knobType:r,options:o})}"string"!==r&&"boolean"!==r||(n={name:t,attribute:t,knobType:r})}return n}).filter(Boolean);var r,i,s},ar=we(class extends _e{constructor(e){if(super(e),e.type!==ve)throw Error("templateContent can only be used in child bindings")}render(e){return this.at===e?K:(this.at=e,document.importNode(e.content,!0))}}),{HOST:lr,PREFIX:ur,SLOT:cr,SUFFIX:fr,WRAPPER:dr}=o,hr=e=>"object"==typeof e&&Promise.resolve(e)===e;const pr=we(class extends _e{constructor(e){if(super(e),e.type!==ve)throw new Error("renderer only supports binding to element")}render(e){return V}update(e,[t]){var r;const n=null===(r=e.options)||void 0===r?void 0:r.host,{tag:i}=t,o=[],[a,c,f,d,h]=[lr,ur,fr,cr,dr].map(e=>u(t.id,i,e)),p=l(h),b=p?p.localName:"";let g=n.querySelector(i);if(g){const e=n.querySelector('[part="demo-output"]'),r=g.parentElement;if(r&&r===e||r.localName===b)return((e,t)=>{const{knobs:r}=t;Object.keys(r).forEach(t=>{const{attribute:n,value:i,custom:o}=r[t];o&&n?"string"==typeof i&&i?e.setAttribute(n,i):e.removeAttribute(n):e[t]=i})})(g,t),K}const m=``,y=l(a);s(c)&&o.push(ar(c));let v=y?y.outerHTML:`<${i}>${m}`;if(s(d)&&(v=v.replace(m,`${d.innerHTML}${m}`)),b){const e=St(`\n <${b}>\n ${v}\n \n `);o.push(e)}else o.push(St(v));return s(f)&&o.push(ar(f)),Promise.resolve().then(()=>{g=n.querySelector(i),async function(e){let t=!1;const r=e,n=r.updateComplete;hr(n)&&(await n,t=!0);const i=!!r.componentOnReady&&r.componentOnReady();return hr(i)&&(await i,t=!0),t||await new Promise(requestAnimationFrame),r}(g).then(()=>{g.dispatchEvent(new CustomEvent("rendered",{detail:{component:g},bubbles:!0,composed:!0}))})}),H`${o}`}});function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t{this.tag===n&&this.requestUpdate()}),H` +
+ Element ${n} is not defined. Have you imported it? +
+ `;const[i,s,a,l,u]=[this.cssProps,this.events,this.slots,this.customKnobs,this.propKnobs].map(e=>0===e.length),f=this.vid,d=(null===(e=this.eventsController)||void 0===e?void 0:e.data)||[],h=(null===(t=this.slotsController)||void 0===t?void 0:t.data)||[],p=(null===(r=this.stylesController)||void 0===r?void 0:r.data)||[],b=a||c(f,n,o.SLOT),g=u&&l;return H` +
+ ${pr({id:f,tag:n,knobs:this.knobs})} +
+ + Source + + +
+ ${Qt(f,n,this.knobs,h,p)} +
+
+ + Knobs + + +
+
+ ${ft(this.propKnobs,"Properties","prop",ut)} + ${ft(this.customKnobs,"Attributes","attr",ut)} +
+
+ ${ft(h,"Slots","slot",ct)} +
+
+
+ + Styles + + +
+
+ ${ft(p,"Custom CSS Properties","css-prop",lt)} +
+
+
+ + Events + + +
+ + ${Te(d.length?wt(d):H` +

+ Interact with component to see the event log. +

+ `)} +
+
+
+ `}willUpdate(e){e.has("tag")&&(this.knobs={},this.propKnobs=or(this.tag,this.props,this.exclude),this.customKnobs=sr(this.tag,this.vid))}updated(e){if(e.has("tag")&&e.get("tag")){const e=this.renderRoot.querySelector("api-viewer-tabs");e&&e.selectFirst()}}_onLogClear(){this.eventsController.clear();const e=this.querySelector("#events");e&&e.focus()}_onCopyClick(){const e=this.renderRoot.querySelector('[part="demo-snippet"] code');if(e){const t=document.createRange();t.selectNodeContents(e);const r=window.getSelection();r.removeAllRanges(),r.addRange(t);try{document.execCommand("copy"),this.copyBtnText="done"}catch(e){console.error(e),this.copyBtnText="error"}setTimeout(()=>{this.copyBtnText="copy"},1e3),r.removeAllRanges()}}onRendered(e){const{component:t}=e.detail;this.initKnobs(t),this.initEvents(t),this.initSlots(t),this.initStyles(t)}initEvents(e){const t=this.eventsController;t&&t.destroy(),this.eventsController=new st(this,e,this.events)}initKnobs(e){if(c(this.vid,this.tag,o.HOST)){((e,t)=>e.filter(e=>{const{name:r,knobType:n}=e,i=nr(e);return t[r]!==i||"boolean"===n&&i}))(this.propKnobs,e).forEach(t=>{this.syncKnob(e,t)})}}initSlots(e){const t=this.slotsController;t&&t.destroy(),this.slotsController=new bt(this,e,this.vid,this.slots)}initStyles(e){const t=this.stylesController;t&&t.destroy(),this.stylesController=new vt(this,e,this.cssProps)}getKnob(e){const t=t=>t.name===e||t.attribute===e;let r=this.propKnobs.find(t),n=!1;return r||(r=this.customKnobs.find(t),n=!0),{knob:r,custom:n}}setKnobs(e,t,r,n,i=!1){this.knobs=gr(gr({},this.knobs),{},{[e]:{knobType:t,value:r,attribute:n,custom:i}})}syncKnob(e,t){const{name:r,knobType:n,attribute:i}=t,o=e[r];this.setKnobs(r,n,o,i),this.propKnobs=this.propKnobs.map(e=>e.name===r?gr(gr({},e),{},{value:o}):e)}_onCssChanged(e){const t=e.composedPath()[0];this.stylesController.setValue(t.dataset.name,t.value)}_onPropChanged(e){const t=e.composedPath()[0],{name:r,type:n}=t.dataset;let i;switch(n){case"boolean":i=t.checked;break;case"number":i=""===t.value?null:Number(t.value);break;default:i=t.value}const{knob:o,custom:s}=this.getKnob(r);o&&this.setKnobs(r,n,i,o.attribute,s)}_onSlotChanged(e){const t=e.composedPath()[0];this.slotsController.setValue(t.dataset.slot,t.value)}}Xe([ye()],yr.prototype,"copyBtnText",void 0),Xe([ye({attribute:!1})],yr.prototype,"cssProps",void 0),Xe([ye({attribute:!1})],yr.prototype,"events",void 0),Xe([ye({attribute:!1})],yr.prototype,"slots",void 0),Xe([ye()],yr.prototype,"tag",void 0),Xe([ye({attribute:!1})],yr.prototype,"props",void 0),Xe([ye()],yr.prototype,"exclude",void 0),Xe([ye({type:Number})],yr.prototype,"vid",void 0),Xe([ye({attribute:!1})],yr.prototype,"customKnobs",void 0),Xe([ye({attribute:!1})],yr.prototype,"knobs",void 0),Xe([ye({attribute:!1})],yr.prototype,"propKnobs",void 0),customElements.define("api-demo-layout",yr);function vr(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}Object.create;Object.create;function wr(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let _r={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Sr=/[&<>"']/,xr=/[&<>"']/g,kr=/[<>"']|&(?!#?\w+;)/,Er=/[<>"']|&(?!#?\w+;)/g,Mr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar=e=>Mr[e];function Cr(e,t){if(t){if(Sr.test(e))return e.replace(xr,Ar)}else if(kr.test(e))return e.replace(Er,Ar);return e}const Tr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Or(e){return e.replace(Tr,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const Rr=/(^|[^\[])\^/g;function Dr(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,n)=>(n=(n=n.source||n).replace(Rr,"$1"),e=e.replace(t,n),r),getRegex:()=>new RegExp(e,t)};return r}const Pr=/[^\w:]/g,Lr=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Nr(e,t,r){if(e){let e;try{e=decodeURIComponent(Or(r)).replace(Pr,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!Lr.test(r)&&(r=function(e,t){jr[" "+e]||(Ir.test(e)?jr[" "+e]=e+"/":jr[" "+e]=Wr(e,"/",!0));const r=-1===(e=jr[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(Br,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(Fr,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}const jr={},Ir=/^[^:]+:\/*[^/]*$/,Br=/^([^:]+:)[\s\S]*$/,Fr=/^([^:]+:\/*[^/]*)[\s\S]*$/;const $r={exec:function(){}};function zr(e){let t,r,n=1;for(;n{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function Kr(e,t,r,n){const i=t.href,o=t.title?Cr(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:r,href:i,title:o,text:s,tokens:n.inlineTokens(s,[])};return n.state.inLink=!1,e}return{type:"image",raw:r,href:i,title:o,text:Cr(s)}}class Vr{constructor(e){this.options=e||_r}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Wr(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const n=r[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Wr(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const r={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,n,i,o,s,a,l,u,c,f,d,h,p=t[1].trim();const b=p.length>1,g={type:"list",raw:"",ordered:b,start:b?+p.slice(0,-1):"",loose:!1,items:[]};p=b?"\\d{1,9}\\"+p.slice(-1):"\\"+p,this.options.pedantic&&(p=b?p:"[*+-]");const m=new RegExp(`^( {0,3}${p})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=m.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),u=t[2].split("\n",1)[0],c=e.split("\n",1)[0],this.options.pedantic?(o=2,d=u.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,d=u.slice(o),o+=t[1].length),a=!1,!u&&/^ *$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(f=e.split("\n",1)[0],u=f,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!i.test(u))&&!s.test(u)&&!t.test(u)&&!n.test(e);){if(u.search(/[^ ]/)>=o||!u.trim())d+="\n"+u.slice(o);else{if(a)break;d+="\n"+u}a||u.trim()||(a=!0),r+=f+"\n",e=e.substring(f.length+1)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(d),n&&(i="[ ] "!==n[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!n,checked:i,loose:!1,text:d}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(s=0;s"space"===e.type),t=e.every(e=>{const t=e.raw.split("");let r=0;for(const e of t)if("\n"===e&&(r+=1),r>1)return!0;return!1});!g.loose&&e.length&&t&&(g.loose=!0,g.items[s].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):Cr(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Ur(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let r,n,i,o,s=e.align.length;for(r=0;r({text:e}));for(s=e.header.length,n=0;n/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Cr(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Wr(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let n=0,i=0;for(;i-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(e)?r.slice(1):r.slice(1,-1)),Kr(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:n?n.replace(this.rules.inline._escapes,"$1"):n},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return Kr(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n)return;if(n[3]&&r.match(/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AC0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{13000}-\u{1342E}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1B000}-\u{1B11E}\u{1B150}-\u{1B152}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DD}\u{2A700}-\u{2B734}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}]/u))return;const i=n[1]||n[2]||"";if(!i||i&&(""===r||this.rules.inline.punctuation.exec(r))){const r=n[0].length-1;let i,o,s=r,a=0;const l="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(n=l.exec(t));){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(o=i.length,n[3]||n[4]){s+=o;continue}if((n[5]||n[6])&&r%3&&!((r+o)%3)){a+=o;continue}if(s-=o,s>0)continue;if(o=Math.min(o,o+s+a),Math.min(r,o)%2){const t=e.slice(1,r+n.index+o);return{type:"em",raw:e.slice(0,r+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,r+n.index+o-1);return{type:"strong",raw:e.slice(0,r+n.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return r&&n&&(e=e.substring(1,e.length-1)),e=Cr(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let e,n;return"@"===r[2]?(e=Cr(this.options.mangle?t(r[1]):r[1]),n="mailto:"+e):(e=Cr(r[1]),n=e),{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=Cr(this.options.mangle?t(r[0]):r[0]),n="mailto:"+e;else{let t;do{t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(t!==r[0]);e=Cr(r[0]),n="www."===r[1]?"http://"+e:e}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Cr(r[0]):r[0]:Cr(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}const Gr={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:$r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Gr.def=Dr(Gr.def).replace("label",Gr._label).replace("title",Gr._title).getRegex(),Gr.bullet=/(?:[*+-]|\d{1,9}[.)])/,Gr.listItemStart=Dr(/^( *)(bull) */).replace("bull",Gr.bullet).getRegex(),Gr.list=Dr(Gr.list).replace(/bull/g,Gr.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Gr.def.source+")").getRegex(),Gr._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gr._comment=/|$)/,Gr.html=Dr(Gr.html,"i").replace("comment",Gr._comment).replace("tag",Gr._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gr.paragraph=Dr(Gr._paragraph).replace("hr",Gr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gr._tag).getRegex(),Gr.blockquote=Dr(Gr.blockquote).replace("paragraph",Gr.paragraph).getRegex(),Gr.normal=zr({},Gr),Gr.gfm=zr({},Gr.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Gr.gfm.table=Dr(Gr.gfm.table).replace("hr",Gr.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gr._tag).getRegex(),Gr.gfm.paragraph=Dr(Gr._paragraph).replace("hr",Gr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Gr.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Gr._tag).getRegex(),Gr.pedantic=zr({},Gr.normal,{html:Dr("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Gr._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$r,paragraph:Dr(Gr.normal._paragraph).replace("hr",Gr.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Gr.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Yr={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:$r,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:$r,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}Yr._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Yr.punctuation=Dr(Yr.punctuation).replace(/punctuation/g,Yr._punctuation).getRegex(),Yr.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Yr.escapedEmSt=/\\\*|\\_/g,Yr._comment=Dr(Gr._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Yr.emStrong.lDelim=Dr(Yr.emStrong.lDelim).replace(/punct/g,Yr._punctuation).getRegex(),Yr.emStrong.rDelimAst=Dr(Yr.emStrong.rDelimAst,"g").replace(/punct/g,Yr._punctuation).getRegex(),Yr.emStrong.rDelimUnd=Dr(Yr.emStrong.rDelimUnd,"g").replace(/punct/g,Yr._punctuation).getRegex(),Yr._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Yr._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Yr._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Yr.autolink=Dr(Yr.autolink).replace("scheme",Yr._scheme).replace("email",Yr._email).getRegex(),Yr._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Yr.tag=Dr(Yr.tag).replace("comment",Yr._comment).replace("attribute",Yr._attribute).getRegex(),Yr._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Yr._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Yr._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Yr.link=Dr(Yr.link).replace("label",Yr._label).replace("href",Yr._href).replace("title",Yr._title).getRegex(),Yr.reflink=Dr(Yr.reflink).replace("label",Yr._label).replace("ref",Gr._label).getRegex(),Yr.nolink=Dr(Yr.nolink).replace("ref",Gr._label).getRegex(),Yr.reflinkSearch=Dr(Yr.reflinkSearch,"g").replace("reflink",Yr.reflink).replace("nolink",Yr.nolink).getRegex(),Yr.normal=zr({},Yr),Yr.pedantic=zr({},Yr.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Dr(/^!?\[(label)\]\((.*?)\)/).replace("label",Yr._label).getRegex(),reflink:Dr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yr._label).getRegex()}),Yr.gfm=zr({},Yr.normal,{escape:Dr(Yr.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(r.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),n=t[t.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startBlock.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let r,n,i,o,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+Hr("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+Hr("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),n=t[t.length-1],n&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,a))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,Zr))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,Zr))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let n;this.options.extensions.startInline.forEach((function(e){n=e.call({lexer:this},r),"number"==typeof n&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i,Xr))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),s=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Qr{constructor(e){this.options=e||_r}code(e,t,r){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,n);null!=t&&t!==e&&(r=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",n?'
'+(r?e:Cr(e,!0))+"
\n":"
"+(r?e:Cr(e,!0))+"
\n"}blockquote(e){return`
\n${e}
\n`}html(e){return e}heading(e,t,r,n){if(this.options.headerIds){return`${e}\n`}return`${e}\n`}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,r){const n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • \n`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,r){if(null===(e=Nr(this.options.sanitize,this.options.baseUrl,e)))return r;let n='",n}image(e,t,r){if(null===(e=Nr(this.options.sanitize,this.options.baseUrl,e)))return r;let n=`${r}":">",n}text(e){return e}}class en{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class tn{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{n++,r=e+"-"+n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class rn{constructor(e){this.options=e||_r,this.options.renderer=this.options.renderer||new Qr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new en,this.slugger=new tn}static parse(e,t){return new rn(t).parse(e)}static parseInline(e,t){return new rn(t).parseInline(e)}parse(e,t=!0){let r,n,i,o,s,a,l,u,c,f,d,h,p,b,g,m,y,v,w,_="";const S=e.length;for(r=0;r0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=v+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=v+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:v}):b+=v),b+=this.parse(g.tokens,p),c+=this.renderer.listitem(b,y,m);_+=this.renderer.list(c,d,h);continue;case"html":_+=this.renderer.html(f.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;r+1{n(e.text,e.lang,(function(t,r){if(t)return o(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),s--,0===s&&o()}))},0))})),void(0===s&&o())}try{const r=Jr.lex(e,t);return t.walkTokens&&nn.walkTokens(r,t.walkTokens),rn.parse(r,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Cr(e.message+"",!0)+"
    ";throw e}}nn.options=nn.setOptions=function(e){var t;return zr(nn.defaults,e),t=nn.defaults,_r=t,nn},nn.getDefaults=wr,nn.defaults=_r,nn.use=function(...e){const t=zr({},...e),r=nn.defaults.extensions||{renderers:{},childTokens:{}};let n;e.forEach(e=>{if(e.extensions&&(n=!0,e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=r.renderers?r.renderers[e.name]:null;r.renderers[e.name]=t?function(...r){let n=e.renderer.apply(this,r);return!1===n&&(n=t.apply(this,r)),n}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");r[e.level]?r[e.level].unshift(e.tokenizer):r[e.level]=[e.tokenizer],e.start&&("block"===e.level?r.startBlock?r.startBlock.push(e.start):r.startBlock=[e.start]:"inline"===e.level&&(r.startInline?r.startInline.push(e.start):r.startInline=[e.start]))}e.childTokens&&(r.childTokens[e.name]=e.childTokens)})),e.renderer){const r=nn.defaults.renderer||new Qr;for(const t in e.renderer){const n=r[t];r[t]=(...i)=>{let o=e.renderer[t].apply(r,i);return!1===o&&(o=n.apply(r,i)),o}}t.renderer=r}if(e.tokenizer){const r=nn.defaults.tokenizer||new Vr;for(const t in e.tokenizer){const n=r[t];r[t]=(...i)=>{let o=e.tokenizer[t].apply(r,i);return!1===o&&(o=n.apply(r,i)),o}}t.tokenizer=r}if(e.walkTokens){const r=nn.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),r&&r.call(this,t)}}n&&(t.extensions=r),nn.setOptions(t)})},nn.walkTokens=function(e,t){for(const r of e)switch(t.call(nn,r),r.type){case"table":for(const e of r.header)nn.walkTokens(e.tokens,t);for(const e of r.rows)for(const r of e)nn.walkTokens(r.tokens,t);break;case"list":nn.walkTokens(r.items,t);break;default:nn.defaults.extensions&&nn.defaults.extensions.childTokens&&nn.defaults.extensions.childTokens[r.type]?nn.defaults.extensions.childTokens[r.type].forEach((function(e){nn.walkTokens(r[e],t)})):r.tokens&&nn.walkTokens(r.tokens,t)}},nn.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");qr(t=zr({},nn.defaults,t||{}));try{const r=Jr.lexInline(e,t);return t.walkTokens&&nn.walkTokens(r,t.walkTokens),rn.parseInline(r,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Cr(e.message+"",!0)+"
    ";throw e}},nn.Parser=rn,nn.parser=rn.parse,nn.Renderer=Qr,nn.TextRenderer=en,nn.Lexer=Jr,nn.lexer=Jr.lex,nn.Tokenizer=Vr,nn.Slugger=tn,nn.parse=nn;nn.options,nn.setOptions,nn.use,nn.walkTokens,nn.parseInline,rn.parse,Jr.lex;var on=Object.hasOwnProperty,sn=Object.setPrototypeOf,an=Object.isFrozen,ln=Object.getPrototypeOf,un=Object.getOwnPropertyDescriptor,cn=Object.freeze,fn=Object.seal,dn=Object.create,hn="undefined"!=typeof Reflect&&Reflect,pn=hn.apply,bn=hn.construct;pn||(pn=function(e,t,r){return e.apply(t,r)}),cn||(cn=function(e){return e}),fn||(fn=function(e){return e}),bn||(bn=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1?r-1:0),i=1;i/gm),qn=fn(/^data-[\-\w.\u00B7-\uFFFF]/),Hn=fn(/^aria-[\-\w]+$/),Kn=fn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vn=fn(/^(?:\w+script|data):/i),Gn=fn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Xn(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:Zn(),r=function(t){return e(t)};if(r.version="2.3.3",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;var n=t.document,i=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,u=t.NodeFilter,c=t.NamedNodeMap,f=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,d=t.Text,h=t.Comment,p=t.DOMParser,b=t.trustedTypes,g=l.prototype,m=On(g,"cloneNode"),y=On(g,"nextSibling"),v=On(g,"childNodes"),w=On(g,"parentNode");if("function"==typeof s){var _=i.createElement("template");_.content&&_.content.ownerDocument&&(i=_.content.ownerDocument)}var S=Jn(b,n),x=S&&te?S.createHTML(""):"",k=i,E=k.implementation,M=k.createNodeIterator,A=k.createDocumentFragment,C=k.getElementsByTagName,T=n.importNode,O={};try{O=Tn(i).documentMode?i.documentMode:{}}catch(e){}var R={};r.isSupported="function"==typeof w&&E&&void 0!==E.createHTMLDocument&&9!==O;var D=Un,P=Wn,L=qn,N=Hn,j=Vn,I=Gn,B=Kn,F=null,$=Cn({},[].concat(Xn(Rn),Xn(Dn),Xn(Pn),Xn(Nn),Xn(In))),z=null,U=Cn({},[].concat(Xn(Bn),Xn(Fn),Xn($n),Xn(zn))),W=null,q=null,H=!0,K=!0,V=!1,G=!1,Y=!1,X=!1,Z=!1,J=!1,Q=!1,ee=!0,te=!1,re=!0,ne=!0,ie=!1,oe={},se=null,ae=Cn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),le=null,ue=Cn({},["audio","video","img","source","image","track"]),ce=null,fe=Cn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",be=pe,ge=!1,me=void 0,ye=["application/xhtml+xml","text/html"],ve="text/html",we=void 0,_e=null,Se=i.createElement("form"),xe=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":Yn(e))||(e={}),e=Tn(e),F="ALLOWED_TAGS"in e?Cn({},e.ALLOWED_TAGS):$,z="ALLOWED_ATTR"in e?Cn({},e.ALLOWED_ATTR):U,ce="ADD_URI_SAFE_ATTR"in e?Cn(Tn(fe),e.ADD_URI_SAFE_ATTR):fe,le="ADD_DATA_URI_TAGS"in e?Cn(Tn(ue),e.ADD_DATA_URI_TAGS):ue,se="FORBID_CONTENTS"in e?Cn({},e.FORBID_CONTENTS):ae,W="FORBID_TAGS"in e?Cn({},e.FORBID_TAGS):{},q="FORBID_ATTR"in e?Cn({},e.FORBID_ATTR):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,H=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,G=e.SAFE_FOR_TEMPLATES||!1,Y=e.WHOLE_DOCUMENT||!1,J=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,Z=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,be=e.NAMESPACE||pe,me=me=-1===ye.indexOf(e.PARSER_MEDIA_TYPE)?ve:e.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===me?function(e){return e}:wn,G&&(K=!1),Q&&(J=!0),oe&&(F=Cn({},[].concat(Xn(In))),z=[],!0===oe.html&&(Cn(F,Rn),Cn(z,Bn)),!0===oe.svg&&(Cn(F,Dn),Cn(z,Fn),Cn(z,zn)),!0===oe.svgFilters&&(Cn(F,Pn),Cn(z,Fn),Cn(z,zn)),!0===oe.mathMl&&(Cn(F,Nn),Cn(z,$n),Cn(z,zn))),e.ADD_TAGS&&(F===$&&(F=Tn(F)),Cn(F,e.ADD_TAGS)),e.ADD_ATTR&&(z===U&&(z=Tn(z)),Cn(z,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Cn(ce,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(se===ae&&(se=Tn(se)),Cn(se,e.FORBID_CONTENTS)),ne&&(F["#text"]=!0),Y&&Cn(F,["html","head","body"]),F.table&&(Cn(F,["tbody"]),delete W.tbody),cn&&cn(e),_e=e)},ke=Cn({},["mi","mo","mn","ms","mtext"]),Ee=Cn({},["foreignobject","desc","title","annotation-xml"]),Me=Cn({},Dn);Cn(Me,Pn),Cn(Me,Ln);var Ae=Cn({},Nn);Cn(Ae,jn);var Ce=function(e){var t=w(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var r=wn(e.tagName),n=wn(t.tagName);if(e.namespaceURI===he)return t.namespaceURI===pe?"svg"===r:t.namespaceURI===de?"svg"===r&&("annotation-xml"===n||ke[n]):Boolean(Me[r]);if(e.namespaceURI===de)return t.namespaceURI===pe?"math"===r:t.namespaceURI===he?"math"===r&&Ee[n]:Boolean(Ae[r]);if(e.namespaceURI===pe){if(t.namespaceURI===he&&!Ee[n])return!1;if(t.namespaceURI===de&&!ke[n])return!1;var i=Cn({},["title","style","font","a","script"]);return!Ae[r]&&(i[r]||!Me[r])}return!1},Te=function(e){vn(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=x}catch(t){e.remove()}}},Oe=function(e,t){try{vn(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){vn(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(J||Q)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){var t=void 0,r=void 0;if(Z)e=""+e;else{var n=_n(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===me&&(e=''+e+"");var o=S?S.createHTML(e):e;if(be===pe)try{t=(new p).parseFromString(o,me)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(be,"template",null);try{t.documentElement.innerHTML=ge?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&r&&s.insertBefore(i.createTextNode(r),s.childNodes[0]||null),be===pe?C.call(t,Y?"html":"body")[0]:Y?t.documentElement:s},De=function(e){return M.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},Pe=function(e){return!(e instanceof d||e instanceof h)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},Le=function(e){return"object"===(void 0===a?"undefined":Yn(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":Yn(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ne=function(e,t,n){R[e]&&mn(R[e],(function(e){e.call(r,t,n,_e)}))},je=function(e){var t=void 0;if(Ne("beforeSanitizeElements",e,null),Pe(e))return Te(e),!0;if(_n(e.nodeName,/[\u0080-\uFFFF]/))return Te(e),!0;var n=we(e.nodeName);if(Ne("uponSanitizeElement",e,{tagName:n,allowedTags:F}),!Le(e.firstElementChild)&&(!Le(e.content)||!Le(e.content.firstElementChild))&&En(/<[/\w]/g,e.innerHTML)&&En(/<[/\w]/g,e.textContent))return Te(e),!0;if("select"===n&&En(/