compost-jekyll-theme 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/_data/layouts/about.yml +26 -10
  3. data/_includes/footer.html +24 -0
  4. data/_includes/header_toggler.html +1 -1
  5. data/_layouts/default_with_menu.html +1 -1
  6. data/assets/css/styles.scss +2 -1
  7. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4gaVI.woff2 +0 -0
  8. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4iaVIGxA.woff2 +0 -0
  9. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4jaVIGxA.woff2 +0 -0
  10. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4kaVIGxA.woff2 +0 -0
  11. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4saVIGxA.woff2 +0 -0
  12. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4taVIGxA.woff2 +0 -0
  13. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4uaVIGxA.woff2 +0 -0
  14. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4vaVIGxA.woff2 +0 -0
  15. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVI.woff2 +0 -0
  16. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4iaVIGxA.woff2 +0 -0
  17. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4jaVIGxA.woff2 +0 -0
  18. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4kaVIGxA.woff2 +0 -0
  19. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4saVIGxA.woff2 +0 -0
  20. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4taVIGxA.woff2 +0 -0
  21. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4uaVIGxA.woff2 +0 -0
  22. data/assets/fonts/opensans/v34/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4vaVIGxA.woff2 +0 -0
  23. data/assets/fonts/robotomono/v22/L0xoDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAOW9-subset.woff2 +0 -0
  24. data/assets/fonts/robotomono/v22/L0xoDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrlnAOW9.ttf +0 -0
  25. data/assets/fonts/robotomono/v22/L0xoDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrmAB-W9-subset.woff2 +0 -0
  26. data/assets/fonts/robotomono/v22/L0xoDF4xlVMF-BfR8bXMIjhOsXG-q2oeuFoqFrmAB-W9.ttf +0 -0
  27. data/assets/fonts/robotomono/v22/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vqPQw-subset.woff2 +0 -0
  28. data/assets/fonts/robotomono/v22/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vqPQw.ttf +0 -0
  29. data/assets/fonts/robotomono/v22/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2PQw-subset.woff2 +0 -0
  30. data/assets/fonts/robotomono/v22/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2PQw.ttf +0 -0
  31. data/assets/fonts/worksans/v18/QGY9z_wNahGAdqQ43Rh_ebrnlwyYfEPxPoGUgGsJow-subset.woff2 +0 -0
  32. data/assets/fonts/worksans/v18/QGY9z_wNahGAdqQ43Rh_ebrnlwyYfEPxPoGUgGsJow.ttf +0 -0
  33. data/assets/js/pack.K7EEKFVP.js +40 -3
  34. data/assets/js/pack.K7EEKFVP.js.map +7 -3
  35. metadata +2 -2
@@ -1,3 +1,7 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1b8d7ada030417afec7a0fb43e864fa2a2fbb8701370e90e151ff7d0cce99f7c
3
- size 601284
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/trim.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/version.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/variable-replacement.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/memory-cache.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/user-agent.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/browser.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/mobile-apps.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/feed-readers.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/libraries.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/media-players.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/personal-information-managers.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/client/index.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/cameras.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/model.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/mobiles.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/televisions.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/cars.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/consoles.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/notebooks.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/portable-media-players.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/device/index.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/operating-system/index.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/vendor-fragment/index.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/parsers/bot/index.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/utils/version-compare.js", "../../node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/index.js", "../../node_modules/.pnpm/stackframe@1.3.4/node_modules/stackframe/stackframe.js", "../../node_modules/.pnpm/error-stack-parser@2.1.4/node_modules/error-stack-parser/error-stack-parser.js", "../../node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js", "../../node_modules/.pnpm/bintrees@1.0.2/node_modules/bintrees/lib/treebase.js", "../../node_modules/.pnpm/bintrees@1.0.2/node_modules/bintrees/lib/rbtree.js", "../../node_modules/.pnpm/bintrees@1.0.2/node_modules/bintrees/lib/bintree.js", "../../node_modules/.pnpm/bintrees@1.0.2/node_modules/bintrees/index.js", "../../node_modules/.pnpm/tdigest@0.1.2/node_modules/tdigest/tdigest.js", "../../_packs/entry.js", "../../node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/finally.js", "../../node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/allSettled.js", "../../node_modules/.pnpm/promise-polyfill@8.2.3/node_modules/promise-polyfill/src/index.js", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/jsonify_notice.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/metrics.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/scope.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/processor/esp.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/filter/angular_message.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/filter/debounce.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/filter/ignore_noise.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/filter/uncaught_message.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/http_req/fetch.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/http_req/api.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/http_req/node.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/http_req/index.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/tdshared.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/queries.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/queues.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/routes.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/version.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/base_notifier.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/filter/window.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/instrumentation/console.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/instrumentation/dom.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/instrumentation/fetch.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/instrumentation/location.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/instrumentation/xhr.ts", "../../node_modules/.pnpm/@airbrake+browser@1.4.2/node_modules/@airbrake/browser/src/notifier.ts", "../../node_modules/.pnpm/@hotwired+turbo@7.2.4/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../node_modules/.pnpm/@hotwired+stimulus@3.2.1/node_modules/@hotwired/stimulus/dist/stimulus.js", "../../_packs/controllers/body_scroll_controller.js", "../../_packs/controllers/device_detector_controller.js", "../../_packs/controllers/button_copy_controller.js", "../../_packs/controllers/footnotes_controller.js", "../../_packs/controllers/support_us_controller.js"],
4
+ "sourcesContent": ["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trim = (str, char) => {\n return str.replace(new RegExp(\"^[\" + char + \"]+|[\" + char + \"]+$\", \"g\"), \"\");\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst trim_1 = require(\"./trim\");\nexports.formatVersion = (version, versionTruncation) => {\n if (version === undefined)\n return \"\";\n const versionString = trim_1.trim(version, \". \").replace(new RegExp(\"_\", \"g\"), \".\");\n const versionParts = versionString.split(\".\");\n // Return if the string is not only digits once we removed the dots\n if (!/^\\d+$/.test(versionParts.join(\"\"))) {\n return versionString;\n }\n if (versionTruncation !== 0) {\n if (Number.isInteger(parseFloat(versionString))) {\n return parseInt(versionString, 10).toFixed(1);\n }\n }\n if (versionParts.length > 1) {\n if (versionTruncation !== null) {\n return versionParts.slice(0, versionTruncation + 1).join(\".\");\n }\n }\n return versionString;\n};\nexports.parseBrowserEngineVersion = (userAgent, engine) => {\n if (!engine)\n return \"\";\n if (engine === \"Gecko\") {\n const geckoVersionRegex = /[ ](?:rv[: ]([0-9\\.]+)).*gecko\\/[0-9]{8,10}/i;\n const match = userAgent.match(geckoVersionRegex);\n if (match) {\n return match.pop();\n }\n }\n const regex = new RegExp(`${engine}\\\\s*\\\\/?\\\\s*((?:(?=\\\\d+\\\\.\\\\d)\\\\d+[.\\\\d]*|\\\\d{1,7}(?=(?:\\\\D|$))))`, \"i\");\n const match = userAgent.match(regex);\n if (!match)\n return \"\";\n return match.pop();\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.variableReplacement = (template, variables) => {\n const regex = new RegExp(`\\\\$\\\\d`, \"g\");\n if (template === null || template === undefined)\n return \"\";\n return template.replace(regex, (match) => {\n const index = parseInt(match.substr(1), 10);\n const variable = variables[index - 1];\n return variable || \"\";\n });\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.memoryCache = () => {\n const memoryCacheBucket = {};\n const set = (key, value) => {\n memoryCacheBucket[key] = value;\n };\n const get = (key) => {\n if (memoryCacheBucket.hasOwnProperty(key)) {\n return memoryCacheBucket[key];\n }\n };\n return {\n set,\n get\n };\n};\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst memory_cache_1 = require(\"./memory-cache\");\nconst cache = memory_cache_1.memoryCache();\nconst getRegexInstance = (rawRegex) => {\n const cachedRegexInstance = cache.get(rawRegex);\n if (cachedRegexInstance)\n return cachedRegexInstance.value;\n const regexInstance = RegExp(`(?:^|[^A-Z0-9\\-_]|[^A-Z0-9\\-]_|sprd-)(?:${rawRegex})`, \"i\");\n cache.set(rawRegex, {\n value: regexInstance\n });\n return regexInstance;\n};\nexports.userAgentParser = (rawRegex, userAgent) => {\n // TODO: find out why it fails in some browsers\n try {\n const regexInstance = getRegexInstance(rawRegex);\n const match = regexInstance.exec(userAgent);\n return match ? match.slice(1) : null;\n }\n catch (_a) {\n return null;\n }\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nconst browsers_json_1 = __importDefault(require(\"../../fixtures/regexes/client/browsers.json\"));\nconst browser_engine_json_1 = __importDefault(require(\"../../fixtures/regexes/client/browser_engine.json\"));\nconst available_browsers_json_1 = __importDefault(require(\"./fixtures/available-browsers.json\"));\nconst mobile_only_browsers_json_1 = __importDefault(require(\"./fixtures/mobile-only-browsers.json\"));\nclass BrowserParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\",\n engine: \"\",\n engineVersion: \"\"\n };\n for (const browser of browsers_json_1.default) {\n const match = user_agent_1.userAgentParser(browser.regex, userAgent);\n if (!match)\n continue;\n const vrpVersion = variable_replacement_1.variableReplacement(browser.version, match);\n const version = version_1.formatVersion(vrpVersion, this.options.versionTruncation);\n const shortVersion = version && parseFloat(version_1.formatVersion(vrpVersion, 1)) || \"\";\n if (browser.engine) {\n result.engine = browser.engine.default;\n if (browser.engine && browser.engine.versions && shortVersion) {\n const sortedEngineVersions = Object.entries(browser.engine.versions).sort((a, b) => {\n return parseFloat(a[0]) > parseFloat(b[0]) ? 1 : -1;\n });\n for (const [versionThreshold, engineByVersion] of sortedEngineVersions) {\n if (parseFloat(versionThreshold) <= shortVersion) {\n result.engine = engineByVersion || \"\";\n }\n }\n }\n }\n result.type = \"browser\";\n result.name = variable_replacement_1.variableReplacement(browser.name, match);\n result.version = version;\n break;\n }\n if (!result.engine) {\n for (const browserEngine of browser_engine_json_1.default) {\n let match = null;\n try {\n match = RegExp(browserEngine.regex, \"i\").exec(userAgent);\n }\n catch (_a) {\n // TODO: find out why it fails in some browsers\n }\n if (!match)\n continue;\n result.engine = browserEngine.name;\n break;\n }\n }\n result.engineVersion = version_1.formatVersion(version_1.parseBrowserEngineVersion(userAgent, result.engine), this.options.versionTruncation);\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = BrowserParser;\nBrowserParser.getBrowserShortName = (browserName) => {\n for (const [shortName, name] of Object.entries(available_browsers_json_1.default)) {\n if (name === browserName) {\n return shortName;\n }\n }\n return \"\";\n};\nBrowserParser.isMobileOnlyBrowser = (browserName) => {\n return mobile_only_browsers_json_1.default.includes(BrowserParser.getBrowserShortName(browserName));\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst mobile_apps_json_1 = __importDefault(require(\"../../fixtures/regexes/client/mobile_apps.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass MobileAppParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\"\n };\n for (const mobileApp of mobile_apps_json_1.default) {\n const match = user_agent_1.userAgentParser(mobileApp.regex, userAgent);\n if (!match)\n continue;\n result.type = \"mobile app\";\n result.name = variable_replacement_1.variableReplacement(mobileApp.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(mobileApp.version, match), this.options.versionTruncation);\n break;\n }\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = MobileAppParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst feed_readers_json_1 = __importDefault(require(\"../../fixtures/regexes/client/feed_readers.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass FeedReaderParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\",\n url: \"\"\n };\n for (const feedReader of feed_readers_json_1.default) {\n const match = user_agent_1.userAgentParser(feedReader.regex, userAgent);\n if (!match)\n continue;\n result.type = \"feed reader\";\n result.name = variable_replacement_1.variableReplacement(feedReader.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(feedReader.version, match), this.options.versionTruncation);\n result.url = feedReader.url;\n break;\n }\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = FeedReaderParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst libraries_json_1 = __importDefault(require(\"../../fixtures/regexes/client/libraries.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass LibraryParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\",\n url: \"\"\n };\n for (const library of libraries_json_1.default) {\n const match = user_agent_1.userAgentParser(library.regex, userAgent);\n if (!match)\n continue;\n result.type = \"library\";\n result.name = variable_replacement_1.variableReplacement(library.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(library.version, match), this.options.versionTruncation);\n result.url = library.url || \"\";\n break;\n }\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = LibraryParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst mediaplayers_json_1 = __importDefault(require(\"../../fixtures/regexes/client/mediaplayers.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass MediaPlayerParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\"\n };\n for (const mediaPlayer of mediaplayers_json_1.default) {\n const match = user_agent_1.userAgentParser(mediaPlayer.regex, userAgent);\n if (!match)\n continue;\n result.type = \"media player\";\n result.name = variable_replacement_1.variableReplacement(mediaPlayer.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(mediaPlayer.version, match), this.options.versionTruncation);\n break;\n }\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = MediaPlayerParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst pim_json_1 = __importDefault(require(\"../../fixtures/regexes/client/pim.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass PersonalInformationManagerParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n name: \"\",\n version: \"\"\n };\n for (const personalInformationManager of pim_json_1.default) {\n const match = user_agent_1.userAgentParser(personalInformationManager.regex, userAgent);\n if (!match)\n continue;\n result.type = \"personal information manager\";\n result.name = variable_replacement_1.variableReplacement(personalInformationManager.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(personalInformationManager.version, match), this.options.versionTruncation);\n break;\n }\n return result;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = PersonalInformationManagerParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst browser_1 = __importDefault(require(\"./browser\"));\nconst mobile_apps_1 = __importDefault(require(\"./mobile-apps\"));\nconst feed_readers_1 = __importDefault(require(\"./feed-readers\"));\nconst libraries_1 = __importDefault(require(\"./libraries\"));\nconst media_players_1 = __importDefault(require(\"./media-players\"));\nconst personal_information_managers_1 = __importDefault(require(\"./personal-information-managers\"));\nconst clientParsers = [\n feed_readers_1.default,\n mobile_apps_1.default,\n media_players_1.default,\n personal_information_managers_1.default,\n browser_1.default,\n libraries_1.default\n];\nclass ClientParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n for (const Parser of clientParsers) {\n const parser = new Parser(this.options);\n const client = parser.parse(userAgent);\n if (client.type !== \"\")\n return client;\n }\n return null;\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = ClientParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst cameras_json_1 = __importDefault(require(\"../../fixtures/regexes/device/cameras.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass CameraParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n for (const [brand, camera] of Object.entries(cameras_json_1.default)) {\n const match = user_agent_1.userAgentParser(camera.regex, userAgent);\n if (!match)\n continue;\n result.type = \"camera\";\n result.brand = brand;\n if (\"model\" in camera && camera.model) {\n result.model = variable_replacement_1.variableReplacement(camera.model, match).trim();\n }\n else if (\"models\" in camera && camera.models) {\n for (const model of camera.models) {\n const modelMatch = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!modelMatch)\n continue;\n result.model = variable_replacement_1.variableReplacement(model.model, modelMatch).trim();\n break;\n }\n }\n break;\n }\n return result;\n };\n }\n}\nexports.default = CameraParser;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildModel = (model) => {\n model = model.replace(/_/g, \" \");\n model = model.replace(RegExp(\" TD$\", \"i\"), \"\");\n if (model === \"Build\")\n return \"\";\n return model;\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst mobiles_json_1 = __importDefault(require(\"../../fixtures/regexes/device/mobiles.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nconst model_1 = require(\"../../utils/model\");\nclass MobileParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n let resultType = \"\";\n for (const [brand, mobile] of Object.entries(mobiles_json_1.default)) {\n const match = user_agent_1.userAgentParser(mobile.regex, userAgent);\n if (!match)\n continue;\n resultType = \"device\" in mobile && mobile.device || \"\";\n result.brand = brand;\n if (\"model\" in mobile && mobile.model) {\n result.model = model_1.buildModel(variable_replacement_1.variableReplacement(mobile.model, match)).trim();\n }\n else if (\"models\" in mobile && mobile.models) {\n for (const model of mobile.models) {\n const modelMatch = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!modelMatch)\n continue;\n result.model = model_1.buildModel(variable_replacement_1.variableReplacement(model.model, modelMatch)).trim();\n if (\"device\" in model && model.device) {\n resultType = model.device;\n }\n if (\"brand\" in model) {\n result.brand = model.brand || \"\";\n }\n break;\n }\n }\n break;\n }\n // Sanitize device type\n if (resultType === \"tv\") {\n result.type = \"television\";\n }\n else if (resultType === \"car browser\") {\n result.type = \"car\";\n }\n else {\n result.type = resultType;\n }\n // Sanitize device brand\n if (result.brand === \"Unknown\") {\n result.brand = \"\";\n }\n return result;\n };\n }\n}\nexports.default = MobileParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst televisions_json_1 = __importDefault(require(\"../../fixtures/regexes/device/televisions.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nconst model_1 = require(\"../../utils/model\");\nclass TelevisionParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n if (!this.isHbbTv(userAgent))\n return result;\n result.type = \"television\";\n for (const [brand, television] of Object.entries(televisions_json_1.default)) {\n const match = user_agent_1.userAgentParser(television.regex, userAgent);\n if (!match)\n continue;\n result.brand = brand;\n if (\"model\" in television && television.model) {\n result.model = model_1.buildModel(variable_replacement_1.variableReplacement(television.model, match)).trim();\n }\n else if (\"models\" in television && television.models) {\n for (const model of television.models) {\n const modelMatch = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!modelMatch)\n continue;\n result.model = model_1.buildModel(variable_replacement_1.variableReplacement(model.model, modelMatch)).trim();\n break;\n }\n }\n break;\n }\n return result;\n };\n this.isHbbTv = (userAgent) => {\n return user_agent_1.userAgentParser(\"HbbTV\\/([1-9]{1}(?:\\.[0-9]{1}){1,2})\", userAgent);\n };\n }\n}\nexports.default = TelevisionParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst car_browsers_json_1 = __importDefault(require(\"../../fixtures/regexes/device/car_browsers.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass CarParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n for (const [brand, car] of Object.entries(car_browsers_json_1.default)) {\n const match = user_agent_1.userAgentParser(car.regex, userAgent);\n if (!match)\n continue;\n result.type = \"car\";\n result.brand = brand;\n for (const model of car.models) {\n const match = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!match)\n continue;\n result.model = variable_replacement_1.variableReplacement(model.model, match).trim();\n }\n break;\n }\n return result;\n };\n }\n}\nexports.default = CarParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst consoles_json_1 = __importDefault(require(\"../../fixtures/regexes/device/consoles.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass ConsoleParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n for (const [brand, gameConsole] of Object.entries(consoles_json_1.default)) {\n const match = user_agent_1.userAgentParser(gameConsole.regex, userAgent);\n if (!match)\n continue;\n result.type = gameConsole.device;\n result.brand = brand;\n if (\"model\" in gameConsole && gameConsole.model) {\n result.model = variable_replacement_1.variableReplacement(gameConsole.model, match).trim();\n }\n else if (\"models\" in gameConsole && gameConsole.models) {\n for (const model of gameConsole.models) {\n const modelMatch = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!modelMatch)\n continue;\n result.model = variable_replacement_1.variableReplacement(model.model, modelMatch).trim();\n break;\n }\n }\n break;\n }\n return result;\n };\n }\n}\nexports.default = ConsoleParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst notebooks_json_1 = __importDefault(require(\"../../fixtures/regexes/device/notebooks.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nconst model_1 = require(\"../../utils/model\");\nclass NotebooksParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n if (!user_agent_1.userAgentParser(\"FBMD/\", userAgent)) {\n return result;\n }\n for (const [brand, notebook] of Object.entries(notebooks_json_1.default)) {\n const match = user_agent_1.userAgentParser(notebook.regex, userAgent);\n if (!match)\n continue;\n result.type = \"desktop\";\n result.brand = brand;\n if (\"model\" in notebook && notebook.model) {\n result.model = model_1.buildModel(variable_replacement_1.variableReplacement(notebook.model, match)).trim();\n }\n else if (\"models\" in notebook && notebook.models) {\n for (const model of notebook.models) {\n const match = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!match)\n continue;\n result.model = variable_replacement_1.variableReplacement(model.model, match).trim();\n }\n }\n break;\n }\n return result;\n };\n }\n}\nexports.default = NotebooksParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst portable_media_player_json_1 = __importDefault(require(\"../../fixtures/regexes/device/portable_media_player.json\"));\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass PortableMediaPlayersParser {\n constructor() {\n this.parse = (userAgent) => {\n const result = {\n type: \"\",\n brand: \"\",\n model: \"\"\n };\n for (const [brand, portableMediaPlayer] of Object.entries(portable_media_player_json_1.default)) {\n const match = user_agent_1.userAgentParser(portableMediaPlayer.regex, userAgent);\n if (!match)\n continue;\n result.type = portableMediaPlayer.device;\n result.brand = brand;\n if (\"model\" in portableMediaPlayer && portableMediaPlayer.model) {\n result.model = variable_replacement_1.variableReplacement(portableMediaPlayer.model, match).trim();\n }\n else if (\"models\" in portableMediaPlayer && portableMediaPlayer.models) {\n for (const model of portableMediaPlayer.models) {\n const modelMatch = user_agent_1.userAgentParser(model.regex, userAgent);\n if (!modelMatch)\n continue;\n result.model = variable_replacement_1.variableReplacement(model.model, modelMatch).trim();\n break;\n }\n }\n break;\n }\n return result;\n };\n }\n}\nexports.default = PortableMediaPlayersParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst cameras_1 = __importDefault(require(\"./cameras\"));\nconst mobiles_1 = __importDefault(require(\"./mobiles\"));\nconst televisions_1 = __importDefault(require(\"./televisions\"));\nconst cars_1 = __importDefault(require(\"./cars\"));\nconst consoles_1 = __importDefault(require(\"./consoles\"));\nconst notebooks_1 = __importDefault(require(\"./notebooks\"));\nconst portable_media_players_1 = __importDefault(require(\"./portable-media-players\"));\nconst deviceParsers = [\n consoles_1.default,\n cars_1.default,\n cameras_1.default,\n televisions_1.default,\n portable_media_players_1.default,\n mobiles_1.default,\n notebooks_1.default\n];\nclass ClientParser {\n constructor() {\n this.parse = (userAgent) => {\n for (const Parser of deviceParsers) {\n const parser = new Parser();\n const device = parser.parse(userAgent);\n if (device.type !== \"\") {\n return device;\n }\n }\n return null;\n };\n }\n}\nexports.default = ClientParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst oss_json_1 = __importDefault(require(\"../../fixtures/regexes/oss.json\"));\nconst version_1 = require(\"../../utils/version\");\nconst variable_replacement_1 = require(\"../../utils/variable-replacement\");\nconst user_agent_1 = require(\"../../utils/user-agent\");\nconst operating_system_json_1 = __importDefault(require(\"./fixtures/operating-system.json\"));\nconst desktopOsArray = [\"AmigaOS\", \"IBM\", \"GNU/Linux\", \"Mac\", \"Unix\", \"Windows\", \"BeOS\", \"Chrome OS\"];\nconst shortOsNames = operating_system_json_1.default.operatingSystem;\nconst osFamilies = operating_system_json_1.default.osFamilies;\nclass OperatingSystemParser {\n constructor(options) {\n this.options = {\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n const result = {\n name: \"\",\n version: \"\",\n platform: this.parsePlatform(userAgent)\n };\n for (const operatingSystem of oss_json_1.default) {\n const match = user_agent_1.userAgentParser(operatingSystem.regex, userAgent);\n if (!match)\n continue;\n result.name = variable_replacement_1.variableReplacement(operatingSystem.name, match);\n result.version = version_1.formatVersion(variable_replacement_1.variableReplacement(operatingSystem.version, match), this.options.versionTruncation);\n if (result.name === \"lubuntu\") {\n result.name = \"Lubuntu\";\n }\n if (result.name === \"debian\") {\n result.name = \"Debian\";\n }\n if (result.name === \"YunOS\") {\n result.name = \"YunOs\";\n }\n return result;\n }\n return null;\n };\n this.parsePlatform = (userAgent) => {\n if (user_agent_1.userAgentParser(\"arm|aarch64|Watch ?OS|Watch1,[12]\", userAgent)) {\n return \"ARM\";\n }\n if (user_agent_1.userAgentParser(\"mips\", userAgent)) {\n return \"MIPS\";\n }\n if (user_agent_1.userAgentParser(\"sh4\", userAgent)) {\n return \"SuperH\";\n }\n if (user_agent_1.userAgentParser(\"WOW64|x64|win64|amd64|x86_?64\", userAgent)) {\n return \"x64\";\n }\n if (user_agent_1.userAgentParser(\"(?:i[0-9]|x)86|i86pc\", userAgent)) {\n return \"x86\";\n }\n return \"\";\n };\n this.options = Object.assign(Object.assign({}, this.options), options);\n }\n}\nexports.default = OperatingSystemParser;\nOperatingSystemParser.getDesktopOsArray = () => desktopOsArray;\nOperatingSystemParser.getOsFamily = (osName) => {\n const osShortName = OperatingSystemParser.getOsShortName(osName);\n for (const [osFamily, shortNames] of Object.entries(osFamilies)) {\n if (shortNames.includes(osShortName)) {\n return osFamily;\n }\n }\n return \"\";\n};\nOperatingSystemParser.getOsShortName = (osName) => {\n for (const [shortName, name] of Object.entries(shortOsNames)) {\n if (name === osName)\n return shortName;\n }\n return \"\";\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst vendorfragments_json_1 = __importDefault(require(\"../../fixtures/regexes/vendorfragments.json\"));\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass VendorFragmentParser {\n constructor() {\n this.parse = (userAgent) => {\n for (const [brand, vendorFragment] of Object.entries(vendorfragments_json_1.default)) {\n for (const regex of vendorFragment) {\n const match = user_agent_1.userAgentParser(regex, userAgent);\n if (!match)\n continue;\n return brand;\n }\n }\n return \"\";\n };\n }\n}\nexports.default = VendorFragmentParser;\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nconst bots_json_1 = __importDefault(require(\"../../fixtures/regexes/bots.json\"));\nconst user_agent_1 = require(\"../../utils/user-agent\");\nclass BotParser {\n constructor() {\n this.parse = (userAgent) => {\n var _a, _b, _c, _d;\n for (const bot of bots_json_1.default) {\n const match = user_agent_1.userAgentParser(bot.regex, userAgent);\n if (!match)\n continue;\n return {\n name: bot.name,\n category: bot.category || \"\",\n url: bot.url || \"\",\n producer: {\n name: ((_b = (_a = bot) === null || _a === void 0 ? void 0 : _a.producer) === null || _b === void 0 ? void 0 : _b.name) || \"\",\n url: ((_d = (_c = bot) === null || _c === void 0 ? void 0 : _c.producer) === null || _d === void 0 ? void 0 : _d.url) || \"\"\n }\n };\n }\n return null;\n };\n }\n}\nmodule.exports = BotParser;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.versionCompare = (v1, v2, operator) => {\n // discuss at: http://locutus.io/php/version_compare/\n // original by: Philippe Jausions (http://pear.php.net/user/jausions)\n // original by: Aidan Lister (http://aidanlister.com/)\n // reimplemented by: Kankrelune (http://www.webfaktory.info/)\n // improved by: Brett Zamir (http://brett-zamir.me)\n // improved by: Scott Baker\n // improved by: Theriault (https://github.com/Theriault)\n // example 1: version_compare('8.2.5rc', '8.2.5a')\n // returns 1: 1\n // example 2: version_compare('8.2.50', '8.2.52', '<')\n // returns 2: true\n // example 3: version_compare('5.3.0-dev', '5.3.0')\n // returns 3: -1\n // example 4: version_compare('4.1.0.52','4.01.0.51')\n // returns 4: 1\n // Important: compare must be initialized at 0.\n let i;\n let x;\n let compare = 0;\n // vm maps textual PHP versions to negatives so they're less than 0.\n // PHP currently defines these as CASE-SENSITIVE. It is important to\n // leave these as negatives so that they can come before numerical versions\n // and as if no letters were there to begin with.\n // (1alpha is < 1 and < 1.1 but > 1dev1)\n // If a non-numerical value can't be mapped to this table, it receives\n // -7 as its value.\n const vm = {\n \"dev\": -6,\n \"alpha\": -5,\n \"a\": -5,\n \"beta\": -4,\n \"b\": -4,\n \"RC\": -3,\n \"rc\": -3,\n \"#\": -2,\n \"p\": 1,\n \"pl\": 1\n };\n // This function will be called to prepare each version argument.\n // It replaces every _, -, and + with a dot.\n // It surrounds any nonsequence of numbers/dots with dots.\n // It replaces sequences of dots with a single dot.\n // version_compare('4..0', '4.0') === 0\n // Important: A string of 0 length needs to be converted into a value\n // even less than an unexisting value in vm (-7), hence [-8].\n // It's also important to not strip spaces because of this.\n // version_compare('', ' ') === 1\n const prepVersion = (v) => {\n v = (\"\" + v).replace(/[_\\-+]/g, \".\");\n v = v.replace(/([^.\\d]+)/g, \".$1.\").replace(/\\.{2,}/g, \".\");\n return (!v.length ? [-8] : v.split(\".\"));\n };\n // This converts a version component to a number.\n // Empty component becomes 0.\n // Non-numerical component becomes a negative number.\n // Numerical component becomes itself as an integer.\n const numVersion = (v) => {\n return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10));\n };\n v1 = prepVersion(v1);\n v2 = prepVersion(v2);\n x = Math.max(v1.length, v2.length);\n for (i = 0; i < x; i++) {\n if (v1[i] === v2[i]) {\n continue;\n }\n v1[i] = numVersion(v1[i]);\n v2[i] = numVersion(v2[i]);\n if (v1[i] < v2[i]) {\n compare = -1;\n break;\n }\n else if (v1[i] > v2[i]) {\n compare = 1;\n break;\n }\n }\n if (!operator) {\n return compare;\n }\n // Important: operator is CASE-SENSITIVE.\n // \"No operator\" seems to be treated as \"<.\"\n // Any other values seem to make the function return null.\n switch (operator) {\n case \">\":\n case \"gt\":\n return (compare > 0);\n case \">=\":\n case \"ge\":\n return (compare >= 0);\n case \"<=\":\n case \"le\":\n return (compare <= 0);\n case \"===\":\n case \"=\":\n case \"eq\":\n return (compare === 0);\n case \"<>\":\n case \"!==\":\n case \"ne\":\n return (compare !== 0);\n case \"\":\n case \"<\":\n case \"lt\":\n return (compare < 0);\n default:\n return null;\n }\n};\n", "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nconst client_1 = __importDefault(require(\"./parsers/client\"));\nconst device_1 = __importDefault(require(\"./parsers/device\"));\nconst operating_system_1 = __importDefault(require(\"./parsers/operating-system\"));\nconst vendor_fragment_1 = __importDefault(require(\"./parsers/vendor-fragment\"));\nconst browser_1 = __importDefault(require(\"./parsers/client/browser\"));\nconst BotParser = require(\"./parsers/bot\");\nconst user_agent_1 = require(\"./utils/user-agent\");\nconst version_compare_1 = require(\"./utils/version-compare\");\nclass DeviceDetector {\n constructor(options) {\n // Default options\n this.options = {\n skipBotDetection: false,\n versionTruncation: 1\n };\n this.parse = (userAgent) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n const result = {\n client: this.clientParser.parse(userAgent),\n os: this.operatingSystemParser.parse(userAgent),\n device: this.deviceParser.parse(userAgent),\n bot: this.options.skipBotDetection ? null : this.botParser.parse(userAgent)\n };\n const osName = (_a = result.os) === null || _a === void 0 ? void 0 : _a.name;\n const osVersion = (_b = result.os) === null || _b === void 0 ? void 0 : _b.version;\n const osFamily = operating_system_1.default.getOsFamily(osName || \"\");\n if (!((_c = result.device) === null || _c === void 0 ? void 0 : _c.brand)) {\n const brand = this.vendorFragmentParser.parse(userAgent);\n if (brand) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.brand = brand;\n }\n }\n /**\n * Assume all devices running iOS / Mac OS are from Apple\n */\n if (!((_d = result.device) === null || _d === void 0 ? void 0 : _d.brand) && [\"Apple TV\", \"watchOS\", \"iOS\", \"Mac\"].includes(osName || \"\")) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.brand = \"Apple\";\n }\n /**\n * Chrome on Android passes the device type based on the keyword 'Mobile'\n * If it is present the device should be a smartphone, otherwise it's a tablet\n * See https://developer.chrome.com/multidevice/user-agent#chrome_for_android_user_agent\n * Note: We do not check for browser (family) here, as there might be mobile apps using Chrome, that won't have\n * a detected browser, but can still be detected. So we check the useragent for Chrome instead.\n */\n if (!((_e = result.device) === null || _e === void 0 ? void 0 : _e.type) && osFamily === \"Android\" && user_agent_1.userAgentParser(\"Chrome/[\\\\.0-9]*\", userAgent)) {\n if (user_agent_1.userAgentParser(\"Chrome/[.0-9]* (?:Mobile|eliboM)\", userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"smartphone\";\n }\n else if (user_agent_1.userAgentParser(\"Chrome/[.0-9]* (?!Mobile)\", userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"tablet\";\n }\n }\n /**\n * Some user agents simply contain the fragment 'Android; Tablet;' or 'Opera Tablet', so we assume those devices are tablets\n */\n if (!((_f = result.device) === null || _f === void 0 ? void 0 : _f.type) && this.hasAndroidTabletFragment(userAgent) || user_agent_1.userAgentParser(\"Opera Tablet\", userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"tablet\";\n }\n /**\n * Some user agents simply contain the fragment 'Android; Mobile;', so we assume those devices are smartphones\n */\n if (!((_g = result.device) === null || _g === void 0 ? void 0 : _g.type) && this.hasAndroidMobileFragment(userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"smartphone\";\n }\n /**\n * Android up to 3.0 was designed for smartphones only. But as 3.0, which was tablet only, was published\n * too late, there were a bunch of tablets running with 2.x\n * With 4.0 the two trees were merged and it is for smartphones and tablets\n *\n * So were are expecting that all devices running Android < 2 are smartphones\n * Devices running Android 3.X are tablets. Device type of Android 2.X and 4.X+ are unknown\n */\n if (!((_h = result.device) === null || _h === void 0 ? void 0 : _h.type) && osName === \"Android\" && osVersion !== \"\") {\n if (version_compare_1.versionCompare(osVersion, \"2.0\") === -1) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"smartphone\";\n }\n else if (version_compare_1.versionCompare(osVersion, \"3.0\") >= 0 && version_compare_1.versionCompare(osVersion, \"4.0\") === -1) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"tablet\";\n }\n }\n /**\n * All detected feature phones running android are more likely smartphones\n */\n if (((_j = result.device) === null || _j === void 0 ? void 0 : _j.type) === \"feature phone\" && osFamily === \"Android\") {\n result.device.type = \"smartphone\";\n }\n /**\n * According to http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx\n * Internet Explorer 10 introduces the \"Touch\" UA string token. If this token is present at the end of the\n * UA string, the computer has touch capability, and is running Windows 8 (or later).\n * This UA string will be transmitted on a touch-enabled system running Windows 8 (RT)\n *\n * As most touch enabled devices are tablets and only a smaller part are desktops/notebooks we assume that\n * all Windows 8 touch devices are tablets.\n */\n if (!((_k = result.device) === null || _k === void 0 ? void 0 : _k.type)\n && this.isToucheEnabled(userAgent)\n && (osName === \"Windows RT\"\n || (osName === \"Windows\"\n && version_compare_1.versionCompare(osVersion, \"8.0\") >= 0))) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"tablet\";\n }\n /**\n * All devices running Opera TV Store are assumed to be televisions\n */\n if (user_agent_1.userAgentParser(\"Opera TV Store\", userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"television\";\n }\n /**\n * All devices running Tizen TV or SmartTV are assumed to be televisions\n */\n if (user_agent_1.userAgentParser(\"SmartTV|Tizen.+ TV .+$\", userAgent)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"television\";\n }\n /**\n * Devices running Kylo or Espital TV Browsers are assumed to be televisions\n */\n if (!((_l = result.device) === null || _l === void 0 ? void 0 : _l.type) && [\"Kylo\", \"Espial TV Browser\"].includes(((_m = result.client) === null || _m === void 0 ? void 0 : _m.name) || \"\")) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"television\";\n }\n /**\n * Set device type to desktop if string ua contains desktop\n */\n const hasDesktop = \"desktop\" !== ((_o = result.device) === null || _o === void 0 ? void 0 : _o.type)\n && null !== user_agent_1.userAgentParser(\"Desktop\", userAgent)\n && this.hasDesktopFragment(userAgent);\n if (hasDesktop) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"desktop\";\n }\n // set device type to desktop for all devices running a desktop os that were not detected as an other device type\n if (!((_p = result.device) === null || _p === void 0 ? void 0 : _p.type) && this.isDesktop(result, osFamily)) {\n if (!result.device) {\n result.device = this.createDeviceObject();\n }\n result.device.type = \"desktop\";\n }\n return result;\n };\n this.hasAndroidMobileFragment = (userAgent) => {\n return user_agent_1.userAgentParser(\"Android( [\\.0-9]+)?; Mobile;\", userAgent);\n };\n this.hasAndroidTabletFragment = (userAgent) => {\n return user_agent_1.userAgentParser(\"Android( [\\.0-9]+)?; Tablet;\", userAgent);\n };\n this.hasDesktopFragment = (userAgent) => {\n return user_agent_1.userAgentParser(\"Desktop (x(?:32|64)|WOW64);\", userAgent);\n };\n this.isDesktop = (result, osFamily) => {\n if (!result.os) {\n return false;\n }\n // Check for browsers available for mobile devices only\n if (this.usesMobileBrowser(result.client)) {\n return false;\n }\n return operating_system_1.default.getDesktopOsArray().includes(osFamily);\n };\n this.usesMobileBrowser = (client) => {\n var _a, _b;\n if (!client)\n return false;\n return ((_a = client) === null || _a === void 0 ? void 0 : _a.type) === \"browser\" && browser_1.default.isMobileOnlyBrowser((_b = client) === null || _b === void 0 ? void 0 : _b.name);\n };\n this.isToucheEnabled = (userAgent) => {\n return user_agent_1.userAgentParser(\"Touch\", userAgent);\n };\n this.createDeviceObject = () => ({\n type: \"\",\n brand: \"\",\n model: \"\"\n });\n this.options = Object.assign(Object.assign({}, this.options), options);\n this.clientParser = new client_1.default(this.options);\n this.deviceParser = new device_1.default();\n this.operatingSystemParser = new operating_system_1.default(this.options);\n this.vendorFragmentParser = new vendor_fragment_1.default();\n this.botParser = new BotParser();\n }\n}\nmodule.exports = DeviceDetector;\n", "(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n", "(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n", "var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n", "\nfunction TreeBase() {}\n\n// removes all nodes from the tree\nTreeBase.prototype.clear = function() {\n this._root = null;\n this.size = 0;\n};\n\n// returns node data if found, null otherwise\nTreeBase.prototype.find = function(data) {\n var res = this._root;\n\n while(res !== null) {\n var c = this._comparator(data, res.data);\n if(c === 0) {\n return res.data;\n }\n else {\n res = res.get_child(c > 0);\n }\n }\n\n return null;\n};\n\n// returns iterator to node if found, null otherwise\nTreeBase.prototype.findIter = function(data) {\n var res = this._root;\n var iter = this.iterator();\n\n while(res !== null) {\n var c = this._comparator(data, res.data);\n if(c === 0) {\n iter._cursor = res;\n return iter;\n }\n else {\n iter._ancestors.push(res);\n res = res.get_child(c > 0);\n }\n }\n\n return null;\n};\n\n// Returns an iterator to the tree node at or immediately after the item\nTreeBase.prototype.lowerBound = function(item) {\n var cur = this._root;\n var iter = this.iterator();\n var cmp = this._comparator;\n\n while(cur !== null) {\n var c = cmp(item, cur.data);\n if(c === 0) {\n iter._cursor = cur;\n return iter;\n }\n iter._ancestors.push(cur);\n cur = cur.get_child(c > 0);\n }\n\n for(var i=iter._ancestors.length - 1; i >= 0; --i) {\n cur = iter._ancestors[i];\n if(cmp(item, cur.data) < 0) {\n iter._cursor = cur;\n iter._ancestors.length = i;\n return iter;\n }\n }\n\n iter._ancestors.length = 0;\n return iter;\n};\n\n// Returns an iterator to the tree node immediately after the item\nTreeBase.prototype.upperBound = function(item) {\n var iter = this.lowerBound(item);\n var cmp = this._comparator;\n\n while(iter.data() !== null && cmp(iter.data(), item) === 0) {\n iter.next();\n }\n\n return iter;\n};\n\n// returns null if tree is empty\nTreeBase.prototype.min = function() {\n var res = this._root;\n if(res === null) {\n return null;\n }\n\n while(res.left !== null) {\n res = res.left;\n }\n\n return res.data;\n};\n\n// returns null if tree is empty\nTreeBase.prototype.max = function() {\n var res = this._root;\n if(res === null) {\n return null;\n }\n\n while(res.right !== null) {\n res = res.right;\n }\n\n return res.data;\n};\n\n// returns a null iterator\n// call next() or prev() to point to an element\nTreeBase.prototype.iterator = function() {\n return new Iterator(this);\n};\n\n// calls cb on each node's data, in order\nTreeBase.prototype.each = function(cb) {\n var it=this.iterator(), data;\n while((data = it.next()) !== null) {\n if(cb(data) === false) {\n return;\n }\n }\n};\n\n// calls cb on each node's data, in reverse order\nTreeBase.prototype.reach = function(cb) {\n var it=this.iterator(), data;\n while((data = it.prev()) !== null) {\n if(cb(data) === false) {\n return;\n }\n }\n};\n\n\nfunction Iterator(tree) {\n this._tree = tree;\n this._ancestors = [];\n this._cursor = null;\n}\n\nIterator.prototype.data = function() {\n return this._cursor !== null ? this._cursor.data : null;\n};\n\n// if null-iterator, returns first node\n// otherwise, returns next node\nIterator.prototype.next = function() {\n if(this._cursor === null) {\n var root = this._tree._root;\n if(root !== null) {\n this._minNode(root);\n }\n }\n else {\n if(this._cursor.right === null) {\n // no greater node in subtree, go up to parent\n // if coming from a right child, continue up the stack\n var save;\n do {\n save = this._cursor;\n if(this._ancestors.length) {\n this._cursor = this._ancestors.pop();\n }\n else {\n this._cursor = null;\n break;\n }\n } while(this._cursor.right === save);\n }\n else {\n // get the next node from the subtree\n this._ancestors.push(this._cursor);\n this._minNode(this._cursor.right);\n }\n }\n return this._cursor !== null ? this._cursor.data : null;\n};\n\n// if null-iterator, returns last node\n// otherwise, returns previous node\nIterator.prototype.prev = function() {\n if(this._cursor === null) {\n var root = this._tree._root;\n if(root !== null) {\n this._maxNode(root);\n }\n }\n else {\n if(this._cursor.left === null) {\n var save;\n do {\n save = this._cursor;\n if(this._ancestors.length) {\n this._cursor = this._ancestors.pop();\n }\n else {\n this._cursor = null;\n break;\n }\n } while(this._cursor.left === save);\n }\n else {\n this._ancestors.push(this._cursor);\n this._maxNode(this._cursor.left);\n }\n }\n return this._cursor !== null ? this._cursor.data : null;\n};\n\nIterator.prototype._minNode = function(start) {\n while(start.left !== null) {\n this._ancestors.push(start);\n start = start.left;\n }\n this._cursor = start;\n};\n\nIterator.prototype._maxNode = function(start) {\n while(start.right !== null) {\n this._ancestors.push(start);\n start = start.right;\n }\n this._cursor = start;\n};\n\nmodule.exports = TreeBase;\n\n", "\nvar TreeBase = require('./treebase');\n\nfunction Node(data) {\n this.data = data;\n this.left = null;\n this.right = null;\n this.red = true;\n}\n\nNode.prototype.get_child = function(dir) {\n return dir ? this.right : this.left;\n};\n\nNode.prototype.set_child = function(dir, val) {\n if(dir) {\n this.right = val;\n }\n else {\n this.left = val;\n }\n};\n\nfunction RBTree(comparator) {\n this._root = null;\n this._comparator = comparator;\n this.size = 0;\n}\n\nRBTree.prototype = new TreeBase();\n\n// returns true if inserted, false if duplicate\nRBTree.prototype.insert = function(data) {\n var ret = false;\n\n if(this._root === null) {\n // empty tree\n this._root = new Node(data);\n ret = true;\n this.size++;\n }\n else {\n var head = new Node(undefined); // fake tree root\n\n var dir = 0;\n var last = 0;\n\n // setup\n var gp = null; // grandparent\n var ggp = head; // grand-grand-parent\n var p = null; // parent\n var node = this._root;\n ggp.right = this._root;\n\n // search down\n while(true) {\n if(node === null) {\n // insert new node at the bottom\n node = new Node(data);\n p.set_child(dir, node);\n ret = true;\n this.size++;\n }\n else if(is_red(node.left) && is_red(node.right)) {\n // color flip\n node.red = true;\n node.left.red = false;\n node.right.red = false;\n }\n\n // fix red violation\n if(is_red(node) && is_red(p)) {\n var dir2 = ggp.right === gp;\n\n if(node === p.get_child(last)) {\n ggp.set_child(dir2, single_rotate(gp, !last));\n }\n else {\n ggp.set_child(dir2, double_rotate(gp, !last));\n }\n }\n\n var cmp = this._comparator(node.data, data);\n\n // stop if found\n if(cmp === 0) {\n break;\n }\n\n last = dir;\n dir = cmp < 0;\n\n // update helpers\n if(gp !== null) {\n ggp = gp;\n }\n gp = p;\n p = node;\n node = node.get_child(dir);\n }\n\n // update root\n this._root = head.right;\n }\n\n // make root black\n this._root.red = false;\n\n return ret;\n};\n\n// returns true if removed, false if not found\nRBTree.prototype.remove = function(data) {\n if(this._root === null) {\n return false;\n }\n\n var head = new Node(undefined); // fake tree root\n var node = head;\n node.right = this._root;\n var p = null; // parent\n var gp = null; // grand parent\n var found = null; // found item\n var dir = 1;\n\n while(node.get_child(dir) !== null) {\n var last = dir;\n\n // update helpers\n gp = p;\n p = node;\n node = node.get_child(dir);\n\n var cmp = this._comparator(data, node.data);\n\n dir = cmp > 0;\n\n // save found node\n if(cmp === 0) {\n found = node;\n }\n\n // push the red node down\n if(!is_red(node) && !is_red(node.get_child(dir))) {\n if(is_red(node.get_child(!dir))) {\n var sr = single_rotate(node, dir);\n p.set_child(last, sr);\n p = sr;\n }\n else if(!is_red(node.get_child(!dir))) {\n var sibling = p.get_child(!last);\n if(sibling !== null) {\n if(!is_red(sibling.get_child(!last)) && !is_red(sibling.get_child(last))) {\n // color flip\n p.red = false;\n sibling.red = true;\n node.red = true;\n }\n else {\n var dir2 = gp.right === p;\n\n if(is_red(sibling.get_child(last))) {\n gp.set_child(dir2, double_rotate(p, last));\n }\n else if(is_red(sibling.get_child(!last))) {\n gp.set_child(dir2, single_rotate(p, last));\n }\n\n // ensure correct coloring\n var gpc = gp.get_child(dir2);\n gpc.red = true;\n node.red = true;\n gpc.left.red = false;\n gpc.right.red = false;\n }\n }\n }\n }\n }\n\n // replace and remove if found\n if(found !== null) {\n found.data = node.data;\n p.set_child(p.right === node, node.get_child(node.left === null));\n this.size--;\n }\n\n // update root and make it black\n this._root = head.right;\n if(this._root !== null) {\n this._root.red = false;\n }\n\n return found !== null;\n};\n\nfunction is_red(node) {\n return node !== null && node.red;\n}\n\nfunction single_rotate(root, dir) {\n var save = root.get_child(!dir);\n\n root.set_child(!dir, save.get_child(dir));\n save.set_child(dir, root);\n\n root.red = true;\n save.red = false;\n\n return save;\n}\n\nfunction double_rotate(root, dir) {\n root.set_child(!dir, single_rotate(root.get_child(!dir), !dir));\n return single_rotate(root, dir);\n}\n\nmodule.exports = RBTree;\n", "\nvar TreeBase = require('./treebase');\n\nfunction Node(data) {\n this.data = data;\n this.left = null;\n this.right = null;\n}\n\nNode.prototype.get_child = function(dir) {\n return dir ? this.right : this.left;\n};\n\nNode.prototype.set_child = function(dir, val) {\n if(dir) {\n this.right = val;\n }\n else {\n this.left = val;\n }\n};\n\nfunction BinTree(comparator) {\n this._root = null;\n this._comparator = comparator;\n this.size = 0;\n}\n\nBinTree.prototype = new TreeBase();\n\n// returns true if inserted, false if duplicate\nBinTree.prototype.insert = function(data) {\n if(this._root === null) {\n // empty tree\n this._root = new Node(data);\n this.size++;\n return true;\n }\n\n var dir = 0;\n\n // setup\n var p = null; // parent\n var node = this._root;\n\n // search down\n while(true) {\n if(node === null) {\n // insert new node at the bottom\n node = new Node(data);\n p.set_child(dir, node);\n ret = true;\n this.size++;\n return true;\n }\n\n // stop if found\n if(this._comparator(node.data, data) === 0) {\n return false;\n }\n\n dir = this._comparator(node.data, data) < 0;\n\n // update helpers\n p = node;\n node = node.get_child(dir);\n }\n};\n\n// returns true if removed, false if not found\nBinTree.prototype.remove = function(data) {\n if(this._root === null) {\n return false;\n }\n\n var head = new Node(undefined); // fake tree root\n var node = head;\n node.right = this._root;\n var p = null; // parent\n var found = null; // found item\n var dir = 1;\n\n while(node.get_child(dir) !== null) {\n p = node;\n node = node.get_child(dir);\n var cmp = this._comparator(data, node.data);\n dir = cmp > 0;\n\n if(cmp === 0) {\n found = node;\n }\n }\n\n if(found !== null) {\n found.data = node.data;\n p.set_child(p.right === node, node.get_child(node.left === null));\n\n this._root = head.right;\n this.size--;\n return true;\n }\n else {\n return false;\n }\n};\n\nmodule.exports = BinTree;\n\n", "module.exports = {\n RBTree: require('./lib/rbtree'),\n BinTree: require('./lib/bintree')\n};\n", "//\n// TDigest:\n//\n// approximate distribution percentiles from a stream of reals\n//\nvar RBTree = require('bintrees').RBTree;\n\nfunction TDigest(delta, K, CX) {\n // allocate a TDigest structure.\n //\n // delta is the compression factor, the max fraction of mass that\n // can be owned by one centroid (bigger, up to 1.0, means more\n // compression). delta=false switches off TDigest behavior and treats\n // the distribution as discrete, with no merging and exact values\n // reported.\n //\n // K is a size threshold that triggers recompression as the TDigest\n // grows during input. (Set it to 0 to disable automatic recompression)\n //\n // CX specifies how often to update cached cumulative totals used\n // for quantile estimation during ingest (see cumulate()). Set to\n // 0 to use exact quantiles for each new point.\n //\n this.discrete = (delta === false);\n this.delta = delta || 0.01;\n this.K = (K === undefined) ? 25 : K;\n this.CX = (CX === undefined) ? 1.1 : CX;\n this.centroids = new RBTree(compare_centroid_means);\n this.nreset = 0;\n this.reset();\n}\n\nTDigest.prototype.reset = function() {\n // prepare to digest new points.\n //\n this.centroids.clear();\n this.n = 0;\n this.nreset += 1;\n this.last_cumulate = 0;\n};\n\nTDigest.prototype.size = function() {\n return this.centroids.size;\n};\n\nTDigest.prototype.toArray = function(everything) {\n // return {mean,n} of centroids as an array ordered by mean.\n //\n var result = [];\n if (everything) {\n this._cumulate(true); // be sure cumns are exact\n this.centroids.each(function(c) { result.push(c); });\n } else {\n this.centroids.each(function(c) { result.push({mean:c.mean, n:c.n}); });\n }\n return result;\n};\n\nTDigest.prototype.summary = function() {\n var approx = (this.discrete) ? \"exact \" : \"approximating \";\n var s = [approx + this.n + \" samples using \" + this.size() + \" centroids\",\n \"min = \"+this.percentile(0),\n \"Q1 = \"+this.percentile(0.25),\n \"Q2 = \"+this.percentile(0.5),\n \"Q3 = \"+this.percentile(0.75),\n \"max = \"+this.percentile(1.0)];\n return s.join('\\n');\n};\n\nfunction compare_centroid_means(a, b) {\n // order two centroids by mean.\n //\n return (a.mean > b.mean) ? 1 : (a.mean < b.mean) ? -1 : 0;\n}\n\nfunction compare_centroid_mean_cumns(a, b) {\n // order two centroids by mean_cumn.\n //\n return (a.mean_cumn - b.mean_cumn);\n}\n\nTDigest.prototype.push = function(x, n) {\n // incorporate value or array of values x, having count n into the\n // TDigest. n defaults to 1.\n //\n n = n || 1;\n x = Array.isArray(x) ? x : [x];\n for (var i = 0 ; i < x.length ; i++) {\n this._digest(x[i], n);\n }\n};\n\nTDigest.prototype.push_centroid = function(c) {\n // incorporate centroid or array of centroids c\n //\n c = Array.isArray(c) ? c : [c];\n for (var i = 0 ; i < c.length ; i++) {\n this._digest(c[i].mean, c[i].n);\n }\n};\n\nTDigest.prototype._cumulate = function(exact) {\n // update cumulative counts for each centroid\n //\n // exact: falsey means only cumulate after sufficient\n // growth. During ingest, these counts are used as quantile\n // estimates, and they work well even when somewhat out of\n // date. (this is a departure from the publication, you may set CX\n // to 0 to disable).\n //\n if (this.n === this.last_cumulate ||\n !exact && this.CX && this.CX > (this.n / this.last_cumulate)) {\n return;\n }\n var cumn = 0;\n this.centroids.each(function(c) {\n c.mean_cumn = cumn + c.n / 2; // half of n at the mean\n cumn = c.cumn = cumn + c.n;\n });\n this.n = this.last_cumulate = cumn;\n};\n\nTDigest.prototype.find_nearest = function(x) {\n // find the centroid closest to x. The assumption of\n // unique means and a unique nearest centroid departs from the\n // paper, see _digest() below\n //\n if (this.size() === 0) {\n return null;\n }\n var iter = this.centroids.lowerBound({mean:x}); // x <= iter || iter==null\n var c = (iter.data() === null) ? iter.prev() : iter.data();\n if (c.mean === x || this.discrete) {\n return c; // c is either x or a neighbor (discrete: no distance func)\n }\n var prev = iter.prev();\n if (prev && Math.abs(prev.mean - x) < Math.abs(c.mean - x)) {\n return prev;\n } else {\n return c;\n }\n};\n\nTDigest.prototype._new_centroid = function(x, n, cumn) {\n // create and insert a new centroid into the digest (don't update\n // cumulatives).\n //\n var c = {mean:x, n:n, cumn:cumn};\n this.centroids.insert(c);\n this.n += n;\n return c;\n};\n\nTDigest.prototype._addweight = function(nearest, x, n) {\n // add weight at location x to nearest centroid. adding x to\n // nearest will not shift its relative position in the tree and\n // require reinsertion.\n //\n if (x !== nearest.mean) {\n nearest.mean += n * (x - nearest.mean) / (nearest.n + n);\n }\n nearest.cumn += n;\n nearest.mean_cumn += n / 2;\n nearest.n += n;\n this.n += n;\n};\n\nTDigest.prototype._digest = function(x, n) {\n // incorporate value x, having count n into the TDigest.\n //\n var min = this.centroids.min();\n var max = this.centroids.max();\n var nearest = this.find_nearest(x);\n if (nearest && nearest.mean === x) {\n // accumulate exact matches into the centroid without\n // limit. this is a departure from the paper, made so\n // centroids remain unique and code can be simple.\n this._addweight(nearest, x, n);\n } else if (nearest === min) {\n this._new_centroid(x, n, 0); // new point around min boundary\n } else if (nearest === max ) {\n this._new_centroid(x, n, this.n); // new point around max boundary\n } else if (this.discrete) {\n this._new_centroid(x, n, nearest.cumn); // never merge\n } else {\n // conider a merge based on nearest centroid's capacity. if\n // there's not room for all of n, don't bother merging any of\n // it into nearest, as we'll have to make a new centroid\n // anyway for the remainder (departure from the paper).\n var p = nearest.mean_cumn / this.n;\n var max_n = Math.floor(4 * this.n * this.delta * p * (1 - p));\n if (max_n - nearest.n >= n) {\n this._addweight(nearest, x, n);\n } else {\n this._new_centroid(x, n, nearest.cumn);\n }\n }\n this._cumulate(false);\n if (!this.discrete && this.K && this.size() > this.K / this.delta) {\n // re-process the centroids and hope for some compression.\n this.compress();\n }\n};\n\nTDigest.prototype.bound_mean = function(x) {\n // find centroids lower and upper such that lower.mean < x <\n // upper.mean or lower.mean === x === upper.mean. Don't call\n // this for x out of bounds.\n //\n var iter = this.centroids.upperBound({mean:x}); // x < iter\n var lower = iter.prev(); // lower <= x\n var upper = (lower.mean === x) ? lower : iter.next();\n return [lower, upper];\n};\n\nTDigest.prototype.p_rank = function(x_or_xlist) {\n // return approximate percentile-ranks (0..1) for data value x.\n // or list of x. calculated according to\n // https://en.wikipedia.org/wiki/Percentile_rank\n //\n // (Note that in continuous mode, boundary sample values will\n // report half their centroid weight inward from 0/1 as the\n // percentile-rank. X values outside the observed range return\n // 0/1)\n //\n // this triggers cumulate() if cumn's are out of date.\n //\n var xs = Array.isArray(x_or_xlist) ? x_or_xlist : [x_or_xlist];\n var ps = xs.map(this._p_rank, this);\n return Array.isArray(x_or_xlist) ? ps : ps[0];\n};\n\nTDigest.prototype._p_rank = function(x) {\n if (this.size() === 0) {\n return undefined;\n } else if (x < this.centroids.min().mean) {\n return 0.0;\n } else if (x > this.centroids.max().mean) {\n return 1.0;\n }\n // find centroids that bracket x and interpolate x's cumn from\n // their cumn's.\n this._cumulate(true); // be sure cumns are exact\n var bound = this.bound_mean(x);\n var lower = bound[0], upper = bound[1];\n if (this.discrete) {\n return lower.cumn / this.n;\n } else {\n var cumn = lower.mean_cumn;\n if (lower !== upper) {\n cumn += (x - lower.mean) * (upper.mean_cumn - lower.mean_cumn) / (upper.mean - lower.mean);\n }\n return cumn / this.n;\n }\n};\n\nTDigest.prototype.bound_mean_cumn = function(cumn) {\n // find centroids lower and upper such that lower.mean_cumn < x <\n // upper.mean_cumn or lower.mean_cumn === x === upper.mean_cumn. Don't call\n // this for cumn out of bounds.\n //\n // XXX because mean and mean_cumn give rise to the same sort order\n // (up to identical means), use the mean rbtree for our search.\n this.centroids._comparator = compare_centroid_mean_cumns;\n var iter = this.centroids.upperBound({mean_cumn:cumn}); // cumn < iter\n this.centroids._comparator = compare_centroid_means;\n var lower = iter.prev(); // lower <= cumn\n var upper = (lower && lower.mean_cumn === cumn) ? lower : iter.next();\n return [lower, upper];\n};\n\nTDigest.prototype.percentile = function(p_or_plist) {\n // for percentage p (0..1), or for each p in a list of ps, return\n // the smallest data value q at which at least p percent of the\n // observations <= q.\n //\n // for discrete distributions, this selects q using the Nearest\n // Rank Method\n // (https://en.wikipedia.org/wiki/Percentile#The_Nearest_Rank_method)\n // (in scipy, same as percentile(...., interpolation='higher')\n //\n // for continuous distributions, interpolates data values between\n // count-weighted bracketing means.\n //\n // this triggers cumulate() if cumn's are out of date.\n //\n var ps = Array.isArray(p_or_plist) ? p_or_plist : [p_or_plist];\n var qs = ps.map(this._percentile, this);\n return Array.isArray(p_or_plist) ? qs : qs[0];\n};\n\nTDigest.prototype._percentile = function(p) {\n if (this.size() === 0) {\n return undefined;\n }\n this._cumulate(true); // be sure cumns are exact\n var h = this.n * p;\n var bound = this.bound_mean_cumn(h);\n var lower = bound[0], upper = bound[1];\n\n if (upper === lower || lower === null || upper === null) {\n return (lower || upper).mean;\n } else if (!this.discrete) {\n return lower.mean + (h - lower.mean_cumn) * (upper.mean - lower.mean) / (upper.mean_cumn - lower.mean_cumn);\n } else if (h <= lower.cumn) {\n return lower.mean;\n } else {\n return upper.mean;\n }\n};\n\nfunction pop_random(choices) {\n // remove and return an item randomly chosen from the array of choices\n // (mutates choices)\n //\n var idx = Math.floor(Math.random() * choices.length);\n return choices.splice(idx, 1)[0];\n}\n\nTDigest.prototype.compress = function() {\n // TDigests experience worst case compression (none) when input\n // increases monotonically. Improve on any bad luck by\n // reconsuming digest centroids as if they were weighted points\n // while shuffling their order (and hope for the best).\n //\n if (this.compressing) {\n return;\n }\n var points = this.toArray();\n this.reset();\n this.compressing = true;\n while (points.length > 0) {\n this.push_centroid(pop_random(points));\n }\n this._cumulate(true);\n this.compressing = false;\n};\n\nfunction Digest(config) {\n // allocate a distribution digest structure. This is an extension\n // of a TDigest structure that starts in exact histogram (discrete)\n // mode, and automatically switches to TDigest mode for large\n // samples that appear to be from a continuous distribution.\n //\n this.config = config || {};\n this.mode = this.config.mode || 'auto'; // disc, cont, auto\n TDigest.call(this, this.mode === 'cont' ? config.delta : false);\n this.digest_ratio = this.config.ratio || 0.9;\n this.digest_thresh = this.config.thresh || 1000;\n this.n_unique = 0;\n}\nDigest.prototype = Object.create(TDigest.prototype);\nDigest.prototype.constructor = Digest;\n\nDigest.prototype.push = function(x_or_xlist) {\n TDigest.prototype.push.call(this, x_or_xlist);\n this.check_continuous();\n};\n\nDigest.prototype._new_centroid = function(x, n, cumn) {\n this.n_unique += 1;\n TDigest.prototype._new_centroid.call(this, x, n, cumn);\n};\n\nDigest.prototype._addweight = function(nearest, x, n) {\n if (nearest.n === 1) {\n this.n_unique -= 1;\n }\n TDigest.prototype._addweight.call(this, nearest, x, n);\n};\n\nDigest.prototype.check_continuous = function() {\n // while in 'auto' mode, if there are many unique elements, assume\n // they are from a continuous distribution and switch to 'cont'\n // mode (tdigest behavior). Return true on transition from\n // disctete to continuous.\n if (this.mode !== 'auto' || this.size() < this.digest_thresh) {\n return false;\n }\n if (this.n_unique / this.size() > this.digest_ratio) {\n this.mode = 'cont';\n this.discrete = false;\n this.delta = this.config.delta || 0.01;\n this.compress();\n return true;\n }\n return false;\n};\n\nmodule.exports = {\n 'TDigest': TDigest,\n 'Digest': Digest\n};\n", "import DeviceDetector from \"device-detector-js\";\nimport { Notifier } from \"@airbrake/browser\";\n\nwindow.deviceDetector = new DeviceDetector();\nwindow.device = window.deviceDetector.parse(navigator.userAgent);\n\nif (!window.device.bot && window.env.JEKYLL_ENV === \"production\") {\n window.airbrake = new Notifier({\n projectId: window.env.AIRBRAKE_PROJECT_ID,\n projectKey: window.env.AIRBRAKE_PROJECT_KEY,\n host: \"https://panel.sutty.nl\",\n });\n\n console.originalError = console.error;\n console.error = (...e) => {\n window.airbrake.notify(e.join(\" \"));\n return console.originalError(...e);\n };\n}\n\nimport * as Turbo from \"@hotwired/turbo\";\nTurbo.start();\n\nimport { Application } from \"@hotwired/stimulus\";\nwindow.Stimulus = Application.start();\n\nimport BodyScrollController from \"./controllers/body_scroll_controller\";\nimport DeviceDetectorController from \"./controllers/device_detector_controller\";\nimport ButtonCopyController from \"./controllers/button_copy_controller\";\nimport FootnotesController from \"./controllers/footnotes_controller\";\nimport SupportUsController from \"./controllers/support_us_controller\";\n\nStimulus.debug = (window.env.JEKYLL_ENV !== \"production\");\nStimulus.register(\"body-scroll\", BodyScrollController);\nStimulus.register(\"device-detector\", DeviceDetectorController);\nStimulus.register(\"button-copy\", ButtonCopyController);\nStimulus.register(\"footnotes\", FootnotesController);\nStimulus.register(\"support-us\", SupportUsController);\n", "/**\n * @this {Promise}\n */\nfunction finallyConstructor(callback) {\n var constructor = this.constructor;\n return this.then(\n function(value) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n return value;\n });\n },\n function(reason) {\n // @ts-ignore\n return constructor.resolve(callback()).then(function() {\n // @ts-ignore\n return constructor.reject(reason);\n });\n }\n );\n}\n\nexport default finallyConstructor;\n", "function allSettled(arr) {\n var P = this;\n return new P(function(resolve, reject) {\n if (!(arr && typeof arr.length !== 'undefined')) {\n return reject(\n new TypeError(\n typeof arr +\n ' ' +\n arr +\n ' is not iterable(cannot read property Symbol(Symbol.iterator))'\n )\n );\n }\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n function(e) {\n args[i] = { status: 'rejected', reason: e };\n if (--remaining === 0) {\n resolve(args);\n }\n }\n );\n return;\n }\n }\n args[i] = { status: 'fulfilled', value: val };\n if (--remaining === 0) {\n resolve(args);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n}\n\nexport default allSettled;\n", "import promiseFinally from './finally';\nimport allSettled from './allSettled';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction isArray(x) {\n return Boolean(x && typeof x.length !== 'undefined');\n}\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments);\n };\n}\n\n/**\n * @constructor\n * @param {Function} fn\n */\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n /** @type {!number} */\n this._state = 0;\n /** @type {!boolean} */\n this._handled = false;\n /** @type {Promise|undefined} */\n this._value = undefined;\n /** @type {!Array<!Function>} */\n this._deferreds = [];\n\n doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\n\nfunction resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\n\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\n\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\n\n/**\n * @constructor\n */\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n // @ts-ignore\n var prom = new this.constructor(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.all accepts an array'));\n }\n\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n reject\n );\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.allSettled = allSettled;\n\nPromise.resolve = function(value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function(resolve) {\n resolve(value);\n });\n};\n\nPromise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!isArray(arr)) {\n return reject(new TypeError('Promise.race accepts an array'));\n }\n\n for (var i = 0, len = arr.length; i < len; i++) {\n Promise.resolve(arr[i]).then(resolve, reject);\n }\n });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n // @ts-ignore\n (typeof setImmediate === 'function' &&\n function(fn) {\n // @ts-ignore\n setImmediate(fn);\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0);\n };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n};\n\nexport default Promise;\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "/*\nTurbo 7.2.4\nCopyright \u00A9 2022 37signals LLC\n */\n(function () {\n if (window.Reflect === undefined ||\n window.customElements === undefined ||\n window.customElements.polyfillWrapFlushCallback) {\n return;\n }\n const BuiltInHTMLElement = HTMLElement;\n const wrapperForTheName = {\n HTMLElement: function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n },\n };\n window.HTMLElement = wrapperForTheName[\"HTMLElement\"];\n HTMLElement.prototype = BuiltInHTMLElement.prototype;\n HTMLElement.prototype.constructor = HTMLElement;\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(prototype) {\n if (typeof prototype.requestSubmit == \"function\") return\n\n prototype.requestSubmit = function(submitter) {\n if (submitter) {\n validateSubmitter(submitter, this);\n submitter.click();\n } else {\n submitter = document.createElement(\"input\");\n submitter.type = \"submit\";\n submitter.hidden = true;\n this.appendChild(submitter);\n submitter.click();\n this.removeChild(submitter);\n }\n };\n\n function validateSubmitter(submitter, form) {\n submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n }\n\n function raise(errorConstructor, message, name) {\n throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name)\n }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n const candidate = element ? element.closest(\"input, button\") : null;\n return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n const submitter = findSubmitterFromClickTarget(event.target);\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n(function () {\n if (\"submitter\" in Event.prototype)\n return;\n let prototype;\n if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n prototype = window.SubmitEvent.prototype;\n }\n else if (\"SubmitEvent\" in window) {\n return;\n }\n else {\n prototype = window.Event.prototype;\n }\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n },\n });\n})();\n\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n FrameLoadingStyle[\"eager\"] = \"eager\";\n FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n constructor() {\n super();\n this.loaded = Promise.resolve();\n this.delegate = new FrameElement.delegateConstructor(this);\n }\n static get observedAttributes() {\n return [\"disabled\", \"complete\", \"loading\", \"src\"];\n }\n connectedCallback() {\n this.delegate.connect();\n }\n disconnectedCallback() {\n this.delegate.disconnect();\n }\n reload() {\n return this.delegate.sourceURLReloaded();\n }\n attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n }\n else if (name == \"complete\") {\n this.delegate.completeChanged();\n }\n else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n }\n else {\n this.delegate.disabledChanged();\n }\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n }\n else {\n this.removeAttribute(\"src\");\n }\n }\n get loading() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n }\n set loading(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n }\n else {\n this.removeAttribute(\"loading\");\n }\n }\n get disabled() {\n return this.hasAttribute(\"disabled\");\n }\n set disabled(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n }\n else {\n this.removeAttribute(\"disabled\");\n }\n }\n get autoscroll() {\n return this.hasAttribute(\"autoscroll\");\n }\n set autoscroll(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n }\n else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n get complete() {\n return !this.delegate.isLoading;\n }\n get isActive() {\n return this.ownerDocument === document && !this.isPreview;\n }\n get isPreview() {\n var _a, _b;\n return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n }\n}\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n default:\n return FrameLoadingStyle.eager;\n }\n}\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n let anchorMatch;\n if (url.hash) {\n return url.hash.slice(1);\n }\n else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n return anchorMatch[1];\n }\n}\nfunction getAction(form, submitter) {\n const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n return expandURL(action);\n}\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml|php))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n const prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n const anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n constructor(response) {\n this.response = response;\n }\n get succeeded() {\n return this.response.ok;\n }\n get failed() {\n return !this.succeeded;\n }\n get clientError() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n get serverError() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n get redirected() {\n return this.response.redirected;\n }\n get location() {\n return expandURL(this.response.url);\n }\n get isHTML() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n get statusCode() {\n return this.response.status;\n }\n get contentType() {\n return this.header(\"Content-Type\");\n }\n get responseText() {\n return this.response.clone().text();\n }\n get responseHTML() {\n if (this.isHTML) {\n return this.response.clone().text();\n }\n else {\n return Promise.resolve(undefined);\n }\n }\n header(name) {\n return this.response.headers.get(name);\n }\n}\n\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nfunction activateScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n }\n else {\n const createdScriptElement = document.createElement(\"script\");\n const cspNonce = getMetaContent(\"csp-nonce\");\n if (cspNonce) {\n createdScriptElement.nonce = cspNonce;\n }\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (const { name, value } of sourceElement.attributes) {\n destinationElement.setAttribute(name, value);\n }\n}\nfunction createDocumentFragment(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content;\n}\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n const event = new CustomEvent(eventName, {\n cancelable,\n bubbles: true,\n detail,\n });\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n }\n else {\n document.documentElement.dispatchEvent(event);\n }\n return event;\n}\nfunction nextAnimationFrame() {\n return new Promise((resolve) => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n return new Promise((resolve) => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n return Promise.resolve();\n}\nfunction parseHTMLDocument(html = \"\") {\n return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings, ...values) {\n const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n const match = lines[0].match(/^\\s+/);\n const indent = match ? match[0].length : 0;\n return lines.map((line) => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n return strings.reduce((result, string, i) => {\n const value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }, \"\");\n}\nfunction uuid() {\n return Array.from({ length: 36 })\n .map((_, i) => {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\";\n }\n else if (i == 14) {\n return \"4\";\n }\n else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16);\n }\n else {\n return Math.floor(Math.random() * 15).toString(16);\n }\n })\n .join(\"\");\n}\nfunction getAttribute(attributeName, ...elements) {\n for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n if (typeof value == \"string\")\n return value;\n }\n return null;\n}\nfunction hasAttribute(attributeName, ...elements) {\n return elements.some((element) => element && element.hasAttribute(attributeName));\n}\nfunction markAsBusy(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.setAttribute(\"busy\", \"\");\n }\n element.setAttribute(\"aria-busy\", \"true\");\n }\n}\nfunction clearBusyState(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.removeAttribute(\"busy\");\n }\n element.removeAttribute(\"aria-busy\");\n }\n}\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n return new Promise((resolve) => {\n const onComplete = () => {\n element.removeEventListener(\"error\", onComplete);\n element.removeEventListener(\"load\", onComplete);\n resolve();\n };\n element.addEventListener(\"load\", onComplete, { once: true });\n element.addEventListener(\"error\", onComplete, { once: true });\n setTimeout(resolve, timeoutInMilliseconds);\n });\n}\nfunction getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n}\nfunction getVisitAction(...elements) {\n const action = getAttribute(\"data-turbo-action\", ...elements);\n return isAction(action) ? action : null;\n}\nfunction getMetaElement(name) {\n return document.querySelector(`meta[name=\"${name}\"]`);\n}\nfunction getMetaContent(name) {\n const element = getMetaElement(name);\n return element && element.content;\n}\nfunction setMetaContent(name, content) {\n let element = getMetaElement(name);\n if (!element) {\n element = document.createElement(\"meta\");\n element.setAttribute(\"name\", name);\n document.head.appendChild(element);\n }\n element.setAttribute(\"content\", content);\n return element;\n}\n\nvar FetchMethod;\n(function (FetchMethod) {\n FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n case \"post\":\n return FetchMethod.post;\n case \"put\":\n return FetchMethod.put;\n case \"patch\":\n return FetchMethod.patch;\n case \"delete\":\n return FetchMethod.delete;\n }\n}\nclass FetchRequest {\n constructor(delegate, method, location, body = new URLSearchParams(), target = null) {\n this.abortController = new AbortController();\n this.resolveRequestPromise = (_value) => { };\n this.delegate = delegate;\n this.method = method;\n this.headers = this.defaultHeaders;\n this.body = body;\n this.url = location;\n this.target = target;\n }\n get location() {\n return this.url;\n }\n get params() {\n return this.url.searchParams;\n }\n get entries() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n cancel() {\n this.abortController.abort();\n }\n async perform() {\n var _a, _b;\n const { fetchOptions } = this;\n (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n await this.allowRequestToBeIntercepted(fetchOptions);\n try {\n this.delegate.requestStarted(this);\n const response = await fetch(this.url.href, fetchOptions);\n return await this.receive(response);\n }\n catch (error) {\n if (error.name !== \"AbortError\") {\n if (this.willDelegateErrorHandling(error)) {\n this.delegate.requestErrored(this, error);\n }\n throw error;\n }\n }\n finally {\n this.delegate.requestFinished(this);\n }\n }\n async receive(response) {\n const fetchResponse = new FetchResponse(response);\n const event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: { fetchResponse },\n target: this.target,\n });\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n }\n else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n }\n else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n return fetchResponse;\n }\n get fetchOptions() {\n var _a;\n return {\n method: FetchMethod[this.method].toUpperCase(),\n credentials: \"same-origin\",\n headers: this.headers,\n redirect: \"follow\",\n body: this.isIdempotent ? null : this.body,\n signal: this.abortSignal,\n referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,\n };\n }\n get defaultHeaders() {\n return {\n Accept: \"text/html, application/xhtml+xml\",\n };\n }\n get isIdempotent() {\n return this.method == FetchMethod.get;\n }\n get abortSignal() {\n return this.abortController.signal;\n }\n acceptResponseType(mimeType) {\n this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n }\n async allowRequestToBeIntercepted(fetchOptions) {\n const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));\n const event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions,\n url: this.url,\n resume: this.resolveRequestPromise,\n },\n target: this.target,\n });\n if (event.defaultPrevented)\n await requestInterception;\n }\n willDelegateErrorHandling(error) {\n const event = dispatch(\"turbo:fetch-request-error\", {\n target: this.target,\n cancelable: true,\n detail: { request: this, error: error },\n });\n return !event.defaultPrevented;\n }\n}\n\nclass AppearanceObserver {\n constructor(delegate, element) {\n this.started = false;\n this.intersect = (entries) => {\n const lastEntry = entries.slice(-1)[0];\n if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n this.delegate.elementAppearedInViewport(this.element);\n }\n };\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n}\n\nclass StreamMessage {\n constructor(fragment) {\n this.fragment = importStreamElements(fragment);\n }\n static wrap(message) {\n if (typeof message == \"string\") {\n return new this(createDocumentFragment(message));\n }\n else {\n return message;\n }\n }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nfunction importStreamElements(fragment) {\n for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n const streamElement = document.importNode(element, true);\n for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n }\n element.replaceWith(streamElement);\n }\n return fragment;\n}\n\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n FormEnctype[\"multipart\"] = \"multipart/form-data\";\n FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FormEnctype.multipart:\n return FormEnctype.multipart;\n case FormEnctype.plain:\n return FormEnctype.plain;\n default:\n return FormEnctype.urlEncoded;\n }\n}\nclass FormSubmission {\n constructor(delegate, formElement, submitter, mustRedirect = false) {\n this.state = FormSubmissionState.initialized;\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.formData = buildFormData(formElement, submitter);\n this.location = expandURL(this.action);\n if (this.method == FetchMethod.get) {\n mergeFormDataEntries(this.location, [...this.body.entries()]);\n }\n this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n this.mustRedirect = mustRedirect;\n }\n static confirmMethod(message, _element, _submitter) {\n return Promise.resolve(confirm(message));\n }\n get method() {\n var _a;\n const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n }\n get action() {\n var _a;\n const formElementAction = typeof this.formElement.action === \"string\" ? this.formElement.action : null;\n if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"formaction\")) {\n return this.submitter.getAttribute(\"formaction\") || \"\";\n }\n else {\n return this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n }\n }\n get body() {\n if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n return new URLSearchParams(this.stringFormData);\n }\n else {\n return this.formData;\n }\n }\n get enctype() {\n var _a;\n return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n }\n get isIdempotent() {\n return this.fetchRequest.isIdempotent;\n }\n get stringFormData() {\n return [...this.formData].reduce((entries, [name, value]) => {\n return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n }, []);\n }\n async start() {\n const { initialized, requesting } = FormSubmissionState;\n const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n if (typeof confirmationMessage === \"string\") {\n const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);\n if (!answer) {\n return;\n }\n }\n if (this.state == initialized) {\n this.state = requesting;\n return this.fetchRequest.perform();\n }\n }\n stop() {\n const { stopping, stopped } = FormSubmissionState;\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n prepareHeadersForRequest(headers, request) {\n if (!request.isIdempotent) {\n const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n if (token) {\n headers[\"X-CSRF-Token\"] = token;\n }\n }\n if (this.requestAcceptsTurboStreamResponse(request)) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n var _a;\n this.state = FormSubmissionState.waiting;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: { formSubmission: this },\n });\n this.delegate.formSubmissionStarted(this);\n }\n requestPreventedHandlingResponse(request, response) {\n this.result = { success: response.succeeded, fetchResponse: response };\n }\n requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n const error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n }\n else {\n this.state = FormSubmissionState.receiving;\n this.result = { success: true, fetchResponse: response };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n requestFailedWithResponse(request, response) {\n this.result = { success: false, fetchResponse: response };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n requestErrored(request, error) {\n this.result = { success: false, error };\n this.delegate.formSubmissionErrored(this, error);\n }\n requestFinished(_request) {\n var _a;\n this.state = FormSubmissionState.stopped;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: Object.assign({ formSubmission: this }, this.result),\n });\n this.delegate.formSubmissionFinished(this);\n }\n requestMustRedirect(request) {\n return !request.isIdempotent && this.mustRedirect;\n }\n requestAcceptsTurboStreamResponse(request) {\n return !request.isIdempotent || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n }\n}\nfunction buildFormData(formElement, submitter) {\n const formData = new FormData(formElement);\n const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n if (name) {\n formData.append(name, value || \"\");\n }\n return formData;\n}\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n if (cookie) {\n const value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n const searchParams = new URLSearchParams();\n for (const [name, value] of entries) {\n if (value instanceof File)\n continue;\n searchParams.append(name, value);\n }\n url.search = searchParams.toString();\n return url;\n}\n\nclass Snapshot {\n constructor(element) {\n this.element = element;\n }\n get activeElement() {\n return this.element.ownerDocument.activeElement;\n }\n get children() {\n return [...this.element.children];\n }\n hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n }\n get isConnected() {\n return this.element.isConnected;\n }\n get firstAutofocusableElement() {\n const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n for (const element of this.element.querySelectorAll(\"[autofocus]\")) {\n if (element.closest(inertDisabledOrHidden) == null)\n return element;\n else\n continue;\n }\n return null;\n }\n get permanentElements() {\n return queryPermanentElementsAll(this.element);\n }\n getPermanentElementById(id) {\n return getPermanentElementById(this.element, id);\n }\n getPermanentElementMapForSnapshot(snapshot) {\n const permanentElementMap = {};\n for (const currentPermanentElement of this.permanentElements) {\n const { id } = currentPermanentElement;\n const newPermanentElement = snapshot.getPermanentElementById(id);\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n return permanentElementMap;\n }\n}\nfunction getPermanentElementById(node, id) {\n return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\nfunction queryPermanentElementsAll(node) {\n return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n constructor(delegate, eventTarget) {\n this.started = false;\n this.submitCaptured = () => {\n this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n };\n this.submitBubbled = ((event) => {\n if (!event.defaultPrevented) {\n const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n const submitter = event.submitter || undefined;\n if (form &&\n submissionDoesNotDismissDialog(form, submitter) &&\n submissionDoesNotTargetIFrame(form, submitter) &&\n this.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.delegate.formSubmitted(form, submitter);\n }\n }\n });\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n}\nfunction submissionDoesNotDismissDialog(form, submitter) {\n const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n return method != \"dialog\";\n}\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formtarget\")) || form.target;\n for (const element of document.getElementsByName(target)) {\n if (element instanceof HTMLIFrameElement)\n return false;\n }\n return true;\n}\n\nclass View {\n constructor(delegate, element) {\n this.resolveRenderPromise = (_value) => { };\n this.resolveInterceptionPromise = (_value) => { };\n this.delegate = delegate;\n this.element = element;\n }\n scrollToAnchor(anchor) {\n const element = this.snapshot.getElementForAnchor(anchor);\n if (element) {\n this.scrollToElement(element);\n this.focusElement(element);\n }\n else {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n }\n scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n scrollToElement(element) {\n element.scrollIntoView();\n }\n focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n }\n else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n scrollToPosition({ x, y }) {\n this.scrollRoot.scrollTo(x, y);\n }\n scrollToTop() {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n get scrollRoot() {\n return window;\n }\n async render(renderer) {\n const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;\n if (shouldRender) {\n try {\n this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));\n this.renderer = renderer;\n await this.prepareToRenderSnapshot(renderer);\n const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));\n const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };\n const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n if (!immediateRender)\n await renderInterception;\n await this.renderSnapshot(renderer);\n this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n this.delegate.preloadOnLoadLinksForView(this.element);\n this.finishRenderingSnapshot(renderer);\n }\n finally {\n delete this.renderer;\n this.resolveRenderPromise(undefined);\n delete this.renderPromise;\n }\n }\n else {\n this.invalidate(renderer.reloadReason);\n }\n }\n invalidate(reason) {\n this.delegate.viewInvalidated(reason);\n }\n async prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n await renderer.prepareToRender();\n }\n markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n }\n else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n async renderSnapshot(renderer) {\n await renderer.render();\n }\n finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n}\n\nclass FrameView extends View {\n invalidate() {\n this.element.innerHTML = \"\";\n }\n get snapshot() {\n return new Snapshot(this.element);\n }\n}\n\nclass LinkInterceptor {\n constructor(delegate, element) {\n this.clickBubbled = (event) => {\n if (this.respondsToEventTarget(event.target)) {\n this.clickEvent = event;\n }\n else {\n delete this.clickEvent;\n }\n };\n this.linkClicked = ((event) => {\n if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n this.clickEvent.preventDefault();\n event.preventDefault();\n this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n }\n }\n delete this.clickEvent;\n });\n this.willVisit = ((_event) => {\n delete this.clickEvent;\n });\n this.delegate = delegate;\n this.element = element;\n }\n start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n respondsToEventTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n return element && element.closest(\"turbo-frame, html\") == this.element;\n }\n}\n\nclass LinkClickObserver {\n constructor(delegate, eventTarget) {\n this.started = false;\n this.clickCaptured = () => {\n this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n };\n this.clickBubbled = (event) => {\n if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n const target = (event.composedPath && event.composedPath()[0]) || event.target;\n const link = this.findLinkFromClickTarget(target);\n if (link && doesNotTargetIFrame(link)) {\n const location = this.getLocationForLink(link);\n if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n event.preventDefault();\n this.delegate.followedLinkToLocation(link, location);\n }\n }\n }\n };\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n clickEventIsSignificant(event) {\n return !((event.target && event.target.isContentEditable) ||\n event.defaultPrevented ||\n event.which > 1 ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey);\n }\n findLinkFromClickTarget(target) {\n if (target instanceof Element) {\n return target.closest(\"a[href]:not([target^=_]):not([download])\");\n }\n }\n getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n }\n}\nfunction doesNotTargetIFrame(anchor) {\n for (const element of document.getElementsByName(anchor.target)) {\n if (element instanceof HTMLIFrameElement)\n return false;\n }\n return true;\n}\n\nclass FormLinkClickObserver {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.linkInterceptor = new LinkClickObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n }\n stop() {\n this.linkInterceptor.stop();\n }\n willFollowLinkToLocation(link, location, originalEvent) {\n return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n link.hasAttribute(\"data-turbo-method\"));\n }\n followedLinkToLocation(link, location) {\n const action = location.href;\n const form = document.createElement(\"form\");\n form.setAttribute(\"data-turbo\", \"true\");\n form.setAttribute(\"action\", action);\n form.setAttribute(\"hidden\", \"\");\n const method = link.getAttribute(\"data-turbo-method\");\n if (method)\n form.setAttribute(\"method\", method);\n const turboFrame = link.getAttribute(\"data-turbo-frame\");\n if (turboFrame)\n form.setAttribute(\"data-turbo-frame\", turboFrame);\n const turboAction = link.getAttribute(\"data-turbo-action\");\n if (turboAction)\n form.setAttribute(\"data-turbo-action\", turboAction);\n const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n if (turboConfirm)\n form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n const turboStream = link.hasAttribute(\"data-turbo-stream\");\n if (turboStream)\n form.setAttribute(\"data-turbo-stream\", \"\");\n this.delegate.submittedFormLinkToLocation(link, location, form);\n document.body.appendChild(form);\n form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n requestAnimationFrame(() => form.requestSubmit());\n }\n}\n\nclass Bardo {\n constructor(delegate, permanentElementMap) {\n this.delegate = delegate;\n this.permanentElementMap = permanentElementMap;\n }\n static preservingPermanentElements(delegate, permanentElementMap, callback) {\n const bardo = new this(delegate, permanentElementMap);\n bardo.enter();\n callback();\n bardo.leave();\n }\n enter() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n leave() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement] = this.permanentElementMap[id];\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n this.delegate.leavingBardo(currentPermanentElement);\n }\n }\n replaceNewPermanentElementWithPlaceholder(permanentElement) {\n const placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n replaceCurrentPermanentElementWithClone(permanentElement) {\n const clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n replacePlaceholderWithPermanentElement(permanentElement) {\n const placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n }\n getPlaceholderById(id) {\n return this.placeholders.find((element) => element.content == id);\n }\n get placeholders() {\n return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n const element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\n\nclass Renderer {\n constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n this.activeElement = null;\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.willRender = willRender;\n this.renderElement = renderElement;\n this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n }\n get shouldRender() {\n return true;\n }\n get reloadReason() {\n return;\n }\n prepareToRender() {\n return;\n }\n finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n preservingPermanentElements(callback) {\n Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n }\n focusFirstAutofocusableElement() {\n const element = this.connectedSnapshot.firstAutofocusableElement;\n if (elementIsFocusable(element)) {\n element.focus();\n }\n }\n enteringBardo(currentPermanentElement) {\n if (this.activeElement)\n return;\n if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n this.activeElement = this.currentSnapshot.activeElement;\n }\n }\n leavingBardo(currentPermanentElement) {\n if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {\n this.activeElement.focus();\n this.activeElement = null;\n }\n }\n get connectedSnapshot() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n get currentElement() {\n return this.currentSnapshot.element;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n get permanentElementMap() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n}\nfunction elementIsFocusable(element) {\n return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n this.delegate = delegate;\n }\n static renderElement(currentElement, newElement) {\n var _a;\n const destinationRange = document.createRange();\n destinationRange.selectNodeContents(currentElement);\n destinationRange.deleteContents();\n const frameElement = newElement;\n const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n currentElement.appendChild(sourceRange.extractContents());\n }\n }\n get shouldRender() {\n return true;\n }\n async render() {\n await nextAnimationFrame();\n this.preservingPermanentElements(() => {\n this.loadFrameElement();\n });\n this.scrollFrameIntoView();\n await nextAnimationFrame();\n this.focusFirstAutofocusableElement();\n await nextAnimationFrame();\n this.activateScriptElements();\n }\n loadFrameElement() {\n this.delegate.willRenderFrame(this.currentElement, this.newElement);\n this.renderElement(this.currentElement, this.newElement);\n }\n scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n const element = this.currentElement.firstElementChild;\n const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n if (element) {\n element.scrollIntoView({ block, behavior });\n return true;\n }\n }\n return false;\n }\n activateScriptElements() {\n for (const inertScriptElement of this.newScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n get newScriptElements() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\nfunction readScrollBehavior(value, defaultValue) {\n if (value == \"auto\" || value == \"smooth\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\n\nclass ProgressBar {\n constructor() {\n this.hiding = false;\n this.value = 0;\n this.visible = false;\n this.trickle = () => {\n this.setValue(this.value + Math.random() / 100);\n };\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n static get defaultCSS() {\n return unindent `\n .turbo-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 2147483647;\n transition:\n width ${ProgressBar.animationDuration}ms ease-out,\n opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n transform: translate3d(0, 0, 0);\n }\n `;\n }\n show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n hide() {\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(() => {\n this.uninstallProgressElement();\n this.stopTrickling();\n this.visible = false;\n this.hiding = false;\n });\n }\n }\n setValue(value) {\n this.value = value;\n this.refresh();\n }\n installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n refresh() {\n requestAnimationFrame(() => {\n this.progressElement.style.width = `${10 + this.value * 90}%`;\n });\n }\n createStylesheetElement() {\n const element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n if (this.cspNonce) {\n element.nonce = this.cspNonce;\n }\n return element;\n }\n createProgressElement() {\n const element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n get cspNonce() {\n return getMetaContent(\"csp-nonce\");\n }\n}\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n constructor() {\n super(...arguments);\n this.detailsByOuterHTML = this.children\n .filter((element) => !elementIsNoscript(element))\n .map((element) => elementWithoutNonce(element))\n .reduce((result, element) => {\n const { outerHTML } = element;\n const details = outerHTML in result\n ? result[outerHTML]\n : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: [],\n };\n return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });\n }, {});\n }\n get trackedElementSignature() {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n .join(\"\");\n }\n getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n .filter(({ type }) => type == matchedType)\n .map(({ elements: [element] }) => element);\n }\n get provisionalElements() {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n if (type == null && !tracked) {\n return [...result, ...elements];\n }\n else if (elements.length > 1) {\n return [...result, ...elements.slice(1)];\n }\n else {\n return result;\n }\n }, []);\n }\n getMetaValue(name) {\n const element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n findMetaElementByName(name) {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const { elements: [element], } = this.detailsByOuterHTML[outerHTML];\n return elementIsMetaElementWithName(element, name) ? element : result;\n }, undefined);\n }\n}\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n }\n else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n const tagName = element.localName;\n return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n const tagName = element.localName;\n return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n const tagName = element.localName;\n return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\");\n}\nfunction elementIsMetaElementWithName(element, name) {\n const tagName = element.localName;\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n return element;\n}\n\nclass PageSnapshot extends Snapshot {\n constructor(element, headSnapshot) {\n super(element);\n this.headSnapshot = headSnapshot;\n }\n static fromHTMLString(html = \"\") {\n return this.fromDocument(parseHTMLDocument(html));\n }\n static fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n static fromDocument({ head, body }) {\n return new this(body, new HeadSnapshot(head));\n }\n clone() {\n const clonedElement = this.element.cloneNode(true);\n const selectElements = this.element.querySelectorAll(\"select\");\n const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n for (const [index, source] of selectElements.entries()) {\n const clone = clonedSelectElements[index];\n for (const option of clone.selectedOptions)\n option.selected = false;\n for (const option of source.selectedOptions)\n clone.options[option.index].selected = true;\n }\n for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n clonedPasswordInput.value = \"\";\n }\n return new PageSnapshot(clonedElement, this.headSnapshot);\n }\n get headElement() {\n return this.headSnapshot.element;\n }\n get rootLocation() {\n var _a;\n const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n get cacheControlValue() {\n return this.getSetting(\"cache-control\");\n }\n get isPreviewable() {\n return this.cacheControlValue != \"no-preview\";\n }\n get isCacheable() {\n return this.cacheControlValue != \"no-cache\";\n }\n get isVisitable() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n getSetting(name) {\n return this.headSnapshot.getMetaValue(`turbo-${name}`);\n }\n}\n\nvar TimingMetric;\n(function (TimingMetric) {\n TimingMetric[\"visitStart\"] = \"visitStart\";\n TimingMetric[\"requestStart\"] = \"requestStart\";\n TimingMetric[\"requestEnd\"] = \"requestEnd\";\n TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n VisitState[\"initialized\"] = \"initialized\";\n VisitState[\"started\"] = \"started\";\n VisitState[\"canceled\"] = \"canceled\";\n VisitState[\"failed\"] = \"failed\";\n VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n action: \"advance\",\n historyChanged: false,\n visitCachedSnapshot: () => { },\n willRender: true,\n updateHistory: true,\n shouldCacheSnapshot: true,\n acceptsStreamResponse: false,\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n constructor(delegate, location, restorationIdentifier, options = {}) {\n this.identifier = uuid();\n this.timingMetrics = {};\n this.followedRedirect = false;\n this.historyChanged = false;\n this.scrolled = false;\n this.shouldCacheSnapshot = true;\n this.acceptsStreamResponse = false;\n this.snapshotCached = false;\n this.state = VisitState.initialized;\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshot = snapshot;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n this.visitCachedSnapshot = visitCachedSnapshot;\n this.willRender = willRender;\n this.updateHistory = updateHistory;\n this.scrolled = !willRender;\n this.shouldCacheSnapshot = shouldCacheSnapshot;\n this.acceptsStreamResponse = acceptsStreamResponse;\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n get restorationData() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n get silent() {\n return this.isSamePage;\n }\n start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.state = VisitState.completed;\n this.followRedirect();\n if (!this.followedRedirect) {\n this.adapter.visitCompleted(this);\n this.delegate.visitCompleted(this);\n }\n }\n }\n fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n }\n }\n changeHistory() {\n var _a;\n if (!this.historyChanged && this.updateHistory) {\n const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n const method = getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n }\n else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n recordResponse(response = this.response) {\n this.response = response;\n if (response) {\n const { statusCode } = response;\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n }\n else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n loadResponse() {\n if (this.response) {\n const { statusCode, responseHTML } = this.response;\n this.render(async () => {\n if (this.shouldCacheSnapshot)\n this.cacheSnapshot();\n if (this.view.renderPromise)\n await this.view.renderPromise;\n if (isSuccessful(statusCode) && responseHTML != null) {\n await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);\n this.performScroll();\n this.adapter.visitRendered(this);\n this.complete();\n }\n else {\n await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n this.adapter.visitRendered(this);\n this.fail();\n }\n });\n }\n }\n getCachedSnapshot() {\n const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot;\n }\n }\n }\n getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n loadCachedSnapshot() {\n const snapshot = this.getCachedSnapshot();\n if (snapshot) {\n const isPreview = this.shouldIssueRequest();\n this.render(async () => {\n this.cacheSnapshot();\n if (this.isSamePage) {\n this.adapter.visitRendered(this);\n }\n else {\n if (this.view.renderPromise)\n await this.view.renderPromise;\n await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n this.performScroll();\n this.adapter.visitRendered(this);\n if (!isPreview) {\n this.complete();\n }\n }\n });\n }\n }\n followRedirect() {\n var _a;\n if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: \"replace\",\n response: this.response,\n });\n this.followedRedirect = true;\n }\n }\n goToSamePageAnchor() {\n if (this.isSamePage) {\n this.render(async () => {\n this.cacheSnapshot();\n this.performScroll();\n this.changeHistory();\n this.adapter.visitRendered(this);\n });\n }\n }\n prepareHeadersForRequest(headers, request) {\n if (this.acceptsStreamResponse) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted() {\n this.startRequest();\n }\n requestPreventedHandlingResponse(_request, _response) { }\n async requestSucceededWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected,\n });\n }\n else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n async requestFailedWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected,\n });\n }\n else {\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n requestErrored(_request, _error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure,\n redirected: false,\n });\n }\n requestFinished() {\n this.finishRequest();\n }\n performScroll() {\n if (!this.scrolled && !this.view.forceReloaded) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n }\n else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n this.scrolled = true;\n }\n }\n scrollToRestoredPosition() {\n const { scrollPosition } = this.restorationData;\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n scrollToAnchor() {\n const anchor = getAnchor(this.location);\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n getTimingMetrics() {\n return Object.assign({}, this.timingMetrics);\n }\n getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n }\n hasPreloadedResponse() {\n return typeof this.response == \"object\";\n }\n shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n }\n else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n }\n else {\n return this.willRender;\n }\n }\n cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n this.snapshotCached = true;\n }\n }\n async render(callback) {\n this.cancelRender();\n await new Promise((resolve) => {\n this.frame = requestAnimationFrame(() => resolve());\n });\n await callback();\n delete this.frame;\n }\n cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n}\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n constructor(session) {\n this.progressBar = new ProgressBar();\n this.showProgressBar = () => {\n this.progressBar.show();\n };\n this.session = session;\n }\n visitProposedToLocation(location, options) {\n this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);\n }\n visitStarted(visit) {\n this.location = visit.location;\n visit.loadCachedSnapshot();\n visit.issueRequest();\n visit.goToSamePageAnchor();\n }\n visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n }\n else {\n this.showProgressBar();\n }\n }\n visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload({\n reason: \"request_failed\",\n context: {\n statusCode,\n },\n });\n default:\n return visit.loadResponse();\n }\n }\n visitRequestFinished(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n visitCompleted(_visit) { }\n pageInvalidated(reason) {\n this.reload(reason);\n }\n visitFailed(_visit) { }\n visitRendered(_visit) { }\n formSubmissionStarted(_formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n formSubmissionFinished(_formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n hideVisitProgressBar() {\n this.progressBar.hide();\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n hideFormProgressBar() {\n this.progressBar.hide();\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n reload(reason) {\n var _a;\n dispatch(\"turbo:reload\", { detail: reason });\n window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;\n }\n get navigator() {\n return this.session.navigator;\n }\n}\n\nclass CacheObserver {\n constructor() {\n this.started = false;\n this.removeStaleElements = ((_event) => {\n const staleElements = [...document.querySelectorAll('[data-turbo-cache=\"false\"]')];\n for (const element of staleElements) {\n element.remove();\n }\n });\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n}\n\nclass FrameRedirector {\n constructor(session, element) {\n this.session = session;\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formSubmitObserver = new FormSubmitObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n stop() {\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.shouldRedirect(element);\n }\n linkClickIntercepted(element, url, event) {\n const frame = this.findFrameElement(element);\n if (frame) {\n frame.delegate.linkClickIntercepted(element, url, event);\n }\n }\n willSubmitForm(element, submitter) {\n return (element.closest(\"turbo-frame\") == null &&\n this.shouldSubmit(element, submitter) &&\n this.shouldRedirect(element, submitter));\n }\n formSubmitted(element, submitter) {\n const frame = this.findFrameElement(element, submitter);\n if (frame) {\n frame.delegate.formSubmitted(element, submitter);\n }\n }\n shouldSubmit(form, submitter) {\n var _a;\n const action = getAction(form, submitter);\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n }\n shouldRedirect(element, submitter) {\n const isNavigatable = element instanceof HTMLFormElement\n ? this.session.submissionIsNavigatable(element, submitter)\n : this.session.elementIsNavigatable(element);\n if (isNavigatable) {\n const frame = this.findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n }\n else {\n return false;\n }\n }\n findFrameElement(element, submitter) {\n const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n if (id && id != \"_top\") {\n const frame = this.element.querySelector(`#${id}:not([disabled])`);\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n}\n\nclass History {\n constructor(delegate) {\n this.restorationIdentifier = uuid();\n this.restorationData = {};\n this.started = false;\n this.pageLoaded = false;\n this.onPopState = (event) => {\n if (this.shouldHandlePopState()) {\n const { turbo } = event.state || {};\n if (turbo) {\n this.location = new URL(window.location.href);\n const { restorationIdentifier } = turbo;\n this.restorationIdentifier = restorationIdentifier;\n this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n }\n }\n };\n this.onPageLoad = async (_event) => {\n await nextMicrotask();\n this.pageLoaded = true;\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n addEventListener(\"load\", this.onPageLoad, false);\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n update(method, location, restorationIdentifier = uuid()) {\n const state = { turbo: { restorationIdentifier } };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n updateRestorationData(additionalData) {\n const { restorationIdentifier } = this;\n const restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n }\n assumeControlOfScrollRestoration() {\n var _a;\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n}\n\nclass Navigator {\n constructor(delegate) {\n this.delegate = delegate;\n }\n proposeVisit(location, options = {}) {\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n else {\n window.location.href = location.toString();\n }\n }\n }\n startVisit(locatable, restorationIdentifier, options = {}) {\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));\n this.currentVisit.start();\n }\n submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n this.formSubmission.start();\n }\n stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === \"function\") {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n if (formSubmission == this.formSubmission) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const shouldCacheSnapshot = formSubmission.method == FetchMethod.get;\n if (!shouldCacheSnapshot) {\n this.view.clearSnapshotCache();\n }\n const { statusCode, redirected } = fetchResponse;\n const action = this.getActionForFormSubmission(formSubmission);\n const visitOptions = {\n action,\n shouldCacheSnapshot,\n response: { statusCode, responseHTML, redirected },\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n }\n }\n async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n if (fetchResponse.serverError) {\n await this.view.renderError(snapshot, this.currentVisit);\n }\n else {\n await this.view.renderPage(snapshot, false, true, this.currentVisit);\n }\n this.view.scrollToTop();\n this.view.clearSnapshotCache();\n }\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === \"function\") {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n }\n locationWithActionIsSamePage(location, action) {\n const anchor = getAnchor(location);\n const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n return (action !== \"replace\" &&\n getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&\n (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n getActionForFormSubmission(formSubmission) {\n const { formElement, submitter } = formSubmission;\n const action = getAttribute(\"data-turbo-action\", submitter, formElement);\n return isAction(action) ? action : \"advance\";\n }\n}\n\nvar PageStage;\n(function (PageStage) {\n PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n constructor(delegate) {\n this.stage = PageStage.initial;\n this.started = false;\n this.interpretReadyState = () => {\n const { readyState } = this;\n if (readyState == \"interactive\") {\n this.pageIsInteractive();\n }\n else if (readyState == \"complete\") {\n this.pageIsComplete();\n }\n };\n this.pageWillUnload = () => {\n this.delegate.pageWillUnload();\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n pageIsComplete() {\n this.pageIsInteractive();\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n get readyState() {\n return document.readyState;\n }\n}\n\nclass ScrollObserver {\n constructor(delegate) {\n this.started = false;\n this.onScroll = () => {\n this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n}\n\nclass StreamMessageRenderer {\n render({ fragment }) {\n Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));\n }\n enteringBardo(currentPermanentElement, newPermanentElement) {\n newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n }\n leavingBardo() { }\n}\nfunction getPermanentElementMapForFragment(fragment) {\n const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n const permanentElementMap = {};\n for (const permanentElementInDocument of permanentElementsInDocument) {\n const { id } = permanentElementInDocument;\n for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n if (elementInStream) {\n permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n }\n }\n }\n return permanentElementMap;\n}\n\nclass StreamObserver {\n constructor(delegate) {\n this.sources = new Set();\n this.started = false;\n this.inspectFetchResponse = ((event) => {\n const response = fetchResponseFromEvent(event);\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n this.receiveMessageResponse(response);\n }\n });\n this.receiveMessageEvent = (event) => {\n if (this.started && typeof event.data == \"string\") {\n this.receiveMessageHTML(event.data);\n }\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n async receiveMessageResponse(response) {\n const html = await response.responseHTML;\n if (html) {\n this.receiveMessageHTML(html);\n }\n }\n receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n }\n}\nfunction fetchResponseFromEvent(event) {\n var _a;\n const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\nfunction fetchResponseIsStream(response) {\n var _a;\n const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const { documentElement, body } = document;\n documentElement.replaceChild(newElement, body);\n }\n async render() {\n this.replaceHeadAndBody();\n this.activateScriptElements();\n }\n replaceHeadAndBody() {\n const { documentElement, head } = document;\n documentElement.replaceChild(this.newHead, head);\n this.renderElement(this.currentElement, this.newElement);\n }\n activateScriptElements() {\n for (const replaceableElement of this.scriptElements) {\n const parentNode = replaceableElement.parentNode;\n if (parentNode) {\n const element = activateScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n }\n get newHead() {\n return this.newSnapshot.headSnapshot.element;\n }\n get scriptElements() {\n return document.documentElement.querySelectorAll(\"script\");\n }\n}\n\nclass PageRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n if (document.body && newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(newElement);\n }\n else {\n document.documentElement.appendChild(newElement);\n }\n }\n get shouldRender() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n get reloadReason() {\n if (!this.newSnapshot.isVisitable) {\n return {\n reason: \"turbo_visit_control_is_reload\",\n };\n }\n if (!this.trackedElementsAreIdentical) {\n return {\n reason: \"tracked_element_mismatch\",\n };\n }\n }\n async prepareToRender() {\n await this.mergeHead();\n }\n async render() {\n if (this.willRender) {\n this.replaceBody();\n }\n }\n finishRendering() {\n super.finishRendering();\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n get currentHeadSnapshot() {\n return this.currentSnapshot.headSnapshot;\n }\n get newHeadSnapshot() {\n return this.newSnapshot.headSnapshot;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n async mergeHead() {\n const newStylesheetElements = this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n this.removeCurrentHeadProvisionalElements();\n this.copyNewHeadProvisionalElements();\n await newStylesheetElements;\n }\n replaceBody() {\n this.preservingPermanentElements(() => {\n this.activateNewBody();\n this.assignNewBody();\n });\n }\n get trackedElementsAreIdentical() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n async copyNewHeadStylesheetElements() {\n const loadingElements = [];\n for (const element of this.newHeadStylesheetElements) {\n loadingElements.push(waitForLoad(element));\n document.head.appendChild(element);\n }\n await Promise.all(loadingElements);\n }\n copyNewHeadScriptElements() {\n for (const element of this.newHeadScriptElements) {\n document.head.appendChild(activateScriptElement(element));\n }\n }\n removeCurrentHeadProvisionalElements() {\n for (const element of this.currentHeadProvisionalElements) {\n document.head.removeChild(element);\n }\n }\n copyNewHeadProvisionalElements() {\n for (const element of this.newHeadProvisionalElements) {\n document.head.appendChild(element);\n }\n }\n activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n activateNewBodyScriptElements() {\n for (const inertScriptElement of this.newBodyScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n assignNewBody() {\n this.renderElement(this.currentElement, this.newElement);\n }\n get newHeadStylesheetElements() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get newHeadScriptElements() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get currentHeadProvisionalElements() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n get newHeadProvisionalElements() {\n return this.newHeadSnapshot.provisionalElements;\n }\n get newBodyScriptElements() {\n return this.newElement.querySelectorAll(\"script\");\n }\n}\n\nclass SnapshotCache {\n constructor(size) {\n this.keys = [];\n this.snapshots = {};\n this.size = size;\n }\n has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n get(location) {\n if (this.has(location)) {\n const snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n clear() {\n this.snapshots = {};\n }\n read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n touch(location) {\n const key = toCacheKey(location);\n const index = this.keys.indexOf(key);\n if (index > -1)\n this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n trim() {\n for (const key of this.keys.splice(this.size)) {\n delete this.snapshots[key];\n }\n }\n}\n\nclass PageView extends View {\n constructor() {\n super(...arguments);\n this.snapshotCache = new SnapshotCache(10);\n this.lastRenderedLocation = new URL(location.href);\n this.forceReloaded = false;\n }\n renderPage(snapshot, isPreview = false, willRender = true, visit) {\n const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);\n if (!renderer.shouldRender) {\n this.forceReloaded = true;\n }\n else {\n visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n }\n return this.render(renderer);\n }\n renderError(snapshot, visit) {\n visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);\n return this.render(renderer);\n }\n clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n async cacheSnapshot(snapshot = this.snapshot) {\n if (snapshot.isCacheable) {\n this.delegate.viewWillCacheSnapshot();\n const { lastRenderedLocation: location } = this;\n await nextEventLoopTick();\n const cachedSnapshot = snapshot.clone();\n this.snapshotCache.put(location, cachedSnapshot);\n return cachedSnapshot;\n }\n }\n getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n get snapshot() {\n return PageSnapshot.fromElement(this.element);\n }\n}\n\nclass Preloader {\n constructor(delegate) {\n this.selector = \"a[data-turbo-preload]\";\n this.delegate = delegate;\n }\n get snapshotCache() {\n return this.delegate.navigator.view.snapshotCache;\n }\n start() {\n if (document.readyState === \"loading\") {\n return document.addEventListener(\"DOMContentLoaded\", () => {\n this.preloadOnLoadLinksForView(document.body);\n });\n }\n else {\n this.preloadOnLoadLinksForView(document.body);\n }\n }\n preloadOnLoadLinksForView(element) {\n for (const link of element.querySelectorAll(this.selector)) {\n this.preloadURL(link);\n }\n }\n async preloadURL(link) {\n const location = new URL(link.href);\n if (this.snapshotCache.has(location)) {\n return;\n }\n try {\n const response = await fetch(location.toString(), { headers: { \"VND.PREFETCH\": \"true\", Accept: \"text/html\" } });\n const responseText = await response.text();\n const snapshot = PageSnapshot.fromHTMLString(responseText);\n this.snapshotCache.put(location, snapshot);\n }\n catch (_) {\n }\n }\n}\n\nclass Session {\n constructor() {\n this.navigator = new Navigator(this);\n this.history = new History(this);\n this.preloader = new Preloader(this);\n this.view = new PageView(this, document.documentElement);\n this.adapter = new BrowserAdapter(this);\n this.pageObserver = new PageObserver(this);\n this.cacheObserver = new CacheObserver();\n this.linkClickObserver = new LinkClickObserver(this, window);\n this.formSubmitObserver = new FormSubmitObserver(this, document);\n this.scrollObserver = new ScrollObserver(this);\n this.streamObserver = new StreamObserver(this);\n this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);\n this.frameRedirector = new FrameRedirector(this, document.documentElement);\n this.streamMessageRenderer = new StreamMessageRenderer();\n this.drive = true;\n this.enabled = true;\n this.progressBarDelay = 500;\n this.started = false;\n this.formMode = \"on\";\n }\n start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.formLinkClickObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.preloader.start();\n this.started = true;\n this.enabled = true;\n }\n }\n disable() {\n this.enabled = false;\n }\n stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.started = false;\n }\n }\n registerAdapter(adapter) {\n this.adapter = adapter;\n }\n visit(location, options = {}) {\n const frameElement = options.frame ? document.getElementById(options.frame) : null;\n if (frameElement instanceof FrameElement) {\n frameElement.src = location.toString();\n frameElement.loaded;\n }\n else {\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }\n connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n renderStreamMessage(message) {\n this.streamMessageRenderer.render(StreamMessage.wrap(message));\n }\n clearCache() {\n this.view.clearSnapshotCache();\n }\n setProgressBarDelay(delay) {\n this.progressBarDelay = delay;\n }\n setFormMode(mode) {\n this.formMode = mode;\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true,\n });\n }\n else {\n this.adapter.pageInvalidated({\n reason: \"turbo_disabled\",\n });\n }\n }\n scrollPositionChanged(position) {\n this.history.updateRestorationData({ scrollPosition: position });\n }\n willSubmitFormLinkToLocation(link, location) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n }\n submittedFormLinkToLocation() { }\n willFollowLinkToLocation(link, location, event) {\n return (this.elementIsNavigatable(link) &&\n locationIsVisitable(location, this.snapshot.rootLocation) &&\n this.applicationAllowsFollowingLinkToLocation(link, location, event));\n }\n followedLinkToLocation(link, location) {\n const action = this.getActionForLink(link);\n const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n this.visit(location.href, { action, acceptsStreamResponse });\n }\n allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n visitStarted(visit) {\n if (!visit.acceptsStreamResponse) {\n markAsBusy(document.documentElement);\n }\n extendURLWithDeprecatedProperties(visit.location);\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n visitCompleted(visit) {\n clearBusyState(document.documentElement);\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n willSubmitForm(form, submitter) {\n const action = getAction(form, submitter);\n return (this.submissionIsNavigatable(form, submitter) &&\n locationIsVisitable(expandURL(action), this.snapshot.rootLocation));\n }\n formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n viewWillCacheSnapshot() {\n var _a;\n if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n allowsImmediateRender({ element }, options) {\n const event = this.notifyApplicationBeforeRender(element, options);\n const { defaultPrevented, detail: { render }, } = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender();\n }\n preloadOnLoadLinksForView(element) {\n this.preloader.preloadOnLoadLinksForView(element);\n }\n viewInvalidated(reason) {\n this.adapter.pageInvalidated(reason);\n }\n frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n applicationAllowsFollowingLinkToLocation(link, location, ev) {\n const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n return !event.defaultPrevented;\n }\n applicationAllowsVisitingLocation(location) {\n const event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: { url: location.href, originalEvent: event },\n cancelable: true,\n });\n }\n notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: { url: location.href },\n cancelable: true,\n });\n }\n notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", { detail: { url: location.href, action } });\n }\n notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n notifyApplicationBeforeRender(newBody, options) {\n return dispatch(\"turbo:before-render\", {\n detail: Object.assign({ newBody }, options),\n cancelable: true,\n });\n }\n notifyApplicationAfterRender() {\n return dispatch(\"turbo:render\");\n }\n notifyApplicationAfterPageLoad(timing = {}) {\n return dispatch(\"turbo:load\", {\n detail: { url: this.location.href, timing },\n });\n }\n notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString(),\n }));\n }\n notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", { target: frame });\n }\n notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: { fetchResponse },\n target: frame,\n cancelable: true,\n });\n }\n submissionIsNavigatable(form, submitter) {\n if (this.formMode == \"off\") {\n return false;\n }\n else {\n const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n if (this.formMode == \"optin\") {\n return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n }\n else {\n return submitterIsNavigatable && this.elementIsNavigatable(form);\n }\n }\n }\n elementIsNavigatable(element) {\n const container = element.closest(\"[data-turbo]\");\n const withinFrame = element.closest(\"turbo-frame\");\n if (this.drive || withinFrame) {\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\";\n }\n else {\n return true;\n }\n }\n else {\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\";\n }\n else {\n return false;\n }\n }\n }\n getActionForLink(link) {\n const action = link.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n get snapshot() {\n return this.view.snapshot;\n }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get() {\n return this.toString();\n },\n },\n};\n\nclass Cache {\n constructor(session) {\n this.session = session;\n }\n clear() {\n this.session.clearCache();\n }\n resetCacheControl() {\n this.setCacheControl(\"\");\n }\n exemptPageFromCache() {\n this.setCacheControl(\"no-cache\");\n }\n exemptPageFromPreview() {\n this.setCacheControl(\"no-preview\");\n }\n setCacheControl(value) {\n setMetaContent(\"turbo-cache-control\", value);\n }\n}\n\nconst StreamActions = {\n after() {\n this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });\n },\n append() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.append(this.templateContent));\n },\n before() {\n this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });\n },\n prepend() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.prepend(this.templateContent));\n },\n remove() {\n this.targetElements.forEach((e) => e.remove());\n },\n replace() {\n this.targetElements.forEach((e) => e.replaceWith(this.templateContent));\n },\n update() {\n this.targetElements.forEach((e) => e.replaceChildren(this.templateContent));\n },\n};\n\nconst session = new Session();\nconst cache = new Cache(session);\nconst { navigator: navigator$1 } = session;\nfunction start() {\n session.start();\n}\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\nfunction clearCache() {\n console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n FormSubmission.confirmMethod = confirmMethod;\n}\nfunction setFormMode(mode) {\n session.setFormMode(mode);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n __proto__: null,\n navigator: navigator$1,\n session: session,\n cache: cache,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n FrameRenderer: FrameRenderer,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n clearCache: clearCache,\n setProgressBarDelay: setProgressBarDelay,\n setConfirmMethod: setConfirmMethod,\n setFormMode: setFormMode,\n StreamActions: StreamActions\n});\n\nclass FrameController {\n constructor(element) {\n this.fetchResponseLoaded = (_fetchResponse) => { };\n this.currentFetchRequest = null;\n this.resolveVisitPromise = () => { };\n this.connected = false;\n this.hasBeenLoaded = false;\n this.ignoredAttributes = new Set();\n this.action = null;\n this.visitCachedSnapshot = ({ element }) => {\n const frame = element.querySelector(\"#\" + this.element.id);\n if (frame && this.previousFrameElement) {\n frame.replaceChildren(...this.previousFrameElement.children);\n }\n delete this.previousFrameElement;\n };\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.restorationIdentifier = uuid();\n this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n }\n connect() {\n if (!this.connected) {\n this.connected = true;\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n else {\n this.loadSourceURL();\n }\n this.formLinkClickObserver.start();\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n }\n disconnect() {\n if (this.connected) {\n this.connected = false;\n this.appearanceObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n }\n disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.loadSourceURL();\n }\n }\n sourceURLChanged() {\n if (this.isIgnoringChangesTo(\"src\"))\n return;\n if (this.element.isConnected) {\n this.complete = false;\n }\n if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n this.loadSourceURL();\n }\n }\n sourceURLReloaded() {\n const { src } = this.element;\n this.ignoringChangesToAttribute(\"complete\", () => {\n this.element.removeAttribute(\"complete\");\n });\n this.element.src = null;\n this.element.src = src;\n return this.element.loaded;\n }\n completeChanged() {\n if (this.isIgnoringChangesTo(\"complete\"))\n return;\n this.loadSourceURL();\n }\n loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n else {\n this.appearanceObserver.stop();\n this.loadSourceURL();\n }\n }\n async loadSourceURL() {\n if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n this.element.loaded = this.visit(expandURL(this.sourceURL));\n this.appearanceObserver.stop();\n await this.element.loaded;\n this.hasBeenLoaded = true;\n }\n }\n async loadResponse(fetchResponse) {\n if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n this.sourceURL = fetchResponse.response.url;\n }\n try {\n const html = await fetchResponse.responseHTML;\n if (html) {\n const { body } = parseHTMLDocument(html);\n const newFrameElement = await this.extractForeignFrameElement(body);\n if (newFrameElement) {\n const snapshot = new Snapshot(newFrameElement);\n const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);\n if (this.view.renderPromise)\n await this.view.renderPromise;\n this.changeHistory();\n await this.view.render(renderer);\n this.complete = true;\n session.frameRendered(fetchResponse, this.element);\n session.frameLoaded(this.element);\n this.fetchResponseLoaded(fetchResponse);\n }\n else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {\n console.warn(`A matching frame for #${this.element.id} was missing from the response, transforming into full-page Visit.`);\n this.visitResponse(fetchResponse.response);\n }\n }\n }\n catch (error) {\n console.error(error);\n this.view.invalidate();\n }\n finally {\n this.fetchResponseLoaded = () => { };\n }\n }\n elementAppearedInViewport(_element) {\n this.loadSourceURL();\n }\n willSubmitFormLinkToLocation(link) {\n return this.shouldInterceptNavigation(link);\n }\n submittedFormLinkToLocation(link, _location, form) {\n const frame = this.findFrameElement(link);\n if (frame)\n form.setAttribute(\"data-turbo-frame\", frame.id);\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.shouldInterceptNavigation(element);\n }\n linkClickIntercepted(element, location) {\n this.navigateFrame(element, location);\n }\n willSubmitForm(element, submitter) {\n return element.closest(\"turbo-frame\") == this.element && this.shouldInterceptNavigation(element, submitter);\n }\n formSubmitted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n this.formSubmission = new FormSubmission(this, element, submitter);\n const { fetchRequest } = this.formSubmission;\n this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n this.formSubmission.start();\n }\n prepareHeadersForRequest(headers, request) {\n var _a;\n headers[\"Turbo-Frame\"] = this.id;\n if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"data-turbo-stream\")) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n markAsBusy(this.element);\n }\n requestPreventedHandlingResponse(_request, _response) {\n this.resolveVisitPromise();\n }\n async requestSucceededWithResponse(request, response) {\n await this.loadResponse(response);\n this.resolveVisitPromise();\n }\n async requestFailedWithResponse(request, response) {\n console.error(response);\n await this.loadResponse(response);\n this.resolveVisitPromise();\n }\n requestErrored(request, error) {\n console.error(error);\n this.resolveVisitPromise();\n }\n requestFinished(_request) {\n clearBusyState(this.element);\n }\n formSubmissionStarted({ formElement }) {\n markAsBusy(formElement, this.findFrameElement(formElement));\n }\n formSubmissionSucceededWithResponse(formSubmission, response) {\n const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n frame.delegate.loadResponse(response);\n }\n formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished({ formElement }) {\n clearBusyState(formElement, this.findFrameElement(formElement));\n }\n allowsImmediateRender({ element: newFrame }, options) {\n const event = dispatch(\"turbo:before-frame-render\", {\n target: this.element,\n detail: Object.assign({ newFrame }, options),\n cancelable: true,\n });\n const { defaultPrevented, detail: { render }, } = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview) { }\n preloadOnLoadLinksForView(element) {\n session.preloadOnLoadLinksForView(element);\n }\n viewInvalidated() { }\n willRenderFrame(currentElement, _newElement) {\n this.previousFrameElement = currentElement.cloneNode(true);\n }\n async visit(url) {\n var _a;\n const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n this.currentFetchRequest = request;\n return new Promise((resolve) => {\n this.resolveVisitPromise = () => {\n this.resolveVisitPromise = () => { };\n this.currentFetchRequest = null;\n resolve();\n };\n request.perform();\n });\n }\n navigateFrame(element, url, submitter) {\n const frame = this.findFrameElement(element, submitter);\n this.pageSnapshot = PageSnapshot.fromElement(frame).clone();\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n this.withCurrentNavigationElement(element, () => {\n frame.src = url;\n });\n }\n proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n this.action = getVisitAction(submitter, element, frame);\n if (isAction(this.action)) {\n const { visitCachedSnapshot } = frame.delegate;\n frame.delegate.fetchResponseLoaded = (fetchResponse) => {\n if (frame.src) {\n const { statusCode, redirected } = fetchResponse;\n const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n const response = { statusCode, redirected, responseHTML };\n const options = {\n response,\n visitCachedSnapshot,\n willRender: false,\n updateHistory: false,\n restorationIdentifier: this.restorationIdentifier,\n snapshot: this.pageSnapshot,\n };\n if (this.action)\n options.action = this.action;\n session.visit(frame.src, options);\n }\n };\n }\n }\n changeHistory() {\n if (this.action) {\n const method = getHistoryMethodForAction(this.action);\n session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n }\n }\n willHandleFrameMissingFromResponse(fetchResponse) {\n this.element.setAttribute(\"complete\", \"\");\n const response = fetchResponse.response;\n const visit = async (url, options = {}) => {\n if (url instanceof Response) {\n this.visitResponse(url);\n }\n else {\n session.visit(url, options);\n }\n };\n const event = dispatch(\"turbo:frame-missing\", {\n target: this.element,\n detail: { response, visit },\n cancelable: true,\n });\n return !event.defaultPrevented;\n }\n async visitResponse(response) {\n const wrapped = new FetchResponse(response);\n const responseHTML = await wrapped.responseHTML;\n const { location, redirected, statusCode } = wrapped;\n return session.visit(location, { response: { redirected, statusCode, responseHTML } });\n }\n findFrameElement(element, submitter) {\n var _a;\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n }\n async extractForeignFrameElement(container) {\n let element;\n const id = CSS.escape(this.id);\n try {\n element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n if (element) {\n return element;\n }\n element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n if (element) {\n await element.loaded;\n return await this.extractForeignFrameElement(element);\n }\n }\n catch (error) {\n console.error(error);\n return new FrameElement();\n }\n return null;\n }\n formActionIsVisitable(form, submitter) {\n const action = getAction(form, submitter);\n return locationIsVisitable(expandURL(action), this.rootLocation);\n }\n shouldInterceptNavigation(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n return false;\n }\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n if (id) {\n const frameElement = getFrameElementById(id);\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n if (!session.elementIsNavigatable(element)) {\n return false;\n }\n if (submitter && !session.elementIsNavigatable(submitter)) {\n return false;\n }\n return true;\n }\n get id() {\n return this.element.id;\n }\n get enabled() {\n return !this.element.disabled;\n }\n get sourceURL() {\n if (this.element.src) {\n return this.element.src;\n }\n }\n set sourceURL(sourceURL) {\n this.ignoringChangesToAttribute(\"src\", () => {\n this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n });\n }\n get loadingStyle() {\n return this.element.loading;\n }\n get isLoading() {\n return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n }\n get complete() {\n return this.element.hasAttribute(\"complete\");\n }\n set complete(value) {\n this.ignoringChangesToAttribute(\"complete\", () => {\n if (value) {\n this.element.setAttribute(\"complete\", \"\");\n }\n else {\n this.element.removeAttribute(\"complete\");\n }\n });\n }\n get isActive() {\n return this.element.isActive && this.connected;\n }\n get rootLocation() {\n var _a;\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n isIgnoringChangesTo(attributeName) {\n return this.ignoredAttributes.has(attributeName);\n }\n ignoringChangesToAttribute(attributeName, callback) {\n this.ignoredAttributes.add(attributeName);\n callback();\n this.ignoredAttributes.delete(attributeName);\n }\n withCurrentNavigationElement(element, callback) {\n this.currentNavigationElement = element;\n callback();\n delete this.currentNavigationElement;\n }\n}\nfunction getFrameElementById(id) {\n if (id != null) {\n const element = document.getElementById(id);\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\nfunction activateElement(element, currentURL) {\n if (element) {\n const src = element.getAttribute(\"src\");\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`);\n }\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n if (element instanceof FrameElement) {\n element.connectedCallback();\n element.disconnectedCallback();\n return element;\n }\n }\n}\n\nclass StreamElement extends HTMLElement {\n static async renderElement(newElement) {\n await newElement.performAction();\n }\n async connectedCallback() {\n try {\n await this.render();\n }\n catch (error) {\n console.error(error);\n }\n finally {\n this.disconnect();\n }\n }\n async render() {\n var _a;\n return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {\n const event = this.beforeRenderEvent;\n if (this.dispatchEvent(event)) {\n await nextAnimationFrame();\n await event.detail.render(this);\n }\n })()));\n }\n disconnect() {\n try {\n this.remove();\n }\n catch (_a) { }\n }\n removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach((c) => c.remove());\n }\n get duplicateChildren() {\n var _a;\n const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);\n const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);\n return existingChildren.filter((c) => newChildrenIds.includes(c.id));\n }\n get performAction() {\n if (this.action) {\n const actionFunction = StreamActions[this.action];\n if (actionFunction) {\n return actionFunction;\n }\n this.raise(\"unknown action\");\n }\n this.raise(\"action attribute is missing\");\n }\n get targetElements() {\n if (this.target) {\n return this.targetElementsById;\n }\n else if (this.targets) {\n return this.targetElementsByQuery;\n }\n else {\n this.raise(\"target or targets attribute is missing\");\n }\n }\n get templateContent() {\n return this.templateElement.content.cloneNode(true);\n }\n get templateElement() {\n if (this.firstElementChild === null) {\n const template = this.ownerDocument.createElement(\"template\");\n this.appendChild(template);\n return template;\n }\n else if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n this.raise(\"first child element must be a <template> element\");\n }\n get action() {\n return this.getAttribute(\"action\");\n }\n get target() {\n return this.getAttribute(\"target\");\n }\n get targets() {\n return this.getAttribute(\"targets\");\n }\n raise(message) {\n throw new Error(`${this.description}: ${message}`);\n }\n get description() {\n var _a, _b;\n return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : \"<turbo-stream>\";\n }\n get beforeRenderEvent() {\n return new CustomEvent(\"turbo:before-stream-render\", {\n bubbles: true,\n cancelable: true,\n detail: { newStream: this, render: StreamElement.renderElement },\n });\n }\n get targetElementsById() {\n var _a;\n const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);\n if (element !== null) {\n return [element];\n }\n else {\n return [];\n }\n }\n get targetElementsByQuery() {\n var _a;\n const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);\n if (elements.length !== 0) {\n return Array.prototype.slice.call(elements);\n }\n else {\n return [];\n }\n }\n}\n\nclass StreamSourceElement extends HTMLElement {\n constructor() {\n super(...arguments);\n this.streamSource = null;\n }\n connectedCallback() {\n this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n connectStreamSource(this.streamSource);\n }\n disconnectedCallback() {\n if (this.streamSource) {\n disconnectStreamSource(this.streamSource);\n }\n }\n get src() {\n return this.getAttribute(\"src\") || \"\";\n }\n}\n\nFrameElement.delegateConstructor = FrameController;\nif (customElements.get(\"turbo-frame\") === undefined) {\n customElements.define(\"turbo-frame\", FrameElement);\n}\nif (customElements.get(\"turbo-stream\") === undefined) {\n customElements.define(\"turbo-stream\", StreamElement);\n}\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n let element = document.currentScript;\n if (!element)\n return;\n if (element.hasAttribute(\"data-turbo-suppress-warning\"))\n return;\n element = element.parentElement;\n while (element) {\n if (element == document.body) {\n return console.warn(unindent `\n You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n \u2014\u2014\n Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n `, element.outerHTML);\n }\n element = element.parentElement;\n }\n})();\n\nwindow.Turbo = Turbo;\nstart();\n\nexport { FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, clearCache, connectStreamSource, disconnectStreamSource, navigator$1 as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2022 Basecamp, LLC\n */\nclass EventListener {\n constructor(eventTarget, eventName, eventOptions) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.eventOptions = eventOptions;\n this.unorderedBindings = new Set();\n }\n connect() {\n this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n }\n disconnect() {\n this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n }\n bindingConnected(binding) {\n this.unorderedBindings.add(binding);\n }\n bindingDisconnected(binding) {\n this.unorderedBindings.delete(binding);\n }\n handleEvent(event) {\n const extendedEvent = extendEvent(event);\n for (const binding of this.bindings) {\n if (extendedEvent.immediatePropagationStopped) {\n break;\n }\n else {\n binding.handleEvent(extendedEvent);\n }\n }\n }\n hasBindings() {\n return this.unorderedBindings.size > 0;\n }\n get bindings() {\n return Array.from(this.unorderedBindings).sort((left, right) => {\n const leftIndex = left.index, rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n }\n}\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n }\n else {\n const { stopImmediatePropagation } = event;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation() {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation.call(this);\n },\n });\n }\n}\n\nclass Dispatcher {\n constructor(application) {\n this.application = application;\n this.eventListenerMaps = new Map();\n this.started = false;\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach((eventListener) => eventListener.connect());\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n }\n }\n get eventListeners() {\n return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n }\n bindingConnected(binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n }\n bindingDisconnected(binding, clearEventListeners = false) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n if (clearEventListeners)\n this.clearEventListenersForBinding(binding);\n }\n handleError(error, message, detail = {}) {\n this.application.handleError(error, `Error ${message}`, detail);\n }\n clearEventListenersForBinding(binding) {\n const eventListener = this.fetchEventListenerForBinding(binding);\n if (!eventListener.hasBindings()) {\n eventListener.disconnect();\n this.removeMappedEventListenerFor(binding);\n }\n }\n removeMappedEventListenerFor(binding) {\n const { eventTarget, eventName, eventOptions } = binding;\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n eventListenerMap.delete(cacheKey);\n if (eventListenerMap.size == 0)\n this.eventListenerMaps.delete(eventTarget);\n }\n fetchEventListenerForBinding(binding) {\n const { eventTarget, eventName, eventOptions } = binding;\n return this.fetchEventListener(eventTarget, eventName, eventOptions);\n }\n fetchEventListener(eventTarget, eventName, eventOptions) {\n const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n const cacheKey = this.cacheKey(eventName, eventOptions);\n let eventListener = eventListenerMap.get(cacheKey);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n eventListenerMap.set(cacheKey, eventListener);\n }\n return eventListener;\n }\n createEventListener(eventTarget, eventName, eventOptions) {\n const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n }\n fetchEventListenerMapForEventTarget(eventTarget) {\n let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map();\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n }\n cacheKey(eventName, eventOptions) {\n const parts = [eventName];\n Object.keys(eventOptions)\n .sort()\n .forEach((key) => {\n parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n });\n return parts.join(\":\");\n }\n}\n\nconst defaultActionDescriptorFilters = {\n stop({ event, value }) {\n if (value)\n event.stopPropagation();\n return true;\n },\n prevent({ event, value }) {\n if (value)\n event.preventDefault();\n return true;\n },\n self({ event, value, element }) {\n if (value) {\n return element === event.target;\n }\n else {\n return true;\n }\n },\n};\nconst descriptorPattern = /^(?:(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n const source = descriptorString.trim();\n const matches = source.match(descriptorPattern) || [];\n let eventName = matches[1];\n let keyFilter = matches[2];\n if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n eventName += `.${keyFilter}`;\n keyFilter = \"\";\n }\n return {\n eventTarget: parseEventTarget(matches[3]),\n eventName,\n eventOptions: matches[6] ? parseEventOptions(matches[6]) : {},\n identifier: matches[4],\n methodName: matches[5],\n keyFilter,\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n }\n else if (eventTargetName == \"document\") {\n return document;\n }\n}\nfunction parseEventOptions(eventOptions) {\n return eventOptions\n .split(\":\")\n .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n }\n else if (eventTarget == document) {\n return \"document\";\n }\n}\n\nfunction camelize(value) {\n return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n return value.match(/[^\\s]+/g) || [];\n}\n\nclass Action {\n constructor(element, index, descriptor, schema) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.eventOptions = descriptor.eventOptions || {};\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n this.keyFilter = descriptor.keyFilter || \"\";\n this.schema = schema;\n }\n static forToken(token, schema) {\n return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n }\n toString() {\n const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n }\n isFilterTarget(event) {\n if (!this.keyFilter) {\n return false;\n }\n const filteres = this.keyFilter.split(\"+\");\n const modifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\n const [meta, ctrl, alt, shift] = modifiers.map((modifier) => filteres.includes(modifier));\n if (event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift) {\n return true;\n }\n const standardFilter = filteres.filter((key) => !modifiers.includes(key))[0];\n if (!standardFilter) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(this.keyMappings, standardFilter)) {\n error(`contains unknown key filter: ${this.keyFilter}`);\n }\n return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n }\n get params() {\n const params = {};\n const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n for (const { name, value } of Array.from(this.element.attributes)) {\n const match = name.match(pattern);\n const key = match && match[1];\n if (key) {\n params[camelize(key)] = typecast(value);\n }\n }\n return params;\n }\n get eventTargetName() {\n return stringifyEventTarget(this.eventTarget);\n }\n get keyMappings() {\n return this.schema.keyMappings;\n }\n}\nconst defaultEventNames = {\n a: () => \"click\",\n button: () => \"click\",\n form: () => \"submit\",\n details: () => \"toggle\",\n input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n select: () => \"change\",\n textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}\nfunction typecast(value) {\n try {\n return JSON.parse(value);\n }\n catch (o_O) {\n return value;\n }\n}\n\nclass Binding {\n constructor(context, action) {\n this.context = context;\n this.action = action;\n }\n get index() {\n return this.action.index;\n }\n get eventTarget() {\n return this.action.eventTarget;\n }\n get eventOptions() {\n return this.action.eventOptions;\n }\n get identifier() {\n return this.context.identifier;\n }\n handleEvent(event) {\n if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(event)) {\n this.invokeWithEvent(event);\n }\n }\n get eventName() {\n return this.action.eventName;\n }\n get method() {\n const method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n }\n applyEventModifiers(event) {\n const { element } = this.action;\n const { actionDescriptorFilters } = this.context.application;\n let passes = true;\n for (const [name, value] of Object.entries(this.eventOptions)) {\n if (name in actionDescriptorFilters) {\n const filter = actionDescriptorFilters[name];\n passes = passes && filter({ name, value, event, element });\n }\n else {\n continue;\n }\n }\n return passes;\n }\n invokeWithEvent(event) {\n const { target, currentTarget } = event;\n try {\n const { params } = this.action;\n const actionEvent = Object.assign(event, { params });\n this.method.call(this.controller, actionEvent);\n this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n }\n catch (error) {\n const { identifier, controller, element, index } = this;\n const detail = { identifier, controller, element, index, event };\n this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n }\n }\n willBeInvokedByEvent(event) {\n const eventTarget = event.target;\n if (event instanceof KeyboardEvent && this.action.isFilterTarget(event)) {\n return false;\n }\n if (this.element === eventTarget) {\n return true;\n }\n else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n }\n else {\n return this.scope.containsElement(this.action.element);\n }\n }\n get controller() {\n return this.context.controller;\n }\n get methodName() {\n return this.action.methodName;\n }\n get element() {\n return this.scope.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\n\nclass ElementObserver {\n constructor(element, delegate) {\n this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set();\n this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.refresh();\n }\n }\n pause(callback) {\n if (this.started) {\n this.mutationObserver.disconnect();\n this.started = false;\n }\n callback();\n if (!this.started) {\n this.mutationObserver.observe(this.element, this.mutationObserverInit);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) {\n const matches = new Set(this.matchElementsInTree());\n for (const element of Array.from(this.elements)) {\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (const element of Array.from(matches)) {\n this.addElement(element);\n }\n }\n }\n processMutations(mutations) {\n if (this.started) {\n for (const mutation of mutations) {\n this.processMutation(mutation);\n }\n }\n }\n processMutation(mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n }\n else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n }\n processAttributeChange(node, attributeName) {\n const element = node;\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n }\n else {\n this.removeElement(element);\n }\n }\n else if (this.matchElement(element)) {\n this.addElement(element);\n }\n }\n processRemovedNodes(nodes) {\n for (const node of Array.from(nodes)) {\n const element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n }\n processAddedNodes(nodes) {\n for (const node of Array.from(nodes)) {\n const element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n }\n matchElement(element) {\n return this.delegate.matchElement(element);\n }\n matchElementsInTree(tree = this.element) {\n return this.delegate.matchElementsInTree(tree);\n }\n processTree(tree, processor) {\n for (const element of this.matchElementsInTree(tree)) {\n processor.call(this, element);\n }\n }\n elementFromNode(node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n }\n elementIsActive(element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n }\n else {\n return this.element.contains(element);\n }\n }\n addElement(element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n }\n removeElement(element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n }\n}\n\nclass AttributeObserver {\n constructor(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new ElementObserver(element, this);\n }\n get element() {\n return this.elementObserver.element;\n }\n get selector() {\n return `[${this.attributeName}]`;\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get started() {\n return this.elementObserver.started;\n }\n matchElement(element) {\n return element.hasAttribute(this.attributeName);\n }\n matchElementsInTree(tree) {\n const match = this.matchElement(tree) ? [tree] : [];\n const matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n }\n elementMatched(element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n }\n elementUnmatched(element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n }\n elementAttributeChanged(element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n }\n}\n\nfunction add(map, key, value) {\n fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n fetch(map, key).delete(value);\n prune(map, key);\n}\nfunction fetch(map, key) {\n let values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nfunction prune(map, key) {\n const values = map.get(key);\n if (values != null && values.size == 0) {\n map.delete(key);\n }\n}\n\nclass Multimap {\n constructor() {\n this.valuesByKey = new Map();\n }\n get keys() {\n return Array.from(this.valuesByKey.keys());\n }\n get values() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n }\n get size() {\n const sets = Array.from(this.valuesByKey.values());\n return sets.reduce((size, set) => size + set.size, 0);\n }\n add(key, value) {\n add(this.valuesByKey, key, value);\n }\n delete(key, value) {\n del(this.valuesByKey, key, value);\n }\n has(key, value) {\n const values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n }\n hasKey(key) {\n return this.valuesByKey.has(key);\n }\n hasValue(value) {\n const sets = Array.from(this.valuesByKey.values());\n return sets.some((set) => set.has(value));\n }\n getValuesForKey(key) {\n const values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n }\n getKeysForValue(value) {\n return Array.from(this.valuesByKey)\n .filter(([_key, values]) => values.has(value))\n .map(([key, _values]) => key);\n }\n}\n\nclass IndexedMultimap extends Multimap {\n constructor() {\n super();\n this.keysByValue = new Map();\n }\n get values() {\n return Array.from(this.keysByValue.keys());\n }\n add(key, value) {\n super.add(key, value);\n add(this.keysByValue, value, key);\n }\n delete(key, value) {\n super.delete(key, value);\n del(this.keysByValue, value, key);\n }\n hasValue(value) {\n return this.keysByValue.has(value);\n }\n getKeysForValue(value) {\n const set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n }\n}\n\nclass SelectorObserver {\n constructor(element, selector, delegate, details = {}) {\n this.selector = selector;\n this.details = details;\n this.elementObserver = new ElementObserver(element, this);\n this.delegate = delegate;\n this.matchesByElement = new Multimap();\n }\n get started() {\n return this.elementObserver.started;\n }\n start() {\n this.elementObserver.start();\n }\n pause(callback) {\n this.elementObserver.pause(callback);\n }\n stop() {\n this.elementObserver.stop();\n }\n refresh() {\n this.elementObserver.refresh();\n }\n get element() {\n return this.elementObserver.element;\n }\n matchElement(element) {\n const matches = element.matches(this.selector);\n if (this.delegate.selectorMatchElement) {\n return matches && this.delegate.selectorMatchElement(element, this.details);\n }\n return matches;\n }\n matchElementsInTree(tree) {\n const match = this.matchElement(tree) ? [tree] : [];\n const matches = Array.from(tree.querySelectorAll(this.selector)).filter((match) => this.matchElement(match));\n return match.concat(matches);\n }\n elementMatched(element) {\n this.selectorMatched(element);\n }\n elementUnmatched(element) {\n this.selectorUnmatched(element);\n }\n elementAttributeChanged(element, _attributeName) {\n const matches = this.matchElement(element);\n const matchedBefore = this.matchesByElement.has(this.selector, element);\n if (!matches && matchedBefore) {\n this.selectorUnmatched(element);\n }\n }\n selectorMatched(element) {\n if (this.delegate.selectorMatched) {\n this.delegate.selectorMatched(element, this.selector, this.details);\n this.matchesByElement.add(this.selector, element);\n }\n }\n selectorUnmatched(element) {\n this.delegate.selectorUnmatched(element, this.selector, this.details);\n this.matchesByElement.delete(this.selector, element);\n }\n}\n\nclass StringMapObserver {\n constructor(element, delegate) {\n this.element = element;\n this.delegate = delegate;\n this.started = false;\n this.stringMap = new Map();\n this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n this.refresh();\n }\n }\n stop() {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n }\n refresh() {\n if (this.started) {\n for (const attributeName of this.knownAttributeNames) {\n this.refreshAttribute(attributeName, null);\n }\n }\n }\n processMutations(mutations) {\n if (this.started) {\n for (const mutation of mutations) {\n this.processMutation(mutation);\n }\n }\n }\n processMutation(mutation) {\n const attributeName = mutation.attributeName;\n if (attributeName) {\n this.refreshAttribute(attributeName, mutation.oldValue);\n }\n }\n refreshAttribute(attributeName, oldValue) {\n const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n if (key != null) {\n if (!this.stringMap.has(attributeName)) {\n this.stringMapKeyAdded(key, attributeName);\n }\n const value = this.element.getAttribute(attributeName);\n if (this.stringMap.get(attributeName) != value) {\n this.stringMapValueChanged(value, key, oldValue);\n }\n if (value == null) {\n const oldValue = this.stringMap.get(attributeName);\n this.stringMap.delete(attributeName);\n if (oldValue)\n this.stringMapKeyRemoved(key, attributeName, oldValue);\n }\n else {\n this.stringMap.set(attributeName, value);\n }\n }\n }\n stringMapKeyAdded(key, attributeName) {\n if (this.delegate.stringMapKeyAdded) {\n this.delegate.stringMapKeyAdded(key, attributeName);\n }\n }\n stringMapValueChanged(value, key, oldValue) {\n if (this.delegate.stringMapValueChanged) {\n this.delegate.stringMapValueChanged(value, key, oldValue);\n }\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n if (this.delegate.stringMapKeyRemoved) {\n this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n }\n }\n get knownAttributeNames() {\n return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n }\n get currentAttributeNames() {\n return Array.from(this.element.attributes).map((attribute) => attribute.name);\n }\n get recordedAttributeNames() {\n return Array.from(this.stringMap.keys());\n }\n}\n\nclass TokenListObserver {\n constructor(element, attributeName, delegate) {\n this.attributeObserver = new AttributeObserver(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new Multimap();\n }\n get started() {\n return this.attributeObserver.started;\n }\n start() {\n this.attributeObserver.start();\n }\n pause(callback) {\n this.attributeObserver.pause(callback);\n }\n stop() {\n this.attributeObserver.stop();\n }\n refresh() {\n this.attributeObserver.refresh();\n }\n get element() {\n return this.attributeObserver.element;\n }\n get attributeName() {\n return this.attributeObserver.attributeName;\n }\n elementMatchedAttribute(element) {\n this.tokensMatched(this.readTokensForElement(element));\n }\n elementAttributeValueChanged(element) {\n const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n }\n elementUnmatchedAttribute(element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n }\n tokensMatched(tokens) {\n tokens.forEach((token) => this.tokenMatched(token));\n }\n tokensUnmatched(tokens) {\n tokens.forEach((token) => this.tokenUnmatched(token));\n }\n tokenMatched(token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n }\n tokenUnmatched(token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n }\n refreshTokensForElement(element) {\n const previousTokens = this.tokensByElement.getValuesForKey(element);\n const currentTokens = this.readTokensForElement(element);\n const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n if (firstDifferingIndex == -1) {\n return [[], []];\n }\n else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n }\n readTokensForElement(element) {\n const attributeName = this.attributeName;\n const tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString\n .trim()\n .split(/\\s+/)\n .filter((content) => content.length)\n .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n const length = Math.max(left.length, right.length);\n return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n constructor(element, attributeName, delegate) {\n this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap();\n this.valuesByTokenByElement = new WeakMap();\n }\n get started() {\n return this.tokenListObserver.started;\n }\n start() {\n this.tokenListObserver.start();\n }\n stop() {\n this.tokenListObserver.stop();\n }\n refresh() {\n this.tokenListObserver.refresh();\n }\n get element() {\n return this.tokenListObserver.element;\n }\n get attributeName() {\n return this.tokenListObserver.attributeName;\n }\n tokenMatched(token) {\n const { element } = token;\n const { value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n }\n tokenUnmatched(token) {\n const { element } = token;\n const { value } = this.fetchParseResultForToken(token);\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n }\n fetchParseResultForToken(token) {\n let parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n }\n fetchValuesByTokenForElement(element) {\n let valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map();\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n }\n parseToken(token) {\n try {\n const value = this.delegate.parseValueForToken(token);\n return { value };\n }\n catch (error) {\n return { error };\n }\n }\n}\n\nclass BindingObserver {\n constructor(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map();\n }\n start() {\n if (!this.valueListObserver) {\n this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n }\n stop() {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n }\n get element() {\n return this.context.element;\n }\n get identifier() {\n return this.context.identifier;\n }\n get actionAttribute() {\n return this.schema.actionAttribute;\n }\n get schema() {\n return this.context.schema;\n }\n get bindings() {\n return Array.from(this.bindingsByAction.values());\n }\n connectAction(action) {\n const binding = new Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n }\n disconnectAction(action) {\n const binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n }\n disconnectAllActions() {\n this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n this.bindingsByAction.clear();\n }\n parseValueForToken(token) {\n const action = Action.forToken(token, this.schema);\n if (action.identifier == this.identifier) {\n return action;\n }\n }\n elementMatchedValue(element, action) {\n this.connectAction(action);\n }\n elementUnmatchedValue(element, action) {\n this.disconnectAction(action);\n }\n}\n\nclass ValueObserver {\n constructor(context, receiver) {\n this.context = context;\n this.receiver = receiver;\n this.stringMapObserver = new StringMapObserver(this.element, this);\n this.valueDescriptorMap = this.controller.valueDescriptorMap;\n }\n start() {\n this.stringMapObserver.start();\n this.invokeChangedCallbacksForDefaultValues();\n }\n stop() {\n this.stringMapObserver.stop();\n }\n get element() {\n return this.context.element;\n }\n get controller() {\n return this.context.controller;\n }\n getStringMapKeyForAttribute(attributeName) {\n if (attributeName in this.valueDescriptorMap) {\n return this.valueDescriptorMap[attributeName].name;\n }\n }\n stringMapKeyAdded(key, attributeName) {\n const descriptor = this.valueDescriptorMap[attributeName];\n if (!this.hasValue(key)) {\n this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n }\n }\n stringMapValueChanged(value, name, oldValue) {\n const descriptor = this.valueDescriptorNameMap[name];\n if (value === null)\n return;\n if (oldValue === null) {\n oldValue = descriptor.writer(descriptor.defaultValue);\n }\n this.invokeChangedCallback(name, value, oldValue);\n }\n stringMapKeyRemoved(key, attributeName, oldValue) {\n const descriptor = this.valueDescriptorNameMap[key];\n if (this.hasValue(key)) {\n this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n }\n else {\n this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n }\n }\n invokeChangedCallbacksForDefaultValues() {\n for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n if (defaultValue != undefined && !this.controller.data.has(key)) {\n this.invokeChangedCallback(name, writer(defaultValue), undefined);\n }\n }\n }\n invokeChangedCallback(name, rawValue, rawOldValue) {\n const changedMethodName = `${name}Changed`;\n const changedMethod = this.receiver[changedMethodName];\n if (typeof changedMethod == \"function\") {\n const descriptor = this.valueDescriptorNameMap[name];\n try {\n const value = descriptor.reader(rawValue);\n let oldValue = rawOldValue;\n if (rawOldValue) {\n oldValue = descriptor.reader(rawOldValue);\n }\n changedMethod.call(this.receiver, value, oldValue);\n }\n catch (error) {\n if (error instanceof TypeError) {\n error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n }\n throw error;\n }\n }\n }\n get valueDescriptors() {\n const { valueDescriptorMap } = this;\n return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n }\n get valueDescriptorNameMap() {\n const descriptors = {};\n Object.keys(this.valueDescriptorMap).forEach((key) => {\n const descriptor = this.valueDescriptorMap[key];\n descriptors[descriptor.name] = descriptor;\n });\n return descriptors;\n }\n hasValue(attributeName) {\n const descriptor = this.valueDescriptorNameMap[attributeName];\n const hasMethodName = `has${capitalize(descriptor.name)}`;\n return this.receiver[hasMethodName];\n }\n}\n\nclass TargetObserver {\n constructor(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.targetsByName = new Multimap();\n }\n start() {\n if (!this.tokenListObserver) {\n this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n this.tokenListObserver.start();\n }\n }\n stop() {\n if (this.tokenListObserver) {\n this.disconnectAllTargets();\n this.tokenListObserver.stop();\n delete this.tokenListObserver;\n }\n }\n tokenMatched({ element, content: name }) {\n if (this.scope.containsElement(element)) {\n this.connectTarget(element, name);\n }\n }\n tokenUnmatched({ element, content: name }) {\n this.disconnectTarget(element, name);\n }\n connectTarget(element, name) {\n var _a;\n if (!this.targetsByName.has(name, element)) {\n this.targetsByName.add(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n }\n }\n disconnectTarget(element, name) {\n var _a;\n if (this.targetsByName.has(name, element)) {\n this.targetsByName.delete(name, element);\n (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n }\n }\n disconnectAllTargets() {\n for (const name of this.targetsByName.keys) {\n for (const element of this.targetsByName.getValuesForKey(name)) {\n this.disconnectTarget(element, name);\n }\n }\n }\n get attributeName() {\n return `data-${this.context.identifier}-target`;\n }\n get element() {\n return this.context.element;\n }\n get scope() {\n return this.context.scope;\n }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce((values, constructor) => {\n getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n return values;\n }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n const ancestors = getAncestorsForConstructor(constructor);\n return ancestors.reduce((pairs, constructor) => {\n pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n return pairs;\n }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n const ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n const definition = constructor[propertyName];\n return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n const definition = constructor[propertyName];\n return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n constructor(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.outletsByName = new Multimap();\n this.outletElementsByName = new Multimap();\n this.selectorObserverMap = new Map();\n }\n start() {\n if (this.selectorObserverMap.size === 0) {\n this.outletDefinitions.forEach((outletName) => {\n const selector = this.selector(outletName);\n const details = { outletName };\n if (selector) {\n this.selectorObserverMap.set(outletName, new SelectorObserver(document.body, selector, this, details));\n }\n });\n this.selectorObserverMap.forEach((observer) => observer.start());\n }\n this.dependentContexts.forEach((context) => context.refresh());\n }\n stop() {\n if (this.selectorObserverMap.size > 0) {\n this.disconnectAllOutlets();\n this.selectorObserverMap.forEach((observer) => observer.stop());\n this.selectorObserverMap.clear();\n }\n }\n refresh() {\n this.selectorObserverMap.forEach((observer) => observer.refresh());\n }\n selectorMatched(element, _selector, { outletName }) {\n const outlet = this.getOutlet(element, outletName);\n if (outlet) {\n this.connectOutlet(outlet, element, outletName);\n }\n }\n selectorUnmatched(element, _selector, { outletName }) {\n const outlet = this.getOutletFromMap(element, outletName);\n if (outlet) {\n this.disconnectOutlet(outlet, element, outletName);\n }\n }\n selectorMatchElement(element, { outletName }) {\n return (this.hasOutlet(element, outletName) &&\n element.matches(`[${this.context.application.schema.controllerAttribute}~=${outletName}]`));\n }\n connectOutlet(outlet, element, outletName) {\n var _a;\n if (!this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.add(outletName, outlet);\n this.outletElementsByName.add(outletName, element);\n (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n }\n }\n disconnectOutlet(outlet, element, outletName) {\n var _a;\n if (this.outletElementsByName.has(outletName, element)) {\n this.outletsByName.delete(outletName, outlet);\n this.outletElementsByName.delete(outletName, element);\n (_a = this.selectorObserverMap\n .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n }\n }\n disconnectAllOutlets() {\n for (const outletName of this.outletElementsByName.keys) {\n for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n this.disconnectOutlet(outlet, element, outletName);\n }\n }\n }\n }\n selector(outletName) {\n return this.scope.outlets.getSelectorForOutletName(outletName);\n }\n get outletDependencies() {\n const dependencies = new Multimap();\n this.router.modules.forEach((module) => {\n const constructor = module.definition.controllerConstructor;\n const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n });\n return dependencies;\n }\n get outletDefinitions() {\n return this.outletDependencies.getKeysForValue(this.identifier);\n }\n get dependentControllerIdentifiers() {\n return this.outletDependencies.getValuesForKey(this.identifier);\n }\n get dependentContexts() {\n const identifiers = this.dependentControllerIdentifiers;\n return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n }\n hasOutlet(element, outletName) {\n return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n }\n getOutlet(element, outletName) {\n return this.application.getControllerForElementAndIdentifier(element, outletName);\n }\n getOutletFromMap(element, outletName) {\n return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n }\n get scope() {\n return this.context.scope;\n }\n get identifier() {\n return this.context.identifier;\n }\n get application() {\n return this.context.application;\n }\n get router() {\n return this.application.router;\n }\n}\n\nclass Context {\n constructor(module, scope) {\n this.logDebugActivity = (functionName, detail = {}) => {\n const { identifier, controller, element } = this;\n detail = Object.assign({ identifier, controller, element }, detail);\n this.application.logDebugActivity(this.identifier, functionName, detail);\n };\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new BindingObserver(this, this.dispatcher);\n this.valueObserver = new ValueObserver(this, this.controller);\n this.targetObserver = new TargetObserver(this, this);\n this.outletObserver = new OutletObserver(this, this);\n try {\n this.controller.initialize();\n this.logDebugActivity(\"initialize\");\n }\n catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n connect() {\n this.bindingObserver.start();\n this.valueObserver.start();\n this.targetObserver.start();\n this.outletObserver.start();\n try {\n this.controller.connect();\n this.logDebugActivity(\"connect\");\n }\n catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n }\n refresh() {\n this.outletObserver.refresh();\n }\n disconnect() {\n try {\n this.controller.disconnect();\n this.logDebugActivity(\"disconnect\");\n }\n catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.outletObserver.stop();\n this.targetObserver.stop();\n this.valueObserver.stop();\n this.bindingObserver.stop();\n }\n get application() {\n return this.module.application;\n }\n get identifier() {\n return this.module.identifier;\n }\n get schema() {\n return this.application.schema;\n }\n get dispatcher() {\n return this.application.dispatcher;\n }\n get element() {\n return this.scope.element;\n }\n get parentElement() {\n return this.element.parentElement;\n }\n handleError(error, message, detail = {}) {\n const { identifier, controller, element } = this;\n detail = Object.assign({ identifier, controller, element }, detail);\n this.application.handleError(error, `Error ${message}`, detail);\n }\n targetConnected(element, name) {\n this.invokeControllerMethod(`${name}TargetConnected`, element);\n }\n targetDisconnected(element, name) {\n this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n }\n outletConnected(outlet, element, name) {\n this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n }\n outletDisconnected(outlet, element, name) {\n this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n }\n invokeControllerMethod(methodName, ...args) {\n const controller = this.controller;\n if (typeof controller[methodName] == \"function\") {\n controller[methodName](...args);\n }\n }\n}\n\nfunction bless(constructor) {\n return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n const shadowConstructor = extend(constructor);\n const shadowProperties = getShadowProperties(constructor.prototype, properties);\n Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n return blessings.reduce((blessedProperties, blessing) => {\n const properties = blessing(constructor);\n for (const key in properties) {\n const descriptor = blessedProperties[key] || {};\n blessedProperties[key] = Object.assign(descriptor, properties[key]);\n }\n return blessedProperties;\n }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n return getOwnKeys(properties).reduce((shadowProperties, key) => {\n const descriptor = getShadowedDescriptor(prototype, properties, key);\n if (descriptor) {\n Object.assign(shadowProperties, { [key]: descriptor });\n }\n return shadowProperties;\n }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n if (!shadowedByValue) {\n const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n if (shadowingDescriptor) {\n descriptor.get = shadowingDescriptor.get || descriptor.get;\n descriptor.set = shadowingDescriptor.set || descriptor.set;\n }\n return descriptor;\n }\n}\nconst getOwnKeys = (() => {\n if (typeof Object.getOwnPropertySymbols == \"function\") {\n return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n }\n else {\n return Object.getOwnPropertyNames;\n }\n})();\nconst extend = (() => {\n function extendWithReflect(constructor) {\n function extended() {\n return Reflect.construct(constructor, arguments, new.target);\n }\n extended.prototype = Object.create(constructor.prototype, {\n constructor: { value: extended },\n });\n Reflect.setPrototypeOf(extended, constructor);\n return extended;\n }\n function testReflectExtension() {\n const a = function () {\n this.a.call(this);\n };\n const b = extendWithReflect(a);\n b.prototype.a = function () { };\n return new b();\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n }\n catch (error) {\n return (constructor) => class extended extends constructor {\n };\n }\n})();\n\nfunction blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: bless(definition.controllerConstructor),\n };\n}\n\nclass Module {\n constructor(application, definition) {\n this.application = application;\n this.definition = blessDefinition(definition);\n this.contextsByScope = new WeakMap();\n this.connectedContexts = new Set();\n }\n get identifier() {\n return this.definition.identifier;\n }\n get controllerConstructor() {\n return this.definition.controllerConstructor;\n }\n get contexts() {\n return Array.from(this.connectedContexts);\n }\n connectContextForScope(scope) {\n const context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n }\n disconnectContextForScope(scope) {\n const context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n }\n fetchContextForScope(scope) {\n let context = this.contextsByScope.get(scope);\n if (!context) {\n context = new Context(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n }\n}\n\nclass ClassMap {\n constructor(scope) {\n this.scope = scope;\n }\n has(name) {\n return this.data.has(this.getDataKey(name));\n }\n get(name) {\n return this.getAll(name)[0];\n }\n getAll(name) {\n const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n return tokenize(tokenString);\n }\n getAttributeName(name) {\n return this.data.getAttributeNameForKey(this.getDataKey(name));\n }\n getDataKey(name) {\n return `${name}-class`;\n }\n get data() {\n return this.scope.data;\n }\n}\n\nclass DataMap {\n constructor(scope) {\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.getAttribute(name);\n }\n set(key, value) {\n const name = this.getAttributeNameForKey(key);\n this.element.setAttribute(name, value);\n return this.get(key);\n }\n has(key) {\n const name = this.getAttributeNameForKey(key);\n return this.element.hasAttribute(name);\n }\n delete(key) {\n if (this.has(key)) {\n const name = this.getAttributeNameForKey(key);\n this.element.removeAttribute(name);\n return true;\n }\n else {\n return false;\n }\n }\n getAttributeNameForKey(key) {\n return `data-${this.identifier}-${dasherize(key)}`;\n }\n}\n\nclass Guide {\n constructor(logger) {\n this.warnedKeysByObject = new WeakMap();\n this.logger = logger;\n }\n warn(object, key, message) {\n let warnedKeys = this.warnedKeysByObject.get(object);\n if (!warnedKeys) {\n warnedKeys = new Set();\n this.warnedKeysByObject.set(object, warnedKeys);\n }\n if (!warnedKeys.has(key)) {\n warnedKeys.add(key);\n this.logger.warn(message, object);\n }\n }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n constructor(scope) {\n this.scope = scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(targetName) {\n return this.find(targetName) != null;\n }\n find(...targetNames) {\n return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n }\n findAll(...targetNames) {\n return targetNames.reduce((targets, targetName) => [\n ...targets,\n ...this.findAllTargets(targetName),\n ...this.findAllLegacyTargets(targetName),\n ], []);\n }\n findTarget(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findElement(selector);\n }\n findAllTargets(targetName) {\n const selector = this.getSelectorForTargetName(targetName);\n return this.scope.findAllElements(selector);\n }\n getSelectorForTargetName(targetName) {\n const attributeName = this.schema.targetAttributeForScope(this.identifier);\n return attributeValueContainsToken(attributeName, targetName);\n }\n findLegacyTarget(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.deprecate(this.scope.findElement(selector), targetName);\n }\n findAllLegacyTargets(targetName) {\n const selector = this.getLegacySelectorForTargetName(targetName);\n return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n }\n getLegacySelectorForTargetName(targetName) {\n const targetDescriptor = `${this.identifier}.${targetName}`;\n return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n }\n deprecate(element, targetName) {\n if (element) {\n const { identifier } = this;\n const attributeName = this.schema.targetAttribute;\n const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n }\n return element;\n }\n get guide() {\n return this.scope.guide;\n }\n}\n\nclass OutletSet {\n constructor(scope, controllerElement) {\n this.scope = scope;\n this.controllerElement = controllerElement;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get schema() {\n return this.scope.schema;\n }\n has(outletName) {\n return this.find(outletName) != null;\n }\n find(...outletNames) {\n return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n }\n findAll(...outletNames) {\n return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n }\n getSelectorForOutletName(outletName) {\n const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n return this.controllerElement.getAttribute(attributeName);\n }\n findOutlet(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n if (selector)\n return this.findElement(selector, outletName);\n }\n findAllOutlets(outletName) {\n const selector = this.getSelectorForOutletName(outletName);\n return selector ? this.findAllElements(selector, outletName) : [];\n }\n findElement(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n }\n findAllElements(selector, outletName) {\n const elements = this.scope.queryElements(selector);\n return elements.filter((element) => this.matchesElement(element, selector, outletName));\n }\n matchesElement(element, selector, outletName) {\n const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n }\n}\n\nclass Scope {\n constructor(schema, element, identifier, logger) {\n this.targets = new TargetSet(this);\n this.classes = new ClassMap(this);\n this.data = new DataMap(this);\n this.containsElement = (element) => {\n return element.closest(this.controllerSelector) === this.element;\n };\n this.schema = schema;\n this.element = element;\n this.identifier = identifier;\n this.guide = new Guide(logger);\n this.outlets = new OutletSet(this.documentScope, element);\n }\n findElement(selector) {\n return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n }\n findAllElements(selector) {\n return [\n ...(this.element.matches(selector) ? [this.element] : []),\n ...this.queryElements(selector).filter(this.containsElement),\n ];\n }\n queryElements(selector) {\n return Array.from(this.element.querySelectorAll(selector));\n }\n get controllerSelector() {\n return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n }\n get isDocumentScope() {\n return this.element === document.documentElement;\n }\n get documentScope() {\n return this.isDocumentScope\n ? this\n : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n }\n}\n\nclass ScopeObserver {\n constructor(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap();\n this.scopeReferenceCounts = new WeakMap();\n }\n start() {\n this.valueListObserver.start();\n }\n stop() {\n this.valueListObserver.stop();\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n parseValueForToken(token) {\n const { element, content: identifier } = token;\n const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n let scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n }\n elementMatchedValue(element, value) {\n const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n }\n elementUnmatchedValue(element, value) {\n const referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n }\n fetchScopesByIdentifierForElement(element) {\n let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map();\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n }\n}\n\nclass Router {\n constructor(application) {\n this.application = application;\n this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new Multimap();\n this.modulesByIdentifier = new Map();\n }\n get element() {\n return this.application.element;\n }\n get schema() {\n return this.application.schema;\n }\n get logger() {\n return this.application.logger;\n }\n get controllerAttribute() {\n return this.schema.controllerAttribute;\n }\n get modules() {\n return Array.from(this.modulesByIdentifier.values());\n }\n get contexts() {\n return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n }\n start() {\n this.scopeObserver.start();\n }\n stop() {\n this.scopeObserver.stop();\n }\n loadDefinition(definition) {\n this.unloadIdentifier(definition.identifier);\n const module = new Module(this.application, definition);\n this.connectModule(module);\n const afterLoad = definition.controllerConstructor.afterLoad;\n if (afterLoad) {\n afterLoad(definition.identifier, this.application);\n }\n }\n unloadIdentifier(identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n }\n getContextForElementAndIdentifier(element, identifier) {\n const module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find((context) => context.element == element);\n }\n }\n handleError(error, message, detail) {\n this.application.handleError(error, message, detail);\n }\n createScopeForElementAndIdentifier(element, identifier) {\n return new Scope(this.schema, element, identifier, this.logger);\n }\n scopeConnected(scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n }\n scopeDisconnected(scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n const module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n }\n connectModule(module) {\n this.modulesByIdentifier.set(module.identifier, module);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope) => module.connectContextForScope(scope));\n }\n disconnectModule(module) {\n this.modulesByIdentifier.delete(module.identifier);\n const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach((scope) => module.disconnectContextForScope(scope));\n }\n}\n\nconst defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\",\n targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n constructor(element = document.documentElement, schema = defaultSchema) {\n this.logger = console;\n this.debug = false;\n this.logDebugActivity = (identifier, functionName, detail = {}) => {\n if (this.debug) {\n this.logFormattedMessage(identifier, functionName, detail);\n }\n };\n this.element = element;\n this.schema = schema;\n this.dispatcher = new Dispatcher(this);\n this.router = new Router(this);\n this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n }\n static start(element, schema) {\n const application = new this(element, schema);\n application.start();\n return application;\n }\n async start() {\n await domReady();\n this.logDebugActivity(\"application\", \"starting\");\n this.dispatcher.start();\n this.router.start();\n this.logDebugActivity(\"application\", \"start\");\n }\n stop() {\n this.logDebugActivity(\"application\", \"stopping\");\n this.dispatcher.stop();\n this.router.stop();\n this.logDebugActivity(\"application\", \"stop\");\n }\n register(identifier, controllerConstructor) {\n this.load({ identifier, controllerConstructor });\n }\n registerActionOption(name, filter) {\n this.actionDescriptorFilters[name] = filter;\n }\n load(head, ...rest) {\n const definitions = Array.isArray(head) ? head : [head, ...rest];\n definitions.forEach((definition) => {\n if (definition.controllerConstructor.shouldLoad) {\n this.router.loadDefinition(definition);\n }\n });\n }\n unload(head, ...rest) {\n const identifiers = Array.isArray(head) ? head : [head, ...rest];\n identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n }\n get controllers() {\n return this.router.contexts.map((context) => context.controller);\n }\n getControllerForElementAndIdentifier(element, identifier) {\n const context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n }\n handleError(error, message, detail) {\n var _a;\n this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n }\n logFormattedMessage(identifier, functionName, detail = {}) {\n detail = Object.assign({ application: this }, detail);\n this.logger.groupCollapsed(`${identifier} #${functionName}`);\n this.logger.log(\"details:\", Object.assign({}, detail));\n this.logger.groupEnd();\n }\n}\nfunction domReady() {\n return new Promise((resolve) => {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", () => resolve());\n }\n else {\n resolve();\n }\n });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n return classes.reduce((properties, classDefinition) => {\n return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n }, {});\n}\nfunction propertiesForClassDefinition(key) {\n return {\n [`${key}Class`]: {\n get() {\n const { classes } = this;\n if (classes.has(key)) {\n return classes.get(key);\n }\n else {\n const attribute = classes.getAttributeName(key);\n throw new Error(`Missing attribute \"${attribute}\"`);\n }\n },\n },\n [`${key}Classes`]: {\n get() {\n return this.classes.getAll(key);\n },\n },\n [`has${capitalize(key)}Class`]: {\n get() {\n return this.classes.has(key);\n },\n },\n };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n return outlets.reduce((properties, outletDefinition) => {\n return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n }, {});\n}\nfunction propertiesForOutletDefinition(name) {\n const camelizedName = namespaceCamelize(name);\n return {\n [`${camelizedName}Outlet`]: {\n get() {\n const outlet = this.outlets.find(name);\n if (outlet) {\n const outletController = this.application.getControllerForElementAndIdentifier(outlet, name);\n if (outletController) {\n return outletController;\n }\n else {\n throw new Error(`Missing \"data-controller=${name}\" attribute on outlet element for \"${this.identifier}\" controller`);\n }\n }\n throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n },\n },\n [`${camelizedName}Outlets`]: {\n get() {\n const outlets = this.outlets.findAll(name);\n if (outlets.length > 0) {\n return outlets\n .map((outlet) => {\n const controller = this.application.getControllerForElementAndIdentifier(outlet, name);\n if (controller) {\n return controller;\n }\n else {\n console.warn(`The provided outlet element is missing the outlet controller \"${name}\" for \"${this.identifier}\"`, outlet);\n }\n })\n .filter((controller) => controller);\n }\n return [];\n },\n },\n [`${camelizedName}OutletElement`]: {\n get() {\n const outlet = this.outlets.find(name);\n if (outlet) {\n return outlet;\n }\n else {\n throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n }\n },\n },\n [`${camelizedName}OutletElements`]: {\n get() {\n return this.outlets.findAll(name);\n },\n },\n [`has${capitalize(camelizedName)}Outlet`]: {\n get() {\n return this.outlets.has(name);\n },\n },\n };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n return targets.reduce((properties, targetDefinition) => {\n return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n return {\n [`${name}Target`]: {\n get() {\n const target = this.targets.find(name);\n if (target) {\n return target;\n }\n else {\n throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n }\n },\n },\n [`${name}Targets`]: {\n get() {\n return this.targets.findAll(name);\n },\n },\n [`has${capitalize(name)}Target`]: {\n get() {\n return this.targets.has(name);\n },\n },\n };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n const propertyDescriptorMap = {\n valueDescriptorMap: {\n get() {\n return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n return Object.assign(result, { [attributeName]: valueDescriptor });\n }, {});\n },\n },\n };\n return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n const { key, name, reader: read, writer: write } = definition;\n return {\n [name]: {\n get() {\n const value = this.data.get(key);\n if (value !== null) {\n return read(value);\n }\n else {\n return definition.defaultValue;\n }\n },\n set(value) {\n if (value === undefined) {\n this.data.delete(key);\n }\n else {\n this.data.set(key, write(value));\n }\n },\n },\n [`has${capitalize(name)}`]: {\n get() {\n return this.data.has(key) || definition.hasCustomDefaultValue;\n },\n },\n };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n return valueDescriptorForTokenAndTypeDefinition({\n controller,\n token,\n typeDefinition,\n });\n}\nfunction parseValueTypeConstant(constant) {\n switch (constant) {\n case Array:\n return \"array\";\n case Boolean:\n return \"boolean\";\n case Number:\n return \"number\";\n case Object:\n return \"object\";\n case String:\n return \"string\";\n }\n}\nfunction parseValueTypeDefault(defaultValue) {\n switch (typeof defaultValue) {\n case \"boolean\":\n return \"boolean\";\n case \"number\":\n return \"number\";\n case \"string\":\n return \"string\";\n }\n if (Array.isArray(defaultValue))\n return \"array\";\n if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n const typeFromObject = parseValueTypeConstant(payload.typeObject.type);\n if (!typeFromObject)\n return;\n const defaultValueType = parseValueTypeDefault(payload.typeObject.default);\n if (typeFromObject !== defaultValueType) {\n const propertyPath = payload.controller ? `${payload.controller}.${payload.token}` : payload.token;\n throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${payload.typeObject.default}\" is of type \"${defaultValueType}\".`);\n }\n return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n const typeFromObject = parseValueTypeObject({\n controller: payload.controller,\n token: payload.token,\n typeObject: payload.typeDefinition,\n });\n const typeFromDefaultValue = parseValueTypeDefault(payload.typeDefinition);\n const typeFromConstant = parseValueTypeConstant(payload.typeDefinition);\n const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n if (type)\n return type;\n const propertyPath = payload.controller ? `${payload.controller}.${payload.typeDefinition}` : payload.token;\n throw new Error(`Unknown value type \"${propertyPath}\" for \"${payload.token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n const constant = parseValueTypeConstant(typeDefinition);\n if (constant)\n return defaultValuesByType[constant];\n const defaultValue = typeDefinition.default;\n if (defaultValue !== undefined)\n return defaultValue;\n return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n const key = `${dasherize(payload.token)}-value`;\n const type = parseValueTypeDefinition(payload);\n return {\n type,\n key,\n name: camelize(key),\n get defaultValue() {\n return defaultValueForDefinition(payload.typeDefinition);\n },\n get hasCustomDefaultValue() {\n return parseValueTypeDefault(payload.typeDefinition) !== undefined;\n },\n reader: readers[type],\n writer: writers[type] || writers.default,\n };\n}\nconst defaultValuesByType = {\n get array() {\n return [];\n },\n boolean: false,\n number: 0,\n get object() {\n return {};\n },\n string: \"\",\n};\nconst readers = {\n array(value) {\n const array = JSON.parse(value);\n if (!Array.isArray(array)) {\n throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n }\n return array;\n },\n boolean(value) {\n return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n },\n number(value) {\n return Number(value);\n },\n object(value) {\n const object = JSON.parse(value);\n if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n }\n return object;\n },\n string(value) {\n return value;\n },\n};\nconst writers = {\n default: writeString,\n array: writeJSON,\n object: writeJSON,\n};\nfunction writeJSON(value) {\n return JSON.stringify(value);\n}\nfunction writeString(value) {\n return `${value}`;\n}\n\nclass Controller {\n constructor(context) {\n this.context = context;\n }\n static get shouldLoad() {\n return true;\n }\n static afterLoad(_identifier, _application) {\n return;\n }\n get application() {\n return this.context.application;\n }\n get scope() {\n return this.context.scope;\n }\n get element() {\n return this.scope.element;\n }\n get identifier() {\n return this.scope.identifier;\n }\n get targets() {\n return this.scope.targets;\n }\n get outlets() {\n return this.scope.outlets;\n }\n get classes() {\n return this.scope.classes;\n }\n get data() {\n return this.scope.data;\n }\n initialize() {\n }\n connect() {\n }\n disconnect() {\n }\n dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true } = {}) {\n const type = prefix ? `${prefix}:${eventName}` : eventName;\n const event = new CustomEvent(type, { detail, bubbles, cancelable });\n target.dispatchEvent(event);\n return event;\n }\n}\nController.blessings = [\n ClassPropertiesBlessing,\n TargetPropertiesBlessing,\n ValuePropertiesBlessing,\n OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n toggle(event) {\n if (event.target.checked) {\n document.body.style.overflowY = \"hidden\";\n this.element.style.overflowY = \"scroll\";\n this.element.style.minHeight = \"100vh\";\n } else {\n document.body.style.overflowY = \"scroll\";\n this.element.style.overflowY = \"\";\n this.element.style.minHeight = \"\";\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = [\n \"clientName\",\n \"clientVersion\",\n \"osName\",\n \"osVersion\",\n \"viewportWidth\",\n \"viewportHeight\",\n \"devicePixelRatio\",\n \"deviceType\",\n \"help\",\n ];\n\n connect() {\n this.element.style.zIndex = 10000;\n\n this.clientNameTarget.innerText = window.device.client.name;\n this.clientVersionTarget.innerText = window.device.client.version;\n this.osNameTarget.innerText = window.device.os.name;\n this.osVersionTarget.innerText = window.device.os.version;\n this.deviceTypeTarget.innerText = window.device.device.type;\n\n this.viewportWidthTarget.innerText = window.innerWidth;\n this.viewportHeightTarget.innerText = window.innerHeight;\n this.devicePixelRatioTarget.innerText = window.devicePixelRatio;\n }\n\n resized (event) {\n this.viewportWidthTarget.innerText = window.innerWidth;\n this.viewportHeightTarget.innerText = window.innerHeight;\n }\n\n outline (event) {\n let style = document.head.querySelector('style#outline');\n\n if(style){\n style.remove();\n } else {\n style = document.createElement('style');\n style.id = 'outline';\n style.append(\"* { outline: 1px solid pink }\");\n\n document.head.appendChild(style);\n }\n }\n\n toggleHelp (event) {\n this.helpTarget.hidden = !this.helpTarget.hidden;\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = [\"text\", \"icon\", \"confirmationIcon\"];\n static values = {\n text: String,\n confirmation: String,\n };\n\n async copy(event) {\n if (!('clipboard' in navigator)) return;\n\n try {\n await navigator.clipboard.writeText(this.textValue.trim());\n } catch(e) {\n console.error(\"Couldn't copy\", e);\n return;\n }\n\n const textTarget = this.hasTextTarget ? \"textTarget\" : \"element\";\n\n this[textTarget].innerText = this.confirmationValue;\n\n if (this.hasIconTarget) this.iconTarget.classList.add(\"d-none\");\n if (this.hasConfirmationIconTarget) this.confirmationIconTarget.classList.remove(\"d-none\");\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = [\"footnote\", \"reference\"];\n static classes = [\"footnote\", \"footnoteToggled\", \"sidenote\"];\n static values = {\n minSpacing: {\n type: Number,\n default: 20,\n },\n offsetTop: {\n type: Number,\n default: 0,\n },\n containerWidth: {\n type: Number,\n default: 780,\n },\n sidenoteWidth: {\n type: Number,\n default: 220,\n },\n paddingLeft: {\n type: Number,\n default: 16,\n },\n };\n\n connect() {\n this.originalFootnotes = [];\n this.createFootnotes();\n }\n\n resize(event = undefined) {\n if (this.sidenotesArePossible === undefined) return;\n\n this.offsetTopValue = 0;\n\n const sidenotesWerePossible = this.sidenotesArePossible;\n const sidenotesArePossible = this.areSidenotesPossible;\n\n if (sidenotesWerePossible && sidenotesArePossible) {\n for (const sidenote of this.footnoteTargets) {\n this.positionSidenote(sidenote);\n }\n } else {\n const footnotes = Array.from(this.footnoteTargets);\n\n for (const i in this.footnoteTargets) {\n footnotes[i].outerHTML = this.originalFootnotes[i];\n }\n\n this.originalFootnotes = [];\n\n this.createFootnotes();\n }\n }\n\n createFootnotes() {\n const references = this.element.querySelectorAll(\"a[id^=fn]\");\n const footnotes = this.element.querySelectorAll(\"li[id^=fn]\");\n\n this.sidenotesArePossible = this.areSidenotesPossible;\n\n for (const i in Array.from(references)) {\n const reference = references[i];\n const footnote = footnotes[i];\n const backlink = footnote.querySelector(\"a[role=doc-backlink]\");\n\n this.originalFootnotes.push(footnote.outerHTML);\n\n reference.dataset.footnote = footnote.id;\n reference.dataset.turbo = \"false\";\n reference.dataset.footnotesTarget = \"reference\";\n\n if (backlink) backlink.dataset.turbo = \"false\";\n footnote.dataset.reference = reference.id;\n // XXX: The timeout ensures footnotes are processed in order.\n setTimeout(() => footnote.dataset.footnotesTarget = \"footnote\", 1+i);\n }\n }\n\n footnoteTargetConnected(footnote) {\n const reference = this.referenceTargets.find(x => x.id === footnote.dataset.reference);\n\n footnote.style.listStylePosition = \"inside\";\n\n if (this.sidenotesArePossible) {\n this.positionSidenote(footnote, reference);\n } else {\n footnote.dataset.action = \"blur->footnotes#hide\";\n\n footnote.classList.add(...this.footnoteToggledClasses);\n footnote.classList.add(...this.footnoteClasses);\n footnote.style.bottom = 0;\n footnote.style.left = 0;\n footnote.style.zIndex = 1;\n footnote.dataset.height = footnote.offsetHeight;\n footnote.style.height = 0;\n footnote.classList.add(\"collapsing\");\n footnote.classList.remove(...this.footnoteToggledClasses);\n\n const backlink = footnote.querySelector(\"a[role=doc-backlink]\");\n\n if (backlink) backlink.style.display = \"none\";\n\n reference.dataset.action = \"footnotes#show\";\n reference.dataset.footnotesReferenceParam = reference.id;\n reference.dataset.footnotesFootnoteParam = footnote.id;\n }\n }\n\n get areSidenotesPossible () {\n const bodyWidth = document.body.offsetWidth;\n const containerWidth = (this.containerWidthValue + this.paddingLeftValue + this.sidenoteWidthValue * 2);\n\n return (bodyWidth > containerWidth);\n }\n\n positionSidenote(sidenote, reference = undefined) {\n if (!reference) reference = this.referenceTargets.find(x => x.id === sidenote.dataset.reference);\n\n const backlink = sidenote.querySelector(\"a[role=doc-backlink]\");\n const offsetTop = Math.max(reference.offsetTop, this.offsetTopValue);\n const offsetLeft = this.element.offsetLeft + this.element.offsetWidth + this.paddingLeftValue;\n\n sidenote.style.top = `${offsetTop}px`;\n sidenote.style.left = `${offsetLeft}px`;\n sidenote.classList.add(...this.sidenoteClasses);\n sidenote.dataset.action = \"\";\n reference.dataset.action = \"\";\n\n if (backlink) backlink.style.display = \"\";\n\n this.offsetTopValue = offsetTop + sidenote.offsetHeight + this.minSpacingValue;\n }\n\n show(event) {\n const footnote = this.footnoteTargets.find(x => x.id === event.params.footnote);\n\n event.preventDefault();\n\n this.hide();\n\n footnote.style.height = `${footnote.dataset.height}px`;\n footnote.classList.add(...this.footnoteToggledClasses);\n footnote.setAttribute(\"role\", \"alert\");\n footnote.setAttribute(\"tabindex\", \"0\");\n footnote.focus();\n }\n\n hide(event = undefined) {\n for (const footnote of this.footnoteTargets) {\n footnote.style.height = 0;\n footnote.classList.remove(...this.footnoteToggledClasses);\n footnote.setAttribute(\"role\", \"\");\n }\n }\n}\n", "import { Controller } from \"@hotwired/stimulus\";\n\nexport default class extends Controller {\n static targets = [\"goal\", \"balance\", \"date\"];\n static values = {\n monetizationUrl: String,\n };\n\n async connect() {\n if (!this.monetizationUrlValue) return;\n\n try {\n const monetizationUrl = new URL(this.monetizationUrlValue);\n\n if (window.location.protocol !== monetizationUrl.protocol) {\n monetizationUrl.protocol = this.protocol;\n this.monetizationUrlValue = monetizationUrl.toString();\n }\n } catch(e) {\n console.error(\"Not a valid URL\", this.monetizationUrlValue);\n return;\n }\n\n const balances = await this.fetchBalances();\n const decimalIndex = balances.balance.length - balances.decimal;\n const totalBalance = `${balances.balance.slice(0, decimalIndex)}.${balances.balance.slice(decimalIndex)}`;\n const locale = document.querySelector(\"html\").lang;\n\n for (const goal of this.goalTargets) {\n const max = parseFloat(goal.getAttribute(\"aria-valuemax\") ?? \"0\");\n const now = Math.min(100, (totalBalance / max) * 100);\n goal.style.width = `${now}%`;\n goal.setAttribute(\"aria-valuenow\", totalBalance);\n }\n\n if (this.hasBalanceTarget) {\n const style = \"currency\";\n const currency = balances.currency;\n const balanceFormatter = new Intl.NumberFormat(locale, { style, currency });\n\n this.balanceTarget.innerText = balanceFormatter.format(totalBalance);\n }\n\n if (this.hasDateTarget) {\n const balanceDate = new Date(balances.timestamp);\n const dateFormatter = new Intl.DateTimeFormat(locale, { dateStyle: 'full' });\n\n this.dateTarget.innerText = dateFormatter.format(balanceDate);\n }\n }\n\n async fetchBalances() {\n try {\n const response = await fetch(this.monetizationUrlValue);\n\n return await response.json();\n } catch(e) {\n console.error(\"Couldn't fetch\", this.monetizationUrlValue, e);\n return {};\n }\n }\n\n get protocol() {\n if (window.location.protocol === \"ipfs:\") return \"ipns:\";\n\n return window.location.protocol;\n }\n}\n"],
5
+ "mappings": "8qBAAA,IAAAA,GAAAC,EAAAC,IAAA,cACA,OAAO,eAAeA,GAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,GAAQ,KAAO,CAACC,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,EAAc,OAAOD,CAAW,CAC9D,CACF,CAEA,MAAM,eAAgB,CACpB,GAAI,CAGF,OAAO,MAFU,MAAM,MAAM,KAAK,oBAAoB,GAEhC,KAAK,CAC7B,OAAQE,EAAN,CACA,eAAQ,MAAM,iBAAkB,KAAK,qBAAsBA,CAAC,EACrD,CAAC,CACV,CACF,CAEA,IAAI,UAAW,CACb,OAAI,OAAO,SAAS,WAAa,QAAgB,QAE1C,OAAO,SAAS,QACzB,CACF,EAhEEC,EADKhB,GACE,UAAU,CAAC,OAAQ,UAAW,MAAM,GAC3CgB,EAFKhB,GAEE,SAAS,CACd,gBAAiB,MACnB,GnCHF,OAAO,eAAiB,IAAI,GAAAiB,QAC5B,OAAO,OAAS,OAAO,eAAe,MAAM,UAAU,SAAS,EAE3D,CAAC,OAAO,OAAO,KAAO,OAAO,IAAI,aAAe,eAClD,OAAO,SAAW,IAAIC,GAAS,CAC7B,UAAW,OAAO,IAAI,oBACtB,WAAY,OAAO,IAAI,qBACvB,KAAM,wBACR,CAAC,EAED,QAAQ,cAAgB,QAAQ,MAChC,QAAQ,MAAQ,IAAIC,KAClB,OAAO,SAAS,OAAOA,EAAE,KAAK,GAAG,CAAC,EAC3B,QAAQ,cAAc,GAAGA,CAAC,IAK/BC,GAAM,EAGZ,OAAO,SAAWC,GAAY,MAAM,EAQpC,SAAS,MAAS,OAAO,IAAI,aAAe,aAC5C,SAAS,SAAS,cAAeC,EAAoB,EACrD,SAAS,SAAS,kBAAmBC,EAAwB,EAC7D,SAAS,SAAS,cAAeC,EAAoB,EACrD,SAAS,SAAS,YAAaC,EAAmB,EAClD,SAAS,SAAS,aAAcC,EAAmB",
6
+ "names": ["require_trim", "__commonJSMin", "exports", "str", "char", "require_version", "__commonJSMin", "exports", "trim_1", "version", "versionTruncation", "versionString", "versionParts", "userAgent", "engine", "geckoVersionRegex", "match", "regex", "require_variable_replacement", "__commonJSMin", "exports", "template", "variables", "regex", "match", "index", "require_memory_cache", "__commonJSMin", "exports", "memoryCacheBucket", "key", "value", "require_user_agent", "__commonJSMin", "exports", "memory_cache_1", "cache", "getRegexInstance", "rawRegex", "cachedRegexInstance", "regexInstance", "userAgent", "match", "require_browser", "__commonJSMin", "exports", "__importDefault", "mod", "version_1", "variable_replacement_1", "user_agent_1", "browsers_json_1", "browser_engine_json_1", "available_browsers_json_1", "mobile_only_browsers_json_1", "BrowserParser", "options", "userAgent", "result", "browser", "match", "vrpVersion", "version", "shortVersion", "sortedEngineVersions", "a", "b", "versionThreshold", "engineByVersion", "browserEngine", "browserName", "shortName", "name", "require_mobile_apps", "__commonJSMin", "exports", "__importDefault", "mod", "mobile_apps_json_1", "version_1", "variable_replacement_1", "user_agent_1", "MobileAppParser", "options", "userAgent", "result", "mobileApp", "match", "require_feed_readers", "__commonJSMin", "exports", "__importDefault", "mod", "feed_readers_json_1", "version_1", "variable_replacement_1", "user_agent_1", "FeedReaderParser", "options", "userAgent", "result", "feedReader", "match", "require_libraries", "__commonJSMin", "exports", "__importDefault", "mod", "libraries_json_1", "version_1", "variable_replacement_1", "user_agent_1", "LibraryParser", "options", "userAgent", "result", "library", "match", "require_media_players", "__commonJSMin", "exports", "__importDefault", "mod", "mediaplayers_json_1", "version_1", "variable_replacement_1", "user_agent_1", "MediaPlayerParser", "options", "userAgent", "result", "mediaPlayer", "match", "require_personal_information_managers", "__commonJSMin", "exports", "__importDefault", "mod", "pim_json_1", "version_1", "variable_replacement_1", "user_agent_1", "PersonalInformationManagerParser", "options", "userAgent", "result", "personalInformationManager", "match", "require_client", "__commonJSMin", "exports", "__importDefault", "mod", "browser_1", "mobile_apps_1", "feed_readers_1", "libraries_1", "media_players_1", "personal_information_managers_1", "clientParsers", "ClientParser", "options", "userAgent", "Parser", "client", "require_cameras", "__commonJSMin", "exports", "__importDefault", "mod", "cameras_json_1", "variable_replacement_1", "user_agent_1", "CameraParser", "userAgent", "result", "brand", "camera", "match", "model", "modelMatch", "require_model", "__commonJSMin", "exports", "model", "require_mobiles", "__commonJSMin", "exports", "__importDefault", "mod", "mobiles_json_1", "variable_replacement_1", "user_agent_1", "model_1", "MobileParser", "userAgent", "result", "resultType", "brand", "mobile", "match", "model", "modelMatch", "require_televisions", "__commonJSMin", "exports", "__importDefault", "mod", "televisions_json_1", "variable_replacement_1", "user_agent_1", "model_1", "TelevisionParser", "userAgent", "result", "brand", "television", "match", "model", "modelMatch", "require_cars", "__commonJSMin", "exports", "__importDefault", "mod", "car_browsers_json_1", "variable_replacement_1", "user_agent_1", "CarParser", "userAgent", "result", "brand", "car", "model", "match", "require_consoles", "__commonJSMin", "exports", "__importDefault", "mod", "consoles_json_1", "variable_replacement_1", "user_agent_1", "ConsoleParser", "userAgent", "result", "brand", "gameConsole", "match", "model", "modelMatch", "require_notebooks", "__commonJSMin", "exports", "__importDefault", "mod", "notebooks_json_1", "variable_replacement_1", "user_agent_1", "model_1", "NotebooksParser", "userAgent", "result", "brand", "notebook", "match", "model", "require_portable_media_players", "__commonJSMin", "exports", "__importDefault", "mod", "portable_media_player_json_1", "variable_replacement_1", "user_agent_1", "PortableMediaPlayersParser", "userAgent", "result", "brand", "portableMediaPlayer", "match", "model", "modelMatch", "require_device", "__commonJSMin", "exports", "__importDefault", "mod", "cameras_1", "mobiles_1", "televisions_1", "cars_1", "consoles_1", "notebooks_1", "portable_media_players_1", "deviceParsers", "ClientParser", "userAgent", "Parser", "device", "require_operating_system", "__commonJSMin", "exports", "__importDefault", "mod", "oss_json_1", "version_1", "variable_replacement_1", "user_agent_1", "operating_system_json_1", "desktopOsArray", "shortOsNames", "osFamilies", "OperatingSystemParser", "options", "userAgent", "result", "operatingSystem", "match", "osName", "osShortName", "osFamily", "shortNames", "shortName", "name", "require_vendor_fragment", "__commonJSMin", "exports", "__importDefault", "mod", "vendorfragments_json_1", "user_agent_1", "VendorFragmentParser", "userAgent", "brand", "vendorFragment", "regex", "require_bot", "__commonJSMin", "exports", "module", "__importDefault", "mod", "bots_json_1", "user_agent_1", "BotParser", "userAgent", "_a", "_b", "_c", "_d", "bot", "require_version_compare", "__commonJSMin", "exports", "v1", "v2", "operator", "i", "x", "compare", "vm", "prepVersion", "v", "numVersion", "require_dist", "__commonJSMin", "exports", "module", "__importDefault", "mod", "client_1", "device_1", "operating_system_1", "vendor_fragment_1", "browser_1", "BotParser", "user_agent_1", "version_compare_1", "DeviceDetector", "options", "userAgent", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "_j", "_k", "_l", "_m", "_o", "_p", "result", "osName", "osVersion", "osFamily", "brand", "client", "require_stackframe", "__commonJSMin", "exports", "module", "root", "factory", "_isNumber", "n", "_capitalize", "str", "_getter", "p", "booleanProps", "numericProps", "stringProps", "arrayProps", "objectProps", "props", "StackFrame", "obj", "i", "v", "fileName", "lineNumber", "columnNumber", "functionName", "argsStartIndex", "argsEndIndex", "args", "locationString", "parts", "j", "k", "require_error_stack_parser", "__commonJSMin", "exports", "module", "root", "factory", "StackFrame", "FIREFOX_SAFARI_STACK_REGEXP", "CHROME_IE_STACK_REGEXP", "SAFARI_NATIVE_CODE_REGEXP", "error", "urlLike", "regExp", "parts", "filtered", "line", "sanitizedLine", "location", "locationParts", "functionName", "fileName", "functionNameRegex", "matches", "e", "lineRE", "lines", "result", "i", "len", "match", "tokens", "functionCall", "argsRaw", "args", "require_browser_ponyfill", "__commonJSMin", "exports", "module", "global", "__self__", "F", "self", "irrelevant", "support", "isDataView", "obj", "viewClasses", "isArrayBufferView", "normalizeName", "name", "normalizeValue", "value", "iteratorFor", "items", "iterator", "Headers", "headers", "header", "oldValue", "callback", "thisArg", "consumed", "body", "fileReaderReady", "reader", "resolve", "reject", "readBlobAsArrayBuffer", "blob", "promise", "readBlobAsText", "readArrayBufferAsText", "buf", "view", "chars", "i", "bufferClone", "Body", "rejected", "decode", "methods", "normalizeMethod", "method", "upcased", "Request", "input", "options", "form", "bytes", "split", "parseHeaders", "rawHeaders", "preProcessedHeaders", "line", "parts", "key", "Response", "bodyInit", "response", "redirectStatuses", "url", "status", "message", "error", "fetch", "init", "request", "xhr", "abortXhr", "ctx", "require_treebase", "__commonJSMin", "exports", "module", "TreeBase", "data", "res", "c", "iter", "item", "cur", "cmp", "i", "Iterator", "cb", "it", "tree", "root", "save", "start", "require_rbtree", "__commonJSMin", "exports", "module", "TreeBase", "Node", "data", "dir", "val", "RBTree", "comparator", "ret", "head", "last", "gp", "ggp", "p", "node", "is_red", "dir2", "single_rotate", "double_rotate", "cmp", "found", "sr", "sibling", "gpc", "root", "save", "require_bintree", "__commonJSMin", "exports", "module", "TreeBase", "Node", "data", "dir", "val", "BinTree", "comparator", "p", "node", "head", "found", "cmp", "require_bintrees", "__commonJSMin", "exports", "module", "require_tdigest", "__commonJSMin", "exports", "module", "RBTree", "TDigest", "delta", "K", "CX", "compare_centroid_means", "everything", "result", "c", "approx", "s", "a", "b", "compare_centroid_mean_cumns", "x", "n", "i", "exact", "cumn", "iter", "prev", "nearest", "min", "max", "p", "max_n", "lower", "upper", "x_or_xlist", "xs", "ps", "bound", "p_or_plist", "qs", "h", "pop_random", "choices", "idx", "points", "Digest", "config", "import_device_detector_js", "finallyConstructor", "callback", "constructor", "value", "reason", "finally_default", "allSettled", "arr", "P", "resolve", "reject", "args", "remaining", "res", "i", "val", "then", "e", "allSettled_default", "setTimeoutFunc", "isArray", "x", "noop", "bind", "fn", "thisArg", "Promise", "doResolve", "handle", "self", "deferred", "cb", "resolve", "reject", "ret", "e", "newValue", "then", "finale", "i", "len", "Handler", "onFulfilled", "onRejected", "promise", "done", "value", "reason", "ex", "prom", "finally_default", "arr", "args", "remaining", "res", "val", "allSettled_default", "err", "src_default", "FILTERED", "MAX_OBJ_LENGTH", "jsonifyNotice", "notice", "_a", "_b", "_c", "maxLength", "_d", "keysBlocklist", "i", "t", "Truncator", "s", "keys", "level", "opts", "_i", "keys_1", "key", "obj", "truncate", "params", "_e", "keys_2", "err", "scale", "num", "value", "depth", "type", "objectType", "saved", "index", "path", "sub", "getAttr", "arr", "length", "dst", "el", "isBlocklisted", "attr", "keysBlocklist_1", "v", "Span", "metric", "name", "startTime", "endTime", "now", "BaseMetric", "endTime", "name", "startTime", "span", "Span", "ms", "NoopMetric", "_name", "_startTime", "_ms", "Scope", "NoopMetric", "clone", "__assign", "context", "ctx", "state", "key", "metric", "import_error_stack_parser", "hasConsole", "parse", "err", "ErrorStackParser", "parseErr", "espProcessor", "backtrace", "frames_2", "fakeErr", "_i", "frames_1", "frame", "type", "msg", "re", "angularMessageFilter", "notice", "err", "m", "makeDebounceFilter", "lastNoticeJSON", "timeout", "notice", "s", "IGNORED_MESSAGES", "ignoreNoiseFilter", "notice", "err", "frame", "re", "uncaughtMessageFilter", "notice", "err", "m", "import_cross_fetch", "errors", "rateLimitReset", "request", "req", "utime", "src_default", "errors", "opt", "fetch", "resp", "s", "n", "json", "err", "body", "makeRequester", "api", "req", "request", "rateLimitReset", "utime", "src_default", "errors", "resolve", "reject", "error", "resp", "body", "h", "s", "n", "json", "err", "makeRequester", "opts", "request", "tdigest", "hasTdigest", "TDigestStat", "ms", "tdigestCentroids", "TDigestStatGroups", "_super", "__extends", "_this", "totalMs", "groups", "name_1", "name", "ms", "stat", "TDigestStat", "tdigestCentroids", "tdigestCentroids", "td", "means", "counts", "c", "FLUSH_INTERVAL", "QueryInfo", "query", "QueriesStats", "opt", "makeRequester", "query", "QueryInfo", "q", "_this", "hasTdigest", "ms", "minute", "startTime", "key", "keyStr", "stat", "TDigestStat", "FLUSH_INTERVAL", "queries", "v", "__assign", "outJSON", "req", "_resp", "err", "FLUSH_INTERVAL", "QueueMetric", "_super", "__extends", "queue", "_this", "BaseMetric", "QueuesStats", "opt", "makeRequester", "q", "_this", "hasTdigest", "ms", "minute", "startTime", "key", "keyStr", "stat", "TDigestStatGroups", "FLUSH_INTERVAL", "queues", "v", "__assign", "outJSON", "req", "_resp", "err", "FLUSH_INTERVAL", "RouteMetric", "_super", "__extends", "method", "route", "statusCode", "contentType", "_this", "BaseMetric", "RoutesStats", "opt", "makeRequester", "req", "_this", "hasTdigest", "ms", "minute", "startTime", "key", "keyStr", "stat", "TDigestStat", "FLUSH_INTERVAL", "routes", "v", "__assign", "outJSON", "_resp", "err", "RoutesBreakdowns", "opt", "makeRequester", "req", "_this", "hasTdigest", "ms", "minute", "startTime", "key", "keyStr", "stat", "TDigestStatGroups", "FLUSH_INTERVAL", "routes", "v", "__assign", "outJSON", "_resp", "err", "NOTIFIER_NAME", "NOTIFIER_VERSION", "NOTIFIER_URL", "BaseNotifier", "opt", "_this", "Scope", "espProcessor", "makeRequester", "ignoreNoiseFilter", "makeDebounceFilter", "uncaughtMessageFilter", "angularMessageFilter", "notice", "NOTIFIER_NAME", "NOTIFIER_VERSION", "NOTIFIER_URL", "Routes", "Queues", "QueriesStats", "_i", "_a", "fn", "scope", "filter", "performanceFilter", "err", "__assign", "src_default", "error", "r", "body", "jsonifyNotice", "req", "resp", "props", "client", "airbrakeWrapper", "fnArgs", "wrappedArgs", "prop", "props_1", "args", "i", "arg", "_args", "wrapper", "Routes", "notifier", "RoutesStats", "RoutesBreakdowns", "method", "route", "statusCode", "contentType", "metric", "RouteMetric", "scope", "req", "_i", "_a", "performanceFilter", "Queues", "QueuesStats", "queue", "QueueMetric", "q", "windowFilter", "notice", "CONSOLE_METHODS", "instrumentConsole", "notifier", "m", "oldFn", "newFn", "args", "_i", "CONSOLE_METHODS_1", "elemAttrs", "instrumentDOM", "notifier", "handler", "makeEventHandler", "event", "getProp", "target", "state", "elemPath", "err", "elemName", "elem", "s", "str", "classNameString", "_i", "elemAttrs_1", "attr", "value", "name", "maxLen", "path", "parent", "name_1", "obj", "prop", "instrumentFetch", "notifier", "oldFetch", "req", "options", "state", "resp", "err", "lastLocation", "getCurrentLocation", "instrumentLocation", "notifier", "oldFn", "_event", "url", "recordLocation", "oldPushState", "_state", "_title", "index", "instrumentXHR", "notifier", "recordReq", "req", "state", "oldOpen", "method", "url", "_async", "_user", "_password", "oldSend", "_data", "oldFn", "_ev", "Notifier", "_super", "__extends", "opt", "_this", "windowFilter", "isDevEnv", "enabled", "self_1", "oldHandler_1", "instrumentDOM", "instrumentFetch", "instrumentLocation", "instrumentConsole", "instrumentXHR", "err", "src_default", "resolve", "reject", "j", "this_1", "notice", "_i", "_a", "e", "reason", "msg", "__assign", "message", "filename", "line", "column", "BaseNotifier", "isDevEnv", "env", "enabled", "v", "BuiltInHTMLElement", "wrapperForTheName", "prototype", "submitter", "validateSubmitter", "form", "raise", "errorConstructor", "message", "name", "submittersByForm", "findSubmitterFromClickTarget", "target", "element", "candidate", "clickCaptured", "event", "FrameLoadingStyle", "FrameElement", "value", "frameLoadingStyleFromString", "_a", "_b", "style", "expandURL", "locatable", "getAnchor", "url", "anchorMatch", "getAction", "action", "getExtension", "getLastPathComponent", "isHTML", "isPrefixedBy", "baseURL", "prefix", "getPrefix", "locationIsVisitable", "location", "rootLocation", "getRequestURL", "anchor", "toCacheKey", "urlsAreEqual", "left", "right", "getPathComponents", "addTrailingSlash", "FetchResponse", "response", "isAction", "activateScriptElement", "createdScriptElement", "cspNonce", "getMetaContent", "copyElementAttributes", "destinationElement", "sourceElement", "createDocumentFragment", "html", "template", "dispatch", "eventName", "cancelable", "detail", "nextAnimationFrame", "resolve", "nextEventLoopTick", "nextMicrotask", "parseHTMLDocument", "unindent", "strings", "values", "lines", "interpolate", "match", "indent", "line", "result", "string", "uuid", "_", "i", "getAttribute", "attributeName", "elements", "hasAttribute", "markAsBusy", "clearBusyState", "waitForLoad", "timeoutInMilliseconds", "onComplete", "getHistoryMethodForAction", "getVisitAction", "getMetaElement", "setMetaContent", "content", "FetchMethod", "fetchMethodFromString", "method", "FetchRequest", "delegate", "body", "_value", "fetchOptions", "error", "fetchResponse", "mimeType", "requestInterception", "AppearanceObserver", "entries", "lastEntry", "StreamMessage", "fragment", "importStreamElements", "streamElement", "inertScriptElement", "FormSubmissionState", "FormEnctype", "formEnctypeFromString", "encoding", "FormSubmission", "formElement", "mustRedirect", "buildFormData", "mergeFormDataEntries", "_element", "_submitter", "formElementAction", "initialized", "requesting", "confirmationMessage", "stopping", "stopped", "headers", "request", "token", "getCookieValue", "_request", "responseSucceededWithoutRedirect", "formData", "cookieName", "cookie", "searchParams", "Snapshot", "inertDisabledOrHidden", "queryPermanentElementsAll", "id", "getPermanentElementById", "snapshot", "permanentElementMap", "currentPermanentElement", "newPermanentElement", "node", "FormSubmitObserver", "eventTarget", "submissionDoesNotDismissDialog", "submissionDoesNotTargetIFrame", "View", "x", "y", "renderer", "isPreview", "shouldRender", "renderInterception", "options", "reason", "FrameView", "LinkInterceptor", "_event", "LinkClickObserver", "link", "doesNotTargetIFrame", "FormLinkClickObserver", "originalEvent", "turboFrame", "turboAction", "turboConfirm", "Bardo", "callback", "bardo", "permanentElement", "placeholder", "createPlaceholderForPermanentElement", "clone", "Renderer", "currentSnapshot", "newSnapshot", "renderElement", "willRender", "reject", "elementIsFocusable", "FrameRenderer", "currentElement", "newElement", "destinationRange", "frameElement", "sourceRange", "block", "readScrollLogicalPosition", "behavior", "readScrollBehavior", "activatedScriptElement", "defaultValue", "ProgressBar", "HeadSnapshot", "elementIsNoscript", "elementWithoutNonce", "outerHTML", "details", "elementType", "elementIsTracked", "matchedType", "type", "tracked", "elementIsMetaElementWithName", "elementIsScript", "elementIsStylesheet", "tagName", "PageSnapshot", "headSnapshot", "head", "clonedElement", "selectElements", "clonedSelectElements", "index", "source", "option", "clonedPasswordInput", "root", "TimingMetric", "VisitState", "defaultOptions", "SystemStatusCode", "Visit", "restorationIdentifier", "historyChanged", "referrer", "snapshotHTML", "visitCachedSnapshot", "updateHistory", "shouldCacheSnapshot", "acceptsStreamResponse", "actionForHistory", "statusCode", "isSuccessful", "responseHTML", "_response", "redirected", "_error", "scrollPosition", "metric", "BrowserAdapter", "session", "visit", "_visit", "_formSubmission", "CacheObserver", "staleElements", "FrameRedirector", "_location", "frame", "meta", "History", "turbo", "state", "additionalData", "restorationData", "Navigator", "formSubmission", "visitOptions", "currentAnchor", "isRestorationToTop", "oldURL", "newURL", "PageStage", "PageObserver", "readyState", "ScrollObserver", "position", "StreamMessageRenderer", "getPermanentElementMapForFragment", "permanentElementsInDocument", "permanentElementInDocument", "elementInStream", "StreamObserver", "fetchResponseFromEvent", "fetchResponseIsStream", "ErrorRenderer", "documentElement", "replaceableElement", "parentNode", "PageRenderer", "newStylesheetElements", "loadingElements", "SnapshotCache", "size", "key", "PageView", "cachedSnapshot", "Preloader", "responseText", "Session", "adapter", "delay", "mode", "extendURLWithDeprecatedProperties", "defaultPrevented", "render", "_snapshot", "_isPreview", "ev", "newBody", "timing", "submitterIsNavigatable", "container", "withinFrame", "deprecatedLocationPropertyDescriptors", "Cache", "StreamActions", "e", "cache", "navigator$1", "start", "registerAdapter", "connectStreamSource", "disconnectStreamSource", "renderStreamMessage", "clearCache", "setProgressBarDelay", "setConfirmMethod", "confirmMethod", "setFormMode", "Turbo", "FrameController", "_fetchResponse", "src", "newFrameElement", "fetchRequest", "newFrame", "_newElement", "wrapped", "getFrameElementById", "activateElement", "sourceURL", "currentURL", "StreamElement", "c", "existingChildren", "newChildrenIds", "actionFunction", "StreamSourceElement", "EventListener", "eventTarget", "eventName", "eventOptions", "binding", "event", "extendedEvent", "extendEvent", "left", "right", "leftIndex", "rightIndex", "stopImmediatePropagation", "Dispatcher", "application", "eventListener", "listeners", "map", "clearEventListeners", "error", "message", "detail", "eventListenerMap", "cacheKey", "parts", "key", "defaultActionDescriptorFilters", "value", "element", "descriptorPattern", "parseActionDescriptorString", "descriptorString", "matches", "keyFilter", "parseEventTarget", "parseEventOptions", "eventTargetName", "options", "token", "stringifyEventTarget", "camelize", "_", "char", "namespaceCamelize", "capitalize", "dasherize", "tokenize", "Action", "index", "descriptor", "schema", "getDefaultEventNameForElement", "eventFilter", "filteres", "modifiers", "meta", "ctrl", "alt", "shift", "modifier", "standardFilter", "params", "pattern", "name", "match", "typecast", "defaultEventNames", "e", "tagName", "Binding", "context", "action", "method", "actionDescriptorFilters", "passes", "filter", "target", "currentTarget", "actionEvent", "identifier", "controller", "ElementObserver", "delegate", "mutations", "callback", "mutation", "node", "attributeName", "nodes", "tree", "processor", "AttributeObserver", "add", "fetch", "del", "prune", "values", "Multimap", "set", "size", "_key", "_values", "SelectorObserver", "element", "selector", "delegate", "details", "ElementObserver", "Multimap", "callback", "matches", "tree", "match", "_attributeName", "matchedBefore", "StringMapObserver", "mutations", "attributeName", "mutation", "oldValue", "key", "value", "attribute", "TokenListObserver", "AttributeObserver", "unmatchedTokens", "matchedTokens", "tokens", "token", "previousTokens", "currentTokens", "firstDifferingIndex", "zip", "previousToken", "currentToken", "tokensAreEqual", "tokenString", "parseTokenString", "content", "index", "left", "right", "length", "_", "ValueListObserver", "parseResult", "valuesByToken", "error", "BindingObserver", "context", "action", "binding", "Binding", "Action", "ValueObserver", "receiver", "descriptor", "name", "defaultValue", "writer", "rawValue", "rawOldValue", "changedMethodName", "changedMethod", "valueDescriptorMap", "descriptors", "hasMethodName", "capitalize", "TargetObserver", "_a", "readInheritableStaticArrayValues", "constructor", "propertyName", "ancestors", "getAncestorsForConstructor", "values", "getOwnStaticArrayValues", "readInheritableStaticObjectPairs", "pairs", "getOwnStaticObjectPairs", "definition", "OutletObserver", "outletName", "observer", "_selector", "outlet", "dependencies", "module", "identifiers", "Context", "scope", "functionName", "detail", "identifier", "controller", "message", "namespaceCamelize", "methodName", "args", "bless", "shadow", "getBlessedProperties", "properties", "shadowConstructor", "extend", "shadowProperties", "getShadowProperties", "blessedProperties", "blessing", "prototype", "getOwnKeys", "getShadowedDescriptor", "shadowingDescriptor", "object", "extendWithReflect", "extended", "testReflectExtension", "b", "blessDefinition", "Module", "application", "ClassMap", "tokenize", "DataMap", "dasherize", "Guide", "logger", "warnedKeys", "attributeValueContainsToken", "TargetSet", "targetName", "targetNames", "target", "targets", "targetDescriptor", "revisedAttributeName", "OutletSet", "controllerElement", "outletNames", "outlets", "controllerAttribute", "Scope", "schema", "ScopeObserver", "scopesByIdentifier", "referenceCount", "Router", "contexts", "afterLoad", "defaultSchema", "objectFromEntries", "c", "n", "array", "memo", "k", "v", "Application", "Dispatcher", "defaultActionDescriptorFilters", "domReady", "controllerConstructor", "filter", "head", "rest", "resolve", "ClassPropertiesBlessing", "classDefinition", "propertiesForClassDefinition", "classes", "OutletPropertiesBlessing", "outletDefinition", "propertiesForOutletDefinition", "camelizedName", "outletController", "TargetPropertiesBlessing", "targetDefinition", "propertiesForTargetDefinition", "ValuePropertiesBlessing", "valueDefinitionPairs", "propertyDescriptorMap", "result", "valueDefinitionPair", "valueDescriptor", "parseValueDefinitionPair", "propertiesForValueDefinitionPair", "read", "write", "typeDefinition", "valueDescriptorForTokenAndTypeDefinition", "parseValueTypeConstant", "constant", "parseValueTypeDefault", "parseValueTypeObject", "payload", "typeFromObject", "defaultValueType", "propertyPath", "parseValueTypeDefinition", "typeFromDefaultValue", "typeFromConstant", "type", "defaultValueForDefinition", "defaultValuesByType", "camelize", "readers", "writers", "writeString", "writeJSON", "Controller", "_identifier", "_application", "eventName", "prefix", "bubbles", "cancelable", "event", "body_scroll_controller_default", "Controller", "event", "device_detector_controller_default", "Controller", "event", "style", "__publicField", "button_copy_controller_default", "Controller", "event", "e", "textTarget", "__publicField", "footnotes_controller_default", "Controller", "event", "sidenotesWerePossible", "sidenotesArePossible", "sidenote", "footnotes", "references", "i", "reference", "footnote", "backlink", "x", "bodyWidth", "containerWidth", "offsetTop", "offsetLeft", "__publicField", "support_us_controller_default", "Controller", "monetizationUrl", "balances", "decimalIndex", "totalBalance", "locale", "goal", "max", "now", "style", "currency", "balanceFormatter", "balanceDate", "dateFormatter", "e", "__publicField", "DeviceDetector", "Notifier", "e", "start", "Application", "body_scroll_controller_default", "device_detector_controller_default", "button_copy_controller_default", "footnotes_controller_default", "support_us_controller_default"]
7
+ }